I need to get the current issue of project Id

Bhagavan Goud June 23, 2022

I need to get the current issue of project Id

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2022

Where?  Why?

Please could you explain the context of your question?

Without the context of your question, all we can really tell you is "run a search for "project = <key of the project you want the issues for>"

Bhagavan Goud June 23, 2022

@Nic Brough -Adaptavist- Thanks for the reply

 

While calling the get issue Rest  API URL, i need to get the current issue of projctID

 

function getIssueId()
{
AJS.$.ajax
({

url: ((baseUrl=='http://localhost:2990')?(baseUrl+'/jira'):(baseUrl)) +'/rest/api/2/issue/'+ encodeURI(JIRA.Issue.getIssueKey()),
type: "GET",
timeout: 0,
dataType: 'json',
processData: false,
headers: {
"Content-Type": "application/json; charset=utf-8"
},

success: function (response) {
console.log("response" + JSON.stringify(response));
console.log("responseId" + JSON.stringify(response.id));
},
error: function (response)
{
console.log(response);
}

});
}

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 23, 2022

Ok, so over the REST API, but what is "current issue of project ID"?  As I asked before, is it a search for issues in a project?

Bhagavan Goud June 23, 2022

@Nic Brough -Adaptavist-  I have a requirement while clicking on the issue along with the issue id I need to get the Project id in response

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2022

You get that in the response to get the issue by default.  Have a look at the sample response in https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get

Bhagavan Goud June 26, 2022

@Nic Brough -Adaptavist- Thanks problem solve

Suggest an answer

Log in or Sign up to answer