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 to pull new input parameter passed through a post script transition call?

Connor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2019

I am in the process of creating a custom script that, based on correct validation, updates a custom field of the next issue being called through:

issueService.transition(appUser, transitionValidationResult)

Where transitionValidationResult has the new value of the custom field being updated. When trying to access that field for the new value in the issue being transitioned using

def CFM = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName('Validated').getValueFromIssue(issue) 

I never get the updated value of the custom field, i am always returned the default value the field was set to. I am trying to get the new value that was passed so that i can run some code based on its value. I am assuming this is due to the value not being committed to the database until the transaction is complete, but i am not sure. Is there a way to pull the new value of the custom field during the transaction? There is currently no screen attached to this phase of the workflow, so is that something that needs to added in order to pull the value? If so, how would i do that? 

 

Current JIRA version is 6.3.15 and current scriptrunner version is 4.1.3.28

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.