HI,
I have a post function (using ScriptRunner) to update assignee and some other custom fields. It has the script to update the status as well. However, I am then left in a bogus state (even if it's status is in the same workflow, which some are not).
My question - has anyone been successful with using ScriptRunner to update issue status with a Post Function. If so, how?
I believe I need to set the workflow too but not seeing how to do that! Help please!
No, you never update the status in a post-function. To change the status of an issue, you use a transition. Embedding a status change inside a transition can only have two effects - it corrupts the data the transition is working with, or it goes into a cascade with a possibility of an infinite recursion (i.e. it'll pause and then crash Jira)
Remove the code that is corrupting the status. Step back and look at what you were trying to achieve. (If you're stuck on how to do it, by all means, ask here)
Thanks Nic,
The team wants to be able to "Escalate" a ticket from one group to another. While "Escalating", they want to update certain fields like Assignee, custom fields and the status (because the group they escalate too uses a different workflow).
I'm essentially trying to automate a "Move" using code and adding some changes to custom fields. This is because the team does not want to have to do this themselves/manually (I know, I know).
I'm currently using a transition to "Escalate" to each different team (they have multiple) and in the transition I'm updating status (because it moves to a different Request Type which has a different workflow).
I don't know another way to do this any other way. Is there a way to automate a "Move" and then I could script the other fields?
Appreciate any help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.