How can i include the status from the issue in the commit acceptance

Hi all,

We are using the plugin commit acceptance to block commits in SVN.

The commmit only can be accepted when the status from issue was "Implementing".

Please How can i include a line in perl script for that it read the status from issue in Jira.

Currently i am doing this through field Resolution. I would like to use the field status instead resolution:

Follow the line that i already tried :

1
2
$comment =~ m/($projectKey-\d+)/;
my $issue = $s->call("jira1.getIssue", $jiraLogin, $jiraPassword, $1)->result();
  • Add this line after "($acceptance, $comment) = split('\|', $result);"
1
2
3
4
5
if($issue.status() == "Draft")
{
$acceptance = 'false';
$comment = "Commits not accepted when the issue is in Draft state";
}

Please could you help me ?

Best Regards

Fabio

2 answers

Hi

Please do you have any idea

Best Regards

Fabio, the Commit Policy Plugin is the modern replacement for the old Commit Acceptance Plugin.

With this, you can verify the issue keys against a JQL query, which results in great flexibility. In your use case, just match the issue keys against a JQL like this:

status = Implementing

That's it. The JQL can contain any further filtering, against project, issue type, etc.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

125 views 0 4
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