New at scriptrunner and was trying to see how it works.
Tried the following example in one of my workflow transition (validator):
Get the following error:
It seems that you have tried to perform an illegal workflow operation.
If you think this message is wrong, please contact your JIRA administrators.
Can someone please assist?
Tried to add a transition screen, which somewhat works, except the screen is shown regardless of whether the condition is true or false and sort of defeats the purpose.
That's not what Conditions do. A condition is a pre-check that returns true or false to Jira. If true, the transition appears on screen and the user can perform it. If false, the user is not offered the transition at all.
Where did you see your code (that does not work)? I suspect the error is because originalissue is not a thing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
Thanks for replying...
I'm trying to add a validator (simple scripted validator):
Here's the code behind it:
Seeing the following regardless of whether the assignee is Unassigned or assigned to a user:
It seems that you have tried to perform an illegal workflow operation.
If you think this message is wrong, please contact your JIRA administrators
Tried the following:
Results:
All I really want to do is:
Me thinks I may just be missing something here just for being a newbie on this and any help is appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, sorry, I looked in the wrong place too. "Condition" and "Validator" have specific meanings in Jira and unfortunately, the SR team has used "Condition" in the config UI - it's right, but it confused me.
In Jira speak, validators, conditions, post-functions and triggers are chunks of code you add to a transition. A validator is similar to a condition, but it checks data after the user has entered something in the transition screen (if there is one)
To get the behaviour you describe, you will actually need to create two transitions from and to the same place, because that's not how transition screens work.
On one transition, give it your "assignee" screen. Add a condition of "check assignee is empty", and a validator to check it has been filled in by the user.
On the second transition, do not give it a screen. Add a condition of "check assignee is not empty"
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.