Forums

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

Access to Transient Vars in Payload to a Post Function?

Bruce Mohler
Contributor
October 2, 2019

My goal is to see whether I can determine the name of either the previous or next status from within the Post Function groovy script.  I'm hoping that it might be derived from the payload passed to the Post Function or that it can be retrieved from the issue itself.

I'm guessing that I'd need to know the name of the workflow as well.

Code examples would be extremely helpful.

Thank you, in advance.

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
October 2, 2019

The issue object that a post-function has access to is a "mutable issue" - it contains a reference to the current issue (meaning, the data that is on it now), and any new values that should be going to update the issue (it's passed validation, there may be new data other than the target status)

https://docs.atlassian.com/software/jira/docs/api/8.4.0/index.html?com/atlassian/jira/issue/fields/AssigneeSystemField.html should be a starting point  (apologies for assuming "latest version" if that's not right)

Suggest an answer

Log in or Sign up to answer