Using issue index in Xray document generator

Wilfred Janssen August 8, 2023

Hello,

 

I'm using the Xray document generator templates. I want to number my issues in the resulting table. The loop runs over &{for issues}. From the documentation I get the impression that &{n} should give me the index number of the issue in the loop. But this gives me an empty result. What is the correct way to get the index printed in the table ?

2 answers

0 votes
Chitra Raj March 1, 2024

Hi @Wilfred Janssen an @Mia Smith 

Declare and initialize a variable before the "for" loop:  ${set(count,0)}

then just after "for" loop , do the increment : ${set(count,%{${count}+1})}

It works.

0 votes
Mia Smith August 8, 2023

It seems that &{n} isn't working in the Xray document generator templates to number issues. The correct way may vary based on the specific version and tools you're using. Since the documentation is not clear, consider consulting official support or community forums related to Xray for the precise syntax required to print the index in your table.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events