Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(abr-testing): Link relevant JIRA tickets #15849

Merged
merged 9 commits into from
Jul 31, 2024
5 changes: 2 additions & 3 deletions abr-testing/abr_testing/automation/jira_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def __init__(self, url: str, api_token: str, email: str) -> None:
"Content-Type": "application/json",
}

def issues_on_board(self, board_id: str) -> List[List[Any]]:
def issues_on_board(self, project_key: str) -> List[List[Any]]:
"""Print Issues on board."""
params = {"jql": "project = RABR"}
params = {"jql": f"project = {project_key}"}
response = requests.get(
f"{self.url}/rest/api/3/search",
headers=self.headers,
Expand Down Expand Up @@ -82,7 +82,6 @@ def link_issues(self, to_link: list, ticket_key: str) -> None:
auth=self.auth,
data=link_data,
)
rclarke0 marked this conversation as resolved.
Show resolved Hide resolved
print(response)

def open_issue(self, issue_key: str) -> str:
"""Open issue on web browser."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ def get_run_error_info_from_robot(
reporter_id = args.reporter_id[0]
file_paths = read_robot_logs.get_logs(storage_directory, ip)
ticket = jira_tool.JiraTicket(url, api_token, email)
ticket.issues_on_board(board_id)
users_file_path = ticket.get_jira_users(storage_directory)
assignee_id = get_user_id(users_file_path, assignee)
run_log_file_path = ""
Expand Down Expand Up @@ -520,7 +519,7 @@ def get_run_error_info_from_robot(
parent_key = project_key + "-" + robot.split("ABR")[1]

# Grab all previous issues
all_issues = ticket.issues_on_board(board_id)
all_issues = ticket.issues_on_board(project_key)

rclarke0 marked this conversation as resolved.
Show resolved Hide resolved
# TODO: read board to see if ticket for run id already exists.
# CREATE TICKET
Expand Down
Loading