summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-12-18 21:32:31 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-12-18 21:32:31 +0100
commit2f310307750a7d70da1bb4f3077c7a7fa616e2eb (patch)
treeb86dc8fc80c2d1798d9db1977b33480c14c40109 /Bugzilla
parentc74561474c4cff83539420bde57306c1b9a384a7 (diff)
downloadbugzilla-2f310307750a7d70da1bb4f3077c7a7fa616e2eb.tar.gz
bugzilla-2f310307750a7d70da1bb4f3077c7a7fa616e2eb.tar.xz
Bug 813628 - New extension hook for Bugzilla::Bug::update called bug_start_of_update
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Hook.pm33
1 files changed, 33 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 27d70e7f5..a18b11f77 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -434,6 +434,39 @@ to the user.
=back
+=head2 bug_start_of_update
+
+This happens near the beginning of L<Bugzilla::Bug/update>, after L<Bugzilla::Object/update>
+is called, but before all other special changes are made to the database. Once use case is
+this allows for adding your own entries to the C<changes> hash which gets added to the
+bugs_activity table later keeping you from having to do it yourself. Also this is also helpful
+if your extension needs to add CC members, flags, keywords, groups, etc. This generally
+occurs inside a database transaction.
+
+Params:
+
+=over
+
+=item C<bug>
+
+The changed bug object, with all fields set to their updated values.
+
+=item C<old_bug>
+
+A bug object pulled from the database before the fields were set to
+their updated values (so it has the old values available for each field).
+
+=item C<timestamp>
+
+The timestamp used for all updates in this transaction, as a SQL date
+string.
+
+=item C<changes>
+
+The hash of changed fields. C<< $changes->{field} = [old, new] >>
+
+=back
+
=head2 buglist_columns
This happens in L<Bugzilla::Search/COLUMNS>, which determines legal bug