summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2014-08-26 06:51:09 +0200
committerByron Jones <glob@mozilla.com>2014-08-26 06:51:09 +0200
commitd5c1d67198505cc72845d512628852ace9ce799e (patch)
treed50c9f7d7cc0a198e03840b40649a7d389f9ecfd /Bugzilla/Bug.pm
parent83c1212ce5f8c90d200d7480142ac31a9b4545c1 (diff)
downloadbugzilla-d5c1d67198505cc72845d512628852ace9ce799e.tar.gz
bugzilla-d5c1d67198505cc72845d512628852ace9ce799e.tar.xz
Bug 1051655: mentor field updated/reset when a bug is updated as a result of a change on a different bug (eg. see also, duplicate)
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index e8f0fd44a..3310afe3d 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -684,8 +684,13 @@ sub create {
my ($class, $params) = @_;
my $dbh = Bugzilla->dbh;
- # BMO - allow parameter alteration before creation
- Bugzilla::Hook::process('bug_before_create', { params => $params });
+ # BMO - allow parameter alteration before creation. also add support for
+ # fields which are not bug columns (eg bug_mentors). extensions should move
+ # fields from $params to $stash, then use the bug_end_of_create hook to
+ # update the database
+ my $stash = {};
+ Bugzilla::Hook::process('bug_before_create', { params => $params,
+ stash => $stash });
$dbh->bz_start_transaction();
@@ -803,8 +808,10 @@ sub create {
# but sometimes it's blank.
Bugzilla::Comment->insert_create_data($creation_comment);
+ # BMO - add the stash param from bug_start_of_create
Bugzilla::Hook::process('bug_end_of_create', { bug => $bug,
timestamp => $timestamp,
+ stash => $stash,
});
$dbh->bz_commit_transaction();