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

Validation error to display issue keys

Edited

*** This is for JIRA Software not Cloud***

Hi guys,

Need your valuable help on this. I want to display the issue keys returned as a result of a JQL in error message of JIRA validator named: "Validation based on JQL query (by JWT) "

I tried using ephemeral number 1, but it displays count of those issues. I tried ephemeral string 1, but shows nothing! How can I resolve this issue.

Many thanks in advance.

2 answers

1 accepted

2 votes
Answer accepted
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 04, 2020 • edited

Hi @simarpreet singh

let me give you an example of the easiest and quickest way to achieve what you are looking for. I searched for unresolved sub-tasks of an issue in my example and configured the boolean expression to return "true" when the number of returned issues equals zero. ( "{00058} = 0" ).

An example validator message using the advanced parsing mode could look like this.

"The issue/s " + toString(issuesFromJQL("insert your JQL query here")) + " are still unresolved".

Simply add your JQL query from before into the expression parser function issuesFromJQL. It will return the issue keys as a list and the validator error message will then look like this:

validator_error_message.png

If you need to validate more complex scenarios that are not possible using JQL, I would recommend using the boolean validator instead. The expression parser functions documented here enable you to easily realize more advanced validations.

I hope I could help you out and please let me know if you have more questions.

Best, Max

Hi @Max Foerster - K15t - 

Your answer seems pretty straight forward and working! But I don't know why I'm getting syntax error. I'm doing whatever you mentioned. Please check screenshots.

ss2.PNGss1.PNG

 

WOULD BE GREAT IF YOU CAN POST YOUR QUERY (just want to see how you added a JQL inside the function)

Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 04, 2020

Hi @simarpreet singh ,

looking at your query I'd say you're just missing a + between "project =" and the virtual field for the Project key.

Try this one instead, I chose a slightly different formatting:

toString(issuesFromJQL("project = '" + %{00018} + "' AND issuetype ='" + %{00014} + "' AND 'Ref ID' ~'" + %{20300} + "'"))

I would also be very careful with blank spaces in front of keywords like AND. Let me know if that works for you.

Best, Max

Thanks @Max Foerster - K15t - It worked perfectly!! Awesome 

Thank you so so much. You saved me a hell lot of time.

Thanks again :)

Like Max Foerster - K15t likes this
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 04, 2020 • edited

You're welcome! Have fun with Jira Workflow Toolbox and feel free to reach out to our support or ask further questions in the community using a tag like "JWT" or "Jiraworkflowtoolbox"! And please do not forget to accept this answer so other members of the community can see that it has been answered already.

Best, Max

0 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 04, 2020

Hi, I never used it but I found "%{00061}" as code for issue key in the documentation (https://apps.decadis.net/display/JWT/Condition+and+validation+based+on+JQL+query).

Hi @Martin Bayer _MoroSystems_ s_r_o__ -

I used this, but it prints null, don't know why! Nevermind, the solution by Max above worked for me.

Thanks for your help :)

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 05, 2020

Hi @simarpreet singh , great to read the Max's solution works for you :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events