Child pages
  • How to get Issue ID in Jira?

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Contents        

Currently alpha preview of Cloud Native Synchronizer shows numeric Jira IDs in sync history log, instead of issue keys (we are working to change that).

Please note that if click on the Jira ID - you will be redirected to this particular issue.

Conversely - if you want to get Jira ID for particular issue, you get it by exporting it to XML (from issue view menu) or calling Jira REST API programatically.

Browser console

Open issue in Jira and run this code in browser console to quickly get ID for particular issue:

if (issue_key = new URL(window.location.href).searchParams.get("selectedIssue") || (/^\[([^\]]+)\]/g.exec(document.title) || [])[1])
{fetch(window.location.origin+'/rest/api/3/issue/'+issue_key).then(res => res.json()).then(data => console.log("Issue ID for "+issue_key+": "+data.id))}else{console.log(issue_key, "Please run it on Jira Issue view page to get issue ID.")}

Bookmarklet

You can also bookmarklet in your bookmarks bar for quick access.

To do so – add a bookmark in your browser with name of your choice (e.g. "Get Issue ID") and paste the code below into the URL field:

javascript:(function()%7Bif%20(issue_key%20%3D%20new%20URL(window.location.href).searchParams.get(%22selectedIssue%22)%20%7C%7C%20(%2F%5E%5C%5B(%5B%5E%5C%5D%5D%2B)%5C%5D%2Fg.exec(document.title)%20%7C%7C%20%5B%5D)%5B1%5D)%7Bfetch(window.location.origin%2B'%2Frest%2Fapi%2F3%2Fissue%2F'%2Bissue_key).then(res%20%3D%3E%20res.json()).then(data%20%3D%3E%20alert(%22Issue%20ID%20for%20%22%2Bissue_key%2B%22%3A%20%22%2Bdata.id))%7Delse%7Balert(%22Please%20run%20it%20on%20Jira%20Issue%20view%20page%20to%20get%20issue%20ID.%22)%7D%7D)()

To you it - navigate to any issue in Jira and click the bookmark – an alert will show with this Issue's ID.

Bulk export

To get IDs for multiple Jira Issues – you can export them to XML or CSV from Issues/Filter view.


  • No labels

This page has no comments.