Skip to content

Commit b5b9b13

Browse files
committed
Add jql parameter to report API for filtering Jira tickets to update with test results
1 parent e1a9ae1 commit b5b9b13

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Full plugin configuration below, optional properties can be omitted
7272
<runName>Custom test run name</runName>
7373
<!--Optional - Run metadata -->
7474
<metadata>{"env ":"uat ","build":"456"}</metadata>
75+
<!--Optional - all Jira tickets will be updated with test results by default; when JQL is provided only filtered tickets will be updated -->
76+
<jql>project = XX AND key in ('XXX-1')</jql>
7577
</configuration>
7678
</execution>
7779
</executions>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<groupId>com.assertthat.plugins</groupId>
44
<artifactId>assertthat-bdd-maven-plugin</artifactId>
55
<packaging>maven-plugin</packaging>
6-
<version>1.6.2</version>
6+
<version>1.6.3</version>
77
<name>assertthat-bdd-maven-plugin</name>
88
<description>AssertThat BDD Jira maven plugin</description>
99
<url>http://www.assertthat.com</url>
@@ -23,7 +23,7 @@
2323
<url>https://github.com/assertthat/assertthat-bdd-maven-plugin</url>
2424
<connection>scm:git:ssh://[email protected]/assertthat/assertthat-bdd-maven-plugin.git</connection>
2525
<developerConnection>scm:git:ssh://[email protected]/assertthat/assertthat-bdd-maven-plugin.git</developerConnection>
26-
<tag>v1.4</tag>
26+
<tag>v1.6.3</tag>
2727
</scm>
2828
<developers>
2929
<developer>
@@ -77,7 +77,7 @@
7777
<dependency>
7878
<groupId>com.assertthat.plugins</groupId>
7979
<artifactId>assertthat-bdd-standalone</artifactId>
80-
<version>1.9.3</version>
80+
<version>1.9.4</version>
8181
</dependency>
8282
</dependencies>
8383
<build>

src/main/java/com/assertthat/ReportMojo.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public class ReportMojo extends AbstractMojo {
6464
private String jiraServerUrl;
6565
@Parameter(property = "metadata")
6666
private String metadata;
67+
@Parameter(property = "jql")
68+
private String jql;
6769

6870
public void execute()
6971
throws MojoExecutionException {
@@ -79,7 +81,7 @@ public void execute()
7981
proxyUsername,
8082
proxyPassword,
8183
null,
82-
null,
84+
jql,
8385
null,
8486
type,
8587
jiraServerUrl,
@@ -93,7 +95,7 @@ public void execute()
9395
Long runid = -1L;
9496
for (String f : files) {
9597
try {
96-
runid = apiUtil.upload(runid, arguments.getRunName(), arguments.getJsonReportFolder() + f, arguments.getType(), metadata);
98+
runid = apiUtil.upload(runid, arguments.getRunName(), arguments.getJsonReportFolder() + f, arguments.getType(), metadata, arguments.getJql());
9799
} catch (IOException e) {
98100
throw new MojoExecutionException("Failed to upload report", e);
99101
} catch (JSONException e) {

0 commit comments

Comments
 (0)