The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the issue that called a script using ScriptRunner?

Richard Pirtle
December 23, 2020

I have a script set up to pull attachments and send them off to get graded for content. Currently, it is set to key off one test issue. I would like to know how to get the script to know which issue called it and pull the correct attachments.

Thank you.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Ismael Jimoh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
December 23, 2020

Hi @Richard Pirtle 

Where is your script placed? Workflow post function or Script listener?

In the former, using issue should return you the exact issue whereas with the later, you can check it with event.issue which shows you the issue which triggered the event.

Knowing where you placed the said script makes it easier to suggest.

Regards

Richard Pirtle
December 23, 2020

Hi Ismeal,

Thank you for the quick response. I have it currently set up as a workflow post function.

Richard Pirtle
December 27, 2020

Everything works great! Thanks for the quick response.