[Rt-commit] r9819 - in rt/branches/3.6-EXPERIMENTAL-CATEGORIES:
html/Admin/CustomFields
falcone at bestpractical.com
falcone at bestpractical.com
Wed Dec 5 11:04:50 EST 2007
Author: falcone
Date: Wed Dec 5 11:04:45 2007
New Revision: 9819
Modified:
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/ (props changed)
rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/CustomFields/Modify.html
Log:
r27183 at ketch: falcone | 2007-12-05 11:02:49 -0500
* allow people to delete categories/descriptiong/sortorders rather than silently denying them
Modified: rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/CustomFields/Modify.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/CustomFields/Modify.html (original)
+++ rt/branches/3.6-EXPERIMENTAL-CATEGORIES/html/Admin/CustomFields/Modify.html Wed Dec 5 11:04:45 2007
@@ -217,10 +217,25 @@
if ( $ARGS{$param} && ($value->$attr() ne $ARGS{$param})) {
my $mutator = "Set$attr";
my ($id, $msg) = $value->$mutator($ARGS{$param});
+ $RT::Logger->error("[$param] [$mutator] [$id] [$msg]");
push (@results, $msg);
}
- }
+ }
+ # these three things can be safely set to ''
+ # you shouldn't be doing that to Name
+ foreach my $attr qw(Description SortOrder Category) {
+ my $param = $paramtag.$value->Id."-".$attr;
+ if ( !$ARGS{$param} && $value->$attr ) {
+ my $mutator = "Set$attr";
+ if ($attr eq 'Category') { # we actually want the Attribute to go away
+ $mutator = "DeleteCategory";
+ }
+ my ($id, $msg) = $value->$mutator($ARGS{$param});
+ $RT::Logger->error("[$param] [$mutator] [$id] [$msg]");
+ push (@results, $msg);
+ }
+ }
}
More information about the Rt-commit
mailing list