Hi,
We are using the Export Template feature to create Word documents with a summary of JIRA issues from R4J.
We are looking for a way to enhance the reports by finding/exporting comments in the issues which contain keywords.
We know we can export ALL comments...
[[\if $.comments.count > 0]][[\each $.comments]][[$.]][[/each]][[/if]]
Or the first comment added...
[[\if $.comments.count > 0]][[\wiki $.comments.item(0)]][[/wiki]][[/if]]
But we would like to dynamically identify and export interesting comments by any means necessary. Is there anyway to using wildcards or startswith() functions, etc to pattern match text in a comment?
For examples I would that would look something like one of these three options:
[[\if $.comments.count > 0]][[\each $.comments]]
[[\if $. = "/*SomeKeyword/*"]][[$.]][[/if]]
[[\if $. ~ "SomeKeyword"]][[$.]][[/if]]
[[\if $.startswith() = "SomeKeyword"]][[$.]][[/if]]
[[/each]][[/if]]
Hello @Alan Foose ,
thank you very much for this great question and your interest in this feature.
Currently you can only find matching keywords by a full string compare, see if statement documentation .
We have a very few similar requests on making this more flexible, so to increase the likelihood for an an impletion is a little bit low right now. To increase please raise a feature request on our service portal.
Best regards
Bernhard from from Ease Solutions, the vendor of R4J.
Thanks @Bernhard Doleschel (Ease Solutions) for your confirmation!
I had reviewed the suggested documentation. It was clearly written and helpful to get using this template export feature. If we cannot solve this another way we will raise a request.
I understand now that only full string compare is possible. There is just one point I was not clear on and could not get to work. If we knew the full string we wanted to match, is it even possible to do full string comparison on comments?
To test I created an issue and added just two comments, "ABCD" and "EFGH". I used this code hoping it would find a match on the first comment.
[[\if $.comments.count > 0]][[\each $.comments]]
Matched - [[\if $. = "ABCD"]][[$.]][[/if]]
[[/each]][[/if]]
But instead this just outputs:
Matched -
Matched -
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Alan Foose
I'm Edmer from EaseSolutions, vendor of R4J plugin.
Let me share a sample export template which will display all issues. There's a separate section for the Issues which has the exact comments e.g. "ABCD" and "EFGH". I've also included the comment context items.
[[\each $selectedProject]]
[[\recurse $.folders]]
[[\recurse $.folderissues]]
[[\levelheading $.key + “ - “ + $. summary]]
[[\if $.comments.count = 0]] NO Comment. [[/if]]
[[\if $.comments.tostring = “ABCD”]]
[[\each $.comments]]
Matched (ABCD):
[[$.author]] | [[$.created]] | [[$.updated]] | [[$.updater]] |
[[/each]]
[[/if]]
[[\if $.comments.tostring = “EFGH”]]
[[\each $.comments]]
Matched (EFGH):
[[$.author]] | [[$.created]] | [[$.updated]] | [[$.updater]] |
[[/each]]
[[/if]]
[[/levelheading]]
[[/recurse]] [[/recurse]][[/each]]
If you need further support with your template customization, we'd be glad to help you at our service desk portal.
Best regards,
Edmer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.