{"id":1041,"date":"2021-09-12T10:36:03","date_gmt":"2021-09-12T02:36:03","guid":{"rendered":"https:\/\/www.chenqing.work\/?p=1041"},"modified":"2021-09-12T17:26:51","modified_gmt":"2021-09-12T09:26:51","slug":"jql-%e9%ab%98%e7%ba%a7%e6%90%9c%e7%b4%a2%e5%85%a5%e5%9d%91","status":"publish","type":"post","link":"https:\/\/www.chenqing.work\/?p=1041","title":{"rendered":"JQL \u9ad8\u7ea7\u641c\u7d22\u5165\u5751"},"content":{"rendered":"\n<p>\u5f88\u591a\u77e5\u540d\u8f6f\u4ef6\u90fd\u4f1a\u53d1\u660e\u4e2a\u81ea\u5df1\u7684 SQL like \u641c\u7d22\u8bed\u8a00\uff0c\u6bd4\u5982 ES  \u7684 DSL\u3001Splunk \u7684 SPL\uff0cJira \u4e5f\u6709 JQL &#8211; Jira Query Language\u3002<\/p>\n\n\n\n<p>\u7c7b\u4f3c\u4e8e Object \u5728 Java \u9ed1\u8bdd\u4f53\u7cfb\u91cc\u7684\u5730\u4f4d\uff0cIssue \u5728\u654f\u6377\u7684\u9ed1\u8bdd\u4f53\u7cfb\u91cc\u5360\u636e\u4e86\u6838\u5fc3\u4f4d\u7f6e\u3002Issue \u5177\u4f53\u53c8\u53ef\u4ee5\u5206\u4e3a\u8fd9\u4e48\u51e0\u4e2a\u5bb6\u4f19\uff1aEpic\u3001Story\u3001Feature\u3001Task\u3001Subtask\u3001Bug\u3001Improvement\uff0c\u5bf9\u5e94\u4e2d\u6587\u7ffb\u8bd1\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"114\" src=\"https:\/\/www.chenqing.work\/wp-content\/uploads\/2021\/09\/image.png\" alt=\"\" class=\"wp-image-1043\"\/><figcaption><sup>\u6765\u81ea\u535a\u4e3b\u7684\u5410\u69fd\uff1a\u8d77\u624b\u5c31\u662f\u4e00\u4e2a\u3010\u53f2\u8bd7\u3011\uff0c\u4e00\u80a1\u6d53\u6d53\u7684\u4e2d\u4e8c\u897f\u5e7b\u98ce\ud83d\ude02\u3002<\/sup><\/figcaption><\/figure>\n\n\n\n<p>\u5173\u4e8e\u53f2\u8bd7\u5982\u4f55\u62c6\u89e3\uff0c\u654f\u6377\u600e\u4e48\u73a9\uff0c\u9c8d\u52c3\u5927\u53d4\u6700\u8fd1\u5199\u4e86<a href=\"https:\/\/book.douban.com\/subject\/35083518\/\" data-type=\"URL\" data-id=\"https:\/\/book.douban.com\/subject\/35083518\/\">\u4e00\u672c\u4e66<\/a>\uff0c\u53ef\u4ee5\u62ff\u6765\u5b66\u4e60\u5b66\u4e60\u3002<\/p>\n\n\n\n<p>\u4eca\u5929\u4e3b\u8981\u60f3\u7ed9\u5927\u5bb6\u7ffb\u8bd1\u7ffb\u8bd1 JQL \u91cc\u7684\u5b9e\u7528\u6280\u80fd\u2014\u2014\u9488\u5bf9 Issue \u7684\u9ad8\u7ea7\u641c\u7d22\uff0c\u4e0b\u9762\u5148\u6765\u770b\u4e00\u5e45\u5b98\u65b9\u76d7\u56fe\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"987\" height=\"397\" src=\"https:\/\/www.chenqing.work\/wp-content\/uploads\/2021\/09\/Image.png\" alt=\"\" class=\"wp-image-1042\"\/><\/figure>\n\n\n\n<p>\u4e0a\u56fe\u8bf4\u660e\uff0c\u7b80\u5355\u641c\u7d22\u5305\u62ec\u4e09\u4e2a\u8981\u7d20\uff1a<a href=\"https:\/\/support.atlassian.com\/jira-software-cloud\/docs\/advanced-search-reference-jql-fields\/\" data-type=\"URL\" data-id=\"https:\/\/support.atlassian.com\/jira-software-cloud\/docs\/advanced-search-reference-jql-fields\/\">field<\/a>\u3001<a href=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-operators-reference-939938745.html\" data-type=\"URL\" data-id=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-operators-reference-939938745.html\">operator<\/a>\u3001value\uff0c\u518d\u590d\u6742\u70b9\u4e5f\u5c31\u662f\u53e0\u52a0\u51e0\u4e2a\u641c\u7d22\u6761\u4ef6\uff0c\u52a0\u4e0a <a href=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-keywords-reference-939938744.html\" data-type=\"URL\" data-id=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-keywords-reference-939938744.html\">keyword<\/a>\u3001<a href=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-functions-reference-939938746.html\" data-type=\"URL\" data-id=\"https:\/\/confluence.atlassian.com\/jirasoftwareserver\/advanced-searching-functions-reference-939938746.html\">function<\/a> \u3002\u8981\u5199\u9ad8\u7ea7\u641c\u7d22\u7684\u8bdd\uff0c\u5fc5\u987b\u5148\u628a\u4e0a\u9762\u51e0\u4e2a\u6982\u5ff5\u6574\u660e\u767d\u3002\u76f4\u63a5\u642c\u8fd0\u5b98\u65b9\u5217\u8868\u4e2d\u4e2a\u4eba\u8ba4\u4e3a\u4f7f\u7528\u9891\u7387\u8f83\u9ad8\u7684\u5185\u5bb9\uff1a<\/p>\n\n\n\n<p><strong>Field<\/strong>\uff1aproject\uff08\u9879\u76ee\uff09\u3001component\uff08\u6a21\u5757\uff09\u3001assignee\uff08\u7ecf\u529e\u4eba\uff09\u3001priority\uff08\u4f18\u5148\u7ea7\uff09\u3001labels\uff08\u6807\u7b7e\uff09\u3001status\uff08\u72b6\u6001\uff09\u3001resolution\uff08\u89e3\u51b3\u65b9\u6848\uff09\u3001resolved\uff08\u89e3\u51b3\u65f6\u95f4\uff09\u3001creator\uff08\u521b\u5efa\u4eba\uff09\u3001description\uff08\u63cf\u8ff0\uff09\u3001created\uff08\u521b\u5efa\u65f6\u95f4\uff09\u3001due\uff08\u5230\u671f\u65e5\u671f\uff09\u3001reporter\uff08\u62a5\u544a\u4eba\uff09\u3001comment\uff08\u8bc4\u8bba\uff09\u3001sprint\uff08\u51b2\u523a\uff09\u3002<\/p>\n\n\n\n<p><strong>Operator<\/strong>\uff1a=\uff08\u4e0d\u80fd\u7528\u4e8e text \u5b57\u6bb5\uff09\u3001!=\uff08\u5982\u679c\u4e00\u4e2a field \u8fde\u503c\u90fd\u6ca1\u6709\u5219\u5339\u914d\u4e0d\u4e0a\uff0c\u4e0d\u80fd\u7528\u4e8e text \u5b57\u6bb5\uff09\u3001&gt;\uff08\u53ef\u6bd4\u8f83\u6570\u5b57\u3001\u65e5\u671f\u3001\u4f18\u5148\u7ea7\uff09\u3001&gt;=\uff08 \u53ef\u6bd4\u8f83\u6570\u5b57\u3001\u65e5\u671f\u3001\u4f18\u5148\u7ea7 \uff09\u3001&lt;\uff08 \u53ef\u6bd4\u8f83\u6570\u5b57\u3001\u65e5\u671f\u3001\u4f18\u5148\u7ea7 \uff09\u3001&lt;=\uff08 \u53ef\u6bd4\u8f83\u6570\u5b57\u3001\u65e5\u671f\u3001\u4f18\u5148\u7ea7 \uff09\u3001~\uff08\u5305\u542b\uff09\u3001!~\uff08\u4e0d\u5305\u542b\uff09\u3001IS\uff08\u503c\u4e3a\u7a7a\uff0c\u53d6 NULL\/EMPTY\uff09\u3001IS NOT\uff08\u503c\u4e0d\u4e3a\u7a7a\uff0c\u53d6 NULL\/EMPTY\uff09\u3001WAS\uff08\u6709\u8fc7\u67d0\u4e2a\u503c\uff09\u3001WAS NOT\uff08 \u6ca1\u6709\u8fc7\u67d0\u4e2a\u503c \uff09\u3001WAS IN\uff08 \u6709\u8fc7\u67d0\u51e0\u4e2a\u503c\u4e4b\u4e00 \uff09\u3001WAS NOT IN\uff08 \u6ca1\u6709\u8fc7\u67d0\u51e0\u4e2a\u503c\u4e2d\u4efb\u4f55\u4e00\u4e2a \uff09\u3001IN\uff08\u5f53\u524d\u503c\u4e3a\u67d0\u51e0\u4e2a\u503c\u4e4b\u4e00\uff09\u3001NOT IN\uff08 \u5f53\u524d\u503c\u4e0d\u4e3a\u67d0\u51e0\u4e2a\u503c\u4e2d\u4efb\u4f55\u4e00\u4e2a \uff09\u3001CHANGED\uff08\u53d1\u751f\u8fc7\u53d8\u5316\uff09\u3002<\/p>\n\n\n\n<p><strong>Keyword<\/strong>\uff1aAND\uff08\u903b\u8f91\u4e0e\uff09\u3001OR\uff08\u903b\u8f91\u6216\uff09\u3001NOT\uff08\u903b\u8f91\u975e\uff09\u3001EMPTY\uff08\u5b57\u6bb5\u6ca1\u6709\u503c\uff09\u3001NULL\uff08 \u5b57\u6bb5\u6ca1\u6709\u503c \uff09\u3001ORDER BY\uff08\u6309\u67d0\u5b57\u6bb5\u6392\u5e8f\uff0cDESC\/ASC\uff09\u3002<\/p>\n\n\n\n<p><strong>Function<\/strong>\uff1acurrentUser()\uff08\u8fd4\u56de\u5f53\u524d\u767b\u5f55\u7528\u6237\uff09\u3001endOfDay()\uff08\u8fd4\u56de\u65e5\u7ec8\u65f6\u95f4\uff09\u3001endOfWeek()\uff08\u8fd4\u56de\u5468\u7ec8\u65f6\u95f4\uff09\u3001endOfMonth()\uff08\u8fd4\u56de\u6708\u7ec8\u65f6\u95f4\uff09\u3001endOfYear()\uff08\u8fd4\u56de\u5e74\u7ec8\u65f6\u95f4\uff09\u3001futureSprints()\uff08\u8fd4\u56de\u8fd8\u6ca1\u5f00\u59cb\u7684 sprint\uff09\u3001myApproval()\uff08\u8fd4\u56de\u6211\u4f5c\u4e3a\u5ba1\u6279\u4eba\u7684 Issue\uff09\u3001myPending()\uff08\u8fd4\u56de\u7b49\u5f85\u6211\u5ba1\u6279\u7684 Issue\uff09\u3001now()\uff08\u8fd4\u56de\u5f53\u524d\u65f6\u95f4\uff09\u3001openSprints()\uff08\u8fd4\u56de\u6b63\u5728\u8fdb\u884c\u4e2d\u7684 sprint\uff09\u3001pending()\uff08\u8fd4\u56de\u7b49\u5f85\u5ba1\u6279\u7684 Issue\uff09\u3001startOfDay()\uff08\u8fd4\u56de\u65e5\u521d\u65f6\u95f4\uff09\u3001 startOfWeek()\uff08\u8fd4\u56de\u5468\u521d\u65f6\u95f4\uff09\u3001 startOfMonth()\uff08\u8fd4\u56de\u6708\u521d\u65f6\u95f4\uff09\u3001 startOfYear()\uff08\u8fd4\u56de\u5e74\u521d\u65f6\u95f4\uff09\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u5c31\u53ef\u4ee5\u5199\u4e00\u4e9b\u6761\u4ef6\u7ec4\u5408\u4e86\uff0c\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u540d\u4e3a Test \u7684\u9879\u76ee<\/p>\n\n\n\n<p>1\uff09\u5f53\u524d\u9879\u76ee\u7684\u6240\u6709\u672a\u89e3\u51b3 Issue \u4e14\u6309\u4f18\u5148\u7ea7\u5012\u6392\uff1aproject = Test AND resolution = Unresolved ORDER BY priority DESC<\/p>\n\n\n\n<p>2\uff09\u770b\u770b\u8001\u5927\u5f20\u9ebb\u5b50\u73b0\u5728\u8fd8\u6709\u54ea\u4e9b\u672a\u89e3\u51b3\u7684 Issue\uff1a project = Test AND resolution = Unresolved AND assignee = \u5f20\u9ebb\u5b50 ORDER BY priority DESC <\/p>\n\n\n\n<p>3\uff09\u6628\u5929\u5230\u4eca\u5929\u53c8\u65b0\u5efa\u4e86\u591a\u5c11 Issue\uff1a project = Test AND created &gt;= startOfDay(-1)  ORDER BY priority DESC  <\/p>\n\n\n\n<p>4\uff09\u770b\u770b\u6d88\u606f\u4e2d\u95f4\u4ef6\u901a\u4fe1\u6a21\u5757\u4eca\u5929\u6709\u54ea\u4e9b Issue \u5230\u671f\u4e86\uff1a project = Test AND due = endOfDay()  AND component = \u6d88\u606f\u4e2d\u95f4\u4ef6\u901a\u4fe1\u6a21\u5757  ORDER BY priority DESC  <\/p>\n\n\n\n<p>5\uff09\u6211\u7684\u5f85\u529e\u4efb\u52a1\uff1a project = Test  AND resolution = Unresolved  AND  assignee = currentUser()   ORDER BY priority DESC <\/p>\n\n\n\n<p>&#8230; \u6309\u9700\u7ec4\u5408\uff0c\u81ea\u5df1\u73a9\u5427<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f88\u591a\u77e5\u540d\u8f6f\u4ef6\u90fd\u4f1a\u53d1\u660e\u4e2a\u81ea\u5df1\u7684 SQL like \u641c\u7d22\u8bed\u8a00\uff0c\u6bd4\u5982 ES \u7684 DSL\u3001Splunk \u7684  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[42,43,3,44],"class_list":["post-1041","post","type-post","status-publish","format-standard","hentry","category-code","tag-jira","tag-43","tag-3","tag-44"],"_links":{"self":[{"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/posts\/1041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1041"}],"version-history":[{"count":22,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/posts\/1041\/revisions"}],"predecessor-version":[{"id":1067,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=\/wp\/v2\/posts\/1041\/revisions\/1067"}],"wp:attachment":[{"href":"https:\/\/www.chenqing.work\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chenqing.work\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}