Is it possible to automatically link documentation from Confluence to a Jira issue?
Asked by Jennifer Hemmens:

Hey everyone!

We're currently working really hard to set up our Jira \& Jira Service Desk environments as well as possible before we fully implement it as our issue tracking tool. While my colleagues are sorting that out, I'm working on organizing our (comprehensive) Confluence documentation as logically as possible.

What we want, is that when a Jira issue is created, related documents that could be helpful in resolving it are automatically linked to the issue. This would save our engineers time in looking for the appropriate documents and linking them to the issue(s) themselves.

Is it possible to do this? For example, by means of labels/components/epics?

Thanks!

Jen


Answers:
author: Davin Studer
body: Another option would be to do it with ScriptRunner. You could create a listener script that would fire off on issue creation that could then scan through your Confluence system using the REST API and create links to the pages that match your logic.

comments: author: Jennifer Hemmens
body: Hi [@Davin Studer](/t5/user/viewprofilepage/user-id/781467) thanks!


author: Tarun Sapra
body: Hello [@Jennifer Hemmens](/t5/user/viewprofilepage/user-id/1387821)

Atlassian already provides a similar feature as to what you require. Basically you can link your Service desk with Confluence knowledge base So that Customers and Engineers don't spend time on repetitive tasks and solutions.

<https://confluence.atlassian.com/servicedeskserver/set-up-a-knowledge-base-for-self-service-956713310.html>

comments: author: Jennifer Hemmens
body: Hi [@Tarun Sapra](/t5/user/viewprofilepage/user-id/781576) ,

Thanks for the link! I could only find information regarding linking the Confluence knowledge base to ServiceDesk for anonymous users, which is something we wish to avoid.

Are the links to the documentation automatically included in a Jira issue that has been created based on a ServiceDesk ticket?


author: Tarun Sapra
body: Hello [@Jennifer Hemmens](/t5/user/viewprofilepage/user-id/1387821)

The links to the documentation are not automatically included, but the customer can quickly do a search

But the linked documentation can appear automatically as the customer types in the request in the JSD, see pic below from docs. Also yo ucan customize the permissions for JSD and the docs as to who can see and who can't

![](https://confluence.atlassian.com/servicedeskserver/files/956713329/956713341/1/1535378518002/request_type_article_suggestions.png)


author: Tarun Sapra
body: Hello a page from the knowledge base article can be displayed in the issue view screen if the content of the tickets matches that of the page.

See below in the screenshot "Related knowledge base articles"

![](https://confluence.atlassian.com/servicedeskserver/files/956713329/956713340/1/1535378517886/Related_knowledge_base_article.png)


author: Jennifer Hemmens
body: [@Tarun Sapra](/t5/user/viewprofilepage/user-id/781576) it won't be difficult for us to get the user documentation for our software linked to customer requests, and it's a great feature!

My question is more directed towards *our* side of the ServiceDesk/Jira environment. When a ticket comes in, a ServiceDesk Agent will determine whether it is to be taken up by our project team or our development team.

We'd like the following:

Based on whatever component/label/etc. the ServiceDesk Agent assigns the Jira issue(s) deriving from the ticket, these issues automatically receive links to certain related pages of our engineering and/or developer manuals that might be of use to the engineer/developer who the issue is assigned to.

I know it's always possible to link a Confluence page to a Jira issue, however, adding these manually takes up unnecessary time.

My question really is, is it possible to somehow link Jira and Confluence labels?

So say I had a page in Confluence labelled \<*user-interface* \>, and a Jira issue that has the same component or label \<*user-interface*\>, Jira would automatically search for any pages in Confluence and add these as links?


author: Tarun Sapra
body: Hello [@Jennifer Hemmens](/t5/user/viewprofilepage/user-id/1387821)

In this screenshot, Jira has automatically picked up the pages (based on content) from the knowledge base article. But exact underlying algorithm, if it's component based or label based etc can may be shared in more detail by someone from Atlassian. But the page links are automatically displayed based on the content of the ticket and content of the linked knowledge base article

![](https://confluence.atlassian.com/servicedeskserver/files/956713329/956713340/1/1535378517886/Related_knowledge_base_article.png)


author: Jennifer Hemmens
body: [@Tarun Sapra](/t5/user/viewprofilepage/user-id/781576) I was just typing a reply and then Atlassian logged me off... haha!

That's definitely more along the lines of what we're looking for!

However, it seems to only be available in ServiceDesk. Do you happen to know if it's also possible to add this module to Jira issue screens? As I said, what's more important is that our engineers/developers can quickly access helpful documentation - especially juniors who are just starting to get the hang of things...

Thanks for your help so far :)


author: Tarun Sapra
body: Hello [@Jennifer Hemmens](/t5/user/viewprofilepage/user-id/1387821)

The documentation links available on the JSD ticket can easily be restricted to only dev teams and agents. Thus, the dev teams can easily access them via the linked JSD ticket.


Tags: component

documentation

epic

jira-core

jira-core-server

label

link

server