You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
It looks like the UI html syntax has changed. Now I'm unable to use a workaround to retrieve release notes. Is it possible use the JIRA API to get the release notes from fix version .
Oooh, this feature request has been around for a long time:
https://jira.atlassian.com/browse/JRASERVER-3855
https://jira.atlassian.com/browse/JRACLOUD-3855
What was your workaround?
So the page is easy(ish) to get to:
https://YOURSITE.atlassian.net/secure/ReleaseNote.jspa?projectId=11333&version=10333
You can certainly find the Project ID and Version via the API: https://nortekcontrol.atlassian.net/secure/ReleaseNote.jspa?projectId=11317&version=10529
But the really tricky part is getting that nicely formatted HTML out of Jira...
Back in 2014, Henri used sed to extract them:
http://blog.tremblay.pro/2014/10/extract-release-notes-from-jira.html
But man, in 2021, everything's Javascript. I don't see the rendered HTML anywhere when I did `acli --action renderrequest` (saves me having to do auth in curl).
I wonder if Selenium or the like could simulate loading that page and clicking on "Copy to clipboard":
Or, building it all up by hand from REST queries, as suggested here:
https://community.atlassian.com/t5/Answers-Developer-Questions/How-do-I-access-Release-Notes-HTML-data-VIA-JIRA-API/qaq-p/573074#M110730
Or maybe doing it with Confluence?
https://confluence.atlassian.com/doc/blog/2015/10/how-to-document-releases-and-share-release-notes
Sorry I couldn't find a better answer. If you can share your workaround, maybe we could build on that.
Oh, and always... there's an app for that. ;-}
https://marketplace.atlassian.com/apps/1215431/automated-release-notes-for-jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was using Henri's approach as the workaround.
http://blog.tremblay.pro/2014/10/extract-release-notes-from-jira.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I'm not an expert in Python but still, I ended up writing a little script doing the job. It takes three parameters :
1 - A username
2 - A password
3 - A part of the version name (I use it with X.Y.Z knowing that I don't have two version names containing the same version numbers)
#!/bin/python3
import sys, requests, json
def getProjectVersionFromNamePart(versionNumber):
response = requests.get(jiraBaseUrl + 'rest/api/2/project/' + project + '/versions', auth=auth)
versions = response.json()
for version in versions:
if (versionNumber in version['name']):
return version
return None
def getProjectIssuesFromVersion(projectVersion):
jql = 'project = ' + project + ' AND fixVersion = "' + projectVersion['name'] + '" AND resolution IS NOT EMPTY ORDER BY key'
params = {'projectId':projectVersion['projectId'], 'maxResults':1000, 'jql':jql}
response = requests.get(jiraBaseUrl + '/rest/api/2/search', auth=auth, params=params)
return response.json()
def printIssue(issue):
print('<li>[<a href=\'' + jiraBaseUrl + '/browse/' + issue['key'] + '\'>' + issue['key'] + '</a>] - ' + issue['fields']['summary'] + '</li>')
def collectIssueTypeNames(issues):
issueTypeNames = []
for issue in issues:
typeName = issue['fields']['issuetype']['name']
if typeName not in issueTypeNames:
issueTypeNames.append(typeName)
issueTypeNames.sort()
return issueTypeNames
def printReleaseNotes(projectVersion, projectIssues):
print('<h2>' + projectVersion['name'] + '</h2>')
print(projectIssues['total'], 'issues.')
issueTypeNames = collectIssueTypeNames(projectIssues['issues'])
for issueTypeName in issueTypeNames:
print('')
print('<h4>' + issueTypeName + '</h4>')
print('<ul>')
for issue in projectIssues['issues']:
if issue['fields']['issuetype']['name'] == issueTypeName:
printIssue(issue)
print('</ul>')
project = 'YOURPROJECT'
jiraBaseUrl = 'https://your.jira.server.org/'
# auth=(user, password)
auth=(sys.argv[1], sys.argv[2])
projectVersion = getProjectVersionFromNamePart(sys.argv[3])
# print(json.dumps(projectVersion, indent=2))
projectIssues = getProjectIssuesFromVersion(projectVersion)
# print(json.dumps(projectIssues, indent=2))
printReleaseNotes(projectVersion, projectIssues)
Hope this can help others ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Shawn Bates
Do you know the version ID? If so, you could just do a JQL search on fixVersion=myID with
https://docs.atlassian.com/software/jira/docs/api/REST/1000.824.0/#api/2/search
If you know more about the version, you could use the JQL functions in the query, such as
project = myProject AND fixVersion = latestReleasedVersion()
or
project = myProject AND fixVersion = earliestUnreleasedVersion()
Best regards,
Bill
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.
Hi Shawn,
Please look here for an example of calling the REST API with curl. This example is for JSM and the ideas work for Jira Cloud.
https://community.atlassian.com/t5/Jira-Service-Management/REST-API-curl-example/qaq-p/1486907
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.