Xporter - JQL - # and &&

Aija Guseva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 3, 2024

I'm trying to create a template that would export all Project Management Plan activities. Activities are sorted by epics and by labels. And I can't get the grouping to export. 

when I try: 

 

 

 

 

&{for issues}

#{for i=JQLIssuesCount|clause=project="CustDev Project Template" and labels = ProjectManagementPlan_PreSaleActivities ORDER BY issuetype ASC }

   Key: ${JQLIssues[i].Key}

   Summary: ${JQLIssues[i].Summary}

#{end}

&{end}

The exported result is empty.

When I try

 

 

#{for i=JQLIssuesCount|clause=project="CustDev Project Template" and labels = ProjectManagementPlan_PreSaleActivities ORDER BY issuetype ASC }

   Key: ${JQLIssues[i].Key}

   Summary: ${JQLIssues[i].Summary}

#{end}

 

The exported result is 600x looped - cover page, table of contents, and the first header... 

 

When entering the clause in Jira search - it lists all the needed items, I need in my template.

What am I doing wrong? 

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Aija Guseva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 17, 2024

I ended up using separate block with a specific condition and a counter and it turned into a beautiful document :)

${set(countPreSales, 0)}

&{for issues|filter=%{'${Issue Type}'.equals('Task') && '${Labels}'.includes('ProjectManagementPlan_PreSaleActivities')}}

  ${set(countPreSales, %{${countPreSales} + 1})}

  #{if (%{${countPreSales} == 1})}

Pre-Sales activities

  #{end}

${Key} - ${Summary}

${html:Description}

&{end}

 

0 votes
vikram
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 9, 2024

Hi @Aija Guseva 

Welcome to Atlassian Community. 

The script seems correct.

First we need to set some default template to create based on the script.

Please go through the below knowledge document.

Working with Templates - Xporter Cloud - Xporter (getxporter.app)

JQL - Xporter Documentation Home - GetXray Documentation Portal

 

Vikram P

TAGS
AUG Leaders

Atlassian Community Events