Skip to content

Commit

Permalink
Add LR to TE after creating bug in Bugzilla via 1-click. Refs #479
Browse files Browse the repository at this point in the history
NOTE: the FE still needs to refresh the UI once the 'Report' button
is clicked which will be implemented together with TR page UI
redesign by @asankov.
  • Loading branch information
atodorov committed May 18, 2020
1 parent dfbc4c0 commit 2d0fb59
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tcms/issuetracker/bugzilla_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from django.conf import settings

from tcms.core.contrib.linkreference.models import LinkReference
from tcms.issuetracker import base


Expand Down Expand Up @@ -96,7 +97,14 @@ def report_issue_from_testexecution(self, execution, user):
args['comment'] = self._report_comment(execution)

try:
return self.one_click_report(execution, user, args)
new_bug_url = self.one_click_report(execution, user, args)
# and also add a link reference that will be shown in the UI
LinkReference.objects.get_or_create(
execution=execution,
url=new_bug_url,
is_defect=True,
)
return new_bug_url
except Fault:
pass

Expand Down

0 comments on commit 2d0fb59

Please sign in to comment.