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

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 Leaders.
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.

Suggest an answer

Log in or Sign up to answer