[rt-users] Change the "Modify Ticket" options on blue bar

Kenneth Crocker KFCrocker at lbl.gov
Thu May 29 15:49:19 EDT 2008


Stephen,


	Toward the bottom of the code in file "Tabs" the following code exists:

if ( (defined $actions->{A} || defined $actions->{B} || defined 
$actions->{C})
     && (defined $actions->{E} || defined $actions->{F} || defined 
$actions->{G}) ) {

     if    (defined $actions->{C}) { $actions->{C}->{separator} = 1 }
     elsif (defined $actions->{B}) { $actions->{B}->{separator} = 1 }
     elsif (defined $actions->{A}) { $actions->{A}->{separator} = 1 }
}


	What does it do? I can't grok it. Thanks.


Kenn
LBNL

On 5/28/2008 6:45 AM, Stephen Turner wrote:
> 
> At 04:04 PM 5/27/2008, you wrote:
>> Stephen,
>>
>>
>>         Thanks for the code example. I used it as the basis for the 
>> code I wanted to add. The "Tabs" layout now shows what I want, but 
>> when I click any of the new options, nothing happens. This is what my 
>> new code looks like:
>>
>> if ($args) {
>>   $tabs->{"i"} = { path      => "Search/Results.html$args",
>>                    title     => loc('Show Results'),
>>                    };
>>   if ($current_tab =~  "Search/Results.html") {
>>     $current_tab = "Search/Results.html$args";
>>     };
>> }
>>
>> if ( $can{'ModifyTicket'} ) {
>>     if ( $Ticket->Status ne 'resolved' ) {
>>         $actions->{'G'} = {
>>             path => 
>> "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" . $id,
>>             title => loc('Resolve') };
>>     }
>>
>> # the following code was added for LBNL
>> # make sure the check for status is in descending order
>>
>>     if  ($Ticket->Status eq 'pending qa')
>>         {
>>          $actions->{'Fg'} =
>>              { path => "Ticket/Display.html?Action=DefaultStatus=('qa 
>> approvd')&id=" . $id,
>>              title => loc('Approve QA'),
>>              };
>>         }
> 
> 
> Hi Ken,
> 
> Just from a quick look at the code, it looks like you're on the right 
> track. I don't think you need the parentheses or quotes around the 
> status values - something like:
> 
> path => "Ticket/Display.html?Action=DefaultStatus=qa approvd&id=" . $id
> 
> As this is going to form a URL, you may need to escape those spaces, but 
> I'm not sure:
> 
> path => "Ticket/Display.html?Action=DefaultStatus=qa%20approvd&id=" . $id
> 
> You'll have to play with the options and see if they work. I'm ccing the 
> list in case someone else has an idea about this.
> 
> Good luck,
> Steve
> 
> 




More information about the rt-users mailing list