You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
I'm working on a projet where I have a screen with custom fields on it, I would like to use a validator using jira expression.
I read the documentation but I didn't understand how to use it on a custom field.
Hi @Koceila CHERGUI ,
Welcome to the community!
You will need two things to use Jira Expressions in a Validator in Jira Cloud. First (like @Fabian Lim correctly mentioned) , you need a workflow app that supports Jira Expressions. In my biased opinion Cloud Workflows is the easiest option, although there are also other options in the marketplace.
Second, you need to know the ID of your custom field. And that's it. You can now use an expression like this:
issue.customfield_10019 != "foo"
To ensure that your custom field is not set to "foo".
Of course, Jira Expressions are pretty powerful but can seem a bit daunting at the start. If you just want to play around with them before committing any buying an app, there's a free app called Expression Tester to let you do just that.
Hope that helps,
Oliver
Full disclosure: I work for the vendor who created Cloud Workflows and the Expression Tester. I'm also quite a big fan of Jira Expressions. Let me know if you need any help getting started.
I would like to thank you for your reply.
I understand more about it.
Koceila.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey guys,
I am in a similar situation. My use case is I want to validate on a custom field where if the custom field has an option selected from the dropdown say "x" then I want the user to fill out a different field on the "close issue screen"
I used the Jira expression JWT to say "issue?.customfield_10152?.value == "x" then on close show an error saying "Please fill out xyz field before closing" . But this somehow doesn't seem to work. Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nikita Rao ,
in this case, you probably need a conditional operator (see https://apps.decadis.net/pages/viewpage.action?pageId=38569652#expand-Examplesofusingtheconditionaloperator) like
issue?.customfield_10152?.value == "x" ? issue?.customfield_##### != null : true
replacing ###### with the custom field ID of your xyz field.
With this expression, the xyz field must not be empty if your 10152 field equals "x". Otherwißse the condition is true by default.
Please let me know if that solves your request.
Cheers,
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Koceila CHERGUI,
Take a look at this tutorial on transition screens which describes how you can add validators end to end. Link: https://www.youtube.com/watch?v=RIKYX-z4meM
You may have to purchase a certain plugin such as JSU to have the expression validator: https://beecom-products.atlassian.net/wiki/spaces/JSU/pages/25680565/Regular+Expression+Check+Validator
I hope this helps
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.