Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,526
Community Members
 
Community Events
165
Community Groups

I need to get the current issue of project Id

I need to get the current issue of project Id

1 answer

0 votes

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>"

@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);
}

});
}

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?

@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

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

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you