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
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 ).
That's the way, it works for us, and it works fine.
Regards.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For example:
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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) ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry I am using JIRA Misc Workflow Extension Plugin. With this plugin is also possible to write groovy scripts.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.