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.
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).
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:
{{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.
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.