Skip to content

Commit

Permalink
feat: Add flag_issue method (atlassian-api#1163)
Browse files Browse the repository at this point in the history
Added the `flag_issue` method to provide functionality for flagging and un-flagging one or multiple issues in Jira. This method enhances the versatility of the codebase and allows for better issue management.

Signed-off-by: Matthis Holleville <matthish29@gmail.com>
  • Loading branch information
matthisholleville authored May 12, 2023
1 parent 402a79a commit c141140
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -4577,6 +4577,23 @@ def dvcs_update_linked_repo_with_remote(self, repository_id):
url = "rest/bitbucket/1.0/repositories/{}/sync".format(repository_id)
return self.post(url)

def flag_issue(self, issueKeys, flag=True):
"""
Flags or un-flags one or multiple issues in Jira with a flag indicator.
:param issueKeys: List of issue keys to flag or un-flag.
:type issueKeys: list[str]
:param flag: Flag indicating whether to flag or un-flag the issues (default is True for flagging).
:type flag: bool
:return: POST request response.
:rtype: dict
"""
url = "rest/greenhopper/1.0/xboard/issue/flag/flag.json"
data = {
"issueKeys": issueKeys,
"flag": flag
}
return self.post(url, data)

def health_check(self):
"""
Get health status
Expand Down

0 comments on commit c141140

Please sign in to comment.