Ignore unknown issue keys in JQL condition

Current behaviour: when using the JQL condition, all issue keys mentioned in a commit message must match the JQL's result set. If there is at least on 'unknown' issue key in the commit message, the commit is rejected.

Make this behaviour configurable on the condition level, i.e. let the condition ignore any issue keys that does not match the JQL expression.

Have more questions? Submit a request

3 Comments

  • 1
    Avatar
    Russellknowles

    We would like something similar to this as explained here : We have created a sub-task type of Change Request Defect but when we want our developers to enter a ticket ID we want the rule to check that at least one of the tickets entered is a Standard Issue Type i,e, the parent of the sub-task. The JQL I have written still seems to trigger on all tickets mentioned in commit.JQL Project in (DES, TEC) AND Status not in (Closed, Implemented) AND type in (standardIssueTypes())
    I have also tried using both "one or more issues" or "exactly one", I would have thought "one or more issues" would wok? What am I doing wrong?

  • 0
    Avatar
    Gabor Nagy

    Hi, I copied here my response from the support system as a reference for other customers interested in this feature request:

    "When the plugin verifies a commit message, it starts with parsing all syntactically correct issue keys from the message (see http://www.midori-global.com/products/jira-commit-policy-plugin/documentation/#issue-key-pattern). Then it runs the JQL, and takes the intersection of the result set and the issue key set parsed from the commit message. If there is any issue key in the commit message that is not returned by the JQL, the commit will be rejected. So "one or more issues" and "exactly one" both refer to just those issues that are matched by the JQL.

    So I am fraid that your use case cannot be implemented with the current feature set. If we could differentiate Change Request Defects and Standard Issue Type issues by their keys, you could re-configure the global issue key pattern to match only the latter, but I assume both types can appear in the same project, so this is not viable."

  • 0
    Avatar
    pmc

    Add another vote for this feature request. The old 'Commit Acceptance' plugin had this feature and it's the last feature needed before we can migrate to this plugin. 

Please sign in to leave a comment.