How to pull new input parameter passed through a post script transition call?

Connor 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

Suggest an answer

Log in or Sign up to answer