Skip to content

Commit 2c572f7

Browse files
authored
Added support for updating rank (#440)
1 parent 5091780 commit 2c572f7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

atlassian/jira.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,6 +2474,19 @@ def get_sprint_issues(self, sprint_id, start, limit):
24742474
url = 'rest/agile/1.0/sprint/{sprintId}/issue'.format(sprintId=sprint_id)
24752475
return self.get(url, params=params)
24762476

2477+
def update_rank(self, issues_to_rank, rank_before, customfield_number):
2478+
"""
2479+
Updates the rank of issues (max 50), placing them before a given issue.
2480+
:param issues_to_rank: List of issues to rank (max 50)
2481+
:param rank_before: Issue that the issues will be put over
2482+
:param customfield_number: The number of the custom field Rank
2483+
:return:
2484+
"""
2485+
return self.put('rest/agile/1.0/issue/rank', data={
2486+
'issues': issues_to_rank,
2487+
'rankBeforeIssue': rank_before,
2488+
'rankCustomFieldId': customfield_number})
2489+
24772490
def health_check(self):
24782491
"""
24792492
Get health status
@@ -2485,4 +2498,4 @@ def health_check(self):
24852498
if not response:
24862499
# check as support tools
24872500
response = self.get('rest/supportHealthCheck/1.0/check/')
2488-
return response
2501+
return response

0 commit comments

Comments
 (0)