EditCustomFields not work for "Select" type CustomFields on stable release RTIR 4.0.0


#1

EditCustomFields not work for “Select” type CustomFields on stable release RTIR 4.0.0:
/usr/local/share/request-tracker4/plugins/RT-IR/html/RTIR/Elements/EditCustomFields

If I have a “Select” type CustomField applied to multiple queues, customfield values doesn’t load on create ticket page when I create a ticket from other queue. For example: Incident Report -> Incident.

RTIR requires an array for “Select” type CFs, not a string with values spaced by \n.

Diff code:

$ diff /usr/local/share/request-tracker4/html/RTIR/Elements/EditCustomFields /usr/local/share/request-tracker4/plugins/RT-IR/html/RTIR/Elements/EditCustomFields
69,74d68
< # BUG
< # Not fill values for select type CF on create ticket
< # RT::IR->CustomFields function and $link_cf have a bad CF object
< if ( $CustomField->Type eq ‘Select’ ) {
< push( @{ $CFDefaults->{“CustomField-”.$CustomField->Id} } , map { $->Content } @{ $DefaultsFrom->CustomFieldValues( $name )->ItemsArrayRef } );
< } else {
76,79c70,72
< $CFDefaults->{“CustomField-”.$CustomField->Id} = join “\n”,
< grep defined && length, map $
->Content,
< @{ $DefaultsFrom->CustomFieldValues( $link_cf->id )->ItemsArrayRef };
< }

            $CFDefaults->{"CustomField-".$CustomField->Id} = join "\n",
                grep defined && length, map $_->Content,
                @{ $DefaultsFrom->CustomFieldValues( $link_cf->id )->ItemsArrayRef };

Could you check this? Thank you!