Feature #3279
closedPlugin Hook for setting additional (custom) fields when closing a ticket via a changeset
100%
Description
I'm looking for an additional hook to be added for when a changeset is closed via a commit - we'd like to be able to change a custom field aswell as the status and % done.
Thanks.
<Kiall> Hi all - i'm looking to get redmine to update a custom field when a ticked is closed via a commit - i've found where this happens at the mo, eg "issue.status = fix_status", but how would set a custom field?
<Kiall> right so :) looking at the plugin guide now ... any additional tips on what events etc i should be hooking into?
<edavis10> Kiall: if you post on the Redmine.org forums, someone might be able to help you with the code for that.
<edavis10> Kiall: let's see...
<edavis10> Kiall: only with an issue that is closed via a commit?
<Kiall> yeah thats the plan ..
<Kiall> just like the "fixes #1234" closing the click @ setting to 100%
<gepetto> Kiall: #1234 is http://www.redmine.org/issues/show/1234 "Redmine - Defect #1234: NoMethodError causes HTTP 500 error - Redmine"
<edavis10> Kiall: we'd need to add a plugin hook in there, I don't see one right now.
<edavis10> Kiall: open a new issue descripting this with me as the Assigned to and I'll add it.
<edavis10> just pastie the conversation in
Updated by Kiall Mac Innes over 15 years ago
BTW - Its you guys have the same custom field as were using and looking to change "Resolution"
and ... that paste went a little all over the place attempt number 2:
<Kiall> Hi all - i'm looking to get redmine to update a custom field when a ticked is closed via a commit - i've found where this happens at the mo, eg "issue.status = fix_status", but how would set a custom field? <Kiall> right so :) looking at the plugin guide now ... any additional tips on what events etc i should be hooking into? <edavis10> Kiall: if you post on the Redmine.org forums, someone might be able to help you with the code for that. <edavis10> Kiall: let's see... <edavis10> Kiall: only with an issue that is closed via a commit? <Kiall> yeah thats the plan .. <Kiall> just like the "fixes #1234" closing the click @ setting to 100% <edavis10> Kiall: we'd need to add a plugin hook in there, I don't see one right now. <edavis10> Kiall: open a new issue descripting this with me as the Assigned to and I'll add it. <edavis10> just pastie the conversation in
Updated by Eric Davis over 15 years ago
- Status changed from New to Resolved
- Target version set to 0.8.5
- % Done changed from 0 to 100
Added a new hook, :model_changeset_scan_commit_for_issue_ids_pre_issue_update
. r2773
Updated by Jean-Philippe Lang about 15 years ago
- Status changed from Resolved to Closed
Merged in 0.8-stable in r2882.