Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add the Category value to the CustomFieldValues

  • Loading branch information...
commit 53a5476a4cbd8a403dbf7aee31f91f8ecfd2c407 1 parent b9c46a4
Kai S authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 sbin/rt-dump-metadata.in
12 sbin/rt-dump-metadata.in
View
@@ -187,12 +187,22 @@ foreach my $class (@classes) {
} elsif ( $class eq 'CustomFields' ) {
my $values = $obj->Values;
while ( my $value = $values->Next ) {
- push @{ $rv->{Values} }, {
+ my $value_rv = {
map { ( $_ => $value->__Value($_) ) }
qw(
Name Description SortOrder
),
};
+ # these values can have attributes.
+ if ( eval { require RT::Attributes; 1 } ) {
+ my $attributes = $value->Attributes;
+ while ( my $attribute = $attributes->Next ) {
+ my $content = $attribute->Content;
+ $value_rv->{ $attribute->Name } = $content
+ if length($content);
+ }
+ }
+ push @{ $rv->{Values} }, $value_rv;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.