JIRA JQL

作者: 含辞未吐气若幽兰 | 来源:发表于2020-11-25 11:27 被阅读0次

1、WAS 运算符:可以查找当前或曾经的一个状态

    WAS运算符包括Was,Was in,Was not,Was not in

例如:assignee WAS "leo"    这个用于查找当前或曾经分配给leo的所有问题,这个功能很实用也很强大。

2、CHANGED运算符

   CHANGED运算符用于查找问题单的某个特定字段被变更过了。这个运算符有以下一些常见用法:

AFTER “date”

BEFORE “date”

BY “username”

DURING (“date1”,“date2”)

ON “date”

FROM “oldvalue”

TO “newvalue”

    备注: CHANGED运算符常被用于Assignee, Fix Version, Priority, Reporter, Resolution, and Status这些字段。

例子:project not in (TestLog, 内部需求反馈) AND issuetype in (Improvement, "New Feature", 线上BUG) AND status = 已上线 AND status changed from 开发中 to 待测试 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"查找评论里包含有"My PC is quite old"的问题(模糊匹配)

5、日期相关

    查找某个特定日期前或后创建的问题(或某个日期范围)。注意,如果没有指定具体时间,默认为凌晨00:00。查询结果是根据你的JIRA服务器设置的时区。使用如下格式:

"yyyy/MM/dd HH:mm"

"yyyy-MM-dd HH:mm"

"yyyy/MM/dd"

"yyyy-MM-dd"

或者使用"w" (周), "d" (天), "h" (小时)或"m" (分钟)来指定相对于当前时间的日期。默认为“M”(分钟)。一定要使用引号(“);如果省略了引号标记,你提供的数字将被解释为纪元(1970-1-1)之后的毫秒。

注:该字段不支持自动填写功能。

支持的函数

当使用 EQUALS, NOT EQUALS, GREATER THAN, GREATER THAN EQUALS, LESS THAN 或LESS THAN EQUALS运算符时,该字段支持:

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点之前创建的所有问题      created > "-1d"    查找创建不足一天的问题

官方文档:

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功能的使用实例。

序号用法功能描述

1issue in testSuite()搜索项目中的所有测试用例。

2issue in testSuite('Test Suite Name')搜索某个特定根测试用例集中的测试用例。

3issue in testSuite('Test Suite 1/Sub Test Suite')搜索某个特定测试用例集中的测试用例(包含在根测试用例集下的子测试用例集)。

4issue in testSuite('Test Suite 1','Test Suite 2')搜索多个测试用例集中的测试用例。

5issue not in testSuite()搜素没有关联到任何测试用例集的测试用例。

hasRequirements()

以下是hasRequirements() JQL功能的使用实例。

序号用法功能描述

1issue in hasRequirements()搜索所有关联了需求的测试用例。

2issue in hasRequirements('Issuekey1','Issuekey2')搜索所有关联了指定需求的测试用例。

3issue not in hasRequirements() and type = 'Test Case'搜索所有没有关联任何需求的测试用例。

hasTestCases()

以下是hasTestCases() JQL功能的使用实例。

序号用法功能描述

1issue in hasTestCases()搜索所有关联了测试用例的需求。

2issue in hasTestCases('Issuekey1','Issuekey2')搜索所有关联了指定测试用例的需求。

3issue not in hasTestCases() and type = 'Requirement'搜索所有没有关联任何测试用例的需求。

bugsInTestPlan()

以下是bugsInTestPlan() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInTestPlan("Issuekey")搜索关联到指定的一个测试计划中缺陷。

2issue in bugsInTestPlan('Issuekey1','Issuekey2')搜索关联到指定的多个测试计划中的缺陷。

bugsInCycle()

以下是bugsInCycle() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInCycle('TestCycleName')搜索所有关联到指定测试周期的缺陷。

bugsInTestCase()

以下是bugsInTestCase() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInTestCase('issueKey')搜索所有关联到指定测试用例的缺陷。

2issue in bugsInTestCase('issueKey1','issueKey2')搜索所有关联到多个指定的测试用例的缺陷。

bugsInRequirement()

以下是bugsInRequirement() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInRequirement('issueKey')搜索所有关联到指定需求的缺陷。

2issue in bugsInRequirement('issueKey1','issueKey2')搜索所有关联到多个指定的需求的缺陷。

bugsInBuild()

以下是bugsInBuild() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInBuild('BuildName')搜索所有从指定的测试版本中报告的缺陷。

2issue in bugsInBuild('BuildName1','BuildName2')搜索所有从指定的多个测试版本中报告的缺陷。

bugsInEnvironment()

以下是bugsInEnvironment() JQL功能的使用实例。

序号用法功能描述

1issue in bugsInEnvironment('EnvName')搜索所有从指定的“测试环境”中报告的缺陷。

2issue in bugsInEnvironment('EnvName1','EnvName2')搜索所有从指定的多个“测试环境”中报告的缺陷。

hasActiveCycle()

以下是hasActiveCycle() JQL功能的使用实例。

序号用法功能描述

1issue in hasActiveCycle()搜索所有包含处于“开始”状态测试周期的测试计划。

hasCycleWithBugs()

以下是hasCycleWithBugs() JQL功能的使用实例。

序号用法功能描述

1issue in hasCycleWithBugs()搜索所有包含了“测试周期中关联了缺陷”的测试计划。

hasCycleWithUnresolvedBugs()

以下是hasCycleWithUnresolvedBugs() JQL功能的使用实例。

序号用法功能描述

1issue in hasCycleWithUnresolvedBugs()搜索所有包含了“测试周期中存在’未解决‘状态缺陷”的测试计划。

hasCycleWithFailedTestCases()

以下是hasCycleWithFailedTestCases() JQL功能的使用实例。

序号用法功能描述

1issue in hasCycleWithFailedTestCases()搜索所有包含了“测试周期中存在’失败‘状态测试用例”的测试计划。

hasCycleWithBlockedTestCases()

以下是hasCycleWithBlockedTestCases() JQL功能的使用实例。

序号用法功能描述

1issue in hasCycleWithBlockedTestCases()搜索所有包含了“测试周期中存在’锁定‘状态测试用例”的测试计划。

hasCycleWithUntestedTestCases()

以下是hasCycleWithUntestedTestCases() JQL功能的使用实例。

序号用法功能描述

1issue in hasCycleWithUntestedTestCases()搜索所有包含了“测试周期中存在’未测试‘状态测试用例”的测试计划。

hasCyclesOfDefectCount()

以下是hasCyclesOfDefectCount() JQL功能的使用实例,支持的运算符是:“==”,“>=”和“<=”。

序号用法功能描述

1issue in hasCyclesOfDefectCount("10")搜索所有包含了“测试周期中关联了10个缺陷”的测试计划。

2issue in hasCyclesOfDefectCount("<=","10")搜索所有包含了“测试周期中关联了10个或者少于10个缺陷”的测试计划。

3issue in hasCyclesOfDefectCount(">=","10")搜索所有包含了“测试周期中关联了10个或者多于10个缺陷”的测试计划。

testPlanMembers()

以下是 testPlanMembers() JQL功能的使用实例。

ID用法功能描述

1issue in testPlanMembers("issueKey")搜索指定测试计划中的所有测试用例。

childrenOfParentRequirement()

以下是childrenOfParentRequirement()JQL功能的使用实例。

ID用法功能描述

1issue in childrenOfParentRequirement("issueKey")搜索指定需求中直接关联的子级需求。

2issue in childrenOfParentRequirement("issueKey","all")搜索指定需求中直接关联的子级需求以及间接关联的子级需求。

testPlansForTester()

以下是testPlansForTester()JQL功能的使用实例。

ID用法功能描述

1issue in testPlansForTester("username")搜索所有包含了指定测试者(=用户名)的测试计划。

testCycleMembers()

以下是 testCycleMembers()JQL功能的使用实例。支持这些运算符: "==", ">=" 和"<="。

ID用法功能描述

1issue in testCycleMembers('TestPlanIssueKey','TestCycleName')搜索指定测试周期中的测试用例。

2issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Not Tested')搜索指定测试周期中所有状态为“未测试”的测试用例。

3issue in testCycleMembers('TestPlanIssueKey','TestCycleName','NA')搜索指定测试周期中所有状态为“不适用”的测试用例。

4issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Passed')搜索指定测试周期中所有状态为“通过”的测试用例

5issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Failed')搜索指定测试周期中所有状态为“失败”的测试用例

6issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Blocked')搜索指定测试周期中所有状态为“锁定”的测试用例

相关文章

网友评论

      本文标题:JIRA JQL

      本文链接:https://www.haomeiwen.com/subject/pxttmktx.html