Skip to content

Commit c141140

Browse files
feat: Add flag_issue method (#1163)
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>
1 parent 402a79a commit c141140

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

atlassian/jira.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,6 +4577,23 @@ def dvcs_update_linked_repo_with_remote(self, repository_id):
45774577
url = "rest/bitbucket/1.0/repositories/{}/sync".format(repository_id)
45784578
return self.post(url)
45794579

4580+
def flag_issue(self, issueKeys, flag=True):
4581+
"""
4582+
Flags or un-flags one or multiple issues in Jira with a flag indicator.
4583+
:param issueKeys: List of issue keys to flag or un-flag.
4584+
:type issueKeys: list[str]
4585+
:param flag: Flag indicating whether to flag or un-flag the issues (default is True for flagging).
4586+
:type flag: bool
4587+
:return: POST request response.
4588+
:rtype: dict
4589+
"""
4590+
url = "rest/greenhopper/1.0/xboard/issue/flag/flag.json"
4591+
data = {
4592+
"issueKeys": issueKeys,
4593+
"flag": flag
4594+
}
4595+
return self.post(url, data)
4596+
45804597
def health_check(self):
45814598
"""
45824599
Get health status

0 commit comments

Comments
 (0)