[rt-devel] Fix For Keyword Select / Create Ticket UI Bug in 2.0.8

Kip Cranford kip.cranford at pgamapd.com
Mon Oct 8 16:54:57 EDT 2001


Jesse,

When a new ticket is created in 2.0.8, and a single keyword select is
chosen, that value is not added to the database, and the ticket is
created with no keywords.  Multiple keywords work as advertised.

Below is a fix I applied to Ticket.pm, and it seemed to fix the problem.

(note, this is not a patch, just a plain diff -- do you want patches?)

--kip

*** Ticket.pm   Fri Sep 21 16:45:34 2001
--- Ticket.ks.pm        Mon Oct  8 16:46:32 2001
***************
*** 345,351 ****
        next unless ($key =~ /^KeywordSelect-(.*)$/);
 
        my $ks = $1;
!       my @keywords = @{$args{$key}};
 
        foreach my $keyword (@keywords) {
            my ($kval, $kmsg) = $self->_AddKeyword(KeywordSelect => $ks,
--- 345,360 ----
        next unless ($key =~ /^KeywordSelect-(.*)$/);
 
        my $ks = $1;
!
!     my @keywords;
!     my $kr = ref $args{$key};
!     if ($kr =~ /ARRAY/) {
!         @keywords = @{$args{$key}};
!     }
!     else {
!         my $ky = $args{$key};
!         @keywords = ($ky);
!     }
 
        foreach my $keyword (@keywords) {
            my ($kval, $kmsg) = $self->_AddKeyword(KeywordSelect => $ks,




More information about the Rt-devel mailing list