JMWE Comment related issues: is there a way to declare the relationship type in the comment?

Graeme Baker May 6, 2024

Hello! I am using the Comment Related Issues Post Function from JMWE (we're on Data Centre 9.4), and I'd like to be able to include the specific inward/outward relationship type in the comment made on the related ticket. The purpose being to add context to the message, so that instead of having to inspect the ticket, check all linked issues, find the specific one, and check its relationship type, the info is there in the comment.

I managed to work that out using these variables

${issue.issueLinks.issueLinkType.name}
${issue.issueLinks.issueLinkType.inward}
${issue.issueLinks.issueLinkType.outward}

but the result includes square brackets, for example:

[Blocks]
[is blocked by]
[blocks]

I'm basically trying to end up with something human friendly like

"TICKET-1234 blocks this ticket, and is now resolved."

I can't work out for the life of me, how to replace them. I'm assuming I need to declare the whole thing as a string in some way, and then use a .replaceAll() maybe?

Groovy is not my strong suit! Any help would be appreciated.

2 answers

0 votes
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 7, 2024

Hi @Graeme Baker 

unfortunately, JMWE doesn't expose the link type that links the "current" issue with each related issue it iterates over. I would recommend you reach out to Appfire support and ask them to add this feature (which would be trivial to add).

0 votes
Graeme Baker May 7, 2024

So I didnt figure out my text replace problem, but did come across a diff issue. When a ticket is linked to more than 1 issue the above groovy returns arrays of ALL linked issues.

I thought I'd try smart values in a branching rule, but got the same result:

 

So I thought maybe with a branching automation rule, and smart values...but these return arrays too, so same issue
{{issue.issueLinks.type.name}}
{{issue.issueLinks.type.outward}}
{{issue.issueLinks.type.inward}}

Anyone know how to address only the specific link relationship in either groovy or automation, without pulling the array?

New goal would be to have a unique comment on each linked ticket, calling out how its linked, and that the other end of the relationship is resolved. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events