diff options
Diffstat (limited to 'rt')
29 files changed, 102 insertions, 996 deletions
diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED index 71ec13508..d1f214681 100644 --- a/rt/FREESIDE_MODIFIED +++ b/rt/FREESIDE_MODIFIED @@ -5,13 +5,10 @@ config.layout.in etc/RT_Config.pm etc/RT_SiteConfig.pm lib/RT/Config.pm -lib/RT/CustomField_Overlay.pm #customfield date patch -lib/RT/Interface/Web.pm #customfield date patch lib/RT/Interface/Web_Vendor.pm - lib/RT/Record.pm #and customfield date patch + lib/RT/Record.pm lib/RT/SearchBuilder.pm #need DBIx::SearchBuilder >= 1.36 for Pg 8.1+ lib/RT/Transaction_Overlay.pm -lib/RT/Tickets_Overlay.pm #customfield date patch lib/RT/Ticket_Overlay.pm lib/RT/Users_Overlay.pm lib/RT/Groups_Overlay.pm @@ -21,33 +18,20 @@ lib/RT/URI/freeside/XMLRPC.pm share/html/Admin/Users/Modify.html share/html/Elements/ColumnMap share/html/Elements/CollectionList -share/html/Elements/EditCustomFieldDate #customfield date patch (NEW) share/html/Elements/Header share/html/Elements/PageLayout #html/Elements/QuickCreate - share/html/Elements/RefreshHomepage - share/html/Elements/RT__CustomField/ColumnMap - share/html/Elements/RT__Ticket/ColumnMap - share/html/Elements/ShowCustomFieldDate #customfield date patch (NEW) share/html/Elements/SelectDate -share/html/Elements/ShowLink_Checklist - share/html/Elements/ShowUserVerbose share/html/Elements/Footer html/Ticket/Create.html #XXX TODO share/html/Search/Build.html - share/html/Search/Elements/BuildFormatString - share/html/Search/Elements/PickCFs #customfield date patch -share/html/Ticket/Checklist.html share/html/Ticket/Display.html share/html/Ticket/Elements/AddCustomers share/html/Ticket/Elements/EditCustomers share/html/Ticket/Elements/ShowCustomers -share/html/Ticket/Elements/ShowMembers_Checklist - share/html/Ticket/Elements/BulkLinks share/html/Ticket/Elements/ShowSummary share/html/Ticket/Elements/ShowTransactionAttachments share/html/Ticket/Elements/Tabs - share/html/Ticket/Graph/index.html share/html/Ticket/ModifyCustomers.html html/NoAuth/css/3.5-default/main.css html/NoAuth/css/3.5-default/misc.css @@ -64,5 +48,3 @@ share/html/Elements/EditCustomers share/html/Prefs/SearchOptions.html share/html/Widgets/TitleBoxEnd - -share/html/Callbacks/RTx-Checklist/* diff --git a/rt/bin/standalone_httpd b/rt/bin/standalone_httpd deleted file mode 100755 index 7b447050b..000000000 --- a/rt/bin/standalone_httpd +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/perl -w -# BEGIN BPS TAGGED BLOCK {{{ -# -# COPYRIGHT: -# -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -# <jesse@bestpractical.com> -# -# (Except where explicitly superseded by other copyright notices) -# -# -# LICENSE: -# -# This work is made available to you under the terms of Version 2 of -# the GNU General Public License. A copy of that license should have -# been provided with this software, but in any event can be snarfed -# from www.gnu.org. -# -# This work is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# -# CONTRIBUTION SUBMISSION POLICY: -# -# (The following paragraph is not intended to limit the rights granted -# to you to modify and distribute this software under the terms of -# the GNU General Public License and is only of importance to you if -# you choose to contribute your changes and enhancements to the -# community by submitting them to Best Practical Solutions, LLC.) -# -# By intentionally submitting any modifications, corrections or -# derivatives to this work, or any other work intended for use with -# Request Tracker, to Best Practical Solutions, LLC, you confirm that -# you are the copyright holder for those contributions and you grant -# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -# royalty-free, perpetual, license to use, copy, create derivative -# works based on those contributions, and sublicense and distribute -# those contributions and any derivatives thereof. -# -# END BPS TAGGED BLOCK }}} -use warnings; -use strict; - -# fix lib paths, some may be relative -BEGIN { - require File::Spec; - my @libs = ("lib", "local/lib"); - my $bin_path; - - for my $lib (@libs) { - unless ( File::Spec->file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } - -} - -use RT; -RT::LoadConfig(); -RT->InitLogging(); -if (RT->Config->Get('DevelMode')) { require Module::Refresh; } - -RT::CheckPerlRequirements(); -RT->InitPluginPaths(); - -my $explicit_port = shift @ARGV; -my $port = $explicit_port || RT->Config->Get('WebPort') || '8080'; - - -require RT::Handle; -my ($integrity, $state, $msg) = RT::Handle->CheckIntegrity; - -unless ( $integrity ) { - print STDERR <<EOF; - -RT couldn't connect to the database where tickets are stored. -If this is a new installation of RT, you should visit the URL below -to configure RT and initialize your database. - -If this is an existing RT installation, this may indicate a database -connectivity problem. - -The error RT got back when trying to connect to your database was: - -$msg - -EOF - - require RT::Installer; - # don't enter install mode if the file exists but is unwritable - if (-e RT::Installer->ConfigFile && !-w _) { - die 'Since your configuration exists (' - . RT::Installer->ConfigFile - . ") but is not writable, I'm refusing to do anything.\n"; - } - - RT->Config->Set( 'LexiconLanguages' => '*' ); - RT::I18N->Init; - - RT->InstallMode(1); -} else { - RT->ConnectToDatabase(); - RT->InitSystemObjects(); - RT->InitClasses( Heavy => 1 ); - RT->InitPlugins(); - RT->Config->PostLoadCheck(); - - my ($status, $msg) = RT::Handle->CheckCompatibility( - $RT::Handle->dbh, 'post' - ); - unless ( $status ) { - print STDERR $msg, "\n\n"; - exit -1; - } -} - -require RT::Interface::Web::Standalone; -my $server = RT::Interface::Web::Standalone->new; -run_server($port); -exit 0; - -sub run_server { - my $port = shift; - $server->port($port); - eval { $server->run() }; - - if ( my $err = $@ ) { - handle_startup_error($err); - } -} - -sub handle_startup_error { - my $err = shift; - if ( $err =~ /bind: Permission denied/ ) { - handle_bind_error(); - } else { - die - "Something went wrong while trying to run RT's standalone web server:\n\t" - . $err; - } -} - - -sub handle_bind_error { - - print STDERR <<EOF; -WARNING: RT couldn't start up a web server on port @{[$port]}. -This is often the case if you're running @{[$0]} as -someone other than your system's "root" user. -EOF - - if ($explicit_port) { - print STDERR - "Please check your system configuration or choose another port\n\n"; - } else { - print STDERR "\nFor now, RT has chosen an alternate port to run on.\n\n"; - if ( !$integrity ) { - print STDERR <<EOF; -You can use this server to configure and explore RT. While configuring -RT, you'll have a chance to set a permanent port and URL for your -server. - -EOF - } - run_server( 8000 + int( rand(1024) ) ); - } -} diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm index 21d837546..a976fb366 100644 --- a/rt/etc/RT_Config.pm +++ b/rt/etc/RT_Config.pm @@ -868,7 +868,7 @@ EmailAddress. =cut -Set($UsernameFormat, 'verbose'); +Set($UsernameFormat, 'concise'); =item C<$WebDomain> @@ -1370,7 +1370,6 @@ C<$DefaultSearchResultFormat> is the default format for RT search results Set ($DefaultSearchResultFormat, qq{ '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#', '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject', - Customer, Status, QueueName, OwnerName, @@ -1378,7 +1377,6 @@ Set ($DefaultSearchResultFormat, qq{ '__NEWLINE__', '', '<small>__Requestors__</small>', - '', '<small>__CreatedRelative__</small>', '<small>__ToldRelative__</small>', '<small>__LastUpdatedRelative__</small>', @@ -1780,7 +1778,7 @@ C<Set(@Plugins, (qw(Extension::QuickDelete RT::FM)));> =cut -Set(@Plugins, qw( RTx::Calendar )); #RTx::Checklist )); +Set(@Plugins, (qw(RTx::Calendar))); =back diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index c73a1e52f..564682b62 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -868,7 +868,7 @@ EmailAddress. =cut -Set($UsernameFormat, 'verbose'); +Set($UsernameFormat, 'concise'); =item C<$WebDomain> @@ -1370,7 +1370,6 @@ C<$DefaultSearchResultFormat> is the default format for RT search results Set ($DefaultSearchResultFormat, qq{ '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#', '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject', - Customer, Status, QueueName, OwnerName, @@ -1378,7 +1377,6 @@ Set ($DefaultSearchResultFormat, qq{ '__NEWLINE__', '', '<small>__Requestors__</small>', - '', '<small>__CreatedRelative__</small>', '<small>__ToldRelative__</small>', '<small>__LastUpdatedRelative__</small>', @@ -1780,7 +1778,7 @@ C<Set(@Plugins, (qw(Extension::QuickDelete RT::FM)));> =cut -Set(@Plugins, (qw(RTx::Calendar))); #RTx::Checklist )); +Set(@Plugins, (qw(RTx::Calendar))); =back diff --git a/rt/etc/RT_SiteConfig.pm b/rt/etc/RT_SiteConfig.pm index eb2d09af5..bfdfbbb89 100644 --- a/rt/etc/RT_SiteConfig.pm +++ b/rt/etc/RT_SiteConfig.pm @@ -41,7 +41,6 @@ Set($DatabaseHost , ''); # These settings are user-editable. Set($WebDefaultStylesheet, 'freeside2.1'); -Set($UsernameFormat, 'verbose'); #back to concise to hide email addresses #uncomment to use #Set($DefaultSummaryRows, 10); diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm index ce66bb6cc..3f8581cc5 100644 --- a/rt/lib/RT/Config.pm +++ b/rt/lib/RT/Config.pm @@ -340,15 +340,13 @@ our %META = ( my $value = $self->Get('RTAddressRegexp'); return if $value; - #XXX freeside - should fix this at some point, but it is being WAY - #too noisy in the logs - #$RT::Logger->error( - # 'The RTAddressRegexp option is not set in the config.' - # .' Not setting this option results in additional SQL queries to' - # .' check whether each address belongs to RT or not.' - # .' It is especially important to set this option if RT recieves' - # .' emails on addresses that are not in the database or config.' - #); + $RT::Logger->error( + 'The RTAddressRegexp option is not set in the config.' + .' Not setting this option results in additional SQL queries to' + .' check whether each address belongs to RT or not.' + .' It is especially important to set this option if RT recieves' + .' emails on addresses that are not in the database or config.' + ); }, }, # User overridable mail options diff --git a/rt/lib/RT/CustomField_Overlay.pm b/rt/lib/RT/CustomField_Overlay.pm index c91f12037..355dd203c 100644 --- a/rt/lib/RT/CustomField_Overlay.pm +++ b/rt/lib/RT/CustomField_Overlay.pm @@ -97,11 +97,6 @@ our %FieldTypes = ( 'Enter one value with autocompletion', # loc 'Enter up to [_1] values with autocompletion', # loc ], - Date => [ - 'Select multiple dates', # loc - 'Select date', # loc - 'Select up to [_1] dates', # loc - ], ); @@ -834,7 +829,7 @@ Returns an array of all possible composite values for custom fields. sub TypeComposites { my $self = shift; - return grep !/(?:[Tt]ext|Combobox|Date)-0/, map { ("$_-1", "$_-0") } $self->Types; + return grep !/(?:[Tt]ext|Combobox)-0/, map { ("$_-1", "$_-0") } $self->Types; } =head2 SetLookupType @@ -1165,15 +1160,6 @@ sub AddValueForObject { $extra_values--; } } - # For date, we need to store Content as ISO date - if ($self->Type eq 'Date') { - my $DateObj = new RT::Date( $self->CurrentUser ); - $DateObj->Set( - Format => 'unknown', - Value => $args{'Content'}, - ); - $args{'Content'} = $DateObj->ISO; - } my $newval = RT::ObjectCustomFieldValue->new( $self->CurrentUser ); my $val = $newval->Create( ObjectType => ref($obj), diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index edb719df5..d6b854f4e 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -1714,9 +1714,6 @@ sub _ProcessObjectCustomFieldUpdates { $values_hash{$val} = 1 if $val; } - # For Date Cfs, @values is empty when there is no changes (no datas in form input) - return @results if ( $cf->Type eq 'Date' && ! @values ); - $cf_values->RedoSearch; while ( my $cf_value = $cf_values->Next ) { next if $values_hash{ $cf_value->id }; diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm index 78bbe915d..bee94420d 100755 --- a/rt/lib/RT/Record.pm +++ b/rt/lib/RT/Record.pm @@ -1744,25 +1744,6 @@ sub _AddCustomFieldValue { } my $new_content = $new_value->Content; - - # For date, we need to display them in "human" format in result message - if ($cf->Type eq 'Date') { - my $DateObj = new RT::Date( $self->CurrentUser ); - $DateObj->Set( - Format => 'ISO', - Value => $new_content, - ); - $new_content = $DateObj->AsString; - - if ( defined $old_content && length $old_content ) { - $DateObj->Set( - Format => 'ISO', - Value => $old_content, - ); - $old_content = $DateObj->AsString; - } - } - unless ( defined $old_content && length $old_content ) { return ( $new_value_id, $self->loc( "[_1] [_2] added", $cf->Name, $new_content )); } @@ -1851,21 +1832,11 @@ sub DeleteCustomFieldValue { return ( 0, $self->loc( "Couldn't create a transaction: [_1]", $Msg ) ); } - my $old_value = $TransactionObj->OldValue; - # For date, we need to display them in "human" format in result message - if ( $cf->Type eq 'Date' ) { - my $DateObj = new RT::Date( $self->CurrentUser ); - $DateObj->Set( - Format => 'ISO', - Value => $old_value, - ); - $old_value = $DateObj->AsString; - } return ( $TransactionId, $self->loc( "[_1] is no longer a value for custom field [_2]", - $old_value, $cf->Name + $TransactionObj->OldValue, $cf->Name ) ); } diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm index b60ae38bd..83737c168 100644 --- a/rt/lib/RT/Ticket_Overlay.pm +++ b/rt/lib/RT/Ticket_Overlay.pm @@ -560,6 +560,68 @@ sub Create { # }}} + # {{{ Deal with auto-customer association + + #unless we already have (a) customer(s)... + unless ( $self->Customers->Count ) { + + #first find any requestors with emails but *without* customer targets + my @NoCust_Requestors = + grep { $_->EmailAddress && ! $_->Customers->Count } + @{ $self->_Requestors->UserMembersObj->ItemsArrayRef }; + + for my $Requestor (@NoCust_Requestors) { + + #perhaps the stuff in here should be in a User method?? + my @Customers = + &RT::URI::freeside::email_search( email=>$Requestor->EmailAddress ); + + foreach my $custnum ( map $_->{'custnum'}, @Customers ) { + + ## false laziness w/RT/Interface/Web_Vendor.pm + my @link = ( 'Type' => 'MemberOf', + 'Target' => "freeside://freeside/cust_main/$custnum", + ); + + my( $val, $msg ) = $Requestor->_AddLink(@link); + #XXX should do something with $msg# push @non_fatal_errors, $msg; + + } + + } + + #find any requestors with customer targets + + my %cust_target = (); + + my @Requestors = + grep { $_->Customers->Count } + @{ $self->_Requestors->UserMembersObj->ItemsArrayRef }; + + foreach my $Requestor ( @Requestors ) { + foreach my $cust_link ( @{ $Requestor->Customers->ItemsArrayRef } ) { + $cust_target{ $cust_link->Target } = 1; + } + } + + #and then auto-associate this ticket with those customers + + foreach my $cust_target ( keys %cust_target ) { + + my @link = ( 'Type' => 'MemberOf', + #'Target' => "freeside://freeside/cust_main/$custnum", + 'Target' => $cust_target, + ); + + my( $val, $msg ) = $self->_AddLink(@link); + push @non_fatal_errors, $msg; + + } + + } + + # }}} + # {{{ Add all the custom fields foreach my $arg ( keys %args ) { @@ -617,16 +679,11 @@ sub Create { next; } } - - #don't show transactions for reminders - my $silent = ( !$args{'_RecordTransaction'} - || $self->Type eq 'reminder' - ); - + my ( $wval, $wmsg ) = $self->_AddLink( Type => $LINKTYPEMAP{$type}->{'Type'}, $LINKTYPEMAP{$type}->{'Mode'} => $link, - Silent => $silent, + Silent => !$args{'_RecordTransaction'}, 'Silent'. ( $LINKTYPEMAP{$type}->{'Mode'} eq 'Base'? 'Target': 'Base' ) => 1, ); @@ -636,69 +693,6 @@ sub Create { } # }}} - - # {{{ Deal with auto-customer association - - #unless we already have (a) customer(s)... - unless ( $self->Customers->Count ) { - - #first find any requestors with emails but *without* customer targets - my @NoCust_Requestors = - grep { $_->EmailAddress && ! $_->Customers->Count } - @{ $self->_Requestors->UserMembersObj->ItemsArrayRef }; - - for my $Requestor (@NoCust_Requestors) { - - #perhaps the stuff in here should be in a User method?? - my @Customers = - &RT::URI::freeside::email_search( email=>$Requestor->EmailAddress ); - - foreach my $custnum ( map $_->{'custnum'}, @Customers ) { - - ## false laziness w/RT/Interface/Web_Vendor.pm - my @link = ( 'Type' => 'MemberOf', - 'Target' => "freeside://freeside/cust_main/$custnum", - ); - - my( $val, $msg ) = $Requestor->_AddLink(@link); - #XXX should do something with $msg# push @non_fatal_errors, $msg; - - } - - } - - #find any requestors with customer targets - - my %cust_target = (); - - my @Requestors = - grep { $_->Customers->Count } - @{ $self->_Requestors->UserMembersObj->ItemsArrayRef }; - - foreach my $Requestor ( @Requestors ) { - foreach my $cust_link ( @{ $Requestor->Customers->ItemsArrayRef } ) { - $cust_target{ $cust_link->Target } = 1; - } - } - - #and then auto-associate this ticket with those customers - - foreach my $cust_target ( keys %cust_target ) { - - my @link = ( 'Type' => 'MemberOf', - #'Target' => "freeside://freeside/cust_main/$custnum", - 'Target' => $cust_target, - ); - - my( $val, $msg ) = $self->_AddLink(@link); - push @non_fatal_errors, $msg; - - } - - } - - # }}} - # Now that we've created the ticket and set up its metadata, we can actually go and check OwnTicket on the ticket itself. # This might be different than before in cases where extensions like RTIR are doing clever things with RT's ACL system if ( $DeferOwner ) { @@ -721,8 +715,7 @@ sub Create { ); } - #don't make a transaction or fire off any scrips for reminders either - if ( $args{'_RecordTransaction'} && $self->Type ne 'reminder' ) { + if ( $args{'_RecordTransaction'} ) { # {{{ Add a transaction for the create my ( $Trans, $Msg, $TransObj ) = $self->_NewTransaction( diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm index f2949ed7a..e8d350dea 100644 --- a/rt/lib/RT/Tickets_Overlay.pm +++ b/rt/lib/RT/Tickets_Overlay.pm @@ -136,7 +136,6 @@ our %FIELD_METADATA = ( QueueAdminCc => [ 'WATCHERFIELD' => 'AdminCc' => 'Queue', ], #loc_left_pair QueueWatcher => [ 'WATCHERFIELD' => undef => 'Queue', ], #loc_left_pair CustomFieldValue => [ 'CUSTOMFIELD', ], #loc_left_pair - DateCustomFieldValue => [ 'DATECUSTOMFIELD', ], CustomField => [ 'CUSTOMFIELD', ], #loc_left_pair CF => [ 'CUSTOMFIELD', ], #loc_left_pair Updated => [ 'TRANSDATE', ], #loc_left_pair @@ -161,7 +160,6 @@ our %dispatch = ( WATCHERFIELD => \&_WatcherLimit, MEMBERSHIPFIELD => \&_WatcherMembershipLimit, CUSTOMFIELD => \&_CustomFieldLimit, - DATECUSTOMFIELD => \&_DateCustomFieldLimit, HASATTRIBUTE => \&_HasAttributeLimit, ); our %can_bundle = ();# WATCHERFIELD => "yes", ); @@ -1342,101 +1340,6 @@ sub _CustomFieldJoin { return ($TicketCFs, $CFs); } -=head2 _DateCustomFieldLimit - -Limit based on CustomFields of type Date - -Meta Data: - none - -=cut - -sub _DateCustomFieldLimit { - my ( $self, $_field, $op, $value, %rest ) = @_; - - my $field = $rest{'SUBKEY'} || die "No field specified"; - - # For our sanity, we can only limit on one queue at a time - - my ($queue, $cfid, $column); - ($queue, $field, $cfid, $column) = $self->_CustomFieldDecipher( $field ); - -# If we're trying to find custom fields that don't match something, we -# want tickets where the custom field has no value at all. Note that -# we explicitly don't include the "IS NULL" case, since we would -# otherwise end up with a redundant clause. - - my $null_columns_ok; - if ( ( $op =~ /^NOT LIKE$/i ) or ( $op eq '!=' ) ) { - $null_columns_ok = 1; - } - - my $cfkey = $cfid ? $cfid : "$queue.$field"; - my ($TicketCFs, $CFs) = $self->_CustomFieldJoin( $cfkey, $cfid, $field ); - - $self->_OpenParen; - - if ( $CFs && !$cfid ) { - $self->SUPER::Limit( - ALIAS => $CFs, - FIELD => 'Name', - VALUE => $field, - ENTRYAGGREGATOR => 'AND', - ); - } - - $self->_OpenParen if $null_columns_ok; - - my $date = RT::Date->new( $self->CurrentUser ); - $date->Set( Format => 'unknown', Value => $value ); - - if ( $op eq "=" ) { - - # if we're specifying =, that means we want everything on a - # particular single day. in the database, we need to check for > - # and < the edges of that day. - - $date->SetToMidnight( Timezone => 'server' ); - my $daystart = $date->ISO; - $date->AddDay; - my $dayend = $date->ISO; - - $self->_OpenParen; - - $self->_SQLLimit( - ALIAS => $TicketCFs, - FIELD => 'Content', - OPERATOR => ">=", - VALUE => $daystart, - %rest, - ); - - $self->_SQLLimit( - ALIAS => $TicketCFs, - FIELD => 'Content', - OPERATOR => "<=", - VALUE => $dayend, - %rest, - ENTRYAGGREGATOR => 'AND', - ); - - $self->_CloseParen; - - } - else { - $self->_SQLLimit( - ALIAS => $TicketCFs, - FIELD => 'Content', - OPERATOR => $op, - VALUE => $date->ISO, - %rest, - ); - } - - $self->_CloseParen; - -} - =head2 _CustomFieldLimit Limit based on CustomFields @@ -1830,60 +1733,7 @@ sub OrderByCols { } push @res, { %$row, FIELD => "Priority", ORDER => $order } ; - - } elsif ( $field eq 'Customer' ) { #Freeside - - my $linkalias = $self->Join( - TYPE => 'LEFT', - ALIAS1 => 'main', - FIELD1 => 'id', - TABLE2 => 'Links', - FIELD2 => 'LocalBase' - ); - - $self->SUPER::Limit( - LEFTJOIN => $linkalias, - FIELD => 'Type', - OPERATOR => '=', - VALUE => 'MemberOf', - ); - $self->SUPER::Limit( - LEFTJOIN => $linkalias, - FIELD => 'Target', - OPERATOR => 'STARTSWITH', - VALUE => 'freeside://freeside/cust_main/', - ); - - #if there was a Links.RemoteTarget int, this bs wouldn't be necessary - my $custnum_sql = "CAST(SUBSTR($linkalias.Target,31) AS INTEGER)"; - - if ( $subkey eq 'Number' ) { - - push @res, { %$row, - ALIAS => '', - FIELD => $custnum_sql, - }; - - } elsif ( $subkey eq 'Name' ) { - - my $custalias = $self->Join( - TYPE => 'LEFT', - EXPRESSION => $custnum_sql, - TABLE2 => 'cust_main', - FIELD2 => 'custnum', - - ); - - my $field = "COALESCE( $custalias.company, - $custalias.last || ', ' || $custalias.first - )"; - - push @res, { %$row, ALIAS => '', FIELD => $field }; - - } - - } #Freeside - + } else { push @res, $row; } @@ -2817,11 +2667,6 @@ sub LimitCustomField { $args{CUSTOMFIELD} = $CF->Id; } - # Handle special customfields types - if ($CF->Type eq 'Date') { - $args{FIELD} = 'DateCustomFieldValue'; - } - #If we are looking to compare with a null value. if ( $args{'OPERATOR'} =~ /^is$/i ) { $args{'DESCRIPTION'} diff --git a/rt/lib/RT/URI/freeside.pm b/rt/lib/RT/URI/freeside.pm index 1bd2f534a..6194fd0cb 100644 --- a/rt/lib/RT/URI/freeside.pm +++ b/rt/lib/RT/URI/freeside.pm @@ -202,7 +202,7 @@ sub ParseURI { $pkey = $2; unless ( $pkey ) { - #way too noisy, using this prefix is normal usage# cluck "bad URL $uri"; + cluck "bad URL $uri"; return(undef); } diff --git a/rt/sbin/rt-dump-database b/rt/sbin/rt-dump-database deleted file mode 100755 index ce023adab..000000000 --- a/rt/sbin/rt-dump-database +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/perl -w -# BEGIN BPS TAGGED BLOCK {{{ -# -# COPYRIGHT: -# -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -# <jesse@bestpractical.com> -# -# (Except where explicitly superseded by other copyright notices) -# -# -# LICENSE: -# -# This work is made available to you under the terms of Version 2 of -# the GNU General Public License. A copy of that license should have -# been provided with this software, but in any event can be snarfed -# from www.gnu.org. -# -# This work is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -# -# -# CONTRIBUTION SUBMISSION POLICY: -# -# (The following paragraph is not intended to limit the rights granted -# to you to modify and distribute this software under the terms of -# the GNU General Public License and is only of importance to you if -# you choose to contribute your changes and enhancements to the -# community by submitting them to Best Practical Solutions, LLC.) -# -# By intentionally submitting any modifications, corrections or -# derivatives to this work, or any other work intended for use with -# Request Tracker, to Best Practical Solutions, LLC, you confirm that -# you are the copyright holder for those contributions and you grant -# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -# royalty-free, perpetual, license to use, copy, create derivative -# works based on those contributions, and sublicense and distribute -# those contributions and any derivatives thereof. -# -# END BPS TAGGED BLOCK }}} -use strict; - -# As we specify that XML is UTF-8 and we output it to STDOUT, we must be sure -# it is UTF-8 so further XMLin will not break -binmode(STDOUT, ":utf8"); - -# fix lib paths, some may be relative -BEGIN { - require File::Spec; - my @libs = ("lib", "local/lib"); - my $bin_path; - - for my $lib (@libs) { - unless ( File::Spec->file_name_is_absolute($lib) ) { - unless ($bin_path) { - if ( File::Spec->file_name_is_absolute(__FILE__) ) { - $bin_path = ( File::Spec->splitpath(__FILE__) )[1]; - } - else { - require FindBin; - no warnings "once"; - $bin_path = $FindBin::Bin; - } - } - $lib = File::Spec->catfile( $bin_path, File::Spec->updir, $lib ); - } - unshift @INC, $lib; - } - -} - -use RT; -use XML::Simple; - -RT::LoadConfig(); -RT::Init(); - -my $LocalOnly = @ARGV ? shift(@ARGV) : 1; - -my %RV; -my %Ignore = ( - All => [qw( - id Created Creator LastUpdated LastUpdatedBy - )], - Templates => [qw( - TranslationOf - )], -); - -my $SystemUserId = $RT::SystemUser->Id; -my @classes = qw( - Users Groups Queues ScripActions ScripConditions - Templates Scrips ACL CustomFields -); -foreach my $class (@classes) { - require "RT/$class.pm"; - my $objects = "RT::$class"->new($RT::SystemUser); - $objects->{find_disabled_rows} = 1; - $objects->UnLimit; - - if ($class eq 'CustomFields') { - $objects->OrderByCols( - { FIELD => 'LookupType' }, - { FIELD => 'SortOrder' }, - { FIELD => 'Id' }, - ); - } - else { - $objects->OrderBy( FIELD => 'Id' ); - } - - if ($LocalOnly) { - next if $class eq 'ACL'; # XXX - would go into infinite loop - XXX - $objects->Limit( FIELD => 'LastUpdatedBy', OPERATOR => '!=', VALUE => $SystemUserId ) - unless $class eq 'Groups'; - $objects->Limit( FIELD => 'Id', OPERATOR => '!=', VALUE => $SystemUserId ) - if $class eq 'Users'; - $objects->Limit( FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined' ) - if $class eq 'Groups'; - } - - my %fields; - while (my $obj = $objects->Next) { - next if $obj->can('LastUpdatedBy') and $obj->LastUpdatedBy == $SystemUserId; - - if (!%fields) { - %fields = map { $_ => 1 } keys %{$obj->_ClassAccessible}; - delete @fields{ - @{$Ignore{$class}||=[]}, - @{$Ignore{All}||=[]}, - }; - } - - my $rv; - # next if $obj-> # skip default names - foreach my $field (sort keys %fields) { - my $value = $obj->__Value($field); - $rv->{$field} = $value if ( defined ($value) && length($value) ); - } - delete $rv->{Disabled} unless $rv->{Disabled}; - - foreach my $record (map { /ACL/ ? 'ACE' : substr($_, 0, -1) } @classes) { - foreach my $key (map "$record$_", ('', 'Id')) { - next unless exists $rv->{$key}; - my $id = $rv->{$key} or next; - my $obj = "RT::$record"->new($RT::SystemUser); - $obj->LoadByCols( Id => $id ) or next; - $rv->{$key} = $obj->__Value('Name') || 0; - } - } - - if ($class eq 'Users' and defined $obj->Privileged) { - $rv->{Privileged} = int($obj->Privileged); - } - elsif ($class eq 'CustomFields') { - my $values = $obj->Values; - while (my $value = $values->Next) { - push @{$rv->{Values}}, { - map { ($_ => $value->__Value($_)) } qw( - Name Description SortOrder - ), - }; - } - } - - if (eval { require RT::Attributes; 1 }) { - my $attributes = $obj->Attributes; - while (my $attribute = $attributes->Next) { - my $content = $attribute->Content; - $rv->{Attributes}{$attribute->Name} = $content if length($content); - } - } - - push @{$RV{$class}}, $rv; - } -} - -print(<< "."); -no strict; use XML::Simple; *_ = XMLin(do { local \$/; readline(DATA) }, ForceArray => [qw( - @classes Values -)], NoAttr => 1, SuppressEmpty => ''); *\$_ = (\$_{\$_} || []) for keys \%_; 1; # vim: ft=xml -__DATA__ -. - -print XMLout( - { map { ($_ => ($RV{$_} || [])) } @classes }, - RootName => 'InitialData', - NoAttr => 1, - SuppressEmpty => '', - XMLDecl => '<?xml version="1.0" encoding="UTF-8"?>', -); diff --git a/rt/share/html/Elements/EditCustomFieldDate b/rt/share/html/Elements/EditCustomFieldDate deleted file mode 100644 index b6359d7e0..000000000 --- a/rt/share/html/Elements/EditCustomFieldDate +++ /dev/null @@ -1,62 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -% my $name = $NamePrefix.$CustomField->Id.'-Values'; -<& /Elements/SelectDate, Name => "$name", ShowTime => 0, current => 0 &> (<%$DateObj->AsString%>) - -<%INIT> -my $DateObj = new RT::Date ( $session{'CurrentUser'} ); -$DateObj->Set( Format => 'ISO', Value => $Default ); -</%INIT> -<%ARGS> -$Object => undef -$CustomField => undef -$NamePrefix => undef -$Default => undef -$Values => undef -$MaxValues => 1 -</%ARGS> diff --git a/rt/share/html/Elements/RT__CustomField/ColumnMap b/rt/share/html/Elements/RT__CustomField/ColumnMap index 0a867eb26..6d8d76a4c 100644 --- a/rt/share/html/Elements/RT__CustomField/ColumnMap +++ b/rt/share/html/Elements/RT__CustomField/ColumnMap @@ -155,9 +155,7 @@ my $COLUMN_MAP = { : ($args->{'PassArguments'}); my %pass = map { $_ => $args->{$_} } grep exists $args->{$_}, @pass; - my $path = $m->request_path; - $path =~ s(^/rt)(); #hacky, dunno why this happens - my $uri = RT->Config->Get('WebPath') . $path; + my $uri = RT->Config->Get('WebPath') . $m->request_path; my @res = ( \'<a href="', diff --git a/rt/share/html/Elements/RT__Ticket/ColumnMap b/rt/share/html/Elements/RT__Ticket/ColumnMap index e848939e1..c1f9e319a 100644 --- a/rt/share/html/Elements/RT__Ticket/ColumnMap +++ b/rt/share/html/Elements/RT__Ticket/ColumnMap @@ -313,25 +313,6 @@ $COLUMN_MAP = { return \$bookmark; }, }, - - Customer => { - title => 'Customer', #loc - attribute => 'Customer', #title/attribute/name... what does it all mean? - value => sub { - my $Ticket = shift; - my @Customers = @{ $Ticket->Customers->ItemsArrayRef }; - my @CustResolvers = map $_->TargetURI->Resolver, @Customers; - my @return = (); - for ( 0 .. $#CustResolvers ) { - my $c = @CustResolvers[$_]; - push @return, \'<A HREF="', $c->HREF, \'">', $c->AsString, \'</A>'; - push @return, \'<BR>' if scalar(@CustResolvers) > 1 - && $_ != $#CustResolvers; - } - @return; - }, - }, - }; # if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular diff --git a/rt/share/html/Elements/RefreshHomepage b/rt/share/html/Elements/RefreshHomepage index 7840f59cc..bf91a9522 100644 --- a/rt/share/html/Elements/RefreshHomepage +++ b/rt/share/html/Elements/RefreshHomepage @@ -46,13 +46,9 @@ %# %# END BPS TAGGED BLOCK }}} <&|/Widgets/TitleBox, title => loc('Refresh')&> -<form method="get" action="<% RT->Config->Get('WebPath') . $path %>"> +<form method="get" action="<% RT->Config->Get('WebPath') . $m->request_path %>"> <& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session{'home_refresh_interval'}||RT->Config->Get('HomePageRefreshInterval', $session{'CurrentUser'}) &> <& /Elements/Submit, Label => loc('Go!') &> </&> </form> -<%init> -my $path = $m->request_path; -$path =~ s(^/rt)(); #hacky, dunno why this happens -</%init> diff --git a/rt/share/html/Elements/SelectDate b/rt/share/html/Elements/SelectDate index 46092ce23..183086f3d 100755 --- a/rt/share/html/Elements/SelectDate +++ b/rt/share/html/Elements/SelectDate @@ -50,14 +50,14 @@ <IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $Name %>_date_button" STYLE="cursor: pointer" TITLE="Select date"> <script type="text/javascript"> Calendar.setup({ - inputField: <% $Name |n,js_string %>, + inputField: "<%$Name%>", % if ( defined($ShowTime) && $ShowTime ) { ifFormat: "%Y-%m-%d %H:%M", showsTime: true, % } else { ifFormat: "%Y-%m-%d", % } - button: <% $Name.'_date_button' |n,js_string %>, + button: "<%$Name%>_date_button", }); </script> <%init> diff --git a/rt/share/html/Elements/ShowCustomFieldDate b/rt/share/html/Elements/ShowCustomFieldDate deleted file mode 100644 index 4e8ad676c..000000000 --- a/rt/share/html/Elements/ShowCustomFieldDate +++ /dev/null @@ -1,57 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<%INIT> - my $content = $Object->Content; - my $DateObj = new RT::Date ( $session{'CurrentUser'} ); - $DateObj->Set( Format => 'ISO', Value => $content ); - $content = $DateObj->AsString; -</%INIT> -<%$content|n%> -<%ARGS> -$Object -</%ARGS> diff --git a/rt/share/html/Elements/ShowLink_Checklist b/rt/share/html/Elements/ShowLink_Checklist deleted file mode 100644 index 945305fb6..000000000 --- a/rt/share/html/Elements/ShowLink_Checklist +++ /dev/null @@ -1,36 +0,0 @@ -<a href="<%$URI->Resolver->HREF%>"> -% if ($URI->IsLocal) { -% my $member = $URI->Object; -% if (UNIVERSAL::isa($member, "RT::Ticket")) { -% my $inactive = 0; #$member->QueueObj->IsInactiveStatus($member->Status); - -<span class="<% $inactive ? 'ticket-inactive' : '' %>"> -<IMG SRC="<%$fsurl%>images/<% $status2image{$member->Status} %>.png" BORDER=0> -<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> -%# [<% loc($member->Status) %>] -</span> - -% } elsif ( UNIVERSAL::can($member, 'Name')) { -<%$URI->Resolver->AsString%>: <%$member->Name%> -% } else { -<%$URI->Resolver->AsString%> -% } -% } else { -<%$URI->Resolver->AsString%> -% } -</a> -<%ARGS> -$URI => undef -</%ARGS> -<%once> - -my %status2image = ( - 'new' => 'square_add', #'bullet_add', - 'open' => 'square', #'bullet_black', - 'stalled' => 'error', - 'resolved' => 'tick', - 'rejected' => 'cross', - #'deleted' => 'delete', -); - -</%once> diff --git a/rt/share/html/Elements/ShowUserVerbose b/rt/share/html/Elements/ShowUserVerbose index 9b61ea74a..82d65b0b3 100644 --- a/rt/share/html/Elements/ShowUserVerbose +++ b/rt/share/html/Elements/ShowUserVerbose @@ -46,11 +46,7 @@ %# %# END BPS TAGGED BLOCK }}} %# Released under the terms of version 2 of the GNU Public License -% if ( $Address->phrase || $Address->comment ) { -<% sprintf q{%s <%s> %s}, map $Address->$_, qw( phrase address comment ) %> -% } else { -<% $Address->address %> -% } +<%$Address->format%>\ <%INIT> my ($phrase, $address, $comment); diff --git a/rt/share/html/Search/Elements/BuildFormatString b/rt/share/html/Search/Elements/BuildFormatString index 9935fdf91..972851160 100644 --- a/rt/share/html/Search/Elements/BuildFormatString +++ b/rt/share/html/Search/Elements/BuildFormatString @@ -71,9 +71,6 @@ $CurrentDisplayColumns => undef # All the things we can display in the format string by default my @fields = qw( id QueueName Subject - - Customer - Status ExtendedStatus UpdateStatus Type @@ -99,7 +96,6 @@ my @fields = qw( Bookmark NEWLINE - ); # loc_qw $m->callback( CallbackOnce => 1, CallbackName => 'SetFieldsOnce', Fields => \@fields ); diff --git a/rt/share/html/Search/Elements/DisplayOptions b/rt/share/html/Search/Elements/DisplayOptions index 7464ae936..40d976cfd 100644 --- a/rt/share/html/Search/Elements/DisplayOptions +++ b/rt/share/html/Search/Elements/DisplayOptions @@ -115,8 +115,6 @@ $fields{$_}=1 for @cfs; # Add PAW sort $fields{'Custom.Ownership'} = 1; -$fields{"Customer.$_"} = 1 foreach qw( Number Name ); #Freeside - my @Order = split /\|/, $Order; my @OrderBy = split /\|/, $OrderBy; if ($Order =~ /\|/) { diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs index beda9f733..ba25cdeda 100644 --- a/rt/share/html/Search/Elements/PickCFs +++ b/rt/share/html/Search/Elements/PickCFs @@ -78,41 +78,20 @@ while ( my $CustomField = $CustomFields->Next ) { my %line; $line{'Name'} = "'CF.{" . $CustomField->Name . "}'"; $line{'Field'} = $CustomField->Name; - - # Op - if ($CustomField->Type eq 'Date') { - $line{'Op'} = { - Type => 'component', - Path => '/Elements/SelectDateRelation', - Arguments => {}, - }; - } else { - $line{'Op'} = { - Type => 'component', - Path => '/Elements/SelectCustomFieldOperator', - Arguments => { True => loc("is"), - False => loc("isn't"), - TrueVal=> '=', - FalseVal => '!=', - }, - }; - } - - # Value - if ($CustomField->Type eq 'Date') { - $line{'Value'} = { - Type => 'component', - Path => '/Elements/SelectDate', - Arguments => {}, - }; - } else { - $line{'Value'} = { - Type => 'component', - Path => '/Elements/SelectCustomFieldValue', - Arguments => { CustomField => $CustomField }, - }; - } - + $line{'Op'} = { + Type => 'component', + Path => '/Elements/SelectCustomFieldOperator', + Arguments => { True => loc("is"), + False => loc("isn't"), + TrueVal=> '=', + FalseVal => '!=', + }, + }; + $line{'Value'} = { + Type => 'component', + Path => '/Elements/SelectCustomFieldValue', + Arguments => { CustomField => $CustomField }, + }; push @lines, \%line; } diff --git a/rt/share/html/Ticket/Checklist.html b/rt/share/html/Ticket/Checklist.html deleted file mode 100644 index 7394b0c10..000000000 --- a/rt/share/html/Ticket/Checklist.html +++ /dev/null @@ -1,30 +0,0 @@ -<& /Elements/Header, Title => loc("Checklist for Ticket #[_1] [_2]", $Ticket->Id, $Ticket->Subject) &> -<& /Ticket/Elements/Tabs, - Ticket => $Ticket, current_tab => 'Ticket/Checklist.html?id='.$Ticket->id, - Title => loc("Ticket Checklist # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &> - -<& /Ticket/Elements/ShowMembers_Checklist, Ticket => $Ticket &> - -% if ( $show_hint ) { - -<A HREF="ModifyLinks.html?id=<%$Ticket->id%>">Link</A> -or <A HREF="Create.html?Queue=<%$Ticket->QueueObj->Id%>&new-MemberOf=<%$Ticket->id%>">create</A> -create child tickets to make a checklist. - -% } - -<%ARGS> -$id => undef -</%ARGS> - -<%INIT> - -my $Ticket = LoadTicket ($id); - -unless ($Ticket->CurrentUserHasRight('ShowTicket')) { - Abort("No permission to view ticket"); -} - -my $show_hint = ! $Ticket->Members->Count; - -</%INIT> diff --git a/rt/share/html/Ticket/Elements/BulkLinks b/rt/share/html/Ticket/Elements/BulkLinks index d04eba426..7f87cefb8 100755 --- a/rt/share/html/Ticket/Elements/BulkLinks +++ b/rt/share/html/Ticket/Elements/BulkLinks @@ -163,7 +163,7 @@ $Tickets => undef <%INIT> my %hash; if ( $Tickets && $Tickets->Count ) { - my $first_ticket = $Tickets->Next or last; #avoid errors on bulk delete + my $first_ticket = $Tickets->Next; # we only show current links that eixst on all the tickets for my $type ( qw/DependsOn DependedOnBy Members MemberOf RefersTo ReferredToBy/ ) { diff --git a/rt/share/html/Ticket/Elements/ShowMembers_Checklist b/rt/share/html/Ticket/Elements/ShowMembers_Checklist deleted file mode 100644 index 68fb3b2c5..000000000 --- a/rt/share/html/Ticket/Elements/ShowMembers_Checklist +++ /dev/null @@ -1,29 +0,0 @@ - -<style type="text/css"> -ul.checklist { - list-style-type: none -} -</style> - -<ul class="checklist"> -% while (my $link = $members->Next) { -<li><& /Elements/ShowLink_Checklist, URI => $link->BaseURI &><br /> -% if ($depth < 8) { #why only 8? -<& /Ticket/Elements/ShowMembers_Checklist, Ticket => $link->BaseObj, depth => ($depth+1) &> -% } -</li> -% } -</ul> - -<%INIT> - -return unless $Ticket; -my $members = $Ticket->Members; -return unless $members->Count; - -</%INIT> - -<%ARGS> -$Ticket => undef -$depth => 1 -</%ARGS> diff --git a/rt/share/html/Ticket/Elements/Tabs b/rt/share/html/Ticket/Elements/Tabs index 6943a2703..c893a350c 100755 --- a/rt/share/html/Ticket/Elements/Tabs +++ b/rt/share/html/Ticket/Elements/Tabs @@ -142,10 +142,6 @@ if ($Ticket) { title => loc('Links'), path => "Ticket/ModifyLinks.html?id=" . $id, }, - _Ea => { - title => loc('Checklist'), - path => "Ticket/Checklist.html?id=" . $id, - }, _Eb=> { title => loc('Customers'), path => "Ticket/ModifyCustomers.html?id=" . $id, diff --git a/rt/share/html/Ticket/Graphs/index.html b/rt/share/html/Ticket/Graphs/index.html index 211d3a0cb..e23737c8e 100644 --- a/rt/share/html/Ticket/Graphs/index.html +++ b/rt/share/html/Ticket/Graphs/index.html @@ -56,9 +56,7 @@ <& Elements/ShowGraph, %ARGS, Ticket => $ticket &> -% my $path = $m->request_comp->path; -% $path =~ s(^/rt)(); #hacky, dunno why this happens -<form action="<% RT->Config->Get('WebPath') . $path %>"> +<form action="<% RT->Config->Get('WebPath') . $m->request_comp->path %>"> <input type="hidden" class="hidden" name="id" value="<% $id %>" /> <& Elements/EditGraphProperties, %ARGS, Ticket => $ticket &> |