Skip to content

Commit

Permalink
Merge pull request #216 from Martchus/case-sensitivity
Browse files Browse the repository at this point in the history
Fix case-sensitivity issue that prevented re-opening tickets to work
  • Loading branch information
mergify[bot] authored Aug 16, 2022
2 parents cf75c86 + e3db4ea commit cadf181
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions openqa_review/openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def reopen(self, note=None):
"https://progress.opensuse.org/projects/openqatests/wiki/Wiki#openqa-review-reminder-handling"
)
if self.issue_type == "bugzilla":
if self.status in ["RESOLVED"]:
if self.status.upper() in ["RESOLVED"]:
self.bugzilla_browser.json_rpc_post(
"/jsonrpc.cgi",
"Bug.update",
Expand All @@ -805,7 +805,9 @@ def reopen(self, note=None):
else:
self.add_comment(note)
elif self.issue_type == "redmine":
status_id = REDMINE_STATUS_ID_FEEDBACK if self.status in ["closed", "rejected", "resolved"] else None
status_id = (
REDMINE_STATUS_ID_FEEDBACK if self.status.lower() in ["closed", "rejected", "resolved"] else None
)
self.add_comment(note, status_id=status_id)
else:
assert False, "Only bugzilla or redmine supported as issue type" # pragma: no cover
Expand Down
4 changes: 2 additions & 2 deletions tests/test_openqa_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def test_querying_last_comment_of_unknown_bugrefs():
def test_reopening_progress_issue(browser_mock):
args = cache_test_args_factory()
issue = issue_factory("poo#102440", "https://progress.opensuse.org/issues/102440", args)
issue.status = "resolved"
issue.status = "Resolved"
issue.reopen("Test note")
issue.reopen() # with default note
issue.status = "workable"
Expand All @@ -763,7 +763,7 @@ def test_reopening_progress_issue(browser_mock):
def test_reopening_bugzilla_ticket(browser_mock_rpc):
args = cache_test_args_factory()
issue = issue_factory("boo#0815", "https://bugzilla.opensuse.org/show_bug.cgi?id=0815", args)
issue.status = "RESOLVED"
issue.status = "RESOLVEd"
issue.reopen("Test note")
issue.status = "CONFIRMED"
issue.reopen("Test note 2")
Expand Down

0 comments on commit cadf181

Please sign in to comment.