Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×Hi,
I would like to add a validation for a number field which must be >0 in my workflow. If you want to change a transition or update the open issue and this field does not have a value which is greater than 0 it will come an error message.
How can I do this?
Thanks a lot for your answers.
BR, Markus
Hi Markus :)
My company created this plugin which greatly enhances workflow conditions, validators and post-functions.
Workflow Magic Box | Atlassian Marketplace
Using the "Field Conditional" you can choose to compare the value of a field, or even if the value of the field Is X given another field is Y.
Example: "If 'Expected costs' > 0 -> Then the field 'Approver' must not be empty".
You could also use the "regular expression validator" with a regular expression similar to
^(?:(?:0?\.\d*[1-9]\d*)|(?:[1-9]\d*(?:\.\d+)?))$
which is supported OOTB, but it's not the best solution.
Let me know if I can help!
Hi @Jaime Escribano _knowmad mood_ ,
thanks for your answer.
I would not like to use another plugin, but thanks for the information :)
But I will try the regular expression validator too how it will works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can do this by the default ootb workflow conditions, you won't need a 3rd party app for this.
Compare Number Custom Field
Value Field
Or the default Regular Expression validator.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marc - Devoteam ,
thanks for your answer!
Is it also possible to add an error message if I will use the workflow conditions?
I do not have seen such a possibility.
I tried it also with the ScriptRunner. This is working fine. But my company will not use this AddOn anymore...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No the ootb options don't have an option to provide an error message.
On transitioning the actor will receive the message that this is not possible, based on conditions not met, but a custom error message is not possible,
There is a related open feature for this, JRACLOUD-72299
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay, I have feared that.
Thanks for information!
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.