External data source field does not auto-trigger API call during ticket creation

Infos:

  • Used Zammad version: 6.5.2 (current stable)
  • Used Zammad installation type: docker-compose
  • Operating system: Ubuntu 22.04 (server)
  • Browser + version: Vivaldi 7.6

Expected behavior:

  • When a customer creates a new ticket in the self-service portal, the external data source field should immediately call our API using #{current_user.login} and pre-populate the drop-down with the correct SAP systems.
  • When an agent creates a new ticket in the back office, after selecting a customer, the external data source field should immediately call the API with #{ticket.customer.login} and show the systems without having to save the ticket or type into the field.

Actual behavior:

  • #{current_user.login} in the customer portal always results in NONE and no API call is triggered on initial form load.
  • #{ticket.customer.login} in the agent UI only works after saving the ticket, not during initial ticket creation.
  • Even when adding q=#{search.query} or providing a dummy default (*), the API is not called automatically — it only triggers once a user types into the field.
  • Hardcoding a username in the URL works fine, so the API itself is functional.

Steps to reproduce the behavior:

  1. Create a new ticket as a customer in the self-service portal.
    • Add an object field of type “external data source” with URL:
      https://…/ticket_api/syst?sap-client=999&username=#{current_user.login}
      
    • Observe that the field shows NONE instead of calling the API with the logged-in customer username.
  2. Create a new ticket as an agent in the back office.
    • Add an object field of type “external data source” with URL:
      https://…/ticket_api/syst?sap-client=999&username=#{ticket.customer.login}
      
    • Observe that after selecting a customer, the field does not call the API until the ticket is saved or the field is manually typed into.
  3. Replace the placeholders with a hardcoded username (e.g. testuser) and confirm that the API call works and the systems are shown.