Closed
Bug 491748
Opened 16 years ago
Closed 16 years ago
Hook for bug creation
Categories
(Bugzilla :: User Interface, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.4
People
(Reporter: docwhat, Assigned: bbaetz)
Details
(Whiteboard: [es-ita])
Attachments
(2 files)
|
3.55 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
|
4.23 KB,
patch
|
Details | Diff | Splinter Review |
It would be nice to have an equiv. to the update hook for creation.
Update hook: bug-end_of_update
Proposed creation hook: bug-end_of_insert
Diff:
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 75fa759..68433c7 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -421,6 +421,10 @@ sub create {
$dbh->do('INSERT INTO longdescs (' . join(',', @columns) . ")
VALUES ($qmarks)", undef, @values);
+ Bugzilla::Hook::process('bug-end_of_insert', { bug => $bug,
+ timestamp => $timestamp,
+ });
+
$dbh->bz_commit_transaction();
# Because MySQL doesn't support transactions on the fulltext table,
| Assignee | ||
Comment 1•16 years ago
|
||
Yeah, I need this for something I'm working on too.
Assignee: ui → bbaetz
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•16 years ago
|
||
Attachment #379654 -
Flags: review?(mkanat)
| Assignee | ||
Updated•16 years ago
|
Whiteboard: [es-gnome]
| Reporter | ||
Comment 3•16 years ago
|
||
Bradley: Thanks for doing that nice patch. :-)
Comment 4•16 years ago
|
||
Comment on attachment 379654 [details] [diff] [review]
Add hook and docs
>+ Bugzilla::Hook::process('bug-end_of_insert', { bug => $bug,
Let's call it end_of_create instead.
>+# The Initial Developer of the Original Code is Everything Solved, Inc.
>+# Portions created by Everything Solved are Copyright (C) 2008
>+# Everything Solved, Inc. All Rights Reserved.
This should be whatever client commissioned this code, instead.
Otherwise this looks fine. You can fix all these things on checkin, if you'd like. It'd be nice to see the fixed patch here after checkin, though.
Attachment #379654 -
Flags: review?(mkanat) → review+
Comment 5•16 years ago
|
||
(In reply to comment #4)
> This should be whatever client commissioned this code, instead.
Namely: Canonical Ltd.
Flags: approval3.4+
Flags: approval+
Hardware: x86 → All
Target Milestone: --- → Bugzilla 3.4
| Assignee | ||
Comment 6•16 years ago
|
||
Will check in
| Assignee | ||
Comment 7•16 years ago
|
||
HEAD:
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.280; previous revision: 1.279
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.25; previous revision: 1.24
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/bug-end_of_create.pl,v
done
Checking in extensions/example/code/bug-end_of_create.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/bug-end_of_create.pl,v <-- bug-end_of_create.pl
initial revision: 1.1
done
3.4:
Checking in Bugzilla/Bug.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm
new revision: 1.276.2.4; previous revision: 1.276.2.3
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v <-- Hook.pm
new revision: 1.24.2.1; previous revision: 1.24
done
Checking in extensions/example/code/bug-end_of_create.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/bug-end_of_create.pl,v <-- bug-end_of_create.pl
new revision: 1.1.2.2; previous revision: 1.1.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #5)
> (In reply to comment #4)
> > This should be whatever client commissioned this code, instead.
>
> Namely: Canonical Ltd.
No, not for this one. Fixed:
Checking in extensions/example/code/bug-end_of_create.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/bug-end_of_create.pl,v <-- bug-end_of_create.pl
new revision: 1.2; previous revision: 1.1
Checking in extensions/example/code/bug-end_of_create.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/bug-end_of_create.pl,v <-- bug-end_of_create.pl
new revision: 1.1.2.3; previous revision: 1.1.2.2
done
Whiteboard: [es-gnome] → [es-ita]
You need to log in
before you can comment on or make changes to this bug.
Description
•