Search and Sort by custom columns

Hi!

I have added two Columns to the Ticket Table (and the corresponding
entries in the Ticket.pm file):

  • Contract (String which contains the Contract ID)
  • ContractName (String which contains the name of the Contract)

I have added the Field ContractName to the search fields in Config.pm:

   { Header => 'Contract',
     TicketAttribute => 'ContractName'
     },

Then, I have created a selection field (SelectContract) for the
contracts. I also have put that field into PickRestriction:

  • Contract <& /Elements/SelectBoolean, Name => "ContractOp" , True => "is", False => "isn't", TrueVal=> '=', FalseVal => '!=' &>

    <& /Elements/SelectContract, Name => “ValueOfContract” &>

    My problem is that it doesn’t restrict the Field. How does the RT search
    engine works? Where are the places to add additional fields? And how
    does it handle the sort functionality?

    Thanks,
    Timo
    Timo A. Hummel
    IS Innovative Software AG Phone: +49 69 505030-324
    Sandweg 94 Fax: +49 69 505030-505
    60316 Frankfurt a.M. E-Mail:
    mailto:timo.hummel@isg.de
    GERMANY WWW: http://isg.de

    (Problems with the digital signature? Visit
    http://www.innovative-software.com/ISCA)

  • I have added two Columns to the Ticket Table (and the corresponding
    entries in the Ticket.pm file):

    • Contract (String which contains the Contract ID)
    • ContractName (String which contains the name of the Contract)

    You will also need to add these to the _ClassAccessible method in
    RT::Ticket before SearchBuilder will use these fields. You may also need
    to restart apache to get around perl module caching.

    Regards,

                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B                      Operations

    You will also need to add these to the _ClassAccessible method in
    RT::Ticket before SearchBuilder will use these fields. You may also need
    to restart apache to get around perl module caching.

    I already did that:

      Contract => { 'read' => 1, 'write' => 1},
      ContractName => { 'read' => 1, 'write' => 1},
    

    Here’s a more detailed info about the issue:

    • When clicking “Refine Search”, the address line shows up with the
      correct ContractOp and ValueOfContract items. However, it doesn’t show
      up in the “Search Criteria” Box.

    Any ideas?
    Timo

    Timo A. Hummel
    IS Innovative Software AG Phone: +49 69 505030-324
    Sandweg 94 Fax: +49 69 505030-505
    60316 Frankfurt a.M. E-Mail:
    mailto:timo.hummel@isg.de
    GERMANY WWW: http://isg.de

    (Problems with the digital signature? Visit
    http://www.innovative-software.com/ISCA)