Skip to content

Commit

Permalink
Add fields id, status & url for BitBucket bug details
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Nov 7, 2024
1 parent 06cc3b5 commit dc677a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tcms/issuetracker/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def details(self, url):
"""
issue = self.rpc.get_issue(self.bug_id_from_url(url))
return {
"title": issue["title"],
"id": issue["id"],
"description": issue["content"]["raw"],
"status": issue["state"],
"title": issue["title"],
"url": url,
}
5 changes: 4 additions & 1 deletion tcms/issuetracker/tests/test_bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ def test_bug_id_from_url(self):
def test_details(self):
result = self.integration.details(self.existing_bug_url)

self.assertEqual("Hello World", result["title"])
self.assertEqual(self.existing_bug_id, result["id"])
self.assertIn("First public bug here", result["description"])
self.assertEqual("new", result["status"])
self.assertEqual("Hello World", result["title"])
self.assertEqual(self.existing_bug_url, result["url"])

def test_auto_update_bugtracker(self):
initial_comments = self.integration.rpc.get_comments(self.existing_bug_id)
Expand Down

0 comments on commit dc677a2

Please sign in to comment.