[英]Python JIRA Rest API get cases from board ORDER BY last updated
我已經成功地獲得了一個使用 Python 代碼的 Jira rest API。 它列出了案例。 但是,它列出了按創建日期排序的最后 50 個案例。 我想按更新日期列出 50 個案例。
這是我的 Python 代碼:
jiraOptions = {'server': "https://xxx.atlassian.net"}
jira = JIRA(options=jiraOptions, basic_auth=(jira_workspace_email, jira_api_token))
for singleIssue in jira.search_issues(jql_str=f"project = GEN"):
key = singleIssue.key
raw_fields_json = singleIssue.raw['fields']
created = raw_fields_json['created']
updated = raw_fields_json['updated']
jiraOptions = {'server': "https://xxx.atlassian.net"}
jira = JIRA(options=jiraOptions, basic_auth=(jira_workspace_email, jira_api_token))
# Modify the JQL string to include the "order by" clause
jql_str = f"project = GEN order by updated"
for singleIssue in jira.search_issues(jql_str=jql_str):
key = singleIssue.key
raw_fields_json = singleIssue.raw['fields']
created = raw_fields_json['created']
updated = raw_fields_json['updated']
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.