Is there way that we could not allow JSM agents to resolve an issue without first having the issue linked to a Confluence article?
Hi @Matt Baker ,
This is an interesting one, as there is no easy way to find links to Confluence pages with Jira Expressions. The documentation certainly does not list any.
But we do get the change logs to an issue with Jira Expressions, so there might be a way. In any case, you will need an app that supports expressions-based conditions. Personally, I like this one, mainly because I work for Polymetis Apps.
So, let's get to it. We cannot get the link to Confluence directly, as
issue.links
only contains links to actual issues. But fortunately, there is the change log, which contains an entry for when a Confluence page is linked. That is available in
issue.changelogs
The data in there is structured like this:
[
{
"id": "123456789",
"author": {
"accountId": "123456456456456",
"emailAddress": "oliver.siebenmarck@jodocus.io",
"displayName": "Oliver Siebenmarck",
"active": true,
"timeZone": "Europe/Berlin",
"accountType": "atlassian"
},
"created": "2023-08-29T14:17:36.361+0200",
"items": [
{
"field": "RemoteIssueLink",
"fieldtype": "jira",
"from": null,
"fromString": null,
"to": "11111",
"toString": "This issue links to \"Wiki Page (System Confluence)\""
}
]
}
I've tried a few things, but it seems that the field "RemoteIssueLink" seems to be fairly reliable as an indicator for a link to Confluence being set up. I'd be comfortable using it, but would check in regular intervals, if there are exemptions to that rule to be found.
Now that we found an indicator to test for, we can filter the change log for it and count if it occurs like this:
TL;DR: Try this expression:
issue.changelogs.filter(l => l.items[0].field == "RemoteIssueLink").length > 0
Hope that helps,
Oliver
Hi @Matt Baker
I don't know of any validators that work with Confluence. However, you could do something like this:
For the automation it could work like this:
{{comment.body}}
contains
YourSpaceKey-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That’s good, but I was hoping to have the agents actually link the article to the issue. That way when we look at the article in Confluence we can see how many issues it has been linked to.
Adding the article in a comment doesn’t create a link between that issue an the Confluence article.
When I mention a Jira issue in a Confluence page it creates a link in the Jira issue. Seems strange that it doesn’t work the other way around, or am I missing something.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, there is currently no native capability to detect that a Confluence page has been linked. That's why I proposed using the article share capability because that at least comes up in a comment.
You may want to look at the API documentation to see if there's a way that you can check if the issue has any linked Confluence pages. If there is, you could do something like this for the automation component:
{{webResponse.body.x}}
Equals
<response that link is there>
I did a little research through the API documentation but wasn't able to find anything. However, I'll admit the API is not my strong suit so maybe something is there.
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.