Is there a way to access the Jira ticket URL directly within the Exalate trigger?

Originally asked by Alastair Wade on 14 July 2023 (original question)


I would like to pass the Jira ticket URL to Zendesk and am wondering if within the Exalate trigger I can access the Jira smart value ‘{{issue.url}}’ or similar i.e. replica.some_variable = issue.url ? I have tried a few variations around this to no avail. By the way, I do realize I could use the smart value within Jira itself and assign to a new field that stores the URL then pass that across to Zendesk but would prefer to avoid this if possible.


Answer by Syed Majid Hassan on 19 July 2023

Triggers are used to add automation in Jira i.e. it is a way of telling Exalate which issues need to be sent to the other side. They cannot be used to pass data.

Instead, you can pass any sort of data within your Outgoing script in Jira by packaging it into the replica variable. In fact, you can already access the issue key from Jira in the Zendesk incoming scripts using the variable replica.key. So, for instance if you wanted to populate the Jira URL into a custom field called RemoteURL in Zendesk, the following line in ZD incoming script should do it:

issue.customFields."RemoteURL".value = "https://<<your_domain_name>>.atlassian.net/browse/" + replica.key

Please let me know if this helps.

Thanks

Majid


Answer by Alastair Wade on 19 July 2023

Yes, I was referring to the outgoing script in fairness but to confirm, your suggestion works perfectly! Much appreciated.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.