Commit 7249d897 authored by Jesse Vincent's avatar Jesse Vincent
Browse files

Merged forward from 3.2

 r3390@tinbook:  jesse | 2004-07-14T19:30:37.426202Z
 
 RT-Ticket: 5886
 RT-Action: correspond
 RT-Status: resolved
 
 Updated rt-crontool to pass in CurrentUser when creating new actions and searches..
 r3397@tinbook:  jesse | 2004-07-14T19:44:51.378312Z
 r3398@tinbook:  jesse | 2004-07-14T19:59:24.627023Z
 r3399@tinbook:  jesse | 2004-07-14T20:23:59.757938Z
 
 Bumping to 3.2.1rc4
 r8220@tinbook:  jesse | 2004-07-15T19:02:55.020727Z
 
 RT-Ticket: 5891
 RT-Status: open
 RT-Action: correspond
 
 Interim measure to only list sortable fields in the "Sort display by" 
 options.
 r8222@tinbook:  jesse | 2004-07-16T17:09:30.264982Z
 
 Web UI: Fixed bug which prevented unlimited searches
 r8239@tinbook:  jesse | 2004-07-19T16:54:11.660605Z
 r8240@tinbook:  jesse | 2004-07-19T17:01:43.322617Z
 
 Retagging the source code with the updated submission policy
 r8258@tinbook:  jesse | 2004-07-20T21:24:03.019565Z
 
 Crontool additions to support scripted notifications
 r8261@tinbook:  jesse | 2004-07-21T18:05:55.579150Z
r8264@tinbook:  jesse | 2004-07-21T19:10:28.393515Z

Bumpped the copyright/license/notice

git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rt/branches/3.3-TESTING@1267 e417ac7c-1bcc-0310-8ffa-8f5827389a85
parents e968e400 08fa69b7
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -14,13 +20,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
#
# DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated.
# Have a look at "configure" and "Makefile.in" instead
......
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2004 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -14,14 +20,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# END LICENSE BLOCK
# 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
RT is an enterprise-grade issue tracking system. It allows
organizations to keep track of their to-do lists, who is working
on which tasks, what's already been done, and when tasks were
......
#!@PERL@
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
package RT::Mason;
......
#!@SPEEDY_BIN@
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
package RT::Mason;
......
#!@PERL@
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
=head1 NAME
......
#!@PERL@
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
use strict;
use Carp;
......@@ -75,15 +97,19 @@ load_module($condition) if ($condition);
# load template if specified
my $template_obj;
if ($template_id) {
$template_obj = RT::Template->new($RT::Nobody);
$template_obj->LoadById($template_id);
$template_obj = RT::Template->new($CurrentUser);
$template_obj->Load($template_id);
}
#At the appointed time:
#find a bunch of tickets
my $tickets = RT::Tickets->new($CurrentUser);
my $search = $search->new( TicketsObj => $tickets, Argument => $search_arg );
my $search = $search->new(
TicketsObj => $tickets,
Argument => $search_arg,
CurrentUser => $CurrentUser
);
$search->Prepare();
......@@ -92,12 +118,13 @@ my $tickets = $search->TicketsObj;
#for each ticket we've found
while ( my $ticket = $tickets->Next() ) {
print "\n" . $ticket->Id() . ": " if ($verbose);
print $ticket->Id() . ": " if ($verbose);
# perform some more advanced check
if ($condition) {
my $condition_obj = $condition->new( TicketObj => $ticket,
Argument => $condition_arg );
Argument => $condition_arg,
CurrentUser => $CurrentUser );
# if the condition doesn't apply, get out of here
......@@ -106,9 +133,12 @@ while ( my $ticket = $tickets->Next() ) {
}
#prepare our action
my $action_obj = $action->new( TicketObj => $ticket,
TemplateObj => $template_obj,
Argument => $action_arg );
my $action_obj = $action->new(
TicketObj => $ticket,
TemplateObj => $template_obj,
Argument => $action_arg,
CurrentUser => $CurrentUser
);
#if our preparation, move onto the next ticket
next unless ( $action_obj->Prepare );
......@@ -116,7 +146,7 @@ while ( my $ticket = $tickets->Next() ) {
#commit our action.
next unless ( $action_obj->Commit );
print loc("Action committed.") if ($verbose);
print loc("Action committed.\n") if ($verbose);
}
# {{{ load_module
......
#!@PERL@ -w
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
=head1 NAME
......
#!@PERL@ -w
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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 LICENSE BLOCK
# END BPS TAGGED BLOCK
use strict;
......
#!@PERL@ -w
# BEGIN BPS TAGGED BLOCK
#
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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
package RT::Mason;
use strict;
use vars '$Handler';
require ('@RT_BIN_PATH@/webmux.pl');
......@@ -14,8 +62,6 @@ $SIG{CHLD} = "IGNORE"; # reap child processes
RT::Init();
my $port = shift || '8080';
if ( @RT::MasonParameters) {} # Shut up the warnings;
my $h = &RT::Interface::Web::NewCGIHandler(@RT::MasonParameters);
main_loop($port);
......@@ -77,13 +123,13 @@ sub main_loop {
print "HTTP/1.0 200 OK\n"; # probably OK by now
if ( ( !$h->interp->comp_exists( $cgi->path_info ) )
&& ($h->interp->comp_exists( $cgi->path_info . "/index.html" ) )
if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
&& ($Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) )
) {
$cgi->path_info( $cgi->path_info . "/index.html" );
}
eval { $h->handle_cgi_object($cgi); };
eval { $Handler->handle_cgi_object($cgi); };
$RT::Logger->crit($@) if ($@);
if ( $RT::Handle->TransactionDepth ) {
......
#!@PERL@
# BEGIN LICENSE BLOCK
# BEGIN BPS TAGGED BLOCK
#
# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
# COPYRIGHT:
#
# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
# <jesse.com>
#
# (Except where explictly superceded by other copyright notices)
# (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
......@@ -15,13 +21,29 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# Unless otherwise specified, all modifications, corrections or
# extensions to this work which alter its source code become the
# property of Best Practical Solutions, LLC when submitted for
# inclusion in the work.
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# 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.)