Forums

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

&{for issues|filter=%{'${IssueTypeName}'.equals('Bug')}} - xporter JIRA issue

mathieu adams
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!
September 23, 2014

Hello All,

 

I have a simple problem, I am trying to extract to a word template some issue using Xporter plugin

 

Here the code I have:

&{for issues|filter=%{'${IssueTypeName}'.equals('Bug')}}

Issue Key: ${Key}

Issue Summary: ${Summary}

&{end}

 

 

Export look to go well, when I open the document the document is blank.

I tried multiple way -

                        - by using the bulk export  - with only issue type Bug

                        - by using the bulk export - all different kind of issue type with Bug

 

 

I can get to work the single issue export using Clause statement instead of filter

 

This is an exact copy/paste from the support documentation on http://jiraxporter.xpand-it.com/display/JIRAXPORTER/Working+with+Advanced+Templates

 

I have JIRA 6.3.3 installed and Xporter version 3.0.2.

 

Do any one has any idea ?

 

Thank you

 

Mathieu

 

5 answers

1 vote
Rui Rodrigues
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 Champions.
October 20, 2014

Hi Mathieu,

Try this:

#{if (%{'${IssueTypeName}'.equals('Bug')})}

Issue Key: ${Key}

Issue Summary: ${Summary}

#{end}

 

Best,

RMRodrigues

Rishikesh Dugyala
August 15, 2018

Hello @Rui Rodrigues 

How we can have mutliple values like how we can use OR functionality if Issue Type equals Bug or Task. Please let me know if you can able to define the script.

Thanks,

Rishikesh.

Rui Rodrigues
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 Champions.
August 27, 2018

Hi @Rishikesh Dugyala

the code between %{...} is javascript. So, you can add multiple conditions.

Sample:

#{if (%{'${IssueTypeName}'.equals('Bug') or '${IssueTypeName}'.equals('Story') or '${IssueTypeName}'.equals('Task')})}

Issue Key: ${Key}

Issue Summary: ${Summary}

#{end}

Cheers,

Rui Rodrigues

Like Yanet Morales likes this
Yanet Morales
Contributor
June 17, 2020

I will try this. It could save my day! Thanks

0 votes
Rachel Bailey
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!
July 30, 2019

Hi,

since the queries are in javascript, one needs to change the "or" with || and the "and" with && giving the following:

#{if (%{'${IssueTypeName}'.equals('Bug') || '${IssueTypeName}'.equals('Story') || '${IssueTypeName}'.equals('Task')})}

Issue Key: ${Key}

Issue Summary: ${Summary}

#{end}
0 votes
Mehmet Kazgan
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 Champions.
September 24, 2014

And have you tried JIRA reindexing?

0 votes
mathieu adams
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!
September 23, 2014

Mehmet,

Thank you for the quick reply.  I just tried your proposal but still did not work. Any other suggestions ?

 

Thank you

 

Mathieu  

0 votes
Mehmet Kazgan
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 Champions.
September 23, 2014

Did you recently upgrade the plugin? I would suggest re-installing 3.0.1 and try that.

Suggest an answer

Log in or Sign up to answer