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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot