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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, will try that. Crongrats for your daughter. I'll let you know as soon as I change the transitions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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" ] } } },
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
]
}
}
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm working in a post commit hook with Jira REST API. Will post it when finished.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Currently is not possible to achieve want I wat with the plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you enabled all these three?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.