Xporter template condition on epic name

Loredana January 15, 2015

Hi,

I'm trying to export UserStories with an custom Xporter template and have the epic name in the export if the UserStory belongs to an Epic.

The syntax bellow works if there the UserStory belongs to an Epic, but if not I get this text: '${Epic Link.Epic Name}'.

%{('${Epic Link.Epic Name}'.length > 0) ? '${Epic Link.Epic Name}': '-'}     

 

Any ideas?

Many thanks!

Loredana

1 answer

1 accepted

1 vote
Answer accepted
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 Leaders.
January 20, 2015

Hi @Loredana,

You can do this: 

%{('${Epic
Link.Epic Name}'.indexOf('Epic Link.Epic Name’) > 0) ? '-': '${Epic
Link.Epic Name}'}

It's not a good solution but works.

Thanks.

Cheers,

RMRodrigues.

Loredana January 20, 2015

Great! That works! Many thanks!!! Loredana

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 Leaders.
January 20, 2015

A New Feature(Issue) was created. The means is to provide a new property that indicates you if the issue has an Epic Link. You can follow its status here: http://jira.xpand-it.com/browse/XPORTER-306

Suggest an answer

Log in or Sign up to answer