Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Update field in external tool using ScriptRunner Cloud

Callum Carlile _Automation Consultants_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2020

Hi all,

I'm using ScriptRunner for Jira Cloud, and am wanting to update a field in an external tool when a Jira field is updated.

Each Jira issue is given a Custom field A value upon creation, a unique ID matching to a corresponding field with the same ID in the external system, and Custom field B, a single-select list field which is also present in the external system, which is given a value at some point during the workflow.

When Custom field B's value is changed in Jira, I would like a script to run which finds the task in the external system with the same unique ID in Custom field A, and copies across/updates the value given to Custom Field B.

My knowledge on scripting/ScriptRunner is very minimal, so any help would be greatly appreciated!

1 answer

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 5, 2020

Hi Callum,

Thank you for your response.

I can confirm that with ScriptRunner with Jira Cloud that it is possible ti write scripts which interact with external systems and you can see further information on how to do this in the Knowledge Base Article here which explains ways to understand how the external third party API works.

You would then write a script configured as a Script Listener to run on the Issue Created event and your script would then have some logic in it to check if Custom Field A had specific value using an If statement and if it did then it would have some logic to call the external system and to update the value in custom field A.

I can confirm we have the example in the documentation here which shows how to call Slack and is an example of calling an external API that you can use as a reference as well as the examples here and here which show how to update fields on an issue that can be used as a reference to help you create the script that you require.

I hope this information helps.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events