Sign in
agent:

Mark ticket as DONE

There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.
import json from jira import JIRA creds = _get_creds(cred_label)['creds'] username = creds['username'] api_key = creds['password'] myjira = None if username and api_key and jira_server: myjira = JIRA( server=jira_server, basic_auth=(username, api_key) ) else: _problem = True msg = "Missing username or API key" print(msg) if myjira: try: next_states = myjira.transitions(issue_id) xns = [xn['name'] for xn in next_states] if 'Mark as done' in xns: op = myjira.transition_issue(issue_id, 'Mark as done') elif 'Resolved' in xns: op = myjira.transition_issue(issue_id, 'Resolved') else: msg = f"ERROR! Unable to transation to DONE for ticket: {issue_id}\n" msg += "Possible transitions: " + json.dumps(xns) print(msg) except Exception as e: msg = str(e) print(msg)
copied