Can the commit acceptance plugin require that the issue key be the first token in an SVN comment?

We want to enforce having the Jira issue key as the first token/word in comment when checking in to SVN. We are using the commit acceptance plugin to ensure that there is a valid Jira ticket and that the ticket is unresolved before anything can be committed.

In addition, we would like to ensure no other tickets appear in the comments, if that is possible.

2 answers

0 vote

Hi Robert,

As the commit must be done directly in the repository first, to only then show up in JIRA, this cannot be enforced by the plugin.

Unfortunately this is a user education task rather than a plugin task. Users must have that in mind before committing, because there's no turning back after source code changes have been committed.

Also, the plugin will show all JIRA tickets that are mentioned in the comments, so if you want to show only one ticket please make sure that only one ticket is mentioned in the commit message.

Kind regards,
Felipe Kraemer

The Commit Policy add-on (a "commit acceptance on steroids") can easily do this with following settings:

  1. Add a "Commit message must contain issue keys from a JQL query" type condition and specify the count as "exactly one": it will reject commit messages that mention invalid or resolved issues or those that mention zero or more than one of those. Set up the JQL that exactly matches your filtering requirements.
  2. Also add a "Commit message must match a pattern" condition with a regex that require the issue key in the starting position. There is an example for this in the plugin's configuration screen.

The documentation of the various conditions is available here: http://www.midori-global.com/products/jira-commit-policy-plugin/documentation/#conditions

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,212 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot