3
votes

I'm currently using the maven-changes-plugin to generate a JIRA report for a given fixVersionId, as follows:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-changes-plugin</artifactId>
    <version>2.9</version>
    <configuration>
        <fixVersionIds>16355</fixVersionIds>
    </configuration>
</plugin>

However, what if instead of specific fixVersionIds, I want to be able to include specific issues? Is there a way to do that? I don't see an option in the usage documentation.

I can use the JQL on the actual Jira site "issueKey=ISSUE-10 OR issueKey=ISSUE=11" but putting that in the filter attribute doesn't seem to work (I have useJql set to true). Even using a simple one like "resolution=1" does not work (the example on the documentation site doesn't work, either). I can see in the logs that both those attributes are set correctly but when it makes the API call to JIRA, it just uses the default settings and doesn't use the filter attribute at all:

Payload: {"jql":"project = RESONANCE AND status in (6) AND resolution in (1) ORDER BY priority DESC, created DESC","maxResults":100,"fields":["*all"]}

What could I possibly be missing?

1
What do you mean by specific JIRA's ? Only a number of JIRA issues? For example ISSUE-10, ISSUE-11, ISSUE-12 something similar?khmarbaise
@khmarbaise Yes, that is correct. I would love it if I could simply put in ISSUE-10,ISSUE-11,ISSUE-12 and nothing else and that's all that would appear in the report.AHungerArtist
From my point of view it does not make sense only putting a limited number of fixed issues in there but it's your turn so i would suggest to check the useJql option.khmarbaise
The problem is that the versioning system used in our JIRA (which I don't control) doesn't allow me to use the fixVersionIds any longer, but I still would like a report of the issues worked on for the release. It would be a lot less work to be able to do the jira report (and look better) than the generic changes-report.AHungerArtist

1 Answers

0
votes

Unfortunately, this appears to be a bug. The RestJiraDownloader that the plugin uses does not use the filter property at all.

I filed an issue: https://issues.apache.org/jira/browse/MCHANGES-353. I actually checked out a local copy and fixed it and it works as expected. Hopefully I'll get some time to submit a patch.

If you want to fix it yourself, go to the doExecute method in RestJiraDownloader and chain the filter method to the jqlQuery string building, like so:

    String jqlQuery = new JqlQueryBuilder( log ).urlEncode( false ).project( jiraProject ).fixVersion(
        getFixFor() ).fixVersionIds( resolvedFixVersionIds ).statusIds( resolvedStatusIds ).priorityIds(
        resolvedPriorityIds ).resolutionIds( resolvedResolutionIds ).components( resolvedComponentIds ).typeIds(
        resolvedTypeIds ).sortColumnNames( sortColumnNames ).filter(filter).build();