Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,649
Community Members
 
Community Events
184
Community Groups

Trying to add validators in Jira workflow for universal validator?

Edited

I am trying to check for the custom field "Create sub-tasks" which is a radio button and has the following value - None, Yes, No. I want to add a validator to check if the value is either Yes or No. However, when I have placed the validator, it shows me some errors.

Here is my custom field - Create sub-tasks. 

 

SubTasks.PNG

 

Here are the errors I get.

Expression_validtaor.PNGValidator_Expression_Failed.PNG

2 answers

1 vote
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 01, 2023

Hey @shreyasjoshi11 - I think you're using Workflow Enhancer for Jira, yes? Huh, their validator syntax looks similar to Jira Expressions (on Cloud), but I now realize this is a DC/Server app. Neat.

So anyways, when you create a custom field of type Radio Button, if it is not set to be Required, then the "None" option shows up automatically.

But as @Alex Koxaras _Relational_ correctly points out, it holds a value of 'null'.

But because you want the validator to "pass" if the custom field is NOT null, I think you need to check for the converse:

{Create Sub-tasks} != null

It says - Parsing of the expression has failed. Please check its syntax. You entered: {Create sub-tasks} != null. This expression will always evaluate to <b>false!</b> System message: Lexical error at line -1, column -1. Encountered: "-" (45), after : "{Create sub"

 

I am using - 

Update parameters of the 'Universal Validator' Validator for this transition.

 

Yes, it is hosted on the server rather than the cloud.

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 02, 2023

Ah, ok, looks like this add-on doesn't support the word 'null'. I got it to work with an expression like this:

{Create Sub-tasks} != ""

Please let us know if this works for you!

Still it doesn't work - 

 

Parsing of the expression has failed. Please check its syntax. You entered: {Create Sub-tasks} != &quot; &quot;. This expression will always evaluate to <b>false!</b> System message: Lexical error at line -1, column -1. Encountered: "-" (45), after : "{Create Sub"

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 03, 2023

Hrm. It might be case-sensitive. Try:

{Create sub-tasks} != ""

 (I got your field name wrong.)

(Also it maybe doesn't like the -.  Can you also try:

{Create sub\-tasks} != ""
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 04, 2023

Ooof, I gave that a try and it also did not work. You probably should contact TNG Technology's support since this is their add-on.

Or maybe @TNG Technology Consulting GmbH might be able to weigh in on this here for those of us who are interested.

The question is why in Workflow Enhancer for Jira @shreyasjoshi11 is unable to create a Universal Validator with a field name that contains a hyphen.

Matthias Bertsch [TNG Technology Consulting]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Apr 04, 2023 • edited

Hello @shreyasjoshi11,

We are sorry to hear that you experience issues with Workflow Enhancer for Jira. Thanks @Darryl Lee for mentioning us.

Unfortunately, I am not able to reproduce your issue locally. Referencing fields that contain a hyphen works fine for me.

May I ask you a couple of questions:

  • Are you sure the field is called "Create sub-tasks" or might the real name be different, e.g., due to a translation configured for the field name?
  • Can you try to work with the custom field id instead, i.e., using {customfield_XXXXX} != "" with XXXXX replaced by the id of the custom field?

If this does not help, may I ask you to open a support ticket at https://tngtech.atlassian.net/servicedesk/customer/portal/16? Then, we can have a closer look together.

Like Maksim Lebedev likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 04, 2023

Huh - really odd. I could exactly replicate @shreyasjoshi11 's issue by renaming my field "Create sub-tasks". Well, I look forward to finding out whatever the fix is. Thanks for the response, @Matthias Bertsch [TNG Technology Consulting] !

1 vote
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 01, 2023

Hi @shreyasjoshi11 ,

I'm not familiar with the specific app, but you could write the expression like:

{Create Sub-tasks} == null

It would be helpful if you could specify the app which you use.

It says - Parsing of the expression has failed. Please check its syntax. You entered: {Create sub-tasks} != null. This expression will always evaluate to <b>false!</b> System message: Lexical error at line -1, column -1. Encountered: "-" (45), after : "{Create sub"

I am using a universal validator and my JIRA is hosted on the server and not cloud.

Suggest an answer

Log in or Sign up to answer