White dot for spacing only
The Dice Project


RT Modifications (in no particular order)

Limiting tickets that a user can see ; Not setting the 'open' status automatically; Mail addresses;
Don't send e-mail if owner changes to Nobody; Add the status of 'spam' and 'bugzilla' - ver 3.0.8 ONLY;
Ensure RT accounts created automatically are correct; Add a trigger for rt->bugzilla; Changing the font size Queue lists give full name

Limiting users to see tickets after September 2004

This is done by onlyshowing tickets with an id greater than 12884 in share/html/SelfService/Dispaly.html

unless ( $id > 12884  ) {
    $m->comp( 'Error.html',
              Why => loc("No permission to display that ticket") );
    $m->abort();
}
and in share/html/SelfService/Elements/MyRequests
foreach my $status (@status) {

        $MyTickets->LimitStatus(VALUE => $status);
        $MyTickets->LimitDate(FIELD => 'Created', VALUE => '2004/09/29' , OPERATOR => '>');

Prevent tickets from being set to status 'open' as soon as they are updated

This is done by removing the middle 2 lines from share/html/Ticket/Update.html

unless($DefaultStatus){
    $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status());
}

if ($DefaultStatus =~ '^new$'){
        $DefaultStatus='open';
}

if ($DefaultStatus eq 'resolved') {

Get mail addresses working correctly

Change SendEmail.pm in lib/Action/ by setting CommentAddress and CorrespondAddress as follows in the SetReturnAddress subroutine.

 if ($args{'is_comment'}) {
      $replyto = "rt+comment".$self->TicketObj->id()."\@inf.ed.ac.uk";
  }
  else {
      $replyto = "rt+correspond".$self->TicketObj->id()."\@inf.ed.ac.uk";
  }


  $self->SetHeader('From', "\"Informatics Support\" <$replyto>");
  $self->SetHeader('Reply-To', "$replyto");

Don't send requestor an e-mail if ticket owner changes to 'Nobody'

Change lib/RT/Condition/OwnerChange.pm by adding ne '10' bit:

    if ($self->TransactionObj->Field eq 'Owner' && $self->TransactionObj->NewValue ne '10')

Add the status of 'spam' and 'bugzilla'

Change lib/RT/Queue_Overlay.pm

@ACTIVE_STATUS = qw(new open stalled bugzilla);
@INACTIVE_STATUS = qw(resolved rejected deleted spam);
@STATUS = (@ACTIVE_STATUS, @INACTIVE_STATUS);

Ensure automatic RT accounts are created correctly

Modify lib/RT/User_Overlay.pm by adding the following to the Create subroutine:

    $args{'EmailAddress'} = $self->CanonicalizeEmailAddress($args{'EmailAddress'});


    # If they are from informatics (ONLY), set username and email to UUN
    # This is so they can authenticate, log onto RT3 and see their tickets
    if ( $args{'EmailAddress'} =~ /(.*)\@inf\.ed\.ac\.uk$/ ) {
#       $args{'EmailAddress'} = $1;
       $args{'Name'} = $1;
    }

and create a subroutine called CanonicalizeUserInfo

=head2 CanonicalizeUserInfo HASHREF

Accepts \%args from RT::User::Create,
and changes them accordingly.  At UIC,
if the EmailAddress is identifiable,
such as bobg@uic.edu or bobg@tigger.uic.edu,
then the Name should become just 'bobg'.

Or conversely, if the Name is just a netid
like 'bobg', then the EmailAddress should
become bobg@uic.edu

=cut
sub CanonicalizeUserInfo {
    my $self = shift;
    my $argsref = shift;

                ## This is bluestem with an authmethod
                ## No way to associate an email address here,
                ## so punt.
#    if ($argsref->{Name} =~ m!/! ) {
#        $argsref->{Name} = undef;
#        $argsref->{EmailAddress} = undef;
#        return 1;
#    }

#                ## Bluestem @uic.edu here
#    if ( $argsref->{Name} !~ /\@/ ) {
#        $argsref->{EmailAddress} = $argsref->{Name} . '@uic.edu';
#        return 1;
#    }

                ## Data from email
    $argsref->{EmailAddress} = RT::User->CanonicalizeEmailAddress( $argsref->{EmailAddress} );
    if ( $argsref->{EmailAddress} =~ /(.*)\@inf\.ed\.ac\.uk$/ ) {
        $argsref->{Name} = $1;
    }
    return 1;

}

# }}}

Add a trigger for rt->bugzilla

the following files need modified:

share/html/Ticket/Display.html, share/html/Ticket/Elements/Tabs and lib/RT/Ticket_overlay.pm

For more information see:

How RT sends a ticket to bugzilla

Changing the font size

Needs a change to share/html/NoAuth/webrt.css (at the td { section )

Queue lists show the full name

By default, RT displays the name rather the decription of a queue e.g. rat-unit rather than Research and Teaching Unit. To change this on the Quick Search part of the main menu, you need to modify share/html/Elements/Quicksearch

If you want to change this for the 20 highest priority tickets I own... and 10 highest priority tickets I requested..., then the following line in share/html/Elements/RT__Ticket/ColumnMap needs to be changed:

        value     => sub { return $_[0]->QueueObj->Description }
To change the drop down queue list, modify share/Elements/SelectNewTicketQueue as follows:

change

<%$queue->{'Name'}%>

to

<%$queue->{'Description'}%>
and then modify share/Elements/SelectQueue under the line:
if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
You only need to replace the reference to Name with Description at the end of the line.

Similarly, change the reference to

Name
to
Description
in Quicksearch.


 : Units : User_support 

Mini Informatics Logo - Link to Main Informatics Page
Please contact us with any comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh
Spacing Line