How can i allow only to creator to make the transition?

Hi all,

i would to know is it possible to select that only the creator of an issue can make some specific transition. We have 3 fields Assignee, Reporter and Creator of an issue. I want to restrict that only creator can make the transition. Is there any way to do that? I also tried with Groovy script but i don´t understand this groovy scripting. 

Thanks 

3 answers

Hi Harris,

If you use script runner for your script then your condition should be 

currentUser == issue.creator

or else I suppose you can get the caller, something like 

def caller = transientVars.get("context").getCaller()
return caller == issue.creator.key

regards, Thanos

Hi Thanos,

i saw that i need to import some managers at the begin of the script. I don´t understand which Managers should i import. Should i only add this lines to the Groovy field or?

Thanks

Hi Thanos,

i saw that i need to import some managers at the begin of the script. I don´t understand which Managers should i import. Should i only add this lines to the Groovy field or?

Thanks

 

Is this a script runner Fast-track transition an issue ? If that is the case then you do not want to import anything in the Condition field. 

For example:

  1. State = Analyzing
  2. State= Implemented

    Between this two states there is a transition with the name "Analysis done". I want now that only the "Issue Creator" this "Analysis done" transition can do (only the person who created the issue can make this "Analysis done" transition)

Thanks

Haris,

do you use the ScriptRunner plugin ? I cannot answer if i don't know more details (there are more than one plugin that make use of groovy scripts) ... 

Sorry smile I am using JIRA Misc Workflow Extension Plugin. With this plugin is also possible to write groovy scripts. 

Thanks

ok then I am not exactly sure about the syntax but should be something like 

import com.atlassian.jira.component.ComponentAccessor

def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
return currentUser == issue.get("creator")

Hi,

it is possible without using Script Runner. When you change your workflow, you can define conditions for a transition. So go to the transition, click on conditions and add a new one. There is already the "Condition Only Creator" predefined. (Not sure what the exact wording is in english, my JIRA is in german wink).

That's the way, it works for us, and it works fine.

Regards.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

220 views 1 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you