Hello everyone,
I am developing a python app to better graph team workloads based on sprints.
For the development of a feature I need to check the issues's changelog to check whether or not the issue has been moved between sprints or not.
The request I am currently using is the following.
API_GET_SPRINT_ISSUES = "https://example.com/rest/agile/1.0/sprint/{}/issue"
def get_sprint_issues(authenticationToken, sprintId):
headers = {"Accept": "application/json",
"Authorization" : "Basic %s" % authenticationToken.decode()}
params = {"expand":"changelog",
"fields" : ["summary","assignee","created","duedate",
"timetracking","status","worklog"],
"changelog":"histories",}
response = requests.get(API_GET_SPRINT_ISSUES.format(sprintId),
headers = headers ,verify = True,params=params)
return ujson.loads(response.content)
In this way I can fetch only the specific data I need from the "fields", but the changelog will always be returned at full,(the "histories" parameter seems to be completely ignored), including a lot of unnecessary data that makes the response time a lot slower.
My question is, is there any other way to get the previous sprints of an issue?
If not, then can I somehow request only specific fields from the changelog so as to limit the response size (specifically I only need the "fieldType", "fromString", "toString" fields).
Thank you all in advance.