Xporter stopping at first loop

Scott Steele October 27, 2014

I am currently trying to create an Xporter template where it runs through a few for loops and prints the required information. However, when I do the export, only the information from "Project 1" is showing up on the created Word document. Is there something incorrect in the following:

 

&{for issues|filter=%{‘${ProjectName}’.equals(‘Project Name 1’)}}                              

         ${Key}  ${Summary}

&{end}

 

&{for issues|filter=%{‘${ProjectName}’.equals(‘Project Name 2’)}}                             

         ${Key}  ${Summary}

&{end}

 

&{for issues|filter=%{‘${ProjectName}’.equals(‘Project Name 3’)}}                             

         ${Key}  ${Summary}

&{end}

 

 

Thank you in advance!

Scott

1 answer

1 vote
Pbratlien November 11, 2014

I am playing with it too looks like you need to create something like in the FAQ

 

Iterating more than one level of links

Xporter for JIRA only allows to directly iterate one level of Links for an issue. If you want to iterate the linked issues of the linked issues, you should do it as provided in the example below:

 

Issue ${Key} has ${LinksCount} links. Below is the list.
#{for j=LinksCount}
   Linked Issues of ${Links[j].Key}:
#{for m=JQLIssuesCount|clause=issuekey in linkedIssues (${Links[j].Key})}
      Linked Issue ${JQLIssues[m].Key}
#{end}
#{end}

or 

#{for i=JQLIssuesCount|clause=project = DEMO}
${JQLIssues[i].Key} - ${JQLIssues[i].Summary}
#{end}

 

Sridhar Ramakrishnan December 7, 2015

Can you help me merge your suggestion to my code. Would like to see the sub-tasks of the associated linked story. Thanks a bunch for your help!!

#{if (%{${SubtasksCount} > 0})}

SUBTASKS        

 

Key

Assignee

Summary

#{for subtasks}

${Subtasks[n].Key}

${Subtasks[n].AssigneeUserDisplayName}

${Subtasks[n].Summary}

 

 

 

#{end}

#{end}

 #{if (%{${LinksCount} > 0})}

LINKED BUSINESS PRODUCTS

 

Key

Link Type

Summary

Description

#{for links}

${Links[n].Key} has ${LinksCount}

${Links[n].LinkType}

${Links[n].Summary}

${Links[n].Description}

 

 

 

 

#{end}

#{end}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events