SVN smart commits

Hello everyone.

I'm triyng use smart commits on my Jira. I'm using Jira v6.0.2 Downloaded, with JIRA Subversion plugin 0.10.12 downloaded from the universal plugin manager. I have configured the repository, and I'm seeing the commits in the Subversion tag for the issue.

I have tried with:

ISSUE-1 #resolve

ISSUE-1 fixes

with the default Workflow in use, but Statuss is always "In progress". I'm doing something wrong, or smart commit is not enabled in this case

Thank you in advance.

11 answers

0 votes
Timothy Chin Community Champion Jun 26, 2013

Have you enabled all these three?

Hi Timothy, thanks for the answer.

I'm not using FishEye or Crucible. I'm using an external SVN repository, and just want the Jira issue to update its status on commits. I've been using another issue tracker, and this functionality was aquieved using a post-commit-hook, but since this add-on

(https://marketplace.atlassian.com/plugins/com.atlassian.jira.plugin.ext.subversion)

seems to parse the comments (since it knows the issue) i hoped that it would update the status on its own.

It seems that i would have to download the sources and see what it does.

Thank you again

Currently is not possible to achieve want I wat with the plugin.

The plug-in save the relationship among the JIRA issues and the Subversion commits in a private instance of Lucene, it does not do much more... Extending it to support "smart commits" would not be a difficult task. On the other hand, would not be much more useful be able to get the full list of the commits related to a JIRA project and let the team members make the further actions in order to organize the work? The Atlassian's JIRA Subversion plug-in does not support such list, but this alternative plug-in yes: https://marketplace.atlassian.com/plugins/pbeltranl.subversion.jira.pbeltranl-jira-subversion-plugin In my opinion, getting the list of commits for a JIRA project is much more important to see and organize the work rather than doing it through smart commits..

In my opinion, the purpose of smart commits is to save time. The developer does not need to access Jira directly since the smart commit commands will do the most common actions a developer needs to do to manipulate an issue in Jira.

The problems I see with smart commits is the smart commit commands remain in the subversion comments and I believe they should be removed once Jira is updated. Updating a comment in subversion may not work, since it involves your subversion adminstrator to set thngs up correctly. Also the command in subversion is not a straight forward command either since it is propset command.

The other problem is the subversion background service would be the user manipulating the Jira issue and not the actual user. There is no relationship between the Jira user and the subversion user.

Implementing smart commits as a subversion server hook might be the better way to go, but it is more complicated since you need to use the REST API and deal with all the potential error cases.

Hi Pablo,

Thanks for the info about your plugin. Right now, I'm working with Trac, and our teem is used to smart commits. I'll give a try to your plugin, and check if I can upgrade the JIRA Subversion with what I need.

On the other hand, it's quite annoing to have to wait until the plugin checks the repository, so i will try a hook approach.

Regards

Germán

If the delay interval was not broken in subversion plugin for Jira 6.X, you could set the delay to 10 minutes instead of 1 hour. Hopefully, this will be fixed soon.

I'm working in a post commit hook with Jira REST API. Will post it when finished.

The REST API idea wont work, since it currently transitions API don't allow to use the "author" parameter that other one does.

So, I stuck, probalby will go back to trac, i wait for Jira to add this functionalities.

I would check out this answer to see if you just missing the field you need because you need to add it to the list in Jira. This answer is talking about custom fields. I would be surprised that an author type field is actually missing.

https://answers.atlassian.com/questions/192184/jira-6-0-rest-api-transition-fields

I need the author field, which is not custom.

For example, according to the documentation, the COMMENT API, (https://docs.atlassian.com/jira/REST/latest/#idp1554128)

when asking for expanded parameters, returns:

"comments": [ { "self": "http://www.example.com/jira/rest/api/2/issue/10010/comment/10000", "id": "10000", "author": { "self": "http://www.example.com/jira/rest/api/2/user?username=fred", "name": "fred", "displayName": "Fred F. User", "active": false },
but when asking expanded parameters for TRANSITIONS, returns
"transitions": [ { "id": "2", "name": "Close Issue", "to": { "self": "http://localhost:8090/jira/rest/api/2.0/status/10000", "description": "The issue is currently being worked on.", "iconUrl": "http://localhost:8090/jira/images/icons/progress.gif", "name": "In Progress", "id": "10000" }, "fields": { "summary": { "required": false, "schema": { "type": "array", "items": "option", "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiselect", "customId": 10001 }, "name": "My Multi Select", "operations": [ "set", "add" ], "allowedValues": [ "red", "blue" ] } } },

Here is my json from the transitions call and it has reporter listed if I understand your issue. I removed the url related fields to avoid security issues. I also took some other fields away as well while removing the url fields to get under 2000 characters. Is this what you are looking for?
{
"expand": "transitions",
"transitions": [
{
"id": "4",
"name": "Start Progress",,
"fields": { }
},
{
"id": "5",
"name": "Resolve Issue",
"to": {
"description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.",
"name": "QA Ready",
"id": "5"
},
"fields": {
"reporter": {
"required": true,
"schema": {
"type": "user",
"system": "reporter"
},
"name": "Reporter",
"operations": [
"set"
]
},
"assignee": {
"required": false,
"schema": {
"type": "user",
"system": "assignee"
},
"name": "Assignee",
"operations": [
"set"
]
},
"fixVersions": {},
"resolution": {},
"worklog": {
"required": false,
"schema": {
},
"name": "Log Work",
"operations": [
"add"
]
}
}
},
{
"id": "721",
"name": "Amend Research",
"to": {
"name": "Research",
"id": "10000"
},
"fields": {
"reporter": {
"required": true,
"schema": {
"type": "user",
"system": "reporter"
},
"name": "Reporter",
"operations": [
"set"
]
},
"assignee": {
"name": "Assignee",
"operations": [
"set"
]
}
}
},
{
"id": "2",
"name": "Close Issue",
"to": {
"
"name": "Closed",
"id": "6"
},
"fields": {
"reporter": {
"required": true,
"schema": {
"type": "user",
"system": "reporter"
},
"name": "Reporter",
"operations": [
"set"
]
},
"assignee": {},
"fixVersions": {
},
"name": "Fix Version/s",
"operations": [
"set",
"add",
"remove"
],
"resolution": {},
"worklog": {
"required": false,
"schema": {
"type": "array",
"items": "worklog",
"system": "worklog"
},
"name": "Log Work",
"operations": [
"add"
]
}
}
}
]
}

Hi Norman. I'm not gettin the reporter field. Which version of Jira are you using? As i said in the first post, y downloaded the latest version at that momennt Atlassian JIRA v6.0.2 (not much ago).

I haven't modified the default workflow. You have added reporter as custom field? Which is it fieldId? "reporter"?

By the way, thank you for helping me so much with this issue!!

Sorry for not responding sooner, my daughter got married this weekend, so you can guess, my freetime was pretty booked up. I will check, but I suspect you will need to add the reporter field to your transition screen.

OK, will try that. Crongrats for your daughter. I'll let you know as soon as I change the transitions.

Right now, I'm trying to achieve this with the API.

So far this seems to work:

curl -D- -u <user>:<pass> -X GET --data {\"fields\":{\"reporter\":{\"name\":\"<svn-commiter>\"},\"resolution\":{\"id\":\"1\"}},\"transition\":{\"id\":5},\"update\":{\"comment\":[{\"add\":{\"body\":\"Testing.\"}}]}} -H "Content-Type: application/json" http://<url>:<port>/rest/api/2/issue/<ticket>/transitions

My only problem is with the comments. I can't manage to include white spaces in the comment. White spaces gives me errors, and %20 is not decoded, so I end with "%20" in the comment.

0 votes

Hi guys,

Please vote the ticket  SVN-460 - Support smart commit feature OPEN  to make the feature available in future.

Regards,

John Chin

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 ...

2,811 views 11 18
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