Hey there,
I am currently setting up an Automation that is supposed to copy the linked Confluence Pages to another issue. (Actually the other issue should be a clone of the issue and it should get the same linked confluence pages.)
The Confluence Pages we are talking about are the ones mentioned on Jira issues:
I already found out that I can get the linked Confluence pages when using the rest API thingie in the browser.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-get
And I doublechecked, it really returnes the URL of the linked Confluence pages needed.
"application":{"type":"com.atlassian.confluence","name":"Confluence"},"relationship":"mentioned in","object":{"url":"https://p-games.atlassian.net/wiki/pages/viewpage.action?pageId=2861694977",
So now my question is:
How do I get this into an automation?
My understanding how this automation should be working is this:
My only problem now is I don't have a clue how to make it work and how to write this in a proper way.
I think my biggest issues in these regards are:
- The issue key changes every time this Automation runs, so it needs to be set in the automation and I can not manually use the browser and copy paste it into the automation - the automation itself needs to look up these things.
- Even if the Automation manages to get these infos, I don't have a clue how to set the value for the new issue - like when step one is to copy, I even don't know how to paste it afterwards and where.
I really hope this makes sense to anyone. :D
If there is a way to make this work, please help me. I am even happy about tiny steps into the right direction. :)
To call a REST API endpoint from a Jira Automation rule, please use the Send Web Request action, as described in this article: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828
Once you have the response message, you may parse that to get the links need.
Kind regards,
Bill
NOT the answer to my question
only
How to use the Rest API page:
I will write this down now, as it took me way too long to understand this. So maybe this will help somebody else. :D
Use in the browser:
https://<your-domain>.atlassian.net<rest-api-input>
replace <your-domain> with your own domain - lets say "p-games".
peplace <rest-api-input> with the input from this page that you would like to use:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-get
Example - Get remote issue links:
/rest/api/3/issue/{issueIdOrKey}/remotelink
replace {issueIdOrKey} with the Issue Id or Issue Key
This is how it looks on the page and where to copy from:
Now your URL in the browser should look like this (not really like this but with your inserted data of course):
https://p-games.atlassian.net/rest/api/3/issue/SF-123/remotelink
When you press enter it should return some information similar to this:
[{"id":28321,"self":"https://p-games.atlassian.net/rest/api/3/issue/SF-123/remotelink/28321","globalId":"appId=77fc247a-3e23-3ae5-ba7e-b5b5c396129b&pageId=2861694977","application":{"type":"com.atlassian.confluence","name":"Confluence"},"relationship":"mentioned in","object":{"url":"https://p-games.atlassian.net/wiki/pages/viewpage.action?pageId=2861694977","title":"Page","icon":{},"status":{"icon":{}}}}]
I hope this helps, if you are stuck at the same point where I was stuck the last days. ;)
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.