Hi is it a way to get all GIT branches related to particular ticket ?
I am using request /rest/dev-status/1.0/issue/detail?issueId=53082&applicationType=stash&dataType=repository
and it crash Jira
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>applicationType</message><stack-trace>java.lang.NullPointerException: applicationType
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:228)
Hi @Sergey Shevchenko ,
Welcome to the Atlassian Community!
Before going any further, please notice that the endpoints discussed in this thread are intended for internal use only. Therefore, they are not part of the official Jira Software REST APIs, they are not supported and they can change without any notice.
Once this has been said:
We have the below feature requests open in our system to have an official endpoint to get the development information for an issue (for Jira Server and Cloud respectively):
You may want to vote and watch one of the above feature request (depending on what you use) so that you will get notified in case of any update. The feature(s) will be addressed according to the Implementation of New Features Policy.
EXAMPLE:
1) On my side calling https://NAME.atlassian.net/rest/dev-status/latest/issue/summary?issueId=10195 returns:
{
"errors": [],
"configErrors": [],
"summary": {
"pullrequest": {
"overall": {
"count": 0,
[..REMOVED..]
"dataType": "pullrequest",
"open": true
},
"byInstanceType": {}
},
"build": {
"overall": {
[..REMOVED..]
"dataType": "build"
},
"byInstanceType": {}
},
"review": {
"overall": {
[..REMOVED..]
"dataType": "review",
"completed": false
},
"byInstanceType": {}
},
"deployment-environment": {
"overall": {
[..REMOVED..]
"dataType": "deployment-environment"
},
"byInstanceType": {}
},
"repository": {
"overall": {
"count": 2,
"lastUpdated": "2019-10-31T17:53:18.000+0100",
"dataType": "repository"
},
"byInstanceType": {
"GitHub": {
"count": 2,
"name": "GitHub"
}
}
},
"branch": {
"overall": {
"count": 1,
"lastUpdated": null,
"dataType": "branch"
},
"byInstanceType": {
"GitHub": {
"count": 1,
"name": "GitHub"
}
}
}
}
}
2) Then, calling https://NAME.atlassian.net/rest/dev-status/latest/issue/detail?issueId=10195&applicationType=GitHub&dataType=branch returns:
{
"errors": [],
"detail": [
{
"branches": [
{
"name": "[REMOVED]-branch-SFF-27",
"url": "https://github.com/[REMOVED]/1st_repository/tree/[REMOVED]-branch-SFF-27",
"createPullRequestUrl": "https://github.com/[REMOVED]/1st_repository/pull/new/[REMOVED]-branch-SFF-27",
"repository": {
"name": "[REMOVED]/1st_repository",
"url": "https://github.com/[REMOVED]/1st_repository",
"branches": []
},
"lastCommit": {
"id": "85663xxxxxxxxxxxxx",
"displayId": "85663f",
"authorTimestamp": "2019-10-31T16:53:18.000+0000",
"url": "https://github.com/[REMOVED]/1st_repository/commit/85663fxxxxxxxxxxxxxxx",
"author": {
"name": "[REMOVED]"
},
"fileCount": 0,
"merge": false,
"message": "Create SFF-27 again",
"files": []
}
}
],
"pullRequests": [],
"repositories": [],
"_instance": {
"name": "GitHub",
"baseUrl": "https://github.com",
"type": "GitHub",
"id": "com.github.integration.production",
"typeName": "GitHub",
"singleInstance": true
}
}
]
}
Please let me know if you have any further question on this topic.
Cheers,
Dario
Hi Dario,
I face a similar issue. Although, I have followed the above instructions, I still get the same error.
Here is the responses to my requests:
https://jirainstance/rest/dev-status/1.0/issue/summary?issueId=1447271
{"errors":[],"configErrors":[],"summary":{"pullrequest":{"overall":{"count":1,"lastUpdated":"2020-06-29T09:36:32.636+0100","stateCount":1,"state":"OPEN","details":{"openCount":1,"mergedCount":0,"declinedCount":0},"open":true},"byInstanceType":{"stash":{"count":1,"name":"Bitbucket Server"}}},"build":{"overall":{"count":0,"lastUpdated":null,"failedBuildCount":0,"successfulBuildCount":0,"unknownBuildCount":0},"byInstanceType":{}},"review":{"overall":{"count":0,"lastUpdated":null,"stateCount":0,"state":null,"dueDate":null,"overDue":false,"completed":false},"byInstanceType":{}},"deployment-environment":{"overall":{"count":0,"lastUpdated":null,"topEnvironments":[],"showProjects":false,"successfulCount":0},"byInstanceType":{}},"repository":{"overall":{"count":0,"lastUpdated":null},"byInstanceType":{}},"branch":{"overall":{"count":1,"lastUpdated":"2020-06-29T09:36:32.636+0100"},"byInstanceType":{"stash":{"count":1,"name":"Bitbucket Server"}}}}}
But when I try :
https://jiraInstance/rest/dev-status/1.0/issue/detail?issueId=1447271&applicationType=stash&dataType=branch
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>500</status-code><message>applicationType</message><stack-trace>java.lang.NullPointerException: applicationType
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)
Could you please advise?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sotiris Gk ,
Please avoid adding new replies to a thread from almost 2 years ago. You have much higher chances to get an answer if you open a new thread.
Also, I don't know how you called the REST API endpoint and I don't know if this is for Server or Cloud, but the error message is complaining about applicationType and is throwing a NullPointerException:
java.lang.NullPointerException: applicationType
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)
If you are using Curl on a *nix machine there are chances you forgot to put the url among quotes and therefore everything after the & is not taken into account:
https://jiraInstance/rest/dev-status/1.0/issue/detail?issueId=1447271&...
If this is not the case, please provide more details on whether this is for Server or Cloud and how you are actually sending your REST requests.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I am using the postman tool, we are in the testing department. We need to get issue branch details and release details. How can achieve it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.