Skip to content

Commit

Permalink
When searching for Jira projects match by project key too
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Sep 8, 2023
1 parent c3223db commit a5d3a42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tcms/issuetracker/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def get_project_from_jira(self, execution):
search_for = execution.run.plan.product.name.lower()
projects_in_jira = self.rpc.projects()
for project in self.rpc.projects():
if project.name.lower() == search_for:
if (project.name.lower() == search_for) or (
project.key.lower() == search_for
):
return project

return projects_in_jira[0]
Expand Down

0 comments on commit a5d3a42

Please sign in to comment.