Feature #3279

Plugin Hook for setting additional (custom) fields when closing a ticket via a changeset

Added by Kiall Mac Innes over 8 years ago. Updated about 6 years ago.

Status:ClosedStart date:2009-05-01
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:Plugin API
Target version:0.8.5
Resolution:

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

Associated revisions

Revision 2773
Added by Eric Davis over 8 years ago

Added hook, :model_changeset_scan_commit_for_issue_ids_pre_issue_update. #3279

History

#1 Updated by Kiall Mac Innes over 8 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

#2 Updated by Eric Davis over 8 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

#3 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from Resolved to Closed

Merged in 0.8-stable in r2882.

#4 Updated by Kiall Mac Innes over 8 years ago

:)

Thanks!

#5 Updated by Gavin Patrick about 6 years ago

  • Assignee deleted (Eric Davis)

SPAM

Also available in: Atom PDF