Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira-XRAY document generator conditionals

LAL
Contributor
October 19, 2020

Im trying to loop through all linked issues of a test. I want to print "No created issues" if none are found or print a list of issues if there are some.

How can this be done using xray document generator? It doesnt seem to have an "else" conditional and i have no idea what are the return types of various filters are since they dont seem to have been documented.

Using this for loop i can loop through all the correct linked issues, but i have no idea how to turn this into a if clause.

#{for k=Tests[n].LinksCount|filter=%{'${Tests[n].Links[k].LinkType}'.equals('created')}}

Does any one know a solution to this?

Im specifically interested in a way to know if there are no issues of certain type.

1 answer

1 accepted

0 votes
Answer accepted
Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2020

Hi @LAL

You can see here the related information about Iterations and here how to create a Conditional Block.


I also suggest you open a ticket at our Service Desk and attach the template you are using so we can investigate this further, and help you to get the information you need.
Thank you.

Best Regards, 

Sergio.

_______________

Solution Architect and Testing Advocate @Xray

Personal blog on testing, Agile, and software development: https://sergiofreire.com

Follow me on Twitter: https://twitter.com/darktelecom

LAL
Contributor
October 26, 2020

Ive read the documentation, but ive found it to be very unintuitive and lacklustre.

Listing returnable values would be a BIG improvement to the docs.

I used "set" function and a variable to check if loop has been run. This is basically how i made an "else" loop.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events