Skip to content

Commit

Permalink
Improve messaging for Issue Tracker Configuration health check
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Jun 4, 2023
1 parent db7a664 commit b93b663
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions tcms/testcases/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,28 @@ def save_model(self, request, obj, form, change):
raise RuntimeError(_("Failed creating Issue Tracker"))

details = tracker.details(bug_url)

if details["from_open_graph"]:
messages.add_message(
request,
messages.WARNING,
_(
"Details extracted via OpenGraph. "
"Issue Tracker may still be configured incorrectly!"
),
)
else:
messages.add_message(
request,
messages.SUCCESS,
_(
"Details extracted via API. Issue Tracker configuration looks good!"
),
)

messages.add_message(
request,
messages.SUCCESS,
_("Issue Tracker configuration check passed"),
)
messages.add_message(
request,
messages.SUCCESS,
messages.INFO,
details,
)
except Exception as err: # pylint: disable=broad-except
Expand Down

0 comments on commit b93b663

Please sign in to comment.