summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-10 17:39:05 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-10 17:39:05 -0800
commit6b4e9edae6b5accf757097a5e7af97c2fba8f0ff (patch)
tree60f2102816a06d0cb6043c38ff63abd55b1990be /Bugzilla/Hook.pm
parentBug 545541: New Hook: object_columns (diff)
downloadbugzilla-6b4e9edae6b5accf757097a5e7af97c2fba8f0ff.tar.gz
bugzilla-6b4e9edae6b5accf757097a5e7af97c2fba8f0ff.tar.bz2
bugzilla-6b4e9edae6b5accf757097a5e7af97c2fba8f0ff.zip
Bug 545551: Hook: object_update_columns
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'Bugzilla/Hook.pm')
-rw-r--r--Bugzilla/Hook.pm29
1 files changed, 29 insertions, 0 deletions
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index 2f4d2a7ff..1f92f332d 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -715,6 +715,35 @@ L<Bugzilla::Object/update> returns.
=back
+=head2 object_update_columns
+
+If you've added fields to bugs via L</object_columns>, then this
+hook allows you to say which of those columns should be updated in the
+database when L<Bugzilla::Object/update> is called on the object.
+
+If you don't use this hook, then your custom columns won't be modified in
+the database by Bugzilla.
+
+Params:
+
+=over
+
+=item C<object>
+
+The object that is about to be updated. You should check this
+like C<< if ($object->isa('Some::Class')) >> in your code, to modify
+the "update columns" only for certain classes.
+
+=item C<columns>
+
+An arrayref. Add the string names of columns to this array to allow
+that column to be updated when C<update()> is called on the object.
+
+This arrayref does not contain the standard column names--you cannot stop
+standard columns from being updated by using this hook.
+
+=back
+
=head2 object_validators
Allows you to add new items to L<Bugzilla::Object/VALIDATORS> for