I am trying to consolidate a large number of workflows which other than one or two things are identical. One project likes to assign the assignee as a post function. When the workflow was only for that project it was easy. Now I would need to see if the workflow was happening for that project instead of any of the other four. Is this something that script runner can do in a post function?
if project = 'xyz' then the assignee of the issue will be set to 'abc'
Indirectly, yes.
A post-function is part of a transition. Transitions happen to issues. Issues belong to projects.
So, issue.getProjectObject() will give you the project to work with (which you can then ask for key, name, and the other project details to feed into your assignee logic)
Can you point me to a sample script that would get me started on writing this post-function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've already given you the code to get the project. Have a look at https://docs.atlassian.com/jira/server/ for what you can do with it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.