1
votes

At the moment I'm working on development of new WorkFlow in Jira and have a case, that I don't know how to implement.

We have several statuses in our dev cycle, - such as "Waiting for reproduce" and "Developemnt", - mostly it depends on the current assignee of the bug, - if it the QA - status is "Waiting for reproduce", if developer - "Development".

At the moment when creating a bug it can be assigned on the creation step to qa, or developer, or pm. So I need to make a condition like this:

if assignee in group "Developers":
  status = "Development";
elif assignee in group "QA
  status = "Waiting for reproduce"
else:
  status = "Open"

I need to make this condition transition on "create" step and on other steps... Can you advice me some tricks or links, that can help me to handle this case?

Best regards, Alexander.

2

2 Answers

1
votes

this can easily be done using Jira Scripting Suite:

# get the current assignee
assignee = issue.getAssignee()
if assignee.inGroup('Developers'):
    # set new status
    issue.setStatus(stateNumber.toString()) # status number as string, i.e. "6"
else:
    .....
1
votes

I would recommend the Groovy ScriptRunner Plugin.

You can achieve your goal by introducing a new status directly after creation. From this new status create transitions to all statuses you need (e.g. "Waiting for reproduce" and "Developemnt").

In the "Create" transition you then use several Fast-track transition an issue post-functions - each for one condition you need. The condition would look like something like this:

groupManager.isUserInGroup(issue.assignee, "QA")