[rt-users] Assembling Bookmark URLs

Jan Algermissen jalgermissen at topicmapping.com
Tue Nov 11 03:08:51 EST 2003


Ok, I have finally figured out how to assemble search URLs.
In case someone else needs this, here is an example:

use URI::Escape;
use FreezeThaw;


my $href = {
        5 => {
                DESCRIPTION => "CF.Incidents.{Related_Host} = MyHost",
                VALUE => 'MyHost',
                FIELD => 'CF.Incidents.{Related_Host}',
                OPERATOR => '=',
                CUSTOMFIELD => '1'
        },
        3 => {
                DESCRIPTION => "Queue = Incidents",
                VALUE => 'Incidents',
                FIELD => 'Queue',
                OPERATOR => '='
        },
        4 => {
                FIELD => 'Status',
                VALUE => 'open',
                OPERATOR => '=',
                DESCRIPTION => "Status = open"
        }
        };
 
my $s = uri_escape(FreezeThaw::freeze( ($href,6))  );
my $url = "http://rt.example.de/Search/Listing.html?Bookmark="
          .$s         
          ."&TicketsSortBy=id&TicketsSortOrder=ASC&RowsPerPage=50";

Don't ask me about the numbers though.....

Jan



Jan Algermissen                           http://www.topicmapping.com
Consultant & Programmer	                  http://www.gooseworks.org



More information about the rt-users mailing list