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

This widget could not be displayed.

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

This widget could not be displayed.

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 Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

137 views 2 0
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