From: David H. <hic...@op...> - 2010-04-22 07:06:38
|
On Tue, 2010-04-20 at 11:53 +0200, smig1o Gazeta.pl wrote: > Seems I'll be forced to modify bug_update function to handle that. I > see no other solution atm. Please consider filing a bug report on the MantisBT bug tracker if one doesn't already exist. We may need to consider adding another hook that plugins can use before/after a bug is reassigned. However I'm of the opinion that we really should be passing all modifications to a bug through the same process. In other words, we create an interface which accepts a list of proposed changes to a bug. This interface would then be responsible for determining whether the changes can succeed. The reason for bundling changes to different fields together when performing validation is to allow for complex rules about the state of issue metadata. For instance you could make a rule that states the priority of an issue cannot be set above HIGH if the severity is below MAJOR. Thus we'd only need two hooks... one prior to updating a bug and one after a bug has been updated. The alternative (when not bundling updates together through the same interface) is a mess of dozens of hooks before/after a whole number of events like: bug_assign, bug_resolve, bug_close, etc. Regards, David |