I want to use the Script Condition [ScriptRunner] in the Workflow.
I want to set up a condition stating that, Issue type of Risks should not go over to the 'Accepted' status.
So, at the transition to 'Accepted', tried adding the below Script condition, but it does not work. Any help of this please,
if(issue.issueType.name == 'RISK')
return false;
@Tansu Akdeniz Hi, Thank you for the reply.
I tried using the condition you have mentioned, but it still does move to Accepted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried in my local Jira without a problem. So, you still see the transition button although issutype is risk?
Could you please send me a screenshot of a condition? Also make sure that the name of issuetype is right. There could be a case sensitivity problem?
issue.issueType.name != 'Risk'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, It still transitions to Accepted. Well, due to compliance issues, we don't have screenshot enabled; Sorry
We have project wise workflows. So, there are many issue types associated with the workflow.
So, I tried adding the Scriptrunner condition at the Transition step from Ready to accept (status) to Accepted (status)
Maybe do you think I need to add any additional script along with the script line you have mentioned ?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here it is;
Btw, if you have JSU add-on, you can also do the following;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tansu Akdeniz Thank you so much !!!!!!!!!!!! Its working fine now :)
I think the issue was, I had added the condition to the ' Custom script condition' instead of the 'Simple script condition'
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.