*** 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.
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:
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.
WOULD BE GREAT IF YOU CAN POST YOUR QUERY (just want to see how you added a JQL inside the function)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Max Foerster - K15t - It worked perfectly!! Awesome
Thank you so so much. You saved me a hell lot of time.
Thanks again :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 :)
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.