JIRA JQL

1、WAS 運(yùn)算符:可以查找當(dāng)前或曾經(jīng)的一個(gè)狀態(tài)

? ??WAS運(yùn)算符包括Was,Was in,Was not,Was not in

例如:assignee WAS "leo"? ? 這個(gè)用于查找當(dāng)前或曾經(jīng)分配給leo的所有問(wèn)題,這個(gè)功能很實(shí)用也很強(qiáng)大。

2、CHANGED運(yùn)算符

? ?CHANGED運(yùn)算符用于查找問(wèn)題單的某個(gè)特定字段被變更過(guò)了。這個(gè)運(yùn)算符有以下一些常見(jiàn)用法:

AFTER “date”

BEFORE “date”

BY “username”

DURING (“date1”,“date2”)

ON “date”

FROM “oldvalue”

TO “newvalue”

? ??備注: CHANGED運(yùn)算符常被用于Assignee, Fix Version, Priority, Reporter, Resolution, and Status這些字段。

例子:project not in (TestLog, 內(nèi)部需求反饋) AND issuetype in (Improvement, "New Feature", 線上BUG) AND status = 已上線 AND?status changed from 開(kāi)發(fā)中 to 待測(cè)試 by currentUser() before endOfMonth() after startOfMonth()?ORDER BY createdDate DESC

3、查詢是否帶有附件

? ??attachments IS NOT EMPTY

? ??attachments IS EMPTY

4、查詢包含特定文本

comment ~ "My PC is quite old"查找評(píng)論里包含有"My PC is quite old"的問(wèn)題(模糊匹配)

5、日期相關(guān)

? ??查找某個(gè)特定日期前或后創(chuàng)建的問(wèn)題(或某個(gè)日期范圍)。注意,如果沒(méi)有指定具體時(shí)間,默認(rèn)為凌晨00:00。查詢結(jié)果是根據(jù)你的JIRA服務(wù)器設(shè)置的時(shí)區(qū)。使用如下格式:

"yyyy/MM/dd HH:mm"

"yyyy-MM-dd HH:mm"

"yyyy/MM/dd"

"yyyy-MM-dd"

或者使用"w" (周), "d" (天), "h" (小時(shí))或"m" (分鐘)來(lái)指定相對(duì)于當(dāng)前時(shí)間的日期。默認(rèn)為“M”(分鐘)。一定要使用引號(hào)(“);如果省略了引號(hào)標(biāo)記,你提供的數(shù)字將被解釋為紀(jì)元(1970-1-1)之后的毫秒。

注:該字段不支持自動(dòng)填寫(xiě)功能。

支持的函數(shù)

當(dāng)使用 EQUALS, NOT EQUALS, GREATER THAN, GREATER THAN EQUALS, LESS THAN 或LESS THAN EQUALS運(yùn)算符時(shí),該字段支持:

currentLogin()

lastLogin()

now()

startOfDay()

startOfWeek()

startOfMonth()

startOfYear()

endOfDay()

endOfWeek()

endOfMonth()

endOfYear()

例子:created > "2010/12/12" and created < "2010/12/12 14:00"? ?查找2010年12月12日下午2點(diǎn)之前創(chuàng)建的所有問(wèn)題? ? ??created > "-1d"? ??查找創(chuàng)建不足一天的問(wèn)題

官方文檔:

https://confluence.atlassian.com/jirasoftwareserver082/advanced-searching-974359675.html

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/


SynapseRT JQL

testSuite()

以下是testSuite() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in testSuite()搜索項(xiàng)目中的所有測(cè)試用例。

2issue in testSuite('Test Suite Name')搜索某個(gè)特定根測(cè)試用例集中的測(cè)試用例。

3issue in testSuite('Test Suite 1/Sub Test Suite')搜索某個(gè)特定測(cè)試用例集中的測(cè)試用例(包含在根測(cè)試用例集下的子測(cè)試用例集)。

4issue in testSuite('Test Suite 1','Test Suite 2')搜索多個(gè)測(cè)試用例集中的測(cè)試用例。

5issue not in testSuite()搜素沒(méi)有關(guān)聯(lián)到任何測(cè)試用例集的測(cè)試用例。

hasRequirements()

以下是hasRequirements() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasRequirements()搜索所有關(guān)聯(lián)了需求的測(cè)試用例。

2issue in hasRequirements('Issuekey1','Issuekey2')搜索所有關(guān)聯(lián)了指定需求的測(cè)試用例。

3issue not in hasRequirements() and type = 'Test Case'搜索所有沒(méi)有關(guān)聯(lián)任何需求的測(cè)試用例。

hasTestCases()

以下是hasTestCases() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasTestCases()搜索所有關(guān)聯(lián)了測(cè)試用例的需求。

2issue in hasTestCases('Issuekey1','Issuekey2')搜索所有關(guān)聯(lián)了指定測(cè)試用例的需求。

3issue not in hasTestCases() and type = 'Requirement'搜索所有沒(méi)有關(guān)聯(lián)任何測(cè)試用例的需求。

bugsInTestPlan()

以下是bugsInTestPlan() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in bugsInTestPlan("Issuekey")搜索關(guān)聯(lián)到指定的一個(gè)測(cè)試計(jì)劃中缺陷。

2issue in bugsInTestPlan('Issuekey1','Issuekey2')搜索關(guān)聯(lián)到指定的多個(gè)測(cè)試計(jì)劃中的缺陷。

bugsInCycle()

以下是bugsInCycle() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in bugsInCycle('TestCycleName')搜索所有關(guān)聯(lián)到指定測(cè)試周期的缺陷。

bugsInTestCase()

以下是bugsInTestCase() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in bugsInTestCase('issueKey')搜索所有關(guān)聯(lián)到指定測(cè)試用例的缺陷。

2issue in bugsInTestCase('issueKey1','issueKey2')搜索所有關(guān)聯(lián)到多個(gè)指定的測(cè)試用例的缺陷。

bugsInRequirement()

以下是bugsInRequirement() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in bugsInRequirement('issueKey')搜索所有關(guān)聯(lián)到指定需求的缺陷。

2issue in bugsInRequirement('issueKey1','issueKey2')搜索所有關(guān)聯(lián)到多個(gè)指定的需求的缺陷。

bugsInBuild()

以下是bugsInBuild()?JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in bugsInBuild('BuildName')搜索所有從指定的測(cè)試版本中報(bào)告的缺陷。

2issue in bugsInBuild('BuildName1','BuildName2')搜索所有從指定的多個(gè)測(cè)試版本中報(bào)告的缺陷。

bugsInEnvironment()

以下是bugsInEnvironment()?JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in?bugsInEnvironment('EnvName')搜索所有從指定的“測(cè)試環(huán)境”中報(bào)告的缺陷。

2issue in?bugsInEnvironment('EnvName1','EnvName2')搜索所有從指定的多個(gè)“測(cè)試環(huán)境”中報(bào)告的缺陷。

hasActiveCycle()

以下是hasActiveCycle()?JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasActiveCycle()搜索所有包含處于“開(kāi)始”狀態(tài)測(cè)試周期的測(cè)試計(jì)劃。

hasCycleWithBugs()

以下是hasCycleWithBugs() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasCycleWithBugs()搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了缺陷”的測(cè)試計(jì)劃。

hasCycleWithUnresolvedBugs()

以下是hasCycleWithUnresolvedBugs() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasCycleWithUnresolvedBugs()搜索所有包含了“測(cè)試周期中存在’未解決‘狀態(tài)缺陷”的測(cè)試計(jì)劃。

hasCycleWithFailedTestCases()

以下是hasCycleWithFailedTestCases() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasCycleWithFailedTestCases()搜索所有包含了“測(cè)試周期中存在’失敗‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃。

hasCycleWithBlockedTestCases()

以下是hasCycleWithBlockedTestCases() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasCycleWithBlockedTestCases()搜索所有包含了“測(cè)試周期中存在’鎖定‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃。

hasCycleWithUntestedTestCases()

以下是hasCycleWithUntestedTestCases() JQL功能的使用實(shí)例。

序號(hào)用法功能描述

1issue in hasCycleWithUntestedTestCases()搜索所有包含了“測(cè)試周期中存在’未測(cè)試‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃。

hasCyclesOfDefectCount()

以下是hasCyclesOfDefectCount() JQL功能的使用實(shí)例,支持的運(yùn)算符是:“==”,“>=”和“<=”。

序號(hào)用法功能描述

1issue?in hasCyclesOfDefectCount("10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)缺陷”的測(cè)試計(jì)劃。

2issue in hasCyclesOfDefectCount("<=","10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)或者少于10個(gè)缺陷”的測(cè)試計(jì)劃。

3issue in hasCyclesOfDefectCount(">=","10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)或者多于10個(gè)缺陷”的測(cè)試計(jì)劃。

testPlanMembers()

以下是?testPlanMembers()?JQL功能的使用實(shí)例。

ID用法功能描述

1issue in testPlanMembers("issueKey")搜索指定測(cè)試計(jì)劃中的所有測(cè)試用例。

childrenOfParentRequirement()

以下是childrenOfParentRequirement()JQL功能的使用實(shí)例。

ID用法功能描述

1issue in childrenOfParentRequirement("issueKey")搜索指定需求中直接關(guān)聯(lián)的子級(jí)需求。

2issue in?childrenOfParentRequirement("issueKey","all")搜索指定需求中直接關(guān)聯(lián)的子級(jí)需求以及間接關(guān)聯(lián)的子級(jí)需求。

testPlansForTester()

以下是testPlansForTester()JQL功能的使用實(shí)例。

ID用法功能描述

1issue in testPlansForTester("username")搜索所有包含了指定測(cè)試者(=用戶名)的測(cè)試計(jì)劃。

testCycleMembers()

以下是?testCycleMembers()JQL功能的使用實(shí)例。支持這些運(yùn)算符: "==", ">=" 和"<="。

ID用法功能描述

1issue in testCycleMembers('TestPlanIssueKey','TestCycleName')搜索指定測(cè)試周期中的測(cè)試用例。

2issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Not Tested')搜索指定測(cè)試周期中所有狀態(tài)為“未測(cè)試”的測(cè)試用例。

3issue in testCycleMembers('TestPlanIssueKey','TestCycleName','NA')搜索指定測(cè)試周期中所有狀態(tài)為“不適用”的測(cè)試用例。

4issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Passed')搜索指定測(cè)試周期中所有狀態(tài)為“通過(guò)”的測(cè)試用例

5issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Failed')搜索指定測(cè)試周期中所有狀態(tài)為“失敗”的測(cè)試用例

6issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Blocked')搜索指定測(cè)試周期中所有狀態(tài)為“鎖定”的測(cè)試用例

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容