Using Conditional Block in Xporter

Jamshaid
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.
March 4, 2021

I am using Xporter to export my reports in Jira. I have tried to use Xporter conditional block but it does not seem to be working. When I download the report and open it, it keeps showing the script I wrote for the conditional block. Here is my script:

#{if (%{'${Risk}'.equals('High')${Risk})}

#{end}

If I write it in code block for Word using Ctrl+F9, it won't print anything in the respected field. I am using it inside a loop like this:

&{for issues}

#{if (%{'${Risk}'.equals('High')${Risk})}

#{end}

&end

is there anything I am doing wrong here? Please help me fix this issue. Thanks

1 answer

0 votes
Rogério Paiva - Xray Xporter
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.
March 26, 2021

Hi @Jamshaid 

You have an error in the code, you have the custom field Risk written twice inside the Javascript code, and this does not make the evaluation of the condition.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events