Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Remote Issue Links from Jira Rest API

Teller Junak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2020

I'm trying to track the progress of confluence page creation/review/publishing using Jira issues. For each page that needs to be completed, it has a corresponding Jira issue. The issues are manually created and linked to the corresponding page using #2 in this article. To keep the state of the confluence page in sync with the status of the jira issue, I've written a python script to check with each app's API and compare the state/status. The problem is, I have to manually create the list of pages for it to check, and I would rather my script "crawl" the Jira Issue links to get the corresponding confluence page state.

 

I've ID'd the "RemoteIssueLink" field in the "changelog" resource, but the "to" key in the remote issue list just gives a five digit int, not a link:

"created": "2020-08-04T15:26:41.961+0000",                

"items": [                   

 {                        

"field": "RemoteIssueLink",                        

"fieldtype": "jira",                        

"from": null,                        

"fromString": null,                        

"to": "12001",                        

"toString": "This issue links to \"Wiki Page (Confluence)\""                   

 }

 

The value "12001" doesn't show up anywhere else in the response body when querying the issue and expanding all fields. I would think it would be defined in 'schema' maybe? But it's not...

What does the 5 digit integer in the "To" key represent? Where is the link to the Confluence Page? Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Matthias Gaiser _K15t_
Community Champion
August 6, 2020

Hi @Teller Junak,

welcome to the Atlassian Community.

You can use another REST API call to get the information you need: <BASE_URL>/rest/api/2/issue/<ISSUE_KEY>/remotelink

See also the Atlassian docs about this method.

Having said that, I wonder what you're really trying to achieve - are you embedding your Jira issues on the Confluence page as in #3 of your linked article? If you now only update the status in Jira, I don't see the need of a script. But that might be just me :)

Cheers,
Matthias.

Teller Junak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2020

That's what I needed! Thank you Matthias. To your question. We're using Comala workflows to ensure that each page is properly reviewed before it's published. So, the bulk of people's interactions are only on Confluence. using the Jira issues to keep up with the page states over on confluence is just to help me track the status of each page easier than going to each one individually.

 

It would be really nice if Atlassian addressed adding and updating content in confluence as a work unit in and of itself, to be managed by Jira. It seems like the main expectation is that the "work" happens outside of the atlassian stack itself, and then the management, documentation, and storage/versioning ends up back within the stack. In our case, we're trying to build a library of documentation from scratch, so the work is updating confluence pages.

 

Thanks again!

Like Matthias Gaiser _K15t_ likes this
Matthias Gaiser _K15t_
Community Champion
August 10, 2020

Thanks for sharing your use case - it's always super interesting to get to know how people work with the tools.

We actually gathered some best practices around documentation with Confluence on our website https://www.k15t.com/rock-the-docs. At some points, we also talk about managing content with Comala Workflows or Document Management.

I guess, this sounds like click baiting - so feel free to ignore it. I just had the feeling it might be useful to you.

Suggest an answer

Log in or Sign up to answer