curl --location -g --request POST 'http:///rest/api/3/jql/parse' \
--header 'Content-Type: application/json' \
--data-raw '{
"queries": [
"summary ~ test AND (labels in (urgent, blocker) OR lastCommentedBy = currentUser()) AND status CHANGED AFTER startOfMonth(-1M) ORDER BY updated DESC",
"issue.property[\"spaces here\"].value in (\"Service requests\", Incidents)",
"invalid query",
"summary = test",
"summary in test",
"project = INVALID",
"universe = 42"
]
}'{"queries":[{"query":"summary ~ test AND (labels in (urgent, blocker) OR lastCommentedBy = currentUser()) AND status CHANGED AFTER -5d ORDER BY updated DESC","structure":{"where":{"clauses":[{"field":{"name":"summary","encodedName":"summary"},"operator":"~","operand":{"value":"test","encodedValue":"test"}},{"clauses":[{"field":{"name":"labels","encodedName":"labels"},"operator":"in","operand":{"values":[{"value":"urgent","encodedValue":"urgent"},{"value":"blocker","encodedValue":"blocker"}],"encodedOperand":"urgent, blocker)"}},{"field":{"name":"lastCommentedBy","encodedName":"lastCommentedBy","property":[{"entity":"issue","key":"propertyKey","path":"path.in.property","type":"user"}]},"operator":"=","operand":{"function":"currentUser","arguments":[],"encodedOperand":"currentUser()"}}],"operator":"or"},{"field":{"name":"status","encodedName":"status"},"operator":"changed","predicates":[{"operator":"after","operand":{"function":"startOfMonth","arguments":["-1M"],"encodedOperand":"startOfMonth(-1M)"}}]}],"operator":"and"},"orderBy":{"fields":[{"field":{"name":"updated","encodedName":"updated"},"direction":"desc"}]}}},{"query":"issue.property[\"spaces here\"].value in (\"Service requests\", Incidents)","structure":{"where":{"field":{"name":"issue.property[spaces here].value","encodedName":"issue.property[\"spaces here\"].value","property":[{"entity":"issue","key":"spaces here","path":"value"}]},"operator":"in","operand":{"values":[{"value":"Service requests","encodedValue":"\"Service requests\""},{"value":"Incidents","encodedValue":"Incidents"}],"encodedOperand":"(\"Service requests\", Incidents)"}}}},{"query":"invalid query","errors":["Error in the JQL Query: Expecting operator but got 'query'. The valid operators are '=', '!=', '<', '>', '<=', '>=', '~', '!~', 'IN', 'NOT IN', 'IS' and 'IS NOT'. (line 1, character 9)"]},{"query":"summary = test","errors":["The operator '=' is not supported by the 'summary' field."]},{"query":"summary in test","errors":["Operator 'in' does not support the non-list value '\"test\"' for field 'summary'."]},{"query":"project = INVALID","errors":["The value 'INVALID' does not exist for the field 'project'."]},{"query":"universe = 42","errors":["Field 'universe' does not exist or you do not have permission to view it."]}]}
【JIRA7.6.1】API开发者 微信交流群
用微信扫右侧二维码,加入【JIRA7.6.1】API开发者 交流群,互助沟通

扫码加入交流群