I have a specific requirement, where we want to do some processing (on the issue) behind the scene once a file is attached to the issue.
I am trying to achieve this through scriptrunner plugin. I am able to catch the event once the file is attached. I am also able to fetch that particular attached file in my script but I am not able to find the issue key for the issue where that file is attached. Unless, i have the issue key, I can't change the issue fields in my script.
Please help on how this can be achieved. Note that i am using Jira Service Desk Cloud version.
Please try the getKey() method.
def myIssue = event.issue
def myIssueKey = myIssue.getKey()
Something like this should work if you are fetching from an event.
If it is from a workflow, they a simple issue.key should normally return your issue key.
Can we get the issue on "Attachment created" Event on script listener (script runner cloud version) as there is no "event" keyword defined! all i can find are following variables
webhookEvent (type: String in our case the value is attachment_created)
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events