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 votes

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:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

804 views 3 9
Read article

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