Using the examples from XpandIT's Working With Advanced Templates documentation, how do I export just the total number of values resulting from this query and print that into a new line / cell? It seems like it should be really straight forward, but I'm missing something
#{for i=JQLIssuesCount|clause=project = DEMO} ${JQLIssues[i].Key} - ${JQLIssues[i].Summary} #{end}
Ex: say in this code example, DEMO has 5 issues. so i = [0,1,2,3,4] I assume as an array of values totaling how many were found in the query. How do I print the total count of values in that array so that my exported cell has a value of "5"?
#{[i]} shows #{[0]} or #{[1]} or .... as iterates
#{JQLIssuesCount[i]}
#{i}
Hi Geoff Wilson,
You just need to use the var: JQLIssuesCount to get the value. In this case: ${JQLIssuesCount}
Thank you.
Cheers,
RMRodrigues.
I honestly do not remember what I was trying to do with this question, but this answer would likely make sense as JQLIssuesCount I guess is aware of what query took place and you can then put ${JQLIssuesCount} anywhere if so ... or only within that iteration? I have no idea haha. Only found this old question of mine by once again trying to tinker with Xporter and having tons of problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a similar question.
I want to print out the actual counter to produce numered headings "User Story 1...2...3" in my document.
I ve tried something (JQLIssues[stories], stories, stories.toString()...) but can't figure it out.
... #{for stories=JQLIssuesCount|clause=issue in linkedIssuesByDepth('${JQLIssues[epics].Key}', 1, 'fordert an') and issuetype = Story and ... } User Story ${stories} ${wiki:JQLIssues[stories].anyContent} #{end}
Can give me a hint, please?
Thanks in advance
Jörg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jorg,
Here is an example:
#{for stories=JQLIssuesCount|clause=project = DEMO} ${JQLIssues[stories].Key} (Issue ${stories} of ${JQLIssuesCount}) #{end}
Cheers,
Rui.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thx Rui,
so ${stories} was always right. With your examle in my template it looks like ... (Issue of 10).
I am using XPorter Version 4.3.10-j6, since last week
Jörg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The example above is for Xporter 5.
For version 4, it's a little bit more tricky, but it works
#{for stories=JQLIssuesCount|clause=project = DEMO} ${JQLIssues[stories].Key} (Issue %{stories =+'[stories]'.replace(/\D/g,'')+1;stories.toString()} of ${JQLIssuesCount}) #{end}
Try it. It must work like a charm.
Cheers,
Rui.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did it work?
Cheers,
Rui.
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.
Great.
Cheers.
Rui Rodrigues.
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.