When the condition is met, everything is fine. But when the condition is not met, it just tells the user the generic error message :
It seems that you have tried to perform an illegal workflow operation.
If you think this message is wrong, please contact your JIRA administrators.
Here is the error log. Changes some details such as username, etc.
2014-12-23 21:46:58,071 http-bio-8088-exec-21 ERROR username 1306x53162x1 10xnx6j 10.228.24.117,127.0.0.1 /secure/WorkflowUIDispatcher.jspa [scriptrunner.jira.workflow.ScriptWorkflowFunction] Script function failed on issue: issuekey, actionId: 41, file: null
[InvalidInputException: [Error map: [{customfield_12345=Defined Error Message}]] [Error list: [[]]]
Community moderators have prevented the ability to post new answers.
cfValues['My Single Select']?.value == "Some value"
worked for me. when i was getting similar errors as others.
Checked out the latest script runner docs. https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/validators/simple-scripted-validators.html
We have the same error with JIRA 6.3.15 and Scriptrunner 4.1.3.5.
Capture.PNG
When Sponsor is equal towards '?', we get 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.
When Sponsor is NOT equal to '?' the workflow is going towards the next status without any problem?
Seems that the Validator is doing his job, although he is not showing the error message I defined.
Please help...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This happens when the Sponsor field is not on the transition screen where the validator is, or there is no screen. If that's the case set the Field dropdown to empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! I am facing the same error. My Jira version is 6.2.2 and Script Runner version is 3.0.16. Still 'Error message' is not displaying against 'Field'. It only gives generic error message. Please help me to get out of this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've made a new comment to add the screenshots. Thanks again Jamie! And I'm really sorry for replying just now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Capture.PNG
The whole script is '<div font style="color:#f5f5f5;">A</div>Received Submissions' in cfValues['GDS STAGE 3 : MICRO CLEANING']*.value && '<div font style="color:#f5f5f5;">C</div>Preloaded Submissions' in cfValues['GDS STAGE 3 : MICRO CLEANING']*.value && '<div font style="color:#f5f5f5;">E</div>Submissions Loaded' in cfValues['GDS STAGE 3 : MICRO CLEANING']*.value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your condition looks bogus, seems to be html in it. Maybe copied and pasted from answers or confluence or something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We needed to add color and have some order on the Options of the Checklist. One order on how it is displayed on the Dashboard and One order on when it is being populated or on screen. So That font color hides the 'A' on the Dashboard that decides the order. Option order on the Dashboard is arranged alphabetically. Quite annoying but it makes the higher ups happy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hrm... I don't think that's a good idea at all. But in that case I would say this is a similar issue to https://jamieechlin.atlassian.net/browse/GRV-588.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried another one and just chose from the examples and still got the error. Anyway, I'll keep testing and let you know if I found something that might help us solve this. Thanks as always Jamie!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie! I've now been able to get the same results with GRV-588. The message is now shown but sitll has the other error messages as well. I think it has something to do with the validation not being done on a step that has no transition screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Marc - I think you are confusing validators and conditions. In your question title you mention validators, in the description you mention conditions. Conditions can't show an error message... maybe a screenshot of the workflow config might help. There is a jira issue with conditions: https://jamieechlin.atlassian.net/browse/GRV-588
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can't reproduce this problem now, although I thought I was able to previously.
My validator looks like this:
image2015-1-9 11:16:48.png
When I try to resolve not using Won't Fix it looks like this:
image2015-1-9 11:17:57.png
I am using JIRA 6.3.12 and latest script runner. What else do I need to reproduce a problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, I couldn't reply with an image so I made a new 'answer'. Sorry for the late reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are using JIRA 6.2.7 with Script Runner 2.1.17 and another instance of JIRA 6.2.7 with Script Runner 3.0.7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here. Using JIRA 6.3.12 and SR 3.0.7. Even when using one of the examples instead of getting an validation error on the selected field, we jsut get that generic error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue here with JIRA v6.3.12 and Script Runner v3.0.7.
In addition, the error text did not appear related to the specified field but was always centered in the browser window.
Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is a jira issue, something between 6.3.7 and 6.3.12 iirc. I will try to look into it more later.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not as simple as that, and the bug you created didn't have nearly enough information for me to do anything with. Try the condition: true Does the error message show up then?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie, I have added condition : true But still error message is not showing up.Can you please help with systax. https://jamieechlin.atlassian.net/browse/GRV-682 Thanks In Adavance Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post a screenshot of the workflow configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie - The error occurs when there is no Transition Screen used. Otherwise, error messages are displayed properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes,Marc it is working fine if add transition and validate field on the screen. Jamie: we have almost 20 transition with out transition screen.To resolve error messages issue, Adding transition screens to transition..it will not make sense to management. Please suggest us to "showing error message". with out transition screens. thanks for you Jamie.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just finished testing. Same results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could try upgrading to SR latest version... it's compatible with 6.2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also tried it with a transition screen. No message shown there either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried it. Still shows the same generic error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that second code will only work for single selects or radio buttons, and only the last statement will have an effect. Can you replace your code with just "false", ie make it fail, and see if that gives you the proper message?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to add, the validation (condition && condition && condition) works perfectly. It validates as expected. Its just the error message which is not being shown when the condition is not met.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the validator code via Simple Scripted Validator: 'ChecklistItem1' in cfValues['ChecklistField']*.value && 'ChecklistItem2' in cfValues['ChecklistField']*.value && 'ChecklistItem3' in cfValues['ChecklistField']*.value I used the following code on another Checklist Field but it does not seem to work for the current Checklist Field I'm working on: cfValues['ChecklistField'][0].getValue() == 'ChecklistItem1' cfValues['ChecklistField'][1].getValue() == 'ChecklistItem2' cfValues['ChecklistField'][2].getValue() == 'ChecklistItem3' Thanks and Merry Christmas!!! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would upgrade to Script Runner 3, although don't know if that will help. What is your validator code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using JIRA v6.2.7 & Script Runner 2.1.17
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.