summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
Diffstat (limited to 'rt')
-rw-r--r--rt/FREESIDE_MODIFIED41
-rw-r--r--rt/HOWTO/README14
-rw-r--r--rt/HOWTO/change.txt67
-rw-r--r--rt/HOWTO/release.txt124
-rw-r--r--rt/HOWTO/version-control.txt41
-rw-r--r--rt/Makefile50
-rwxr-xr-xrt/README427
-rwxr-xr-xrt/bin/mason_handler.fcgi4
-rwxr-xr-xrt/bin/mason_handler.scgi4
-rw-r--r--rt/bin/mason_handler.svc4
-rwxr-xr-xrt/bin/rt2060
-rw-r--r--rt/bin/rt-commit-handler2
-rw-r--r--rt/bin/rt-commit-handler.in846
-rw-r--r--rt/bin/rt-crontool4
-rwxr-xr-xrt/bin/rt-mailgate4
-rwxr-xr-xrt/bin/webmux.pl137
-rw-r--r--rt/config256
-rw-r--r--rt/config.layout.in (renamed from rt/config.layout)49
-rw-r--r--rt/config.log212
-rw-r--r--rt/config.pld19
-rwxr-xr-xrt/config.status1398
-rw-r--r--rt/etc/RT_Config.pm38
-rw-r--r--rt/etc/RT_Config.pm.in23
-rw-r--r--rt/etc/RT_SiteConfig.pm38
-rw-r--r--rt/etc/acl.Oracle12
-rwxr-xr-xrt/etc/acl.Pg38
-rwxr-xr-xrt/etc/acl.mysql3
-rw-r--r--rt/etc/schema.Oracle398
-rwxr-xr-xrt/etc/schema.mysql89
-rw-r--r--rt/etc/upgrade/2.1.71211
-rw-r--r--rt/html/Admin/Elements/ModifyQueue78
-rw-r--r--rt/html/Admin/Elements/ModifyUser99
-rw-r--r--rt/html/Admin/Global/CustomField.html86
-rw-r--r--rt/html/Admin/Global/CustomFields.html69
-rw-r--r--rt/html/Admin/Users/Modify.html16
-rw-r--r--rt/html/Admin/Users/Prefs.html122
-rw-r--r--rt/html/Callbacks/ActivityReports/Elements/Tabs/Default7
-rw-r--r--rt/html/Callbacks/ActivityReports/NoAuth/webrt.css/Default71
-rw-r--r--rt/html/Callbacks/ActivityReports/Search/Results.html/SearchActions7
-rw-r--r--rt/html/Callbacks/RT-WebCronTool/Elements/Tabs/Default13
-rw-r--r--rt/html/Callbacks/kStatistics/Elements/Tabs/Default11
-rw-r--r--rt/html/Developer/CronTool/autohandler9
-rw-r--r--rt/html/Developer/CronTool/index.html116
-rw-r--r--rt/html/Elements/AddCustomers59
-rw-r--r--rt/html/Elements/CollectionAsTable/Row4
-rw-r--r--rt/html/Elements/EditCustomers63
-rw-r--r--rt/html/Elements/Footer46
-rw-r--r--rt/html/Elements/FreesideInvoiceSearch20
-rw-r--r--rt/html/Elements/FreesideNewCust3
-rw-r--r--rt/html/Elements/FreesideSearch13
-rw-r--r--rt/html/Elements/FreesideSvcSearch13
-rw-r--r--rt/html/Elements/Header113
-rw-r--r--rt/html/Elements/Menu4
-rw-r--r--rt/html/Elements/PageLayout164
-rw-r--r--rt/html/Elements/QuickCreate8
-rw-r--r--rt/html/Elements/SelectDate19
-rw-r--r--rt/html/Elements/ShadedBox33
-rw-r--r--rt/html/Elements/ShadedInputRow35
-rw-r--r--rt/html/Elements/ShadedRow31
-rw-r--r--rt/html/Elements/SimpleSearch17
-rw-r--r--rt/html/Elements/Tabs26
-rw-r--r--rt/html/Elements/TicketList7
-rw-r--r--rt/html/Elements/TitleBoxStart4
-rw-r--r--rt/html/Elements/ViewUser51
-rw-r--r--rt/html/NoAuth/css/3.5-default/freeside.css9
-rw-r--r--rt/html/NoAuth/css/3.5-default/main.css5
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/misc.css12
-rw-r--r--rt/html/NoAuth/css/3.5-default/titlebox.css7
-rwxr-xr-xrt/html/NoAuth/css/3.5-default/transactions.css8
-rw-r--r--rt/html/NoAuth/images/back_home.gifbin330 -> 0 bytes
-rw-r--r--rt/html/NoAuth/images/css/cb.gifbin163 -> 110 bytes
-rw-r--r--rt/html/NoAuth/images/css/cbr.gifbin188 -> 110 bytes
-rw-r--r--rt/html/NoAuth/images/css/ct.gifbin162 -> 110 bytes
-rw-r--r--rt/html/NoAuth/images/css/ctr.gifbin188 -> 111 bytes
-rw-r--r--rt/html/NoAuth/images/head_requestracker.gifbin1233 -> 0 bytes
-rw-r--r--rt/html/NoAuth/images/rt.jpgbin917 -> 0 bytes
-rw-r--r--rt/html/NoAuth/images/small-logo.pngbin0 -> 4887 bytes
-rw-r--r--rt/html/NoAuth/images/space.gifbin43 -> 0 bytes
-rw-r--r--rt/html/NoAuth/images/spacer.gifbin43 -> 0 bytes
-rw-r--r--rt/html/NoAuth/images/squares_blue.gifbin219 -> 0 bytes
-rw-r--r--rt/html/NoAuth/printrt.css77
-rw-r--r--rt/html/NoAuth/webrt.css628
-rw-r--r--rt/html/Prefs/SearchOptions.html6
-rwxr-xr-xrt/html/RTx/Statistics/CallsMultiQueue/Elements/Chart39
-rwxr-xr-xrt/html/RTx/Statistics/CallsMultiQueue/index.html330
-rwxr-xr-xrt/html/RTx/Statistics/CallsQueueDay/Elements/Chart29
-rw-r--r--rt/html/RTx/Statistics/CallsQueueDay/Results.tsv191
-rwxr-xr-xrt/html/RTx/Statistics/CallsQueueDay/index.html275
-rwxr-xr-xrt/html/RTx/Statistics/DayOfWeek/Elements/Chart26
-rwxr-xr-xrt/html/RTx/Statistics/DayOfWeek/index.html155
-rwxr-xr-xrt/html/RTx/Statistics/DurationAsString18
-rw-r--r--rt/html/RTx/Statistics/Elements/CollectionAsTable/Header126
-rw-r--r--rt/html/RTx/Statistics/Elements/CollectionAsTable/ParseFormat (renamed from rt/html/Ticket/Elements/ShowReferences)83
-rw-r--r--rt/html/RTx/Statistics/Elements/CollectionAsTable/Row112
-rw-r--r--rt/html/RTx/Statistics/Elements/ControlsAsTable/ControlBox103
-rw-r--r--rt/html/RTx/Statistics/Elements/ControlsAsTable/UpdatePage5
-rw-r--r--rt/html/RTx/Statistics/Elements/DateSelectRow55
-rwxr-xr-xrt/html/RTx/Statistics/Elements/DurationAsString18
-rw-r--r--rt/html/RTx/Statistics/Elements/GraphBox27
-rwxr-xr-x[-rw-r--r--]rt/html/RTx/Statistics/Elements/SelectMultiQueue (renamed from rt/html/Ticket/Elements/ShowMemberOf)40
-rw-r--r--rt/html/RTx/Statistics/Elements/StatColumnMap173
-rwxr-xr-xrt/html/RTx/Statistics/Elements/Tabs72
-rw-r--r--rt/html/RTx/Statistics/FAQ/index.html23
-rwxr-xr-xrt/html/RTx/Statistics/OpenStalled/Elements/Chart27
-rw-r--r--rt/html/RTx/Statistics/OpenStalled/Results.tsv114
-rwxr-xr-xrt/html/RTx/Statistics/OpenStalled/index.html188
-rwxr-xr-xrt/html/RTx/Statistics/Resolution/Elements/Chart29
-rw-r--r--rt/html/RTx/Statistics/Resolution/index.html269
-rwxr-xr-xrt/html/RTx/Statistics/TimeToResolve/Elements/Chart23
-rwxr-xr-xrt/html/RTx/Statistics/TimeToResolve/index.html75
-rwxr-xr-xrt/html/RTx/Statistics/UserTest/Elements/Chart28
-rwxr-xr-xrt/html/RTx/Statistics/UserTest/index.html54
-rwxr-xr-xrt/html/RTx/Statistics/index.html59
-rw-r--r--rt/html/Reports/Activity/ActivityDetail.html83
-rw-r--r--rt/html/Reports/Activity/ActivitySummary.html61
-rw-r--r--rt/html/Reports/Activity/Elements/LimitReport23
-rw-r--r--rt/html/Reports/Activity/Elements/MiniPlot57
-rw-r--r--rt/html/Reports/Activity/Elements/PrintFooter7
-rw-r--r--rt/html/Reports/Activity/Elements/PrintHeader32
-rw-r--r--rt/html/Reports/Activity/Elements/ScreenFooter13
-rw-r--r--rt/html/Reports/Activity/Elements/ScreenHeader8
-rw-r--r--rt/html/Reports/Activity/Elements/Tabs52
-rw-r--r--rt/html/Reports/Activity/Elements/Wrapper16
-rw-r--r--rt/html/Reports/Activity/ResolutionComments.html62
-rw-r--r--rt/html/Reports/Activity/ResolutionStatistics.html95
-rw-r--r--rt/html/Reports/Activity/index.html29
-rw-r--r--rt/html/Search/Bulk.html5
-rw-r--r--rt/html/Search/Elements/PickRestriction142
-rw-r--r--rt/html/Search/Elements/TicketHeader40
-rw-r--r--rt/html/Search/Elements/TicketHeaderCell55
-rw-r--r--rt/html/Search/Elements/TicketRow55
-rw-r--r--rt/html/Search/Listing.html113
-rw-r--r--rt/html/Ticket/Create.html13
-rw-r--r--rt/html/Ticket/Display.html16
-rw-r--r--rt/html/Ticket/Elements/AddCustomers52
-rw-r--r--rt/html/Ticket/Elements/EditCustomers63
-rw-r--r--rt/html/Ticket/Elements/EditLinks133
-rw-r--r--rt/html/Ticket/Elements/ShowCustomers38
-rw-r--r--rt/html/Ticket/Elements/ShowLink40
-rw-r--r--rt/html/Ticket/Elements/ShowLinks87
-rw-r--r--rt/html/Ticket/Elements/ShowSummary10
-rw-r--r--rt/html/Ticket/Elements/ShowTransactionAttachments14
-rw-r--r--rt/html/Ticket/Elements/Tabs10
-rw-r--r--rt/html/Ticket/ModifyCustomers.html49
-rw-r--r--rt/html/User/Prefs.html6
-rwxr-xr-xrt/html/Widgets/TitleBoxStart4
-rw-r--r--rt/lib/RT.pm37
-rwxr-xr-xrt/lib/RT/ACE.pm92
-rwxr-xr-xrt/lib/RT/ACL.pm44
-rwxr-xr-xrt/lib/RT/Action/Autoreply.pm68
-rwxr-xr-xrt/lib/RT/Action/Generic.pm94
-rwxr-xr-xrt/lib/RT/Action/Notify.pm81
-rwxr-xr-xrt/lib/RT/Action/NotifyAsComment.pm40
-rw-r--r--rt/lib/RT/Action/ResolveMembers.pm40
-rwxr-xr-xrt/lib/RT/Action/SendEmail.pm995
-rwxr-xr-xrt/lib/RT/Attachment.pm112
-rwxr-xr-xrt/lib/RT/Attachments.pm44
-rw-r--r--rt/lib/RT/Condition/AnyTransaction.pm40
-rwxr-xr-xrt/lib/RT/Condition/Generic.pm48
-rw-r--r--rt/lib/RT/Condition/StatusChange.pm40
-rwxr-xr-xrt/lib/RT/CurrentUser.pm201
-rw-r--r--rt/lib/RT/Date.pm125
-rw-r--r--rt/lib/RT/Extension/ActivityReports.pm3
-rwxr-xr-xrt/lib/RT/Group.pm86
-rwxr-xr-xrt/lib/RT/GroupMember.pm62
-rwxr-xr-xrt/lib/RT/GroupMembers.pm44
-rwxr-xr-xrt/lib/RT/Groups.pm44
-rw-r--r--rt/lib/RT/Groups_Overlay.pm5
-rw-r--r--rt/lib/RT/Handle.pm68
-rw-r--r--rt/lib/RT/I18N/en_malkovich.po3973
-rw-r--r--rt/lib/RT/Interface/CLI.pm42
-rwxr-xr-xrt/lib/RT/Interface/Email.pm1035
-rw-r--r--rt/lib/RT/Interface/Web.pm1057
-rw-r--r--rt/lib/RT/Interface/Web_Vendor.pm201
-rw-r--r--rt/lib/RT/Link.pm96
-rw-r--r--rt/lib/RT/Links.pm44
-rwxr-xr-xrt/lib/RT/Queue.pm114
-rwxr-xr-xrt/lib/RT/Queues.pm44
-rwxr-xr-xrt/lib/RT/Record.pm35
-rwxr-xr-xrt/lib/RT/Scrip.pm140
-rwxr-xr-xrt/lib/RT/ScripAction.pm90
-rwxr-xr-xrt/lib/RT/ScripActions.pm44
-rwxr-xr-xrt/lib/RT/ScripCondition.pm96
-rwxr-xr-xrt/lib/RT/ScripConditions.pm44
-rwxr-xr-xrt/lib/RT/Scrips.pm44
-rw-r--r--rt/lib/RT/SearchBuilder.pm6
-rwxr-xr-xrt/lib/RT/Template.pm110
-rwxr-xr-xrt/lib/RT/Templates.pm44
-rwxr-xr-xrt/lib/RT/Ticket.pm188
-rw-r--r--rt/lib/RT/TicketCustomFieldValue.pm308
-rw-r--r--rt/lib/RT/TicketCustomFieldValue_Overlay.pm74
-rw-r--r--rt/lib/RT/TicketCustomFieldValues.pm137
-rw-r--r--rt/lib/RT/TicketCustomFieldValues_Overlay.pm108
-rw-r--r--rt/lib/RT/Ticket_Overlay.pm181
-rwxr-xr-xrt/lib/RT/Tickets.pm44
-rwxr-xr-xrt/lib/RT/Transaction.pm228
-rw-r--r--rt/lib/RT/Transaction_Overlay.pm9
-rwxr-xr-xrt/lib/RT/Transactions.pm44
-rw-r--r--rt/lib/RT/URI/freeside.pm285
-rw-r--r--rt/lib/RT/URI/freeside/Internal.pm145
-rw-r--r--rt/lib/RT/URI/freeside/XMLRPC.pm122
-rwxr-xr-xrt/lib/RT/User.pm240
-rw-r--r--rt/lib/RT/User_Overlay.pm265
-rwxr-xr-xrt/lib/RT/Users.pm44
-rw-r--r--rt/lib/RT/Users_Overlay.pm5
-rwxr-xr-xrt/lib/RTx/Statistics.pm239
-rw-r--r--rt/lib/RTx/WebCronTool.pm41
-rw-r--r--rt/lib/t/00smoke.t.in14
-rw-r--r--rt/lib/t/01harness.t.in12
-rw-r--r--rt/lib/t/02regression.t7
-rw-r--r--rt/lib/t/02regression.t.in47
-rw-r--r--rt/lib/t/03web.pl78
-rw-r--r--rt/lib/t/03web.pl.in170
-rw-r--r--rt/lib/t/04_send_email.pl25
-rw-r--r--rt/lib/t/04_send_email.pl.in506
-rw-r--r--rt/lib/t/05cronsupport.pl.in84
-rw-r--r--rt/lib/t/regression/00placeholder1
-rw-r--r--rt/sbin/rt-setup-database707
-rw-r--r--rt/sbin/rt-setup-database.in11
-rw-r--r--rt/sbin/rt-test-dependencies481
220 files changed, 8987 insertions, 18586 deletions
diff --git a/rt/FREESIDE_MODIFIED b/rt/FREESIDE_MODIFIED
new file mode 100644
index 000000000..e82078992
--- /dev/null
+++ b/rt/FREESIDE_MODIFIED
@@ -0,0 +1,41 @@
+ sbin/rt-setup-database.in
+config.layout
+config.layout.in
+ etc/RT_SiteConfig.pm
+lib/RT/Interface/Web_Vendor.pm
+lib/RT/SearchBuilder.pm #need DBIx::SearchBuilder >= 1.36 for Pg 8.1+
+lib/RT/Transaction_Overlay.pm
+lib/RT/URI/freeside.pm
+lib/RT/URI/freeside/Internal.pm
+lib/RT/URI/freeside/XMLRPC.pm
+ html/Elements/Header
+ html/Elements/Menu
+ html/Elements/PageLayout
+ html/Elements/QuickCreate
+ html/Elements/SelectDate
+ html/Elements/SimpleSearch
+ html/Elements/Tabs
+ html/Elements/Footer
+ html/Elements/CollectionAsTable/Row #backport from 3.3-TESTING
+ html/Ticket/Create.html
+ html/Ticket/Display.html
+html/Ticket/Elements/AddCustomers
+html/Ticket/Elements/EditCustomers
+html/Ticket/Elements/ShowCustomers
+ html/Ticket/Elements/ShowSummary
+ html/Ticket/Elements/Tabs
+html/Ticket/ModifyCustomers.html
+html/NoAuth/images/small-logo.png
+ html/NoAuth/css/3.5-default/main.css
+ html/NoAuth/css/3.5-default/misc.css
+ html/NoAuth/css/3.5-default/titlebox.css
+html/NoAuth/css/3.5-default/freeside.css
+
+html/Widgets/TitleBoxStart
+
+html/Elements/FreesideNewCust
+html/Elements/FreesideSearch
+html/Elements/FreesideSvcSearch
+
+ html/User/Prefs.html
+ html/Prefs/SearchOptions.html
diff --git a/rt/HOWTO/README b/rt/HOWTO/README
deleted file mode 100644
index 942096b0a..000000000
--- a/rt/HOWTO/README
+++ /dev/null
@@ -1,14 +0,0 @@
-Here you'll find plain text documentation of how to handle various
-project procedures. Files contained herein:
-
-change.txt
- How changes are integrated, including generating and
- distributing aedist change sets, and updating the CVS repository.
-
-release.txt
- Steps to go through when releasing a new version of RT.
-
-
-These procedures are based on documentation from the scons project
-as http://www.scons.org/
-
diff --git a/rt/HOWTO/change.txt b/rt/HOWTO/change.txt
deleted file mode 100644
index de316450c..000000000
--- a/rt/HOWTO/change.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-Handling a change set:
-
- -- Start the change:
-
- aedist -r [if it's a remote submission]
-
- -or-
-
- aedb {cnum} [if it's initiated locally]
-
- -- Normal development cycle:
-
- aecd -c {cnum}
- aecp . # Copy the baseline to your working dir
- # work on your change
- aenf {new file names}
-
- aecpu -unch # Remove unchanged files, for faster diffs
- aeb # Currently does nothing
- aet # Currently does nothing
- aed # Diff your change
- aede # End the change
-
- -- As the reviewer:
-
- aerpass {cnum}
-
- -- As the integrator:
-
- aeib {cnum}
- aeb
- aet
- aed
- cd ~ # Get out of the current working directory
- aeipass
-
-
-
-
- -- Update the aedist baseline on the web site:
-
- aedist -s -bl -p rt.2.1 > rt.2.1.ae
- scp rt.2.1.ae jesse@fsck.com:/home/ftp/pub/rt/devel/rt.2.1.ae
- rm rt.2.1.ae
-
- [This will eventually be automated.]
-
- -- Distribute the change to CVS:
-
- WARNING. DOES NOT YET WORK
-
- export CVS_RSH=ssh
- ae2cvs -n -aegis -p rt.2.1 -c {cnum} -u ~/SCons/scons
- ae2cvs -X -aegis -p rt.2.1 -c {cnum} -u ~/SCons/scons
-
- If you need the "ae2cvs" Perl script, you can find a copy
- checked in to the bin/subdirectory.
-
- [This may eventually be automated.]
-
-
-
- -- Grabbing the latest dev sources over ssh
-
- ssh fsck.com "aedist -s -p rt.2.1 -naa -bl -entire-source" | aedist -r
-
-
diff --git a/rt/HOWTO/release.txt b/rt/HOWTO/release.txt
deleted file mode 100644
index 285041c5b..000000000
--- a/rt/HOWTO/release.txt
+++ /dev/null
@@ -1,124 +0,0 @@
-Things to do to release a new version of rt:
-
- Build and test candidate packages
-
- Read through the README and src/README.txt files for any updates
-
- Prepare ChangeLog
-
- date -R the latest release
-
- should be current if this has been updated as each
- change went in.
-
- [ Should be automated ]
-
-
- TODO: nothing below this line is accurate for RT
-
- END THE BRANCH
-
- ae_p rt.2
- aede {5}
- aerpass {5}
- aeib {5}
- aeb
- aet
- aet -reg
- aed
- aeipass
-
- START THE NEW BRANCH
-
- aenbr -p rt.2 {6}
- aenc -p rt.2.{6}
-
- Call it something like, "Initialize the new
- branch." Cause = internal_enhancement. Exempt
- it from all tests (*_exempt = true).
-
- ae_p rt.2.{6}
-
- aedb 100
-
- aecd
-
- # Change the hard-coded package version numbers
- # in the following files.
- aecp rttruct debian/changelog rpm/rt.spec
-
- vi rttruct debian/changelog rpm/rt.spec
-
- # Optionally, do the same in the following:
- [optional] aecp HOWTO/change.txt
- [optional] aecp HOWTO/release.txt
- [optional] aecp debian/rt.postinst
-
- [optional] vi HOWTO/change.txt
- [optional] vi HOWTO/release.txt
- [optional] vi debian/rt.postinst
-
- aeb
-
- aet -reg
-
- aed
-
- aede
-
- etc.
-
-
- Read through the FAQ for any updates
-
- Test downloading from the web site download page
-
-
- In the Bugs Tracker, add a Group for the new release (0.05)
-
- Announce to the following mailing lists (template below):
-
- rt-announce@lists.fsck.com
-
-
- Notify www.cmtoday.com/contribute.html
-
- [This guy wants an announcement no more frequently than
- once a month, so save it for a future release if it's
- been too soon since the previous one.]
-
- Notify freshmeat.net
-
- [Wait until the morning so the announcement hits the
- main freshmeat.net page while people in the U.S. are
- awake and working]
-
-
-
-
-=======================
-
-Template release announcement:
-
-
-
-Version 2.1.XXX of rt has been released and is available for download
-from the rt web site:
-
- http://bestpractical.com/rt/
-
-
-
-WHAT'S NEW IN THIS RELEASE?
-
-Version 2.1.XXX of rt contains the following important changes:
-
- - XXX
-
-For a complete list of changes in version 2.1.XXX, see the CHANGES.txt
-file in the release itself.
-
-
-WHAT IS RT?
-
- FILL THIS IN
diff --git a/rt/HOWTO/version-control.txt b/rt/HOWTO/version-control.txt
deleted file mode 100644
index 06babfdf1..000000000
--- a/rt/HOWTO/version-control.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Using Aegis for RT development
-
- 1. The main line of RT development will be under the control
- of the Aegis change management system, as administered by
- Best Practical Solutions, LLC
-
- 2. We will use aedist to generate change sets for each change
- checked in to the main Aegis repository. These change sets will be
- either distributed by a mailing list or made available via the web,
- or both.
-
- 3. Remote developers using Aegis will send aedist output for
- their changes to rt-patches@bestpractical.com for review and
- integration.
-
- 4. The aedist output should be sent to rt-patches@bestpractical.com
- after the change has completed its local aede, but before aerpass.
-
- 5. If the change is rejected, the developer can aedeu to reopen
- the change and fix whatever problems caused the review to not pass.
-
- 6. A baseline snapshot (aedist -bl) of the main Aegis repository
- will be generated at least daily and made available via http
- to provide a central location for synchronizing remote Aegis
- repositories.
-
- 7. Changes to the main Aegis repository will also be propagated
- automatically to the tracking CVS repository.
-
-Using CVS for RT development
-
- 1. CVS is accessed via anonymous cvs with the following CVSROOT:
-
- :pserver:anoncvs@cvs.fsck.com:/raid/cvsroot/rt-2-1
-
- 2. Remote developers using CVS will send patches (cvs -diff
- output) to rt-patches@bestpractical.com for integration into the
- main Aegis repository. This allows anonymous CVS access to be used
- for RT development by developers who are unable to use Aegis.
-
-
diff --git a/rt/Makefile b/rt/Makefile
index 87d6fd74c..7d510c81b 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -60,14 +60,14 @@ SITE_CONFIG_FILE = $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
RT_VERSION_MAJOR = 3
RT_VERSION_MINOR = 6
-RT_VERSION_PATCH = 10
+RT_VERSION_PATCH = 6
RT_VERSION = $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
TAG = rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
# This is the group that all of the installed files will be chgrp'ed to.
-RTGROUP = www
+RTGROUP = freeside
# User which should own rt binaries.
@@ -79,11 +79,11 @@ LIBS_OWNER = root
# Group that should own all of RT's libraries, generally root.
LIBS_GROUP = bin
-WEB_USER = www
-WEB_GROUP = www
+WEB_USER = freeside
+WEB_GROUP = freeside
-APACHECTL = /usr/sbin/apachectl
+APACHECTL =
# {{{ Files and directories
@@ -105,9 +105,9 @@ RT_LOCAL_PATH = /opt/rt3/local
LOCAL_ETC_PATH = /opt/rt3/local/etc
LOCAL_LIB_PATH = /opt/rt3/local/lib
LOCAL_LEXICON_PATH = /opt/rt3/local/po
-MASON_HTML_PATH = /opt/rt3/share/html
+MASON_HTML_PATH = /var/www/freeside/rt
MASON_LOCAL_HTML_PATH = /opt/rt3/local/html
-MASON_DATA_PATH = /opt/rt3/var/mason_data
+MASON_DATA_PATH = /usr/local/etc/freeside/masondata
MASON_SESSION_PATH = /opt/rt3/var/session_data
RT_LOG_PATH = /opt/rt3/var/log
@@ -160,7 +160,7 @@ SYSTEM_BINARIES = $(DESTDIR)/$(RT_SBIN_PATH)/
# "Pg" is known to work
# "Informix" is known to work
-DB_TYPE = SQLite
+DB_TYPE = Pg
# Set DBA to the name of a unix account with the proper permissions and
# environment to run your commandline SQL sbin
@@ -172,7 +172,7 @@ DB_TYPE = SQLite
# For Oracle, you want 'system'
# For Informix, you want 'informix'
-DB_DBA = root
+DB_DBA = freeside
DB_HOST = localhost
@@ -198,9 +198,9 @@ DB_RT_HOST = localhost
# set this to the name you want to give to the RT database in
# your database server. For Oracle, this should be the name of your sid
-DB_DATABASE = rt3
-DB_RT_USER = rt_user
-DB_RT_PASS = rt_pass
+DB_DATABASE = freeside
+DB_RT_USER = freeside
+DB_RT_PASS =
# }}}
@@ -244,9 +244,9 @@ upgrade-instruct:
@echo ""
@echo "For each item in that directory whose name is greater than"
@echo "your previously installed RT version, run:"
- @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action schema --datadir etc/upgrade/<version>"
- @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action acl --datadir etc/upgrade/<version>"
- @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action insert --datadir etc/upgrade/<version>"
+ @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action schema --datadir etc/upgrade/<version>"
+ @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action acl --datadir etc/upgrade/<version>"
+ @echo " $(RT_SBIN_PATH)/rt-setup-database --dba $(DB_DBA) --prompt-for-dba-password --action insert --datadir etc/upgrade/<version>"
upgrade: config-install dirs files-install fixperms upgrade-instruct
@@ -271,7 +271,7 @@ fixperms:
chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_PATH)
chown -R $(LIBS_OWNER) $(DESTDIR)/$(RT_LIB_PATH)
chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(RT_LIB_PATH)
- chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(RT_LIB_PATH)
+ chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(RT_LIB_PATH)
chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH)
@@ -331,7 +331,7 @@ install: config-install dirs files-install fixperms instruct
files-install: libs-install etc-install bin-install sbin-install html-install local-install doc-install
config-install:
- mkdir -p $(DESTDIR)/$(CONFIG_FILE_PATH)
+ mkdir -p $(DESTDIR)/$(CONFIG_FILE_PATH)
-cp etc/RT_Config.pm $(DESTDIR)/$(CONFIG_FILE)
[ -f $(DESTDIR)/$(SITE_CONFIG_FILE) ] || cp etc/RT_SiteConfig.pm $(DESTDIR)/$(SITE_CONFIG_FILE)
@@ -367,7 +367,7 @@ regression-instruct:
# {{{ database-installation
regression-reset-db:
- $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --dba-password '' --force
+ $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --dba-password '' --force
$(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --dba-password ''
initdb :: initialize-database
@@ -376,7 +376,7 @@ initialize-database:
$(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --prompt-for-dba-password
dropdb:
- $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --prompt-for-dba-password
+ $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --prompt-for-dba-password
insert-approval-data:
$(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/insert_approval_scrips
@@ -461,10 +461,10 @@ POD2TEST_EXE = sbin/extract_pod_tests
testify-pods:
[ -d lib/t/autogen ] || mkdir lib/t/autogen
- find lib -name \*pm | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
- find bin -type f | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
- find lib -name \*pm | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
- find bin -type f | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
+ find lib -name \*pm |grep -v .svn | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
+ find bin -type f |grep -v .svn | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
+ find lib -name \*pm |grep -v .svn | grep -v \*.in |xargs -n 1 $(PERL) $(POD2TEST_EXE)
+ find bin -type f |grep -v .svn | grep -v \~ | grep -v "\.in" | xargs -n 1 $(PERL) $(POD2TEST_EXE)
diff --git a/rt/README b/rt/README
index 398d8c422..7c5e4d47a 100755
--- a/rt/README
+++ b/rt/README
@@ -1,46 +1,88 @@
-RT is an enterprise-grade issue tracking system. It allows organizations
-to keep track of what needs to get done, who is working on which tasks,
-what's already been done, and when tasks were (or weren't) completed.
-
-RT doesn't cost anything to use, no matter how much you use it; it
-is freely available under the terms of Version 2 of the GNU General
-Public License.
-
-RT is commercially-supported software. To purchase support, training,
-custom development, or professional services, please get in touch with
-us at sales@bestpractical.com.
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+#
+# (Except where explictly superceded by other copyright notices)
+#
+# 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.
+#
+# 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.
+#
+#
+# END LICENSE 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
+completed. It is available under the terms of version 2 of the GNU
+General Public License (GPL), so it doesn't cost anything to set
+up and use.
- Jesse Vincent
- Best Practical Solutions, LLC
- March, 2005
+ Jesse Vincent
+ Best Practical Solutions, LLC
+ March 2003
REQUIRED PACKAGES:
------------------
-o Perl 5.8.3 or later (http://www.perl.com).
+o Perl 5.8.0 or later (http://www.perl.com).
- Perl versions prior to 5.8.3 contain bugs that could result
- in data corruption. We recommend strongly that you use 5.8.3
- or newer.
+ (If you intend to use the FastCGI or SpeedyCGI support, you
+ need to make sure that perl has been built with support for
+ setgid perl scripts.)`
-o A supported SQL database
+ Perl 5.6.1 is currently deprecated and will be officially desupported
+ in a future release
- Currently supported: Mysql 4.0.13 or later with InnoDB support.
+o A DB backend; MySQL is recommended ( http://www.mysql.com )
+ Currently supported: Mysql 4.0.13 or later.
Postgres 7.2 or later.
- Oracle 9iR2 or later.
- SQLite 3.0. (Not recommended for production)
+
+ Mysql 3.23.46 or newer with support for InnoDB
+ is currently deprecated and will be officially
+ desupported in a future release.
o Apache version 1.3.x or 2.x (http://httpd.apache.org)
- with mod_perl -- (http://perl.apache.org )
- or a webserver with FastCGI support (www.fastcgi.com)
+ with mod_perl -- (http://perl.apache.org )
+ or a webserver with FastCGI support (www.fastcgi.com)
+
+ mod_perl 2.0 isn't quite ready for prime_time just yet;
+ Best Practical Solutions strongly recommends that sites use
+ Apache 1.3 or FastCGI.
Compiling mod_perl on Apache 1.3.x as a DSO has been known
- to have massive stability problems and is not recommended.
+ to have massive stability problems and is not recommended.
+
+ mod_perl 1.x must be build with EVERYTHING=1
+
+ RT's FastCGI handler runs setgid to the 'rt' group to
+ protect RT's database password. You may need to install
+ a special "suidperl" package or reconfigure your perl
+ setup to support "setuid scripts" if you intend to use RT
+ with FastCGI.
+
+ Debian GNU/* 3.0+: the package which installs suidperl is
+ called perl-suid, and should work without any tweaking.
+
+ FreeBSD 4.2+: the package is called sperl, and should
+ install a suidperl that just works
+
+ Conectiva Linux 6.0+: suidperl is installed by default when
+ perl is installed, but the program /bin/suidperl is not setuid.
+ You must use chmod to make it setuid.
- mod_perl 1.x must be built with EVERYTHING=1
- RT's FastCGI handler needs to access RT's configuration file.
o Various and sundry perl modules
A tool included with RT takes care of the installation of
@@ -48,190 +90,133 @@ o Various and sundry perl modules
The tool supplied with RT uses Perl's CPAN system
(http://www.cpan.org) to install modules. Some operating
- systems package all or some of the modules required, and
+ systems package all or some of the modules required and
you may be better off installing the modules that way.
GENERAL INSTALLATION
--------------------
-This is a rough guide to installing RT. For more detail, you'll
-want to read a more comprehensive installation guide at:
+This is a rough guide to installing RT. For more detail, you'll want
+to read 'Chapter 2: Installing' in RT's manual, available at
+http://www.bestpractical.com/rt
- http://wiki.bestpractical.com/index.cgi?InstallationGuides
+1 Unpack this distribution SOMWHERE OTHER THAN where you want to install RT
-1 Unpack this distribution other than where you want to install RT
+ Granted, you've already got it open. To do this cleanly:
- To do this cleanly, run the following command:
-
- tar xzvf rt.tar.gz -C /tmp
+ tar xzvf rt.tar.gz -C /tmp
2 Run the "configure" script.
- ./configure --help to see the list of options
- ./configure (with the flags you want)
-
- RT defaults to installing in /opt/rt3 with MySQL as its database. It
- tries to guess which of www-data, www, apache or nobody your webserver
- will run as, but you can override that behavior.
-
-3 Make sure that RT has everything it needs to run.
-
- Check for missing dependencies by running:
-
- make testdeps
-
-4 If the script reports any missing dependencies, install them by hand
- or run the following command as a user who has permission to install perl
- modules on your system:
-
- make fixdeps
-
-5 Check to make sure everything was installed properly.
-
- make testdeps
-
- It might sometimes be necessary to run "make fixdeps" several times
- to install all necessary perl modules.
-
-6 If this is a new installation:
-
- As a user with permission to install RT in your chosen directory, type:
-
- make install
-
- Set up etc/RT_SiteConfig.pm in your RT installation directory.
- You'll need to add any values you need to change from the defaults
- in etc/RT_Config.pm
-
- As a user with permission to read RT's configuration file, type:
-
- make initialize-database
+ ./configure --help to see the list of options
+ ./configure (with the flags you want)
- If the make fails, type:
-
- make dropdb
+3 Satisfy RT's myriad dependencies.
- and start over from step 6
+3.1 Check for compliance:
+
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment>
-7 If you're upgrading from RT 3.0 or newer:
+ databasename is one of: mysql, postgres
+ web-environment is one of: fastcgi, modperl1, modperl2
- Read through the UPGRADING document included in this distribution.
-
- It includes special upgrade instructions that will help you get this
- new version of RT up and running smoothly.
+3.2 If there are unsatisfied dependencies, install them by hand or run:
- As a user with permission to install RT in your chosen installation
- directory, type:
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment> --install
+
- make upgrade
+3.3 Check to make sure everything was installed properly:
- This will install new binaries, config files and libraries without
- overwriting your RT database.
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment>
- Update etc/RT_SiteConfig.pm in your RT installation directory.
- You'll need to add any new values you need to change from the defaults
- in etc/RT_Config.pm
+4 Create a group called 'rt'
- You may also need to update RT's database. To find out, type:
+5a FOR A NEW INSTALLATION:
+
+ As root, type:
+ make install (replace "make" with the local name for
+ Make, if you need to)
- ls etc/upgrade
+
+ make initialize-database
- For each item in that directory whose name is greater than
- your previously installed RT version, run:
- /opt/rt3/sbin/rt-setup-database --action schema \
- --datadir etc/upgrade/<version>
- /opt/rt3/sbin/rt-setup-database --action acl \
- --datadir etc/upgrade/<version>
- /opt/rt3/sbin/rt-setup-database --action insert \
- --datadir etc/upgrade/<version>
+ If the make fails, type:
+ make dropdb
+ and start over from step 5a
- Clear mason cache dir:
+5b FOR UPGRADING: (Within the RT 3.0.x series)
- rm -fr /opt/rt3/var/mason_data/obj
+ As root, type:
+ make upgrade (replace "make" with the local name for
+ Make, if you need to)
- Stop and start web-server.
+ This will build new binaries, config files and libraries without
+ overwriting your RT database.
+
+ It may then instruct you to update your RT system database objects
+6 Edit etc/RT_SiteConfig.pm in your RT installation directory, by specifying
+ any values you need to change from the defaults in etc/RT_Config.pm
-8 If you're upgrading from RT 2.0:
+7 Configure the email and web gateways, as described below.
- Please upgrade from RT 2.0 to RT 3.2 and then follow the instructions
- for section 7.
-
-9 Configure the email and web gateways, as described below.
+8 Stop and start your webserver, so it picks up your configuration changes.
NOTE: root's password for the web interface is "password"
- (without the quotes). Not changing this is a SECURITY risk!
+ (without the quotes.) Not changing this is a SECURITY risk
-10 Set up users, groups, queues, scrips and access control.
+9 Configure RT per the instructions in RT's manual.
Until you do this, RT will not be able to send or receive email,
nor will it be more than marginally functional. This is not an
optional step.
-SETTING UP THE WEB INTERFACE
-----------------------------
-
-RT's web interface is based around HTML::Mason, which works well with
-the mod_perl perl interpreter within Apache httpd and FastCGI
-
-mod_perl
---------
+THE WEB INTERFACE
+-----------------
-To install RT with mod_perl, you'll need to install the
-apache database connection cache. To make sure it's installed, run
-the following command:
+RT's web interface is based around HTML::Mason, which works best with the mod_perl
+perl interpreter within Apache httpd. Alternatively, support for the FastCGI
+(and plain CGI) interface is also provided as 'bin/mason_handler.fcgi'.
- perl -MCPAN -e'install Apache::DBI'
-
-Next, add a few lines to your Apache configuration file, so that
-it knows where to find RT:
+Apache
+ You'll need to add a few lines to your httpd.conf telling it about RT:
<VirtualHost your.ip.address>
ServerName your.rt.server.hostname
DocumentRoot /opt/rt3/share/html
AddDefaultCharset UTF-8
+ # this line applies to Apache2+mod_perl2 only
+ PerlModule Apache2 Apache::compat
+
PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl
+ # this section applies to Apache 1 only
<Location />
- SetHandler perl-script
- PerlHandler RT::Mason
+ SetHandler perl-script
+ PerlHandler RT::Mason
</Location>
-</VirtualHost>
-
-FastCGI
--------
-
-Installation with FastCGI is a little bit more complex and is documented
-in detail at http://wiki.bestpractical.com/index.cgi?FastCGIConfiguration
-
-In the most basic configuration, you can set up your webserver to run
-as a user who is a member of the "rt" unix group so that the FastCGI script
-can read RT's configuration file. It's important to understand the security
-implications of this configuration, which are discussed in the document
-mentioned above.
-
-To install RT with FastCGI, you'll need to add a few lines to your
-Apache configuration file telling it about RT:
-
-
-# Tell FastCGI to put its temporary files somewhere sane.
-FastCgiIpcDir /tmp
-FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 120
-
-<VirtualHost rt.example.com>
-
- # Pass through requests to display images
- Alias /NoAuth/images/ /opt/rt3/share/html/NoAuth/images/
-
- AddHandler fastcgi-script fcgi
- ScriptAlias / /opt/rt3/bin/mason_handler.fcgi/
-
+ # this section applies to Apache2+mod_perl2 only
+ <FilesMatch "\.html$">
+ SetHandler perl-script
+ PerlHandler RT::Mason
+ </FilesMatch>
+ <LocationMatch "/Attachment/">
+ SetHandler perl-script
+ PerlHandler RT::Mason
+ </LocationMatch>
+ <LocationMatch "/REST/">
+ SetHandler perl-script
+ PerlHandler RT::Mason
+ </LocationMatch>
</VirtualHost>
@@ -239,63 +224,55 @@ FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 120
SETTING UP THE MAIL GATEWAY
---------------------------
-To let email flow to your RT server, you need to add a few lines of
-configuration to your mail server's "aliases" file. These lines "pipe"
-incoming email messages from your mail server to RT.
+An alias for the initial queue will need to be made in either your
+global mail aliases file (if you are using NIS) or locally on your
+machine.
+
+Add the following lines to /etc/aliases (or your local equivalent) :
-Add the following lines to /etc/aliases (or your local equivalent) on your mail server:
+rt: "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://localhost/"
+rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://localhost/"
+ | | |
+ <queue-name>----/ | |
+ | |
+ <correspond or comment depending on whether | |
+ the mail should be resent to the requestor>---/ |
+ |
+ <URL for RT's web interface>---/
-rt: "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com/"
-rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://rt.example.com/"
-
-You'll need to add similar lines for each queue you want to be able
-to send email to. To find out more about how to configure RT's email
-gateway, type:
-
- perldoc /opt/rt3/bin/rt-mailgate
+BUGS
+----
+To report a bug, send email to rt-3.0-bugs@fsck.com.
GETTING HELP
------------
If RT is mission-critical for you or if you use it heavily, we recommend that
you purchase a commercial support contract. Details on support contracts
-are available at http://www.bestpractical.com or by writing to
-<sales@bestpractical.com>.
+are available at http://www.bestpractical.com.
If you're interested in having RT extended or customized or would like more
information about commercial support options, please send email to
<sales@bestpractical.com> to discuss rates and availability.
-
-RT WEBSITE
-----------
-
-For current information about RT, check out the RT website at
- http://www.bestpractical.com/
-
-You'll find screenshots, a pointer to the current version of RT, contributed
-patches, and lots of other great stuff.
-
-
-
-RT-USERS MAILING LIST
+RT-USERS MAILINGLIST
--------------------
To keep up to date on the latest RT tips, techniques and extensions,
you probably want to join the rt-users mailing list. Send a message to:
- rt-users-request@lists.bestpractical.com
+ rt-users-request@lists.fsck.com
-with the body of the message consisting of only the word:
+With the body of the message consisting of only the word:
- subscribe
+ subscribe
If you're interested in hacking on RT, you'll want to subscribe to
-<rt-devel@lists.bestpractical.com>. Subscribe to it with instructions
-similar to those above.
+rt-devel@lists.fsck.com. Subscribe to it with instructions similar to
+those above.
Address questions about the stable release to the rt-users list, and
questions about the development version to the rt-devel list. If you feel
@@ -303,63 +280,21 @@ your questions are best not asked publicly, send them personally to
<jesse@bestpractical.com>.
+RT WEBSITE
+----------
-BUGS
-----
+For current information about RT, check out the RT website at
+ http://www.bestpractical.com/
-RT's a pretty complex application, and as you get up to speed, you might
-run into some trouble. Generally, it's best to ask about things you
-run into on the rt-users mailinglist (or pick up a commercial support
-contract from Best Practical). But, sometimes people do run into bugs. In
-the exceedingly unlikely event that you hit a bug in RT, please report
-it! We'd love to hear about problems you have with RT, so we can fix them.
-To report a bug, send email to rt-bugs@fsck.com.
+You'll find screenshots, a pointer to the current version of RT, contributed
+patches, and lots of other great stuff.
-# 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 }}}
+TROUBLESHOOTING
+---------------
+
+If the solution to the problem you're running into isn't obvious and you've
+checked the FAQ, feel free to send mail to rt-users@fsck.com (for released
+versions of RT) or rt-devel@fsck.com (for development versions).
+
+Thanks!
diff --git a/rt/bin/mason_handler.fcgi b/rt/bin/mason_handler.fcgi
index 9bef9a89f..38f590124 100755
--- a/rt/bin/mason_handler.fcgi
+++ b/rt/bin/mason_handler.fcgi
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/bin/mason_handler.scgi b/rt/bin/mason_handler.scgi
index 6a3404ea5..faff8a5db 100755
--- a/rt/bin/mason_handler.scgi
+++ b/rt/bin/mason_handler.scgi
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/bin/mason_handler.svc b/rt/bin/mason_handler.svc
index 86adfae28..fc97da9b9 100644
--- a/rt/bin/mason_handler.svc
+++ b/rt/bin/mason_handler.svc
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/bin/rt b/rt/bin/rt
deleted file mode 100755
index 3440d9e57..000000000
--- a/rt/bin/rt
+++ /dev/null
@@ -1,2060 +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 }}}
-# Designed and implemented for Best Practical Solutions, LLC by
-# Abhijit Menon-Sen <ams@wiw.org>
-
-use strict;
-
-# This program is intentionally written to have as few non-core module
-# dependencies as possible. It should stay that way.
-
-use Cwd;
-use LWP;
-use Text::ParseWords;
-use HTTP::Request::Common;
-use Term::ReadLine;
-
-# We derive configuration information from hardwired defaults, dotfiles,
-# and the RT* environment variables (in increasing order of precedence).
-# Session information is stored in ~/.rt_sessions.
-
-my $VERSION = 0.02;
-my $HOME = eval{(getpwuid($<))[7]}
- || $ENV{HOME} || $ENV{LOGDIR} || $ENV{HOMEPATH}
- || ".";
-my %config = (
- (
- debug => 0,
- user => eval{(getpwuid($<))[0]} || $ENV{USER} || $ENV{USERNAME},
- passwd => undef,
- server => 'http://localhost/',
- query => undef,
- orderby => undef,
- ),
- config_from_file($ENV{RTCONFIG} || ".rtrc"),
- config_from_env()
-);
-my $session = new Session("$HOME/.rt_sessions");
-my $REST = "$config{server}/REST/1.0";
-
-my $prompt = 'rt> ';
-
-sub whine;
-sub DEBUG { warn @_ if $config{debug} >= shift }
-
-# These regexes are used by command handlers to parse arguments.
-# (XXX: Ask Autrijus how i18n changes these definitions.)
-
-my $name = '[\w.-]+';
-my $field = '(?:[a-zA-Z](?:[a-zA-Z0-9_-]|\s+)*)';
-my $label = '[a-zA-Z0-9@_.+-]+';
-my $labels = "(?:$label,)*$label";
-my $idlist = '(?:(?:\d+-)?\d+,)*(?:\d+-)?\d+';
-
-# Our command line looks like this:
-#
-# rt <action> [options] [arguments]
-#
-# We'll parse just enough of it to decide upon an action to perform, and
-# leave the rest to per-action handlers to interpret appropriately.
-
-my %handlers = (
-# handler => [ ...aliases... ],
- version => ["version", "ver"],
- shell => ["shell"],
- logout => ["logout"],
- help => ["help", "man"],
- show => ["show", "cat"],
- edit => ["create", "edit", "new", "ed"],
- list => ["search", "list", "ls"],
- comment => ["comment", "correspond"],
- link => ["link", "ln"],
- merge => ["merge"],
- grant => ["grant", "revoke"],
- take => ["take", "steal", "untake"],
- quit => ["quit", "exit"],
-);
-
-my %actions;
-foreach my $fn (keys %handlers) {
- foreach my $alias (@{ $handlers{$fn} }) {
- $actions{$alias} = \&{"$fn"};
- }
-}
-
-# Once we find and call an appropriate handler, we're done.
-
-sub handler {
- my $action;
-
- push @ARGV, 'shell' if (!@ARGV); # default to shell mode
- shift @ARGV if ($ARGV[0] eq 'rt'); # ignore a leading 'rt'
- if (@ARGV && exists $actions{$ARGV[0]}) {
- $action = shift @ARGV;
- $actions{$action}->($action);
- }
- else {
- print STDERR "rt: Unknown command '@ARGV'.\n";
- print STDERR "rt: For help, run 'rt help'.\n";
- }
-}
-
-handler();
-exit;
-
-# Handler functions.
-# ------------------
-#
-# The following subs are handlers for each entry in %actions.
-
-sub shell {
- $|=1;
- my $term = new Term::ReadLine 'RT CLI';
- while ( defined ($_ = $term->readline($prompt)) ) {
- next if /^#/ || /^\s*$/;
-
- @ARGV = shellwords($_);
- handler();
- }
-}
-
-sub version {
- print "rt $VERSION\n";
-}
-
-sub logout {
- submit("$REST/logout") if defined $session->cookie;
-}
-
-sub quit {
- logout();
- exit;
-}
-
-my %help;
-sub help {
- my ($action, $type) = @_;
- my $key;
-
- # What help topics do we know about?
- if (!%help) {
- local $/ = undef;
- foreach my $item (@{ Form::parse(<DATA>) }) {
- my $title = $item->[2]{Title};
- my @titles = ref $title eq 'ARRAY' ? @$title : $title;
-
- foreach $title (grep $_, @titles) {
- $help{$title} = $item->[2]{Text};
- }
- }
- }
-
- # What does the user want help with?
- undef $action if ($action && $actions{$action} eq \&help);
- unless ($action || $type) {
- # If we don't know, we'll look for clues in @ARGV.
- foreach (@ARGV) {
- if (exists $help{$_}) { $key = $_; last; }
- }
- unless ($key) {
- # Tolerate possibly plural words.
- foreach (@ARGV) {
- if ($_ =~ s/s$// && exists $help{$_}) { $key = $_; last; }
- }
- }
- }
-
- if ($type && $action) {
- $key = "$type.$action";
- }
- $key ||= $type || $action || "introduction";
-
- # Find a suitable topic to display.
- while (!exists $help{$key}) {
- if ($type && $action) {
- if ($key eq "$type.$action") { $key = $action; }
- elsif ($key eq $action) { $key = $type; }
- else { $key = "introduction"; }
- }
- else {
- $key = "introduction";
- }
- }
-
- print STDERR $help{$key}, "\n\n";
-}
-
-# Displays a list of objects that match some specified condition.
-
-sub list {
- my ($q, $type, %data);
- my $orderby = $config{orderby};
-
- if ($config{orderby}) {
- $data{orderby} = $config{orderby};
- }
- my $bad = 0;
-
- while (@ARGV) {
- $_ = shift @ARGV;
-
- if (/^-t$/) {
- $bad = 1, last unless defined($type = get_type_argument());
- }
- elsif (/^-S$/) {
- $bad = 1, last unless get_var_argument(\%data);
- }
- elsif (/^-o$/) {
- $data{'orderby'} = shift @ARGV;
- }
- elsif (/^-([isl])$/) {
- $data{format} = $1;
- }
- elsif (/^-f$/) {
- if ($ARGV[0] !~ /^(?:(?:$field,)*$field)$/) {
- whine "No valid field list in '-f $ARGV[0]'.";
- $bad = 1; last;
- }
- $data{fields} = shift @ARGV;
- }
- elsif (!defined $q && !/^-/) {
- $q = $_;
- }
- else {
- my $datum = /^-/ ? "option" : "argument";
- whine "Unrecognised $datum '$_'.";
- $bad = 1; last;
- }
- }
- if (!defined $q) {
- $q = $config{query};
- }
-
- $type ||= "ticket";
- unless ($type && defined $q) {
- my $item = $type ? "query string" : "object type";
- whine "No $item specified.";
- $bad = 1;
- }
- #return help("list", $type) if $bad;
- return suggest_help("list", $type) if $bad;
-
- my $r = submit("$REST/search/$type", { query => $q, %data });
- print $r->content;
-}
-
-# Displays selected information about a single object.
-
-sub show {
- my ($type, @objects, %data);
- my $slurped = 0;
- my $bad = 0;
-
- while (@ARGV) {
- $_ = shift @ARGV;
-
- if (/^-t$/) {
- $bad = 1, last unless defined($type = get_type_argument());
- }
- elsif (/^-S$/) {
- $bad = 1, last unless get_var_argument(\%data);
- }
- elsif (/^-([isl])$/) {
- $data{format} = $1;
- }
- elsif (/^-$/ && !$slurped) {
- chomp(my @lines = <STDIN>);
- foreach (@lines) {
- unless (is_object_spec($_, $type)) {
- whine "Invalid object on STDIN: '$_'.";
- $bad = 1; last;
- }
- push @objects, $_;
- }
- $slurped = 1;
- }
- elsif (/^-f$/) {
- if ($ARGV[0] !~ /^(?:(?:$field,)*$field)$/) {
- whine "No valid field list in '-f $ARGV[0]'.";
- $bad = 1; last;
- }
- $data{fields} = shift @ARGV;
- }
- elsif (my $spec = is_object_spec($_, $type)) {
- push @objects, $spec;
- }
- else {
- my $datum = /^-/ ? "option" : "argument";
- whine "Unrecognised $datum '$_'.";
- $bad = 1; last;
- }
- }
-
- unless (@objects) {
- whine "No objects specified.";
- $bad = 1;
- }
- #return help("show", $type) if $bad;
- return suggest_help("show", $type) if $bad;
-
- my $r = submit("$REST/show", { id => \@objects, %data });
- my $c = $r->content;
- # if this isn't a text reply, remove the trailing newline so we
- # don't corrupt things like tarballs when people do
- # show ticket/id/attachments/id/content > foo.tar.gz
- if ($r->content_type !~ /^text\//) {
- chomp($c);
- }
- print $c;
-}
-
-# To create a new object, we ask the server for a form with the defaults
-# filled in, allow the user to edit it, and send the form back.
-#
-# To edit an object, we must ask the server for a form representing that
-# object, make changes requested by the user (either on the command line
-# or interactively via $EDITOR), and send the form back.
-
-sub edit {
- my ($action) = @_;
- my (%data, $type, @objects);
- my ($cl, $text, $edit, $input, $output);
-
- use vars qw(%set %add %del);
- %set = %add = %del = ();
- my $slurped = 0;
- my $bad = 0;
-
- while (@ARGV) {
- $_ = shift @ARGV;
-
- if (/^-e$/) { $edit = 1 }
- elsif (/^-i$/) { $input = 1 }
- elsif (/^-o$/) { $output = 1 }
- elsif (/^-t$/) {
- $bad = 1, last unless defined($type = get_type_argument());
- }
- elsif (/^-S$/) {
- $bad = 1, last unless get_var_argument(\%data);
- }
- elsif (/^-$/ && !($slurped || $input)) {
- chomp(my @lines = <STDIN>);
- foreach (@lines) {
- unless (is_object_spec($_, $type)) {
- whine "Invalid object on STDIN: '$_'.";
- $bad = 1; last;
- }
- push @objects, $_;
- }
- $slurped = 1;
- }
- elsif (/^set$/i) {
- my $vars = 0;
-
- while (@ARGV && $ARGV[0] =~ /^($field)([+-]?=)(.*)$/) {
- my ($key, $op, $val) = ($1, $2, $3);
- my $hash = ($op eq '=') ? \%set : ($op =~ /^\+/) ? \%add : \%del;
-
- vpush($hash, lc $key, $val);
- shift @ARGV;
- $vars++;
- }
- unless ($vars) {
- whine "No variables to set.";
- $bad = 1; last;
- }
- $cl = $vars;
- }
- elsif (/^(?:add|del)$/i) {
- my $vars = 0;
- my $hash = ($_ eq "add") ? \%add : \%del;
-
- while (@ARGV && $ARGV[0] =~ /^($field)=(.*)$/) {
- my ($key, $val) = ($1, $2);
-
- vpush($hash, lc $key, $val);
- shift @ARGV;
- $vars++;
- }
- unless ($vars) {
- whine "No variables to set.";
- $bad = 1; last;
- }
- $cl = $vars;
- }
- elsif (my $spec = is_object_spec($_, $type)) {
- push @objects, $spec;
- }
- else {
- my $datum = /^-/ ? "option" : "argument";
- whine "Unrecognised $datum '$_'.";
- $bad = 1; last;
- }
- }
-
- if ($action =~ /^ed(?:it)?$/) {
- unless (@objects) {
- whine "No objects specified.";
- $bad = 1;
- }
- }
- else {
- if (@objects) {
- whine "You shouldn't specify objects as arguments to $action.";
- $bad = 1;
- }
- unless ($type) {
- whine "What type of object do you want to create?";
- $bad = 1;
- }
- @objects = ("$type/new");
- }
- #return help($action, $type) if $bad;
- return suggest_help($action, $type) if $bad;
-
- # We need a form to make changes to. We usually ask the server for
- # one, but we can avoid that if we are fed one on STDIN, or if the
- # user doesn't want to edit the form by hand, and the command line
- # specifies only simple variable assignments. We *should* get a
- # form if we're creating a new ticket, so that the default values
- # get filled in properly.
-
- my @new_objects = grep /\/new$/, @objects;
-
- if ($input) {
- local $/ = undef;
- $text = <STDIN>;
- }
- elsif ($edit || %add || %del || !$cl || @new_objects) {
- my $r = submit("$REST/show", { id => \@objects, format => 'l' });
- $text = $r->content;
- }
-
- # If any changes were specified on the command line, apply them.
- if ($cl) {
- if ($text) {
- # We're updating forms from the server.
- my $forms = Form::parse($text);
-
- foreach my $form (@$forms) {
- my ($c, $o, $k, $e) = @$form;
- my ($key, $val);
-
- next if ($e || !@$o);
-
- local %add = %add;
- local %del = %del;
- local %set = %set;
-
- # Make changes to existing fields.
- foreach $key (@$o) {
- if (exists $add{lc $key}) {
- $val = delete $add{lc $key};
- vpush($k, $key, $val);
- $k->{$key} = vsplit($k->{$key}) if $val =~ /[,\n]/;
- }
- if (exists $del{lc $key}) {
- $val = delete $del{lc $key};
- my %val = map {$_=>1} @{ vsplit($val) };
- $k->{$key} = vsplit($k->{$key});
- @{$k->{$key}} = grep {!exists $val{$_}} @{$k->{$key}};
- }
- if (exists $set{lc $key}) {
- $k->{$key} = delete $set{lc $key};
- }
- }
-
- # Then update the others.
- foreach $key (keys %set) { vpush($k, $key, $set{$key}) }
- foreach $key (keys %add) {
- vpush($k, $key, $add{$key});
- $k->{$key} = vsplit($k->{$key});
- }
- push @$o, (keys %add, keys %set);
- }
-
- $text = Form::compose($forms);
- }
- else {
- # We're rolling our own set of forms.
- my @forms;
- foreach (@objects) {
- my ($type, $ids, $args) =
- m{^($name)/($idlist|$labels)(?:(/.*))?$}o;
-
- $args ||= "";
- foreach my $obj (expand_list($ids)) {
- my %set = (%set, id => "$type/$obj$args");
- push @forms, ["", [keys %set], \%set];
- }
- }
- $text = Form::compose(\@forms);
- }
- }
-
- if ($output) {
- print $text;
- return;
- }
-
- my $synerr = 0;
-
-EDIT:
- # We'll let the user edit the form before sending it to the server,
- # unless we have enough information to submit it non-interactively.
- if ($edit || (!$input && !$cl)) {
- my $newtext = vi($text);
- # We won't resubmit a bad form unless it was changed.
- $text = ($synerr && $newtext eq $text) ? undef : $newtext;
- }
-
- if ($text) {
- my $r = submit("$REST/edit", {content => $text, %data});
- if ($r->code == 409) {
- # If we submitted a bad form, we'll give the user a chance
- # to correct it and resubmit.
- if ($edit || (!$input && !$cl)) {
- $text = $r->content;
- $synerr = 1;
- goto EDIT;
- }
- else {
- print $r->content;
- return;
- }
- }
- print $r->content;
- }
-}
-
-# We roll "comment" and "correspond" into the same handler.
-
-sub comment {
- my ($action) = @_;
- my (%data, $id, @files, @bcc, @cc, $msg, $wtime, $edit);
- my $bad = 0;
-
- while (@ARGV) {
- $_ = shift @ARGV;
-
- if (/^-e$/) {
- $edit = 1;
- }
- elsif (/^-[abcmw]$/) {
- unless (@ARGV) {
- whine "No argument specified with $_.";
- $bad = 1; last;
- }
-
- if (/-a/) {
- unless (-f $ARGV[0] && -r $ARGV[0]) {
- whine "Cannot read attachment: '$ARGV[0]'.";
- return;
- }
- push @files, shift @ARGV;
- }
- elsif (/-([bc])/) {
- my $a = $_ eq "-b" ? \@bcc : \@cc;
- @$a = split /\s*,\s*/, shift @ARGV;
- }
- elsif (/-m/) {
- $msg = shift @ARGV;
- if ( $msg =~ /^-$/ ) {
- undef $msg;
- while (<STDIN>) { $msg .= $_ }
- }
- }
-
- elsif (/-w/) { $wtime = shift @ARGV }
- }
- elsif (!$id && m|^(?:ticket/)?($idlist)$|) {
- $id = $1;
- }
- else {
- my $datum = /^-/ ? "option" : "argument";
- whine "Unrecognised $datum '$_'.";
- $bad = 1; last;
- }
- }
-
- unless ($id) {
- whine "No object specified.";
- $bad = 1;
- }
- #return help($action, "ticket") if $bad;
- return suggest_help($action, "ticket") if $bad;
-
- my $form = [
- "",
- [ "Ticket", "Action", "Cc", "Bcc", "Attachment", "TimeWorked", "Text" ],
- {
- Ticket => $id,
- Action => $action,
- Cc => [ @cc ],
- Bcc => [ @bcc ],
- Attachment => [ @files ],
- TimeWorked => $wtime || '',
- Text => $msg || '',
- Status => ''
- }
- ];
-
- my $text = Form::compose([ $form ]);
-
- if ($edit || !$msg) {
- my $error = 0;
- my ($c, $o, $k, $e);
-
- do {
- my $ntext = vi($text);
- return if ($error && $ntext eq $text);
- $text = $ntext;
- $form = Form::parse($text);
- $error = 0;
-
- ($c, $o, $k, $e) = @{ $form->[0] };
- if ($e) {
- $error = 1;
- $c = "# Syntax error.";
- goto NEXT;
- }
- elsif (!@$o) {
- return;
- }
- @files = @{ vsplit($k->{Attachment}) };
-
- NEXT:
- $text = Form::compose([[$c, $o, $k, $e]]);
- } while ($error);
- }
-
- my $i = 1;
- foreach my $file (@files) {
- $data{"attachment_$i"} = bless([ $file ], "Attachment");
- $i++;
- }
- $data{content} = $text;
-
- my $r = submit("$REST/ticket/$id/comment", \%data);
- print $r->content;
-}
-
-# Merge one ticket into another.
-
-sub merge {
- my @id;
- my $bad = 0;
-
- while (@ARGV) {
- $_ = shift @ARGV;
-
- if (/^\d+$/) {
- push @id, $_;
- }
- else {
- whine "Unrecognised argument: '$_'.";
- $bad = 1; last;
- }
- }
-
- unless (@id == 2) {
- my $evil = @id > 2 ? "many" : "few";
- whine "Too $evil arguments specified.";
- $bad = 1;
- }
- #return help("merge", "ticket") if $bad;
- return suggest_help("merge", "ticket") if $bad;
-
- my $r = submit("$REST/ticket/$id[0]/merge/$id[1]");
- print $r->content;
-}
-
-# Link one ticket to another.
-
-sub link {
- my ($bad, $del, %data) = (0, 0, ());
- my %ltypes = map { lc $_ => $_ } qw(DependsOn DependedOnBy RefersTo
- ReferredToBy HasMember MemberOf);
-
- while (@ARGV && $ARGV[0] =~ /^-/) {
- $_ = shift @ARGV;
-
- if (/^-d$/) {
- $del = 1;
- }
- else {
- whine "Unrecognised option: '$_'.";
- $bad = 1; last;
- }
- }
-
- if (@ARGV == 3) {
- my ($from, $rel, $to) = @ARGV;
- if ($from !~ /^\d+$/ || $to !~ /^\d+$/) {
- my $bad = $from =~ /^\d+$/ ? $to : $from;
- whine "Invalid ticket ID '$bad' specified.";
- $bad = 1;
- }
- unless (exists $ltypes{lc $rel}) {
- whine "Invalid link '$rel' specified.";
- $bad = 1;
- }
- %data = (id => $from, rel => $rel, to => $to, del => $del);
- }
- else {
- my $bad = @ARGV < 3 ? "few" : "many";
- whine "Too $bad arguments specified.";
- $bad = 1;
- }
- #return help("link", "ticket") if $bad;
- return suggest_help("link", "ticket") if $bad;
-
- my $r = submit("$REST/ticket/link", \%data);
- print $r->content;
-}
-
-# Take/steal a ticket
-sub take {
- my ($cmd) = @_;
- my ($bad, %data) = (0, ());
-
- my $id;
-
- # get the ticket id
- if (@ARGV == 1) {
- ($id) = @ARGV;
- unless ($id =~ /^\d+$/) {
- whine "Invalid ticket ID $id specified.";
- $bad = 1;
- }
- my $form = [
- "",
- [ "Ticket", "Action" ],
- {
- Ticket => $id,
- Action => $cmd,
- Status => '',
- }
- ];
-
- my $text = Form::compose([ $form ]);
- $data{content} = $text;
- }
- else {
- $bad = @ARGV < 1 ? "few" : "many";
- whine "Too $bad arguments specified.";
- $bad = 1;
- }
- return suggest_help("take", "ticket") if $bad;
-
- my $r = submit("$REST/ticket/$id/take", \%data);
- print $r->content;
-}
-
-# Grant/revoke a user's rights.
-
-sub grant {
- my ($cmd) = @_;
-
- my $revoke = 0;
- while (@ARGV) {
- }
-
- $revoke = 1 if $cmd->{action} eq 'revoke';
-}
-
-# Client <-> Server communication.
-# --------------------------------
-#
-# This function composes and sends an HTTP request to the RT server, and
-# interprets the response. It takes a request URI, and optional request
-# data (a string, or a reference to a set of key-value pairs).
-
-sub submit {
- my ($uri, $content) = @_;
- my ($req, $data);
- my $ua = new LWP::UserAgent(agent => "RT/3.0b", env_proxy => 1);
-
- # Did the caller specify any data to send with the request?
- $data = [];
- if (defined $content) {
- unless (ref $content) {
- # If it's just a string, make sure LWP handles it properly.
- # (By pretending that it's a file!)
- $content = [ content => [undef, "", Content => $content] ];
- }
- elsif (ref $content eq 'HASH') {
- my @data;
- foreach my $k (keys %$content) {
- if (ref $content->{$k} eq 'ARRAY') {
- foreach my $v (@{ $content->{$k} }) {
- push @data, $k, $v;
- }
- }
- else { push @data, $k, $content->{$k} }
- }
- $content = \@data;
- }
- $data = $content;
- }
-
- # Should we send authentication information to start a new session?
- if (!defined $session->cookie) {
- push @$data, ( user => $config{user} );
- push @$data, ( pass => $config{passwd} || read_passwd() );
- }
-
- # Now, we construct the request.
- if (@$data) {
- $req = POST($uri, $data, Content_Type => 'form-data');
- }
- else {
- $req = GET($uri);
- }
- $session->add_cookie_header($req);
-
- # Then we send the request and parse the response.
- DEBUG(3, $req->as_string);
- my $res = $ua->request($req);
- DEBUG(3, $res->as_string);
-
- if ($res->is_success) {
- # The content of the response we get from the RT server consists
- # of an HTTP-like status line followed by optional header lines,
- # a blank line, and arbitrary text.
-
- my ($head, $text) = split /\n\n/, $res->content, 2;
- my ($status, @headers) = split /\n/, $head;
- $text =~ s/\n*$/\n/ if ($text);
-
- # "RT/3.0.1 401 Credentials required"
- if ($status !~ m#^RT/\d+(?:\S+) (\d+) ([\w\s]+)$#) {
- warn "rt: Malformed RT response from $config{server}.\n";
- warn "(Rerun with RTDEBUG=3 for details.)\n" if $config{debug} < 3;
- exit -1;
- }
-
- # Our caller can pretend that the server returned a custom HTTP
- # response code and message. (Doing that directly is apparently
- # not sufficiently portable and uncomplicated.)
- $res->code($1);
- $res->message($2);
- $res->content($text);
- $session->update($res) if ($res->is_success || $res->code != 401);
-
- if (!$res->is_success) {
- # We can deal with authentication failures ourselves. Either
- # we sent invalid credentials, or our session has expired.
- if ($res->code == 401) {
- my %d = @$data;
- if (exists $d{user}) {
- warn "rt: Incorrect username or password.\n";
- exit -1;
- }
- elsif ($req->header("Cookie")) {
- # We'll retry the request with credentials, unless
- # we only wanted to logout in the first place.
- $session->delete;
- return submit(@_) unless $uri eq "$REST/logout";
- }
- }
- # Conflicts should be dealt with by the handler and user.
- # For anything else, we just die.
- elsif ($res->code != 409) {
- warn "rt: ", $res->content;
- #exit;
- }
- }
- }
- else {
- warn "rt: Server error: ", $res->message, " (", $res->code, ")\n";
- exit -1;
- }
-
- return $res;
-}
-
-# Session management.
-# -------------------
-#
-# Maintains a list of active sessions in the ~/.rt_sessions file.
-{
- package Session;
- my ($s, $u);
-
- # Initialises the session cache.
- sub new {
- my ($class, $file) = @_;
- my $self = {
- file => $file || "$HOME/.rt_sessions",
- sids => { }
- };
-
- # The current session is identified by the currently configured
- # server and user.
- ($s, $u) = @config{"server", "user"};
-
- bless $self, $class;
- $self->load();
-
- return $self;
- }
-
- # Returns the current session cookie.
- sub cookie {
- my ($self) = @_;
- my $cookie = $self->{sids}{$s}{$u};
- return defined $cookie ? "RT_SID_$cookie" : undef;
- }
-
- # Deletes the current session cookie.
- sub delete {
- my ($self) = @_;
- delete $self->{sids}{$s}{$u};
- }
-
- # Adds a Cookie header to an outgoing HTTP request.
- sub add_cookie_header {
- my ($self, $request) = @_;
- my $cookie = $self->cookie();
-
- $request->header(Cookie => $cookie) if defined $cookie;
- }
-
- # Extracts the Set-Cookie header from an HTTP response, and updates
- # session information accordingly.
- sub update {
- my ($self, $response) = @_;
- my $cookie = $response->header("Set-Cookie");
-
- if (defined $cookie && $cookie =~ /^RT_SID_(.[^;,\s]+=[0-9A-Fa-f]+);/) {
- $self->{sids}{$s}{$u} = $1;
- }
- }
-
- # Loads the session cache from the specified file.
- sub load {
- my ($self, $file) = @_;
- $file ||= $self->{file};
- local *F;
-
- open(F, $file) && do {
- $self->{file} = $file;
- my $sids = $self->{sids} = {};
- while (<F>) {
- chomp;
- next if /^$/ || /^#/;
- next unless m#^https?://[^ ]+ \w+ [^;,\s]+=[0-9A-Fa-f]+$#;
- my ($server, $user, $cookie) = split / /, $_;
- $sids->{$server}{$user} = $cookie;
- }
- return 1;
- };
- return 0;
- }
-
- # Writes the current session cache to the specified file.
- sub save {
- my ($self, $file) = shift;
- $file ||= $self->{file};
- local *F;
-
- open(F, ">$file") && do {
- my $sids = $self->{sids};
- foreach my $server (keys %$sids) {
- foreach my $user (keys %{ $sids->{$server} }) {
- my $sid = $sids->{$server}{$user};
- if (defined $sid) {
- print F "$server $user $sid\n";
- }
- }
- }
- close(F);
- chmod 0600, $file;
- return 1;
- };
- return 0;
- }
-
- sub DESTROY {
- my $self = shift;
- $self->save;
- }
-}
-
-# Form handling.
-# --------------
-#
-# Forms are RFC822-style sets of (field, value) specifications with some
-# initial comments and interspersed blank lines allowed for convenience.
-# Sets of forms are separated by --\n (in a cheap parody of MIME).
-#
-# Each form is parsed into an array with four elements: commented text
-# at the start of the form, an array with the order of keys, a hash with
-# key/value pairs, and optional error text if the form syntax was wrong.
-
-# Returns a reference to an array of parsed forms.
-sub Form::parse {
- my $state = 0;
- my @forms = ();
- my @lines = split /\n/, $_[0];
- my ($c, $o, $k, $e) = ("", [], {}, "");
-
- LINE:
- while (@lines) {
- my $line = shift @lines;
-
- next LINE if $line eq '';
-
- if ($line eq '--') {
- # We reached the end of one form. We'll ignore it if it was
- # empty, and store it otherwise, errors and all.
- if ($e || $c || @$o) {
- push @forms, [ $c, $o, $k, $e ];
- $c = ""; $o = []; $k = {}; $e = "";
- }
- $state = 0;
- }
- elsif ($state != -1) {
- if ($state == 0 && $line =~ /^#/) {
- # Read an optional block of comments (only) at the start
- # of the form.
- $state = 1;
- $c = $line;
- while (@lines && $lines[0] =~ /^#/) {
- $c .= "\n".shift @lines;
- }
- $c .= "\n";
- }
- elsif ($state <= 1 && $line =~ /^($field):(?:\s+(.*))?$/) {
- # Read a field: value specification.
- my $f = $1;
- my @v = ($2 || ());
-
- # Read continuation lines, if any.
- while (@lines && ($lines[0] eq '' || $lines[0] =~ /^\s+/)) {
- push @v, shift @lines;
- }
- pop @v while (@v && $v[-1] eq '');
-
- # Strip longest common leading indent from text.
- my $ws = "";
- foreach my $ls (map {/^(\s+)/} @v[1..$#v]) {
- $ws = $ls if (!$ws || length($ls) < length($ws));
- }
- s/^$ws// foreach @v;
-
- push(@$o, $f) unless exists $k->{$f};
- vpush($k, $f, join("\n", @v));
-
- $state = 1;
- }
- elsif ($line !~ /^#/) {
- # We've found a syntax error, so we'll reconstruct the
- # form parsed thus far, and add an error marker. (>>)
- $state = -1;
- $e = Form::compose([[ "", $o, $k, "" ]]);
- $e.= $line =~ /^>>/ ? "$line\n" : ">> $line\n";
- }
- }
- else {
- # We saw a syntax error earlier, so we'll accumulate the
- # contents of this form until the end.
- $e .= "$line\n";
- }
- }
- push(@forms, [ $c, $o, $k, $e ]) if ($e || $c || @$o);
-
- foreach my $l (keys %$k) {
- $k->{$l} = vsplit($k->{$l}) if (ref $k->{$l} eq 'ARRAY');
- }
-
- return \@forms;
-}
-
-# Returns text representing a set of forms.
-sub Form::compose {
- my ($forms) = @_;
- my @text;
-
- foreach my $form (@$forms) {
- my ($c, $o, $k, $e) = @$form;
- my $text = "";
-
- if ($c) {
- $c =~ s/\n*$/\n/;
- $text = "$c\n";
- }
- if ($e) {
- $text .= $e;
- }
- elsif ($o) {
- my @lines;
-
- foreach my $key (@$o) {
- my ($line, $sp);
- my $v = $k->{$key};
- my @values = ref $v eq 'ARRAY' ? @$v : $v;
-
- $sp = " "x(length("$key: "));
- $sp = " "x4 if length($sp) > 16;
-
- foreach $v (@values) {
- if ($v =~ /\n/) {
- $v =~ s/^/$sp/gm;
- $v =~ s/^$sp//;
-
- if ($line) {
- push @lines, "$line\n\n";
- $line = "";
- }
- elsif (@lines && $lines[-1] !~ /\n\n$/) {
- $lines[-1] .= "\n";
- }
- push @lines, "$key: $v\n\n";
- }
- elsif ($line &&
- length($line)+length($v)-rindex($line, "\n") >= 70)
- {
- $line .= ",\n$sp$v";
- }
- else {
- $line = $line ? "$line, $v" : "$key: $v";
- }
- }
-
- $line = "$key:" unless @values;
- if ($line) {
- if ($line =~ /\n/) {
- if (@lines && $lines[-1] !~ /\n\n$/) {
- $lines[-1] .= "\n";
- }
- $line .= "\n";
- }
- push @lines, "$line\n";
- }
- }
-
- $text .= join "", @lines;
- }
- else {
- chomp $text;
- }
- push @text, $text;
- }
-
- return join "\n--\n\n", @text;
-}
-
-# Configuration.
-# --------------
-
-# Returns configuration information from the environment.
-sub config_from_env {
- my %env;
-
- foreach my $k ("DEBUG", "USER", "PASSWD", "SERVER", "QUERY", "ORDERBY") {
- if (exists $ENV{"RT$k"}) {
- $env{lc $k} = $ENV{"RT$k"};
- }
- }
-
- return %env;
-}
-
-# Finds a suitable configuration file and returns information from it.
-sub config_from_file {
- my ($rc) = @_;
-
- if ($rc =~ m#^/#) {
- # We'll use an absolute path if we were given one.
- return parse_config_file($rc);
- }
- else {
- # Otherwise we'll use the first file we can find in the current
- # directory, or in one of its (increasingly distant) ancestors.
-
- my @dirs = split /\//, cwd;
- while (@dirs) {
- my $file = join('/', @dirs, $rc);
- if (-r $file) {
- return parse_config_file($file);
- }
-
- # Remove the last directory component each time.
- pop @dirs;
- }
-
- # Still nothing? We'll fall back to some likely defaults.
- for ("$HOME/$rc", "/etc/rt.conf") {
- return parse_config_file($_) if (-r $_);
- }
- }
-
- return ();
-}
-
-# Makes a hash of the specified configuration file.
-sub parse_config_file {
- my %cfg;
- my ($file) = @_;
- local $_; # $_ may be aliased to a constant, from line 1163
-
- open(CFG, $file) && do {
- while (<CFG>) {
- chomp;
- next if (/^#/ || /^\s*$/);
-
- if (/^(user|passwd|server|query|orderby)\s+(.*)\s?$/) {
- $cfg{$1} = $2;
- }
- else {
- die "rt: $file:$.: unknown configuration directive.\n";
- }
- }
- };
-
- return %cfg;
-}
-
-# Helper functions.
-# -----------------
-
-sub whine {
- my $sub = (caller(1))[3];
- $sub =~ s/^main:://;
- warn "rt: $sub: @_\n";
- return;
-}
-
-sub read_passwd {
- eval 'require Term::ReadKey';
- if ($@) {
- die "No password specified (and Term::ReadKey not installed).\n";
- }
-
- print "Password: ";
- Term::ReadKey::ReadMode('noecho');
- chomp(my $passwd = Term::ReadKey::ReadLine(0));
- Term::ReadKey::ReadMode('restore');
- print "\n";
-
- return $passwd;
-}
-
-sub vi {
- my ($text) = @_;
- my $file = "/tmp/rt.form.$$";
- my $editor = $ENV{EDITOR} || $ENV{VISUAL} || "vi";
-
- local *F;
- local $/ = undef;
-
- open(F, ">$file") || die "$file: $!\n"; print F $text; close(F);
- system($editor, $file) && die "Couldn't run $editor.\n";
- open(F, $file) || die "$file: $!\n"; $text = <F>; close(F);
- unlink($file);
-
- return $text;
-}
-
-# Add a value to a (possibly multi-valued) hash key.
-sub vpush {
- my ($hash, $key, $val) = @_;
- my @val = ref $val eq 'ARRAY' ? @$val : $val;
-
- if (exists $hash->{$key}) {
- unless (ref $hash->{$key} eq 'ARRAY') {
- my @v = $hash->{$key} ne '' ? $hash->{$key} : ();
- $hash->{$key} = \@v;
- }
- push @{ $hash->{$key} }, @val;
- }
- else {
- $hash->{$key} = $val;
- }
-}
-
-# "Normalise" a hash key that's known to be multi-valued.
-sub vsplit {
- my ($val) = @_;
- my ($word, @words);
- my @values = ref $val eq 'ARRAY' ? @$val : $val;
-
- foreach my $line (map {split /\n/} @values) {
- # XXX: This should become a real parser, à la Text::ParseWords.
- $line =~ s/^\s+//;
- $line =~ s/\s+$//;
- push @words, split /\s*,\s*/, $line;
- }
-
- return \@words;
-}
-
-# WARN: this code is duplicated in lib/RT/Interface/REST.pm
-# change both functions at once
-sub expand_list {
- my ($list) = @_;
-
- my @elts;
- foreach (split /,/, $list) {
- push @elts, /^(\d+)-(\d+)$/? ($1..$2): $_;
- }
-
- return map $_->[0], # schwartzian transform
- sort {
- defined $a->[1] && defined $b->[1]?
- # both numbers
- $a->[1] <=> $b->[1]
- :!defined $a->[1] && !defined $b->[1]?
- # both letters
- $a->[2] cmp $b->[2]
- # mix, number must be first
- :defined $a->[1]? -1: 1
- }
- map [ $_, (defined( /^(\d+)$/ )? $1: undef), lc($_) ],
- @elts;
-}
-
-sub get_type_argument {
- my $type;
-
- if (@ARGV) {
- $type = shift @ARGV;
- unless ($type =~ /^[A-Za-z0-9_.-]+$/) {
- # We want whine to mention our caller, not us.
- @_ = ("Invalid type '$type' specified.");
- goto &whine;
- }
- }
- else {
- @_ = ("No type argument specified with -t.");
- goto &whine;
- }
-
- $type =~ s/s$//; # "Plural". Ugh.
- return $type;
-}
-
-sub get_var_argument {
- my ($data) = @_;
-
- if (@ARGV) {
- my $kv = shift @ARGV;
- if (my ($k, $v) = $kv =~ /^($field)=(.*)$/) {
- push @{ $data->{$k} }, $v;
- }
- else {
- @_ = ("Invalid variable specification: '$kv'.");
- goto &whine;
- }
- }
- else {
- @_ = ("No variable argument specified with -S.");
- goto &whine;
- }
-}
-
-sub is_object_spec {
- my ($spec, $type) = @_;
-
- $spec =~ s|^(?:$type/)?|$type/| if defined $type;
- return $spec if ($spec =~ m{^$name/(?:$idlist|$labels)(?:/.*)?$}o);
- return;
-}
-
-sub suggest_help {
- my ($action, $type) = @_;
-
- print STDERR "rt: For help, run 'rt help $action'.\n" if defined $action;
- print STDERR "rt: For help, run 'rt help $type'.\n" if defined $type;
-}
-
-__DATA__
-
-Title: intro
-Title: introduction
-Text:
-
- ** THIS IS AN UNSUPPORTED PREVIEW RELEASE **
- ** PLEASE REPORT BUGS TO rt-bugs@bestpractical.com **
-
- This is a command-line interface to RT 3.0 or newer
-
- It allows you to interact with an RT server over HTTP, and offers an
- interface to RT's functionality that is better-suited to automation
- and integration with other tools.
-
- In general, each invocation of this program should specify an action
- to perform on one or more objects, and any other arguments required
- to complete the desired action.
-
- For more information:
-
- - rt help usage (syntax information)
- - rt help objects (how to specify objects)
- - rt help actions (a list of possible actions)
- - rt help types (a list of object types)
-
- - rt help config (configuration details)
- - rt help examples (a few useful examples)
- - rt help topics (a list of help topics)
-
---
-
-Title: usage
-Title: syntax
-Text:
-
- Syntax:
-
- rt <action> [options] [arguments]
- or
- rt shell
-
- Each invocation of this program must specify an action (e.g. "edit",
- "create"), options to modify behaviour, and other arguments required
- by the specified action. (For example, most actions expect a list of
- numeric object IDs to act upon.)
-
- The details of the syntax and arguments for each action are given by
- "rt help <action>". Some actions may be referred to by more than one
- name ("create" is the same as "new", for example).
-
- You may also call "rt shell", which will give you an 'rt>' prompt at
- which you can issue commands of the form "<action> [options]
- [arguments]". See "rt help shell" for details.
-
- Objects are identified by a type and an ID (which can be a name or a
- number, depending on the type). For some actions, the object type is
- implied (you can only comment on tickets); for others, the user must
- specify it explicitly. See "rt help objects" for details.
-
- In syntax descriptions, mandatory arguments that must be replaced by
- appropriate value are enclosed in <>, and optional arguments are
- indicated by [] (for example, <action> and [options] above).
-
- For more information:
-
- - rt help objects (how to specify objects)
- - rt help actions (a list of actions)
- - rt help types (a list of object types)
- - rt help shell (how to use the shell)
-
---
-
-Title: conf
-Title: config
-Title: configuration
-Text:
-
- This program has two major sources of configuration information: its
- configuration files, and the environment.
-
- The program looks for configuration directives in a file named .rtrc
- (or $RTCONFIG; see below) in the current directory, and then in more
- distant ancestors, until it reaches /. If no suitable configuration
- files are found, it will also check for ~/.rtrc and /etc/rt.conf.
-
- Configuration directives:
-
- The following directives may occur, one per line:
-
- - server <URL> URL to RT server.
- - user <username> RT username.
- - passwd <passwd> RT user's password.
- - query <RT Query> Default RT Query for list action
- - orderby <order> Default RT order for list action
-
- Blank and #-commented lines are ignored.
-
- Environment variables:
-
- The following environment variables override any corresponding
- values defined in configuration files:
-
- - RTUSER
- - RTPASSWD
- - RTSERVER
- - RTDEBUG Numeric debug level. (Set to 3 for full logs.)
- - RTCONFIG Specifies a name other than ".rtrc" for the
- configuration file.
- - RTQUERY Default RT Query for rt list
- - RTORDERBY Default order for rt list
-
---
-
-Title: objects
-Text:
-
- Syntax:
-
- <type>/<id>[/<attributes>]
-
- Every object in RT has a type (e.g. "ticket", "queue") and a numeric
- ID. Some types of objects can also be identified by name (like users
- and queues). Furthermore, objects may have named attributes (such as
- "ticket/1/history").
-
- An object specification is like a path in a virtual filesystem, with
- object types as top-level directories, object IDs as subdirectories,
- and named attributes as further subdirectories.
-
- A comma-separated list of names, numeric IDs, or numeric ranges can
- be used to specify more than one object of the same type. Note that
- the list must be a single argument (i.e., no spaces). For example,
- "user/root,1-3,5,7-10,ams" is a list of ten users; the same list
- can also be written as "user/ams,root,1,2,3,5,7,8-10".
-
- Examples:
-
- ticket/1
- ticket/1/attachments
- ticket/1/attachments/3
- ticket/1/attachments/3/content
- ticket/1-3/links
- ticket/1-3,5-7/history
-
- user/ams
- user/ams/rights
- user/ams,rai,1/rights
-
- For more information:
-
- - rt help <action> (action-specific details)
- - rt help <type> (type-specific details)
-
---
-
-Title: actions
-Title: commands
-Text:
-
- You can currently perform the following actions on all objects:
-
- - list (list objects matching some condition)
- - show (display object details)
- - edit (edit object details)
- - create (create a new object)
-
- Each type may define actions specific to itself; these are listed in
- the help item about that type.
-
- For more information:
-
- - rt help <action> (action-specific details)
- - rt help types (a list of possible types)
-
---
-
-Title: types
-Text:
-
- You can currently operate on the following types of objects:
-
- - tickets
- - users
- - groups
- - queues
-
- For more information:
-
- - rt help <type> (type-specific details)
- - rt help objects (how to specify objects)
- - rt help actions (a list of possible actions)
-
---
-
-Title: ticket
-Text:
-
- Tickets are identified by a numeric ID.
-
- The following generic operations may be performed upon tickets:
-
- - list
- - show
- - edit
- - create
-
- In addition, the following ticket-specific actions exist:
-
- - link
- - merge
- - comment
- - correspond
-
- Attributes:
-
- The following attributes can be used with "rt show" or "rt edit"
- to retrieve or edit other information associated with tickets:
-
- links A ticket's relationships with others.
- history All of a ticket's transactions.
- history/type/<type> Only a particular type of transaction.
- history/id/<id> Only the transaction of the specified id.
- attachments A list of attachments.
- attachments/<id> The metadata for an individual attachment.
- attachments/<id>/content The content of an individual attachment.
-
---
-
-Title: user
-Title: group
-Text:
-
- Users and groups are identified by name or numeric ID.
-
- The following generic operations may be performed upon them:
-
- - list
- - show
- - edit
- - create
-
- In addition, the following type-specific actions exist:
-
- - grant
- - revoke
-
- Attributes:
-
- The following attributes can be used with "rt show" or "rt edit"
- to retrieve or edit other information associated with users and
- groups:
-
- rights Global rights granted to this user.
- rights/<queue> Queue rights for this user.
-
---
-
-Title: queue
-Text:
-
- Queues are identified by name or numeric ID.
-
- Currently, they can be subjected to the following actions:
-
- - show
- - edit
- - create
-
---
-
-Title: logout
-Text:
-
- Syntax:
-
- rt logout
-
- Terminates the currently established login session. You will need to
- provide authentication credentials before you can continue using the
- server. (See "rt help config" for details about authentication.)
-
---
-
-Title: ls
-Title: list
-Title: search
-Text:
-
- Syntax:
-
- rt <ls|list|search> [options] "query string"
-
- Displays a list of objects matching the specified conditions.
- ("ls", "list", and "search" are synonyms.)
-
- Conditions are expressed in the SQL-like syntax used internally by
- RT3. (For more information, see "rt help query".) The query string
- must be supplied as one argument.
-
- (Right now, the server doesn't support listing anything but tickets.
- Other types will be supported in future; this client will be able to
- take advantage of that support without any changes.)
-
- Options:
-
- The following options control how much information is displayed
- about each matching object:
-
- -i Numeric IDs only. (Useful for |rt edit -; see examples.)
- -s Short description.
- -l Longer description.
-
- In addition,
-
- -o +/-<field> Orders the returned list by the specified field.
- -S var=val Submits the specified variable with the request.
- -t type Specifies the type of object to look for. (The
- default is "ticket".)
-
- Examples:
-
- rt ls "Priority > 5 and Status='new'"
- rt ls -o +Subject "Priority > 5 and Status='new'"
- rt ls -o -Created "Priority > 5 and Status='new'"
- rt ls -i "Priority > 5"|rt edit - set status=resolved
- rt ls -t ticket "Subject like '[PATCH]%'"
-
---
-
-Title: show
-Text:
-
- Syntax:
-
- rt show [options] <object-ids>
-
- Displays details of the specified objects.
-
- For some types, object information is further classified into named
- attributes (for example, "1-3/links" is a valid ticket specification
- that refers to the links for tickets 1-3). Consult "rt help <type>"
- and "rt help objects" for further details.
-
- This command writes a set of forms representing the requested object
- data to STDOUT.
-
- Options:
-
- - Read IDs from STDIN instead of the command-line.
- -t type Specifies object type.
- -f a,b,c Restrict the display to the specified fields.
- -S var=val Submits the specified variable with the request.
- -v Verbose display
- Examples:
-
- rt show -t ticket -f id,subject,status 1-3
- rt show ticket/3/attachments/29
- rt show ticket/3/attachments/29/content
- rt show ticket/1-3/links
- rt show ticket/3/history
- rt show -v ticket/3/history
- rt show -t user 2
-
---
-
-Title: new
-Title: edit
-Title: create
-Text:
-
- Syntax:
-
- rt edit [options] <object-ids> set field=value [field=value] ...
- add field=value [field=value] ...
- del field=value [field=value] ...
-
- Edits information corresponding to the specified objects.
-
- If, instead of "edit", an action of "new" or "create" is specified,
- then a new object is created. In this case, no numeric object IDs
- may be specified, but the syntax and behaviour remain otherwise
- unchanged.
-
- This command typically starts an editor to allow you to edit object
- data in a form for submission. If you specified enough information
- on the command-line, however, it will make the submission directly.
-
- The command line may specify field-values in three different ways.
- "set" sets the named field to the given value, "add" adds a value
- to a multi-valued field, and "del" deletes the corresponding value.
- Each "field=value" specification must be given as a single argument.
-
- For some types, object information is further classified into named
- attributes (for example, "1-3/links" is a valid ticket specification
- that refers to the links for tickets 1-3). These attributes may also
- be edited. Consult "rt help <type>" and "rt help object" for further
- details.
-
- Options:
-
- - Read numeric IDs from STDIN instead of the command-line.
- (Useful with rt ls ... | rt edit -; see examples below.)
- -i Read a completed form from STDIN before submitting.
- -o Dump the completed form to STDOUT instead of submitting.
- -e Allows you to edit the form even if the command-line has
- enough information to make a submission directly.
- -S var=val
- Submits the specified variable with the request.
- -t type Specifies object type.
-
- Examples:
-
- # Interactive (starts $EDITOR with a form).
- rt edit ticket/3
- rt create -t ticket
-
- # Non-interactive.
- rt edit ticket/1-3 add cc=foo@example.com set priority=3
- rt ls -t tickets -i 'Priority > 5' | rt edit - set status=resolved
- rt edit ticket/4 set priority=3 owner=bar@example.com \
- add cc=foo@example.com bcc=quux@example.net
- rt create -t ticket set subject='new ticket' priority=10 \
- add cc=foo@example.com
-
---
-
-Title: comment
-Title: correspond
-Text:
-
- Syntax:
-
- rt <comment|correspond> [options] <ticket-id>
-
- Adds a comment (or correspondence) to the specified ticket (the only
- difference being that comments aren't sent to the requestors.)
-
- This command will typically start an editor and allow you to type a
- comment into a form. If, however, you specified all the necessary
- information on the command line, it submits the comment directly.
-
- (See "rt help forms" for more information about forms.)
-
- Options:
-
- -m <text> Specify comment text.
- -a <file> Attach a file to the comment. (May be used more
- than once to attach multiple files.)
- -c <addrs> A comma-separated list of Cc addresses.
- -b <addrs> A comma-separated list of Bcc addresses.
- -w <time> Specify the time spent working on this ticket.
- -e Starts an editor before the submission, even if
- arguments from the command line were sufficient.
-
- Examples:
-
- rt comment -m 'Not worth fixing.' -a stddisclaimer.h 23
-
---
-
-Title: merge
-Text:
-
- Syntax:
-
- rt merge <from-id> <to-id>
-
- Merges the first ticket specified into the second ticket specified.
-
---
-
-Title: link
-Text:
-
- Syntax:
-
- rt link [-d] <id-A> <link> <id-B>
-
- Creates (or, with -d, deletes) a link between the specified tickets.
- The link can (irrespective of case) be any of:
-
- DependsOn/DependedOnBy: A depends upon B (or vice versa).
- RefersTo/ReferredToBy: A refers to B (or vice versa).
- MemberOf/HasMember: A is a member of B (or vice versa).
-
- To view a ticket's links, use "rt show ticket/3/links". (See
- "rt help ticket" and "rt help show".)
-
- Options:
-
- -d Deletes the specified link.
-
- Examples:
-
- rt link 2 dependson 3
- rt link -d 4 referredtoby 6 # 6 no longer refers to 4
-
---
-
-Title: grant
-Title: revoke
-Text:
-
---
-
-Title: query
-Text:
-
- RT3 uses an SQL-like syntax to specify object selection constraints.
- See the <RT:...> documentation for details.
-
- (XXX: I'm going to have to write it, aren't I?)
-
---
-
-Title: form
-Title: forms
-Text:
-
- This program uses RFC822 header-style forms to represent object data
- in a form that's suitable for processing both by humans and scripts.
-
- A form is a set of (field, value) specifications, with some initial
- commented text and interspersed blank lines allowed for convenience.
- Field names may appear more than once in a form; a comma-separated
- list of multiple field values may also be specified directly.
-
- Field values can be wrapped as in RFC822, with leading whitespace.
- The longest sequence of leading whitespace common to all the lines
- is removed (preserving further indentation). There is no limit on
- the length of a value.
-
- Multiple forms are separated by a line containing only "--\n".
-
- (XXX: A more detailed specification will be provided soon. For now,
- the server-side syntax checking will suffice.)
-
---
-
-Title: topics
-Text:
-
- Syntax:
-
- rt help <topic>
-
- Get help on any of the following subjects:
-
- - tickets, users, groups, queues.
- - show, edit, ls/list/search, new/create.
-
- - query (search query syntax)
- - forms (form specification)
-
- - objects (how to specify objects)
- - types (a list of object types)
- - actions/commands (a list of actions)
- - usage/syntax (syntax details)
- - conf/config/configuration (configuration details)
- - examples (a few useful examples)
-
---
-
-Title: example
-Title: examples
-Text:
-
- This section will be filled in with useful examples, once it becomes
- more clear what examples may be useful.
-
- For the moment, please consult examples provided with each action.
-
---
-
-Title: shell
-Text:
-
- Syntax:
-
- rt shell
-
- Opens an interactive shell, at which you can issue commands of
- the form "<action> [options] [arguments]".
-
- To exit the shell, type "quit" or "exit".
-
- Commands can be given at the shell in the same form as they would
- be given at the command line without the leading 'rt' invocation.
-
- Example:
- $ rt shell
- rt> create -t ticket set subject='new' add cc=foo@example.com
- # Ticket 8 created.
- rt> quit
- $
-
---
-
-Title: take
-Title: untake
-Title: steal
-Text:
-
- Syntax:
-
- rt <take|untake|steal> <ticket-id>
-
- Sets the owner of the specified ticket to the current user,
- assuming said user has the bits to do so, or releases the
- ticket.
-
- 'Take' is used on tickets which are not currently owned
- (Owner: Nobody), 'steal' is used on tickets which *are*
- currently owned, and 'untake' is used to "release" a ticket
- (reset its Owner to Nobody). 'Take' cannot be used on
- tickets which are currently owned.
-
- Example:
- alice$ rt create -t ticket set subject="New ticket"
- # Ticket 7 created.
- alice$ rt take 7
- # Owner changed from Nobody to alice
- alice$ su bob
- bob$ rt steal 7
- # Owner changed from alice to bob
- bob$ rt untake 7
- # Owner changed from bob to Nobody
-
---
-
-Title: quit
-Title: exit
-Text:
-
- Use "quit" or "exit" to leave the shell. Only valid within shell
- mode.
-
- Example:
- $ rt shell
- rt> quit
- $
diff --git a/rt/bin/rt-commit-handler b/rt/bin/rt-commit-handler
index 29e443ebd..bf23a6c0b 100644
--- a/rt/bin/rt-commit-handler
+++ b/rt/bin/rt-commit-handler
@@ -26,7 +26,7 @@
# {{{ Docs
# -*-Perl-*-
#
-#ident "@(#)ccvs/contrib:$Name: $:$Id: rt-commit-handler,v 1.1 2003-07-15 13:16:15 ivan Exp $"
+#ident "@(#)ccvs/contrib:$Name: $:$Id: rt-commit-handler,v 1.2 2007-08-01 22:20:32 ivan Exp $"
#
# Perl filter to handle the log messages from the checkin of files in multiple
# directories. This script will group the lists of files by log message, and
diff --git a/rt/bin/rt-commit-handler.in b/rt/bin/rt-commit-handler.in
deleted file mode 100644
index 02b01abff..000000000
--- a/rt/bin/rt-commit-handler.in
+++ /dev/null
@@ -1,846 +0,0 @@
-#!@PERL@ -w
-# BEGIN LICENSE BLOCK
-#
-# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-#
-# (Except where explictly superceded by other copyright notices)
-#
-# 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.
-#
-# 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.
-#
-#
-# END LICENSE BLOCK
-
-# {{{ Docs
-# -*-Perl-*-
-#
-#ident "@(#)ccvs/contrib:$Name: $:$Id: rt-commit-handler.in,v 1.1 2003-07-15 13:16:15 ivan Exp $"
-#
-# Perl filter to handle the log messages from the checkin of files in multiple
-# directories. This script will group the lists of files by log message, and
-# send one piece of mail per unique message, no matter how many files are
-# committed.
-
-=head1 NAME rt-commit-handler
-
-=head1 USAGE
-
-
-
-=head2 Regular use
-
-Stick the following in in CVSROOT/commitinfo
-
- ALL @RT_BIN_PATH@/rt-commit-handler --record-last-dir
-
-Stick the following in CVSROOT/loginfo
-
- ALL @RT_BIN_PATH@/rt-commit-handler --cvs-root /pathtocvs/root --rt %{Vvts}
-
-=head2 Invocation (advanced use)
-
-rt-commit-handler --cvs-root /path/to/cvs/root [-d] [-D] [-r] [-M module] \
- [[-m mailto] ...] [[-R replyto] ...] [-f logfile]
-
-
- -d - turn on debugging
- -m mailto - send mail to "mailto" (multiple)
- -R replyto - set the "Reply-To:" to "replyto" (multiple)
- -M modulename - set module name to "modulename"
- -f logfile - write commit messages to logfile too
- -D - generate diff commands
- --rt - invoke RT commit handler
- --cvs-root - specify your CVS root
-
- --record-last-dir - Record the last directory with changes in
- pre-commit (commitinfo) mode
-
-
-=cut
-
-# }}}
-
-use strict;
-use Carp;
-use Getopt::Long;
-use Text::Wrap;
-use Digest::MD5;
-use MIME::Entity;
-
-use lib ("@RT_LIB_PATH@", "@LOCAL_LIB_PATH@");
-
-use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc);
-
-use vars
- qw(@MAILER $TMPDIR $FILE_PREFIX $LASTDIR_FILE $HASH_FILE $VERSION_FILE $MESSAGE_FILE $MAIL_FILE $DEBUG $MAILTO $REPLYTO $id $MODULE_NAME
- $LOGIN $COMMITLOG $CVS_ROOT $RT_HANDLER);
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-RT::LoadConfig();
-
-#Drop setgid permissions
-RT::DropSetGIDPermissions();
-
-# {{{ Variable setup
-$TMPDIR = '/tmp';
-$FILE_PREFIX = $TMPDIR . '/#cvs.';
-
-# The root of your CVS install. we should get this from some smarter place.
-# It needs a trailing /
-
-$LASTDIR_FILE = $FILE_PREFIX . "lastdir";
-$HASH_FILE = $FILE_PREFIX . "hash";
-$VERSION_FILE = $FILE_PREFIX . "version";
-$MESSAGE_FILE = $FILE_PREFIX . "message";
-$MAIL_FILE = $FILE_PREFIX . "mail";
-
-$DEBUG = 0;
-$RT_HANDLER = 1;
-
-$MAILTO = '';
-
-my @files = ();
-my (@log_lines);
-my $do_diff = 0;
-my $id = getpgrp(); # note, you *must* use a shell which does setpgrp()
-$LOGIN = getpwuid($<);
-
-# }}}
-
-die "User could not be found" unless ($LOGIN);
-
-# {{{ parse command line arguments (file list is seen as one arg)
-#
-while ( my $arg = shift @ARGV ) {
-
- if ( $arg eq '-d' ) {
- $DEBUG = 1;
- warn "Debug turned on...\n";
- }
- elsif ( $arg =~ /^--record-last-dir$/i ) {
- record_last_dir( $id, $ARGV[0] );
- exit(0);
- }
- elsif ( $arg eq '-m' ) {
- $MAILTO .= ", " if $MAILTO;
- $MAILTO .= shift @ARGV;
- }
- elsif ( $arg eq '--rt' ) {
- $RT_HANDLER = 1;
- }
- elsif ( $arg eq '-R' ) {
- $REPLYTO .= ", " if $REPLYTO;
- $REPLYTO .= shift @ARGV;
- }
- elsif ( $arg eq '-M' ) {
- die ("too many '-M' args\n") if $MODULE_NAME;
- $MODULE_NAME = shift @ARGV;
- }
- elsif ( $arg eq '--cvs-root' ) {
- $CVS_ROOT = shift @ARGV;
- $CVS_ROOT .= "/" unless ( $CVS_ROOT =~ /\/$/ );
- }
- elsif ( $arg eq '-f' ) {
- die ("too many '-f' args\n") if $COMMITLOG;
- $COMMITLOG = shift @ARGV;
-
- # This is a disgusting hack to untaint $COMMITLOG if we're running from
- # setgid cvs.
- $COMMITLOG = untaint($COMMITLOG);
- }
- elsif ( $arg eq '-D' ) {
- $do_diff = 1;
- }
- else {
- @files = split ( ' ', $arg );
- last;
- }
-}
-
-# }}}
-
-$REPLYTO = $LOGIN unless ($REPLYTO);
-
-# for now, the first "file" is the repository directory being committed,
-# relative to the $CVSROOT location
-#
-my $dir = shift @files;
-
-# XXX there are some ugly assumptions in here about module names and
-# XXX directories relative to the $CVSROOT location -- really should
-# XXX read $CVSROOT/CVSROOT/modules, but that's not so easy to do, since
-# XXX we have to parse it backwards.
-#
-# XXX For now we set the `module' name to the top-level directory name.
-#
-unless ($MODULE_NAME) {
- ($MODULE_NAME) = split ( '/', $dir, 2 );
-}
-
-if ($DEBUG) {
- warn "module - ", $MODULE_NAME, "\n";
- warn "dir - ", $dir, "\n";
- warn "files - ", join ( " ", @files ), "\n";
- warn "id - ", $id, "\n";
-}
-
-# {{{ Check for a new directory or an import command.
-
-#
-# files[0] - "-"
-# files[1] - "New"
-# files[2] - "directory"
-#
-# files[0] - "-"
-# files[1] - "Imported"
-# files[2] - "sources"
-#
-if ( $files[0] eq "-" ) {
-
- #we just don't care about New Directory notes
- unless ( $files[1] eq "New" && $files[2] eq "directory" ) {
-
- my @text = ();
-
- push @text, build_header();
- push @text, "";
-
- while ( my $line = <STDIN> ) {
- chop $line; # Drop the newline
- push @text, $line;
- }
-
- append_logfile( $COMMITLOG, @text ) if ($COMMITLOG);
-
- mail_notification( $id, @text );
- }
-
- exit 0;
-}
-
-# }}}
-
-# {{{ Collect just the log message from stdin.
-#
-
-while ( my $line = <STDIN> ) {
- chop $line; # strip the newline
- last if ( $line =~ /^Log Message:$/ );
-}
-while ( my $line = <STDIN> ) {
- chop $line; # strip the newline
- $line =~ s/\s+$//; # strip trailing white space
- push @log_lines, $line;
-}
-
-my $md5 = Digest::MD5->new();
-foreach my $line (@log_lines) {
- $md5->add( $line . "\n" );
-}
-my $hash = $md5->hexdigest();
-
-warn "hash = $hash\n" if ($DEBUG);
-
-if ( !-e "$MESSAGE_FILE.$id.$hash" ) {
- append_logfile( "$HASH_FILE.$id", $hash );
- write_file( "$MESSAGE_FILE.$id.$hash", @log_lines );
-}
-
-# }}}
-
-# Spit out the information gathered in this pass.
-
-append_logfile( "$VERSION_FILE.$id.$hash", $dir . '/', @files );
-
-# {{{ Check whether this is the last directory. If not, quit.
-
-warn "Checking current dir against last dir $LASTDIR_FILE.$id\n" if ($DEBUG);
-
-my @last_dir = read_file("$LASTDIR_FILE.$id");
-
-unless ($CVS_ROOT) {
- die "No cvs root specified with --cvs-root. Can't continue.";
-}
-
-if ( $last_dir[0] ne $CVS_ROOT . $dir ) {
- warn "Current directory $CVS_ROOT$dir is not last directory $last_dir[0].\n"
- if ($DEBUG);
- exit 0;
-}
-
-# }}}
-
-# {{{ End Of Commits!
-#
-
-# This is it. The commits are all finished. Lump everything together
-# into a single message, fire a copy off to the mailing list, and drop
-# it on the end of the Changes file.
-#
-
-#
-# Produce the final compilation of the log messages
-#
-
-my @hashes = read_file("$HASH_FILE.$id");
-my (@text);
-
-push @text, build_header();
-push @text, "";
-
-my ( @added_files, @modified_files, @removed_files );
-
-foreach my $hash (@hashes) {
-
- # In case we're running setgid, make sure the hash file hasn't been hacked.
- $hash =~ m/([a-z0-9]*)/ || die "*** Hacking attempt detected\n";
- $hash = $1;
-
- my @files = read_file("$VERSION_FILE.$id.$hash");
- my @log_lines = read_file("$MESSAGE_FILE.$id.$hash");
-
- my $working_on_dir; # gets set as we iterate through the files.
- foreach my $file (@files) {
-
- #If we've entered a new directory, make a note of that and remove the trailing /
-
- if ( $file =~ s'\/$'' ) {
- $working_on_dir = $file;
- next;
- }
-
- my @file_entry = ( split ( ',', $file, 4 ), $working_on_dir );
-
- # file_entry looks like ths:
-
- # 0 1 2 3 4
- # Old rev : new rev : tag: file :directory
- my $entry = {};
- $entry->{'old'} = $file_entry[0];
- $entry->{'new'} = $file_entry[1];
- $entry->{'tag'} = $file_entry[2];
- $entry->{'file'} = $file_entry[3];
- $entry->{'dir'} = $file_entry[4];
-
- if ( $file_entry[0] eq 'NONE' ) {
- $entry->{'old'} = '0';
- push @added_files, $entry;
- }
- elsif ( $file_entry[1] eq 'NONE' ) {
- $entry->{'new'} = '0';
- push @removed_files, $entry;
- }
- else {
- push @modified_files, $entry;
- }
- }
-}
-
-# }}}
-
-# {{{ start building up the body
-
-# Strip leading and trailing blank lines from the log message. Also
-# compress multiple blank lines in the body of the message down to a
-# single blank line.
-#
-
-my $blank = 1;
-@log_lines = map {
- my $wasblank = $blank;
- $blank = $_ eq '';
- $blank && $wasblank ? () : $_;
-} @log_lines;
-
-pop @log_lines if $blank;
-
-@modified_files = order_and_summarize_diffs(@modified_files);
-@added_files = order_and_summarize_diffs(@added_files);
-@removed_files = order_and_summarize_diffs(@removed_files);
-
-push @text, "Modified Files:", format_lists(@modified_files)
- if (@modified_files);
-
-push @text, "Added Files:", format_lists(@added_files) if (@added_files);
-
-push @text, "Removed Files:", format_lists(@removed_files) if (@removed_files);
-
-push @text, "", "Log Message", @log_lines if (@log_lines);
-
-push @text, "";
-
-if ($RT_HANDLER) {
- rt_handler(
- @log_lines, "\n",
- loc("To generate a diff of this commit:\n"), "\n",
- format_diffs( @modified_files, @added_files, @removed_files )
- );
-}
-
-if ($COMMITLOG) {
- append_logfile( $COMMITLOG, @text );
-}
-
-if ($do_diff) {
- push @text, "";
- push @text, loc("To generate a diff of this commit:");
- push @text, format_diffs( @modified_files, @added_files, @removed_files );
- push @text, "";
-}
-
-# }}}
-
-# {{{ Mail out the notification.
-
-mail_notification( $id, @text );
-
-# }}}
-
-# {{{ clean up
-
-unless ($DEBUG) {
- $hash = untaint($hash);
- $id = untaint($id);
- unlink "$VERSION_FILE.$id.$hash";
- unlink "$MESSAGE_FILE.$id.$hash";
- unlink "$MAIL_FILE.$id";
- unlink "$LASTDIR_FILE.$id";
- unlink "$HASH_FILE.$id";
-}
-
-# }}}
-
-exit 0;
-
-# {{{ Subroutines
-#
-
-# {{{ append_logfile
-sub append_logfile {
- my $filename = shift;
- my (@lines) = @_;
-
- $filename = untaint($filename);
-
- open( FILE, ">>$filename" )
- || die ("Cannot open file $filename for append.\n");
- foreach my $line (@lines) {
- print FILE $line . "\n";
- }
- close(FILE);
-}
-
-# }}}
-
-# {{{ write_file
-sub write_file {
- my $filename = shift;
- my (@lines) = @_;
-
- $filename = untaint($filename);
-
- open( FILE, ">$filename" )
- || die ("Cannot open file $filename for write.\n");
- foreach my $line (@lines) {
- print FILE $line . "\n";
- }
- close(FILE);
-}
-
-# }}}
-
-# {{{ read_file
-sub read_file {
- my $filename = shift;
- my (@lines);
-
- open( FILE, "<$filename" )
- || die ("Cannot open file $filename for read.\n");
- while ( my $line = <FILE> ) {
- chop $line;
- push @lines, $line;
- }
- close(FILE);
-
- return (@lines);
-}
-
-# }}}
-
-# {{{ sub format_lists
-
-sub format_lists {
- my @items = (@_);
-
- my $files = "";
- map {
- $_->{'files'} && ( $files .= ' ' . join ( ' ', @{ $_->{'files'} } ) );
- } @items;
-
- my @lines = wrap( "\t", "\t\t", $files );
- return (@lines);
-
-}
-
-# }}}
-
-# {{{ sub format_diffs
-
-sub format_diffs {
- my @items = (@_);
-
- my @lines;
- foreach my $item (@items) {
- next unless ( $item->{'files'} );
- push ( @lines,
- "cvs diff -r"
- . $item->{'old'} . " -r"
- . $item->{'new'} . " "
- . join ( " ", @{ $item->{'files'} } ) . "\n" );
-
- }
-
- @lines = fill( "\t", "\t\t", @lines );
-
- return (@lines);
-}
-
-# }}}
-
-# {{{ sub order_and_summarize_diffs {
-
-# takes an array of file items
-# returns a sorted array of fileset items, which are like file items, except they can have an array of files, rather than
-# a singleton file.
-
-sub order_and_summarize_diffs {
-
- my @files = (@_);
-
- # Sort by tag, dir, file.
- @files = sort {
- $a->{'tag'} cmp $b->{'tag'}
- || $a->{'dir'} cmp $b->{'dir'}
- || $a->{'file'} cmp $b->{'file'};
- } @files;
-
- # Combine adjacent rows that are the same modulo the file name.
-
- my @items = (undef);
-
- foreach my $file (@files) {
- if ( $#items == -1 #if it's empty
- || ( !defined $items[-1]->{'old'}
- || $items[-1]->{'old'} ne $file->{'old'} )
- || ( !defined $items[-1]->{'new'}
- || $items[-1]->{'new'} ne $file->{'new'} )
- || ( !defined $items[-1]->{'tag'}
- || $items[-1]->{'tag'} ne $file->{'tag'} ) )
- {
-
- push ( @items, $file );
- }
- push ( @{ $items[-1]->{'files'} },
- $file->{'dir'} . "/" . $file->{'file'} );
- }
-
- return (@items);
-}
-
-# }}}
-
-# {{{ build_header
-
-sub build_header {
- my $now = gmtime;
- my $header =
- sprintf( "Module Name:\t%s\nCommitted By:\t%s\nDate:\t\t%s %s %s",
- $MODULE_NAME, $LOGIN, substr( $now, 0, 19 ), "UTC",
- substr( $now, 20, 4 ) );
- return ($header);
-}
-
-# }}}
-
-# {{{ mail_notification
-sub mail_notification {
- my $id = shift;
- my (@text) = @_;
- write_file( "$MAIL_FILE.$id", "From: " . $LOGIN,
- "Subject: CVS commit: " . $MODULE_NAME, "To: " . $MAILTO,
- "Reply-To: " . $REPLYTO, "", "", @text );
-
- my $entity = MIME::Entity->build(
- From => $LOGIN,
- To => $MAILTO,
- Subject => "CVS commit: " . $MODULE_NAME,
- 'Reply-To' => $REPLYTO,
- Data => join ( "\n", @text )
- );
- if ( $RT::MailCommand eq 'sendmailpipe' ) {
- open( MAIL, "|$RT::SendmailPath $RT::SendmailArguments" )
- || die "Couldn't send mail: " . $@ . "\n";
- print MAIL $entity->as_string;
- close(MAIL);
- }
- else {
- $entity->send( $RT::MailCommand, $RT::MailParams );
- }
-
-}
-
-# }}}
-
-# {{{ sub record_last_dir
-
-sub record_last_dir {
- my $id = shift;
- my $dir = shift;
-
- # make a note of this directory. later, we'll use this to
- # figure out if we've gone through the whole commit,
- # for something that is a bad mockery of attomic commits.
-
- warn "about to write $dir to $LASTDIR_FILE.$id" if ($DEBUG);
-
- write_file( "$LASTDIR_FILE.$id", $dir );
-}
-
-# }}}
-
-# {{{ Get the RT stuff set up
-
-# {{{ sub rt_handler
-
-sub rt_handler {
- my (@LogMessage) = (@_);
-
- #Connect to the database and get RT::SystemUser and RT::Nobody loaded
- RT::Init;
-
- require RT::Ticket;
-
- #Get the current user all loaded
- my $CurrentUser = GetCurrentUser();
-
- if ( !$CurrentUser->Id ) {
- print
-loc("No valid RT user found. RT cvs handler disengaged. Please consult your RT administrator.\n");
- return;
- }
-
- my (@commands) = find_commands( \@LogMessage );
-
- my ( @tickets, @errors );
-
- # Get the list of tickets we're working with out of commands
- grep { $_ =~ /^RT-Ticket:\s*(.*?)$/i && push ( @tickets, $1 ) } @commands;
-
- my $message = new MIME::Entity;
- $message->build(
- From => $CurrentUser->EmailAddress,
- Subject => 'CVS Commit',
- Data => \@LogMessage
- );
-
- # {{{ comment or correspond, as needed
-
- foreach my $ticket (@tickets) {
- my $TicketObj = RT::Ticket->new($CurrentUser);
- $TicketObj->Load($ticket);
- my ( $id, $msg );
- unless ( $TicketObj->Id ) {
- push ( @errors,
-"Couldn't load ticket #$ticket. Not adding commit log to ticket history.\n"
- );
- }
-
- if ( $LogMessage[0] =~ /^(comment|private)$/ ) {
- ( $id, $msg ) = $TicketObj->Comment( MIMEObj => $message );
-
- }
- else {
- ( $id, $msg ) = $TicketObj->Correspond( MIMEObj => $message );
- }
-
- push ( @errors, ">> Log message",
- "Ticket #" . $TicketObj->Id . ": " . $msg );
-
- }
-
- # }}}
-
- my ($reply) = ActOnPseudoHeaders( $CurrentUser, @commands );
- print "$reply\n" if ($reply);
- print join ( "\n", @errors );
- print "\n";
-
-}
-
-# }}}
-
-# {{{ sub find_commands
-
-sub find_commands {
- my $lines = shift;
- my (@pseudoheaders);
-
- while ( my $line = shift @{$lines} ) {
- next if $line =~ /^\s*?$/;
- if ( $line =~ /^RT-/i ) {
-
- push ( @pseudoheaders, $line );
- }
-
- #If we find a line that's not a command, get out.
- else {
- unshift ( @{$lines}, $line );
- last;
- }
- }
-
- return (@pseudoheaders);
-
-}
-
-# }}}
-
-# {{{ sub ActOnPseudoHeaders
-
-=item ActOnPseudoHeaders $PseudoHeaders
-
-Takes a string of pseudo-headers, iterates through them and does what they tell it to.
-
-=cut
-
-sub ActOnPseudoHeaders {
- my $CurrentUser = shift;
- my (@actions) = (@_);
-
- my $ResultsMessage = '';
- my $Ticket = RT::Ticket->new($CurrentUser);
-
- foreach my $action (@actions) {
- my ($val);
- my $msg = '';
-
- $ResultsMessage .= ">>> $action\n";
-
- if ( $action =~ /^RT-(.*?):\s*(.*)$/i ) {
- my $command = $1;
- my $args = $2;
-
- if ( $command =~ /^ticket$/i ) {
-
- $val = $Ticket->Load($args);
- unless ($val) {
- $ResultsMessage .=
- loc("ERROR: Couldn't load ticket '[_1]': [_2].\n", $1, $msg);
- . loc("Aborting to avoid unintended ticket modifications.\n")
- . loc("The following commands were not proccessed:\n\n")
- . join ( "\n", @actions );
- return ($ResultsMessage);
- }
- $ResultsMessage .= loc("Ticket [_1] loaded\n", $Ticket->Id);
- }
- else {
- unless ( $Ticket->Id ) {
- $ResultsMessage .= loc("No Ticket specified. Aborting ticket ")
- . loc("modifications\n\n")
- . loc("The following commands were not proccessed:\n\n")
- . join ( "\n", @actions );
- return ($ResultsMessage);
- }
-
- # Deal with the basics
- if ( $command =~ /^(Subject|Owner|Status|Queue)$/i ) {
- my $method = 'Set' . ucfirst( lc($1) );
- ( $val, $msg ) = $Ticket->$method($args);
- }
-
- # Deal with the dates
- elsif ( $command =~ /^(due|starts|started|resolved)$/i ) {
- my $method = 'Set' . ucfirst( lc($1) );
- my $date = new RT::Date($CurrentUser);
- $date->Set( Format => 'unknown', Value => $args );
- ( $val, $msg ) = $Ticket->$method( $date->ISO );
- }
-
- # Deal with the watchers
- elsif ( $command =~ /^(requestor|requestors|cc|admincc)$/i ) {
- my $operator = "+";
- my ($type);
- if ( $args =~ /^(\+|\-)(.*)$/ ) {
- $operator = $1;
- $args = $2;
- }
- $type = 'Requestor' if ( $command =~ /^requestor/i );
- $type = 'Cc' if ( $command =~ /^cc/i );
- $type = 'AdminCc' if ( $command =~ /^admincc/i );
-
- my $user = RT::User->new($CurrentUser);
- $user->Load($args);
-
- if ($operator eq '+') {
- ($val, $msg) = $Ticket->AddWatcher( Type => $type,
- PrincipalId => $user->PrincipalId);
- } elsif ($operator eq '-') {
- ($val, $msg) = $Ticket->DeleteWatcher( Type => $type,
- PrincipalId => $user->PrincipalId);
- }
-
- }
- $ResultsMessage .= $msg . "\n";
- }
-
- }
- return ($ResultsMessage);
-
-}
-
-# }}}
-
-# {{{ sub untaint
-sub untaint {
- my $val = shift;
-
- if ( $val =~ /^([-\#\/\w.]+)$/ ) {
- $val = $1; # $data now untainted
- }
- else {
- die loc("Bad data in [_1]", $val); # log this somewhere
- }
- return ($val);
-}
-
-# }}}
-
-=head1 AUTHOR
-
-
-
- rt-commit-handler is a rewritten version of the NetBSD commit handler,
- which was placed in the public domain by Charles Hannum. It bore the following
- authors statement:
-
- Contributed by David Hampton <hampton@cisco.com>
- Hacked greatly by Greg A. Woods <woods@planix.com>
- Rewritten by Charles M. Hannum <mycroft@netbsd.org>
-
-=cut
-
diff --git a/rt/bin/rt-crontool b/rt/bin/rt-crontool
index 3171d115c..8fcd63111 100644
--- a/rt/bin/rt-crontool
+++ b/rt/bin/rt-crontool
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/bin/rt-mailgate b/rt/bin/rt-mailgate
index a578b4bc6..8db26dbe3 100755
--- a/rt/bin/rt-mailgate
+++ b/rt/bin/rt-mailgate
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/bin/webmux.pl b/rt/bin/webmux.pl
deleted file mode 100755
index 02eb84640..000000000
--- a/rt/bin/webmux.pl
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/usr/bin/perl
-# 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;
-
-BEGIN {
- $ENV{'PATH'} = '/bin:/usr/bin'; # or whatever you need
- $ENV{'CDPATH'} = '' if defined $ENV{'CDPATH'};
- $ENV{'SHELL'} = '/bin/sh' if defined $ENV{'SHELL'};
- $ENV{'ENV'} = '' if defined $ENV{'ENV'};
- $ENV{'IFS'} = '' if defined $ENV{'IFS'};
-
- use CGI qw(-private_tempfiles); #bring this in before mason, to make sure we
- #set private_tempfiles
-
- die "RT does not support mod_perl 1.99. Please upgrade to mod_perl 2.0"
- if $ENV{'MOD_PERL'}
- and $ENV{'MOD_PERL'} =~ m{mod_perl/(?:1\.9)};
-
-}
-
-use lib ( "/opt/rt3/local/lib", "/opt/rt3/lib" );
-use RT;
-
-package RT::Mason;
-
-use vars qw($Nobody $SystemUser $Handler $r);
-
-#This drags in RT's config.pm
-BEGIN {
- RT::LoadConfig();
- if ($RT::DevelMode) { require Module::Refresh; }
-}
-
-
-{
-
- package HTML::Mason::Commands;
- use vars qw(%session);
-}
-
-use RT::Interface::Web;
-use RT::Interface::Web::Handler;
-$Handler = RT::Interface::Web::Handler->new(@RT::MasonParameters);
-
-if ($ENV{'MOD_PERL'} && !$RT::DevelMode) {
- # Under static_source, we need to purge the component cache
- # each time we restart, so newer components may be reloaded.
- #
- # We can't do this in FastCGI or we'll blow away the component root _every_ time a new server starts
- # which happens every few hits.
-
- use File::Path qw( rmtree );
- use File::Glob qw( bsd_glob );
- my @files = bsd_glob("$RT::MasonDataDir/obj/*");
- rmtree([ @files ], 0, 1) if @files;
-}
-
-sub handler {
- ($r) = @_;
-
- local $SIG{__WARN__};
- local $SIG{__DIE__};
-
- if ($r->content_type =~ m/^httpd\b.*\bdirectory/i) {
- use File::Spec::Unix;
- # Our DirectoryIndex is always index.html, regardless of httpd settings
- $r->filename( File::Spec::Unix->catfile( $r->filename, 'index.html' ) );
- }
-# elsif (defined( $r->content_type )) {
- #$r->content_type !~ m!(^text/|\bxml\b)!i or return -1;
-# }
-
- Module::Refresh->refresh if $RT::DevelMode;
-
- RT::Init();
-
- my %session;
- my $status;
- eval { $status = $Handler->handle_request($r) };
- if ($@) {
- $RT::Logger->crit($@);
- }
-
- undef(%session);
-
- RT::Interface::Web::Handler->CleanupRequest();
-
- return $status;
-}
-
-1;
diff --git a/rt/config b/rt/config
deleted file mode 100644
index b9418a66d..000000000
--- a/rt/config
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * This is the project ``config'' file. It controls many aspects of
- * how Aegis interacts with your project.
- *
- * There are several sections of this file, each dealing with a different
- * aspect of the interaction between Aegis and the tools used to manage
- * yout project.
- */
-
-/*
- * -------------------------------------------------------------------------
- *
- * The build tool is delegated.
- */
-
-/*
- * The build_command field of the config file is used to invoke the relevant
- * build command. The following command tells cook where to find the recipes.
- * The ${s Howto.cook} expands to a path into the baseline during development
- * if the file is not in the change. Look in aesub(5) for more information
- * about command substitutions.
- */
-build_command =
- "";
-
-/* cook -book ${s Howto.cook} search_path=$search_path \
-project=$p change=$c version=$v -star -no-log -action -notouch";
-
-/*
- * The recipes in the User Guide will all remove their targets before
- * constructing them, which qualifies them to use the following entry in the
- * config file. The targets MUST be removed first if this field is true,
- * otherwise the baseline would cease to be self-consistent.
- *
- * Fortunately, Cook has a nifty ``set unlink;'' statement which is
- * placed at the top of the cookbook.
- */
-link_integration_directory = true;
-
-
-/*
- * -------------------------------------------------------------------------
- *
- * The history tool is delegated.
- *
- * The fhist program was written by David I. Bell and is admirably
- * suited to providing a history mechanism with out the "cruft" that
- * SCCS and RCS impose. The fhist program also comes with two other
- * utilities, fcomp and fmerge, which use the same minimal difference
- * algorithm.
- *
- * Please note that the [# edit #] feature needs to be avoided, or the
- * -Fored_Update (-fu) flag needs to be used in addition to the
- * -Conditional_Update (-cu) flag, otherwise updates will complain that
- * ``Input file "XXX" contains edit A instead of B for module "YYY"''
- *
- * The history_create_command and the history_put_command are
- * intentionally identical. This minimizes problems when using
- * branches.
- *
- * The ${quote ...} construct is used to quote filesnames whicg contain
- * shell special characters. A minimum of quoting is performed, so if
- * the filenames do not contail shell special characters, no quotes will
- * be used.
- */
-
-/*
- * This command is used to create a new project history. The command is
- * always executed as the project owner. Note he the source is left in
- * the baseline. The following substitutions are available:
- *
- * ${Input}
- * absolute path of the source file
- * ${History}
- * absolute path of the history file
- *
- * The history_create_command and the history_put_command are
- * intentionally identical. This minimizes problems when using
- * branches.
- */
-history_create_command =
- "fhist ${quote ${basename $input}} -cr -cu -i ${quote $input} \
--p ${quote ${dirname $history}} -r";
-
-/*
- * This command is used to get a specific edit back from history. The
- * command may be executed by developers. The following substitutions
- * are available:
- *
- * ${History}
- * absolute path of the history file
- * ${Edit}
- * edit number, as given by history_query_command
- * ${Output}
- * absolute path of the destination file
- *
- * Note that the destination filename will never look anything like the
- * history source filename, so the -p is essential.
- */
-history_get_command =
- "fhist ${quote ${basename $history}} -e ${quote $e} \
--o ${quote $output} -p ${quote ${dirname $history}}";
-
-/*
- * This command is used to add a new "top-most" entry to the history
- * file. This command is always executed as the project owner. Note
- * that the source file is left in the baseline. The following
- * substitutions are available:
- *
- * ${Input}
- * absolute path of source file
- * ${History}
- * absolute path of history file
- *
- * The history_create_command and the history_put_command are
- * intentionally identical. This minimizes problems when using
- * branches.
- */
-history_put_command =
- "fhist ${quote ${basename $input}} -cr -cu -i ${quote $input} \
--p ${quote ${dirname $history}} -r";
-
-/*
- * This command is used to query what the history mechanism calls the
- * "top-most" edit of a history file. The result may be any arbitrary
- * string, it need not be anything like a number, just so long as it
- * uniquely identifies the edit for use by the history_get_command at a
- * later date. The edit number is to be printed on the standard output.
- * This command may be executed by developers. The following
- * substitutions are available:
- *
- * ${History}
- * absolute path of the history file
- */
-history_query_command =
- "fhist ${quote ${basename $history}} -l 0 \
--p ${quote ${dirname $history}} -q";
-
-/*
- * -------------------------------------------------------------------------
- *
- * The difference and merge tools are delegated.
- */
-
-/*
- * Compare two files using fcomp. The -w option produces an output of
- * the entire file, with insertions an deletions marked by "change bars"
- * in the left margin. This is superior to context difference, as it
- * shows the entire file as context. The -s option could be added to
- * compare runs of white space as equal.
- *
- * This command is used by aed(1) to produce a difference listing when
- * file in the development directory was originally copied from the
- * current version in the baseline.
- *
- * All of the command substitutions described in aesub(5) are available.
- * In addition, the following substitutions are also available:
- *
- * ${ORiginal}
- * The absolute path name of a file containing the version
- * originally copied. Usually in the baseline.
- * ${Input}
- * The absolute path name of the edited version of the file.
- * Usually in the development directory.
- * ${Output}
- * The absolute path name of the file in which to write the
- * difference listing. Usually in the development directory.
- *
- * An exit status of 0 means successful, even of the files differ (and
- * they usually do). An exit status which is non-zero means something
- * is wrong.
- *
- * The non-zero exit status may be used to overload this command with
- * extra tests, such as line length limits. The difference files must
- * be produced in addition to these extra tests.
- */
-diff_command =
- "fcomp -w ${quote $original} ${quote $input} -o ${quote $output}";
-
-/*
- * Compare three files using fmerge. Conflicts are marked in the
- * output.
- *
- * This command is used by aed(1) to produce a difference listing when a
- * file in the development directory is out of date compared to the
- * current version in the baseline.
- *
- * All of the command substitutions described in aesub(5) are available.
- * In addition, the following substitutions are also available:
- *
- * ${ORiginal}
- * The absolute path name of a file containing the common ancestor
- * version of ${MostRecent} and {$Input}. Usually the version
- * originally copied into the change. Usually in a temporary file.
- * ${Most_Recent}
- * The absolute path name of a file containing the most recent
- * version. Usually in the baseline.
- * ${Input}
- * The absolute path name of the edited version of the file.
- * Usually in the development directory.
- * ${Output}
- * The absolute path name of the file in which to write the
- * difference listing. Usually in the development directory.
- *
- * An exit status of 0 means successful, even of the files differ (and
- * they usually do). An exit status which is non-zero means something
- * is wrong.
- */
-merge_command =
- "fmerge ${quote $original} ${quote $MostRecent} ${quote $input} \
--o ${quote $output} -c /dev/null";
-
-/*
- * -------------------------------------------------------------------------
- *
- * The new file templates are very handy. They allow all sorts of things
- * to be se automatically. You need to edit them to add your own name,
- * and copyright conditions.
- */
-
-file_template =
-[
- {
- pattern = [ "*" ];
- body = "${read_file ${source etc/template/generic abs}}";
-
- }
-];
-
-/* -------------------------------------------------------------------------
- *
- * The integrate_begin_exceptions are files which are not hard linked
- * from the baseline to the integration directory. In this case, this
- * is done to ensure the version stmp is updated appropriately.
- */
-
-integrate_begin_exceptions = [ ];
-
-
-
-
-/* -------------------------------------------------------------------------
- *
- * The trojan_horse_suspect field is a list of filename patterns which
- * indicate files which *could* host a Trojan horse attack. It makes
- * aedist --receive more cautions. It is NOT a silver bullet: just
- * about ANY file can host a Trojan, one way or the other.
- */
-
-trojan_horse_suspect = [ ];
-
-build_covers_all_architectures = true;
-
-test_command = "make test";
-
-build_time_adjust=dont_adjust;
diff --git a/rt/config.layout b/rt/config.layout.in
index 1550111d5..a08f48948 100644
--- a/rt/config.layout
+++ b/rt/config.layout.in
@@ -59,31 +59,6 @@
customlibdir: ${customdir}/lib
</Layout>
-<Layout FHS>
- prefix: /usr/local
- exec_prefix: ${prefix}
- bindir: ${prefix}/bin
- sbindir: ${prefix}/sbin
- sysconfdir: /etc+
- datadir: ${prefix}/share
-# FIXME: missing support for lib64
- libdir: ${prefix}/lib
- mandir: ${datadir}/man
-# FIXME: no such directory in FHS; shouldn't go to somewhere in "${datadir}/rt/"?
- htmldir: ${datadir}/html
- manualdir: ${datadir}/doc
- localstatedir: /var
- logfiledir: ${localstatedir}/log
-# XXX: "/var/cache/mason/*"?
- masonstatedir: ${localstatedir}/cache/mason_data
- sessionstatedir: ${localstatedir}/cache/session_data
- customdir: ${prefix}/local
- custometcdir: ${customdir}/etc
- customhtmldir: ${customdir}/html
- customlexdir: ${customdir}/po
- customlibdir: ${customdir}/lib
-</Layout>
-
<Layout FreeBSD>
prefix: /usr/local
exec_prefix: ${prefix}
@@ -128,25 +103,25 @@
customlibdir: ${customdir}/lib
</Layout>
-# RH path layout.
-<Layout RH>
- prefix: /usr/
+<Layout Freeside>
+ prefix: /opt/rt3
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
- sysconfdir: /etc/rt
+ sysconfdir: ${prefix}/etc
mandir: ${prefix}/man
- libdir: ${prefix}/lib/rt
- datadir: /var/rt
- htmldir: ${datadir}/html
+ libdir: ${prefix}/lib
+ datadir: ${prefix}/share
+ htmldir: %%%FREESIDE_DOCUMENT_ROOT%%%/rt
manualdir: ${datadir}/doc
- localstatedir: /var/
- logfiledir: ${localstatedir}/log/rt
- masonstatedir: ${localstatedir}/rt/mason_data
- sessionstatedir: ${localstatedir}/rt/session_data
- customdir: ${prefix}/local/rt
+ localstatedir: ${prefix}/var
+ logfiledir: ${localstatedir}/log
+ masonstatedir: %%%MASONDATA%%%
+ sessionstatedir: ${localstatedir}/session_data
+ customdir: ${prefix}/local
custometcdir: ${customdir}/etc
customhtmldir: ${customdir}/html
customlexdir: ${customdir}/po
customlibdir: ${customdir}/lib
</Layout>
+
diff --git a/rt/config.log b/rt/config.log
index 24e15e3cf..ab4b65c54 100644
--- a/rt/config.log
+++ b/rt/config.log
@@ -1,25 +1,25 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by RT configure 3.0.9, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+It was created by RT configure 3.6.4, which was
+generated by GNU Autoconf 2.59. Invocation command line was
- $ ./configure
+ $ ./configure --enable-layout=Freeside --with-db-type=Pg --with-db-dba=freeside --with-db-database=freeside --with-db-rt-user=freeside --with-db-rt-pass= --with-web-user=freeside --with-web-group=freeside --with-rt-group=freeside
## --------- ##
## Platform. ##
## --------- ##
-hostname = pallas
-uname -m = i686
-uname -r = 2.4.18-686
+hostname = rootwood
+uname -m = x86_64
+uname -r = 2.6.21-1-amd64
uname -s = Linux
-uname -v = #1 Sun Apr 14 11:32:47 EST 2002
+uname -v = #1 SMP Sat May 26 17:22:54 CEST 2007
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
-/bin/arch = i686
+/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
@@ -27,41 +27,36 @@ hostinfo = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
-PATH: /usr/X11R6/bin/
-PATH: /opt/rt/bin
-PATH: /usr/athena/bin
+PATH: /usr/local/sbin
PATH: /usr/local/bin
-PATH: /bin
-PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/bin
-PATH: /usr/games
-PATH: $HOME/bin
-PATH: /opt/kerberos/bin
-PATH: /opt/StarOffice-4.0/bin
-PATH: /opt/mysql/bin/
-PATH: .
+PATH: /sbin
+PATH: /bin
## ----------- ##
## Core tests. ##
## ----------- ##
-configure:1218: checking for a BSD-compatible install
-configure:1272: result: /usr/bin/install -c
-configure:1286: checking for perl
-configure:1304: found /usr/bin/perl
-configure:1317: result: /usr/bin/perl
-configure:1639: checking for chosen layout
-configure:1654: result: RT3
-configure:1986: creating ./config.status
+configure:1331: checking for a BSD-compatible install
+configure:1386: result: /usr/bin/install -c
+configure:1401: checking for gawk
+configure:1417: found /usr/bin/gawk
+configure:1427: result: gawk
+configure:1440: checking for perl
+configure:1458: found /usr/bin/perl
+configure:1471: result: /usr/bin/perl
+configure:1795: checking for chosen layout
+configure:1810: result: Freeside
+configure:2272: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
-This file was extended by RT config.status 3.0.9, which was
-generated by GNU Autoconf 2.53. Invocation command line was
+This file was extended by RT config.status 3.6.4, which was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
@@ -69,26 +64,22 @@ generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_COMMANDS =
$ ./config.status
-on pallas
-
-config.status:639: creating sbin/rt-setup-database
-config.status:639: creating sbin/rt-test-dependencies
-config.status:639: creating Makefile
-config.status:639: creating etc/RT_Config.pm
-config.status:639: creating lib/RT.pm
-config.status:639: creating lib/t/00smoke.t
-config.status:639: creating lib/t/01harness.t
-config.status:639: creating lib/t/02regression.t
-config.status:639: creating lib/t/03web.pl
-config.status:639: creating lib/t/04_send_email.pl
-config.status:639: creating bin/mason_handler.fcgi
-config.status:639: creating bin/mason_handler.scgi
-config.status:639: creating bin/mason_handler.svc
-config.status:639: creating bin/rt-commit-handler
-config.status:639: creating bin/rt-crontool
-config.status:639: creating bin/rt-mailgate
-config.status:639: creating bin/rt
-config.status:639: creating bin/webmux.pl
+on rootwood
+
+config.status:760: creating sbin/rt-dump-database
+config.status:760: creating sbin/rt-setup-database
+config.status:760: creating sbin/rt-test-dependencies
+config.status:760: creating bin/mason_handler.fcgi
+config.status:760: creating bin/mason_handler.scgi
+config.status:760: creating bin/standalone_httpd
+config.status:760: creating bin/rt-crontool
+config.status:760: creating bin/rt-mailgate
+config.status:760: creating bin/rt
+config.status:760: creating Makefile
+config.status:760: creating etc/RT_Config.pm
+config.status:760: creating lib/RT.pm
+config.status:760: creating bin/mason_handler.svc
+config.status:760: creating bin/webmux.pl
## ---------------- ##
## Cache variables. ##
@@ -104,15 +95,132 @@ ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_PERL=/usr/bin/perl
ac_cv_path_install='/usr/bin/install -c'
+ac_cv_prog_AWK=gawk
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+APACHECTL='/usr/sbin/apachectl'
+AWK='gawk'
+BIN_OWNER='root'
+CONFIG_FILE_PATH='/opt/rt3/etc'
+DATABASE_ENV_PREF=''
+DB_DATABASE='freeside'
+DB_DBA='freeside'
+DB_HOST='localhost'
+DB_PORT=''
+DB_RT_HOST='localhost'
+DB_RT_PASS=''
+DB_RT_USER='freeside'
+DB_TYPE='Pg'
+DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.6.4\" -DPACKAGE_STRING=\"RT\ 3.6.4\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" '
+DESTDIR='/opt/rt3'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+LIBOBJS=''
+LIBS=''
+LIBS_GROUP='bin'
+LIBS_OWNER='root'
+LOCAL_ETC_PATH='/opt/rt3/local/etc'
+LOCAL_LEXICON_PATH='/opt/rt3/local/po'
+LOCAL_LIB_PATH='/opt/rt3/local/lib'
+LTLIBOBJS=''
+MASON_DATA_PATH='/usr/local/etc/freeside/masondata'
+MASON_HTML_PATH='/var/www/freeside/rt'
+MASON_LOCAL_HTML_PATH='/opt/rt3/local/html'
+MASON_SESSION_PATH='/opt/rt3/var/session_data'
+PACKAGE_BUGREPORT='rt-bugs@bestpractical.com'
+PACKAGE_NAME='RT'
+PACKAGE_STRING='RT 3.6.4'
+PACKAGE_TARNAME='rt'
+PACKAGE_VERSION='3.6.4'
+PATH_SEPARATOR=':'
+PERL='/usr/bin/perl'
+RTGROUP='freeside'
+RT_BIN_PATH='/opt/rt3/bin'
+RT_DEVEL_MODE='0'
+RT_DOC_PATH='/opt/rt3/share/doc'
+RT_ETC_PATH='/opt/rt3/etc'
+RT_LIB_PATH='/opt/rt3/lib'
+RT_LOCAL_PATH='/opt/rt3/local'
+RT_LOG_PATH='/opt/rt3/var/log'
+RT_MAN_PATH='/opt/rt3/man'
+RT_PATH='/opt/rt3'
+RT_SBIN_PATH='/opt/rt3/sbin'
+RT_STANDALONE='0'
+RT_VAR_PATH='/opt/rt3/var'
+RT_VERSION_MAJOR='3'
+RT_VERSION_MINOR='6'
+RT_VERSION_PATCH='4'
+SHELL='/bin/sh'
+SPEEDY_BIN='/usr/local/bin/speedy'
+WEB_GROUP='freeside'
+WEB_USER='freeside'
+bindir='/opt/rt3/bin'
+build_alias=''
+customdir='/opt/rt3/local'
+custometcdir='/opt/rt3/local/etc'
+customhtmldir='/opt/rt3/local/html'
+customlexdir='/opt/rt3/local/po'
+customlibdir='/opt/rt3/local/lib'
+datadir='/opt/rt3/share'
+exec_prefix='/opt/rt3'
+exp_bindir='/opt/rt3/bin'
+exp_customdir='/opt/rt3/local'
+exp_custometcdir='/opt/rt3/local/etc'
+exp_customhtmldir='/opt/rt3/local/html'
+exp_customlexdir='/opt/rt3/local/po'
+exp_customlibdir='/opt/rt3/local/lib'
+exp_datadir='/opt/rt3/share'
+exp_exec_prefix='/opt/rt3'
+exp_htmldir='/var/www/freeside/rt'
+exp_libdir='/opt/rt3/lib'
+exp_localstatedir='/opt/rt3/var'
+exp_logfiledir='/opt/rt3/var/log'
+exp_mandir='/opt/rt3/man'
+exp_manualdir='/opt/rt3/share/doc'
+exp_masonstatedir='/usr/local/etc/freeside/masondata'
+exp_prefix='/opt/rt3'
+exp_sbindir='/opt/rt3/sbin'
+exp_sessionstatedir='/opt/rt3/var/session_data'
+exp_sysconfdir='/opt/rt3/etc'
+host_alias=''
+htmldir='/var/www/freeside/rt'
+includedir='${prefix}/include'
+infodir='${prefix}/info'
+libdir='/opt/rt3/lib'
+libexecdir='${exec_prefix}/libexec'
+localstatedir='/opt/rt3/var'
+logfiledir='/opt/rt3/var/log'
+mandir='/opt/rt3/man'
+manualdir='/opt/rt3/share/doc'
+masonstatedir='/usr/local/etc/freeside/masondata'
+oldincludedir='/usr/include'
+prefix='/opt/rt3'
+program_transform_name='s,x,x,'
+rt_layout_name='Freeside'
+rt_version_major='3'
+rt_version_minor='6'
+rt_version_patch='4'
+sbindir='/opt/rt3/sbin'
+sessionstatedir='/opt/rt3/var/session_data'
+sharedstatedir='${prefix}/com'
+sysconfdir='/opt/rt3/etc'
+target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
+#define PACKAGE_BUGREPORT "rt-bugs@bestpractical.com"
#define PACKAGE_NAME "RT"
+#define PACKAGE_STRING "RT 3.6.4"
#define PACKAGE_TARNAME "rt"
-#define PACKAGE_VERSION "3.0.9"
-#define PACKAGE_STRING "RT 3.0.9"
-#define PACKAGE_BUGREPORT "rt-3.0-bugs@fsck.com"
+#define PACKAGE_VERSION "3.6.4"
configure: exit 0
diff --git a/rt/config.pld b/rt/config.pld
deleted file mode 100644
index 3d0202762..000000000
--- a/rt/config.pld
+++ /dev/null
@@ -1,19 +0,0 @@
-(test "x$prefix" = "xNONE" || test "x$prefix" = "x") && prefix=/opt/rt3
-(test "x$exec_prefix" = "xNONE" || test "x$exec_prefix" = "x") && exec_prefix=${prefix}
-bindir=${exec_prefix}/bin
-sbindir=${exec_prefix}/sbin
-sysconfdir=${prefix}/etc
-mandir=${prefix}/man
-libdir=${prefix}/lib
-datadir=${prefix}/share
-htmldir=${datadir}/html
-(test "x$manualdir" = "xNONE" || test "x$manualdir" = "x") && manualdir=${datadir}/doc
-localstatedir=${prefix}/var
-(test "x$logfiledir" = "xNONE" || test "x$logfiledir" = "x") && logfiledir=${localstatedir}/log
-(test "x$masonstatedir" = "xNONE" || test "x$masonstatedir" = "x") && masonstatedir=${localstatedir}/mason_data
-(test "x$sessionstatedir" = "xNONE" || test "x$sessionstatedir" = "x") && sessionstatedir=${localstatedir}/session_data
-(test "x$customdir" = "xNONE" || test "x$customdir" = "x") && customdir=${prefix}/local
-(test "x$custometcdir" = "xNONE" || test "x$custometcdir" = "x") && custometcdir=${customdir}/etc
-(test "x$customhtmldir" = "xNONE" || test "x$customhtmldir" = "x") && customhtmldir=${customdir}/html
-(test "x$customlexdir" = "xNONE" || test "x$customlexdir" = "x") && customlexdir=${customdir}/po
-(test "x$customlibdir" = "xNONE" || test "x$customlibdir" = "x") && customlibdir=${customdir}/lib
diff --git a/rt/config.status b/rt/config.status
index c5d48d96e..06c562a7d 100755
--- a/rt/config.status
+++ b/rt/config.status
@@ -7,250 +7,78 @@
debug=false
ac_cs_recheck=false
ac_cs_silent=false
-
SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in #(
- *posix*) :
- set -o posix ;; #(
- *) :
- ;;
-esac
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='printf %s\n'
- as_echo_n='printf %s'
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
else
- if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
- as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
- as_echo_n='/usr/ucb/echo -n'
- else
- as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
- as_echo_n_body='eval
- arg=$1;
- case $arg in #(
- *"$as_nl"*)
- expr "X$arg" : "X\\(.*\\)$as_nl";
- arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
- esac;
- expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
- '
- export as_echo_n_body
- as_echo_n='sh -c $as_echo_n_body as_echo'
- fi
- export as_echo_body
- as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
- (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
- PATH_SEPARATOR=';'
- }
+ as_unset=false
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in #((
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
+done
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-as_me=`$as_basename -- "$0" ||
+# Name of the executable.
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -258,123 +86,148 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
- rm -f conf$$.dir/conf$$.file
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
else
- rm -f conf$$.dir
- mkdir conf$$.dir 2>/dev/null
+ as_expr=false
fi
-if (echo >conf$$.file) 2>/dev/null; then
- if ln -s conf$$.file conf$$ 2>/dev/null; then
- as_ln_s='ln -s'
- # ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
- ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
- elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
- else
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
- done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
-
+rm -f conf$$ conf$$.exe conf$$.file
-} # as_fn_mkdir_p
if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
+ as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -383,16 +236,31 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-# Save the log message, to keep $0 and so on meaningful, and to
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by RT $as_me 3.6.10, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by RT $as_me 3.6.4, which was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -400,91 +268,98 @@ generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-# Files that config.status was made for.
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
config_files=" sbin/rt-dump-database sbin/rt-setup-database sbin/rt-test-dependencies bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/rt-crontool bin/rt-mailgate bin/rt Makefile etc/RT_Config.pm lib/RT.pm bin/mason_handler.svc bin/webmux.pl"
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
+\`$as_me' instantiates files from templates according to the
+current configuration.
-Usage: $0 [OPTION]... [TAG]...
+Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- -q, --quiet, --silent
- do not print progress messages
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
Configuration files:
$config_files
-Report bugs to <rt-bugs@bestpractical.com>."
-
+Report bugs to <bug-autoconf@gnu.org>."
ac_cs_version="\
-RT config.status 3.6.10
-configured by ./configure, generated by GNU Autoconf 2.64,
- with options \"'--with-db-type=SQLite' 'PERL=/usr/bin/perl'\"
+RT config.status 3.6.4
+configured by ./configure, generated by GNU Autoconf 2.59,
+ with options \"'--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside'\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='/Users/falcone/work/rt/releases/rt-3.6.10'
-srcdir='.'
-INSTALL='install-sh'
-AWK='gawk'
-test -n "$AWK" || AWK=awk
-# The default lists apply if the user does not specify any file.
+srcdir=.
+INSTALL="/usr/bin/install -c"
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
- ac_option=`expr "X$1" : 'X\([^=]*\)='`
- ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
ac_shift=:
;;
- *)
+ -*)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
- $as_echo "$ac_cs_version"; exit ;;
- --debug | --debu | --deb | --de | --d | -d )
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
- case $ac_optarg in
- *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- as_fn_append CONFIG_FILES " '$ac_optarg'"
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
- --he | --h | --help | --hel | -h )
- $as_echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
- *) as_fn_append ac_config_targets " $1"
- ac_need_defaults=false ;;
+ *) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
@@ -498,48 +373,34 @@ if $ac_cs_silent; then
fi
if $ac_cs_recheck; then
- set X '/bin/sh' './configure' '--with-db-type=SQLite' 'PERL=/usr/bin/perl' $ac_configure_extra_args --no-create --no-recursion
- shift
- $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
- CONFIG_SHELL='/bin/sh'
- export CONFIG_SHELL
- exec "$@"
+ echo "running /bin/sh ./configure " '--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside' $ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec /bin/sh ./configure '--enable-layout=Freeside' '--with-db-type=Pg' '--with-db-dba=freeside' '--with-db-database=freeside' '--with-db-rt-user=freeside' '--with-db-rt-pass=' '--with-web-user=freeside' '--with-web-group=freeside' '--with-rt-group=freeside' $ac_configure_extra_args --no-create --no-recursion
fi
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
- $as_echo "$ac_log"
-} >&5
-
-
-# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case $ac_config_target in
- "sbin/rt-dump-database") CONFIG_FILES="$CONFIG_FILES sbin/rt-dump-database" ;;
- "sbin/rt-setup-database") CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;;
- "sbin/rt-test-dependencies") CONFIG_FILES="$CONFIG_FILES sbin/rt-test-dependencies" ;;
- "bin/mason_handler.fcgi") CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
- "bin/mason_handler.scgi") CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
- "bin/standalone_httpd") CONFIG_FILES="$CONFIG_FILES bin/standalone_httpd" ;;
- "bin/rt-crontool") CONFIG_FILES="$CONFIG_FILES bin/rt-crontool" ;;
- "bin/rt-mailgate") CONFIG_FILES="$CONFIG_FILES bin/rt-mailgate" ;;
- "bin/rt") CONFIG_FILES="$CONFIG_FILES bin/rt" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "etc/RT_Config.pm") CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
- "lib/RT.pm") CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
- "bin/mason_handler.svc") CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
- "bin/webmux.pl") CONFIG_FILES="$CONFIG_FILES bin/webmux.pl" ;;
-
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "sbin/rt-dump-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-dump-database" ;;
+ "sbin/rt-setup-database" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;;
+ "sbin/rt-test-dependencies" ) CONFIG_FILES="$CONFIG_FILES sbin/rt-test-dependencies" ;;
+ "bin/mason_handler.fcgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
+ "bin/mason_handler.scgi" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
+ "bin/standalone_httpd" ) CONFIG_FILES="$CONFIG_FILES bin/standalone_httpd" ;;
+ "bin/rt-crontool" ) CONFIG_FILES="$CONFIG_FILES bin/rt-crontool" ;;
+ "bin/rt-mailgate" ) CONFIG_FILES="$CONFIG_FILES bin/rt-mailgate" ;;
+ "bin/rt" ) CONFIG_FILES="$CONFIG_FILES bin/rt" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "etc/RT_Config.pm" ) CONFIG_FILES="$CONFIG_FILES etc/RT_Config.pm" ;;
+ "lib/RT.pm" ) CONFIG_FILES="$CONFIG_FILES lib/RT.pm" ;;
+ "bin/mason_handler.svc" ) CONFIG_FILES="$CONFIG_FILES bin/mason_handler.svc" ;;
+ "bin/webmux.pl" ) CONFIG_FILES="$CONFIG_FILES bin/webmux.pl" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
esac
done
-
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -549,441 +410,408 @@ if $ac_need_defaults; then
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
+# simply because there is no reason to put it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
- tmp=
- trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
-' 0
- trap 'as_fn_exit 1' 1 2 13 15
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
}
+
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./conf$$-$RANDOM
- (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
-else
- ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
-cat >>"$tmp/subs1.awk" <<\_ACAWK &&
-S["LTLIBOBJS"]=""
-S["LIBOBJS"]=""
-S["RT_LOG_PATH"]="/opt/rt3/var/log"
-S["DESTDIR"]="/opt/rt3"
-S["LOCAL_LIB_PATH"]="/opt/rt3/local/lib"
-S["LOCAL_LEXICON_PATH"]="/opt/rt3/local/po"
-S["MASON_LOCAL_HTML_PATH"]="/opt/rt3/local/html"
-S["LOCAL_ETC_PATH"]="/opt/rt3/local/etc"
-S["MASON_HTML_PATH"]="/opt/rt3/share/html"
-S["MASON_SESSION_PATH"]="/opt/rt3/var/session_data"
-S["MASON_DATA_PATH"]="/opt/rt3/var/mason_data"
-S["RT_MAN_PATH"]="/opt/rt3/man"
-S["RT_VAR_PATH"]="/opt/rt3/var"
-S["RT_SBIN_PATH"]="/opt/rt3/sbin"
-S["RT_BIN_PATH"]="/opt/rt3/bin"
-S["CONFIG_FILE_PATH"]="/opt/rt3/etc"
-S["RT_ETC_PATH"]="/opt/rt3/etc"
-S["RT_LIB_PATH"]="/opt/rt3/lib"
-S["RT_LOCAL_PATH"]="/opt/rt3/local"
-S["RT_DOC_PATH"]="/opt/rt3/share/doc"
-S["RT_PATH"]="/opt/rt3"
-S["RT_VERSION_PATCH"]="10"
-S["RT_VERSION_MINOR"]="6"
-S["RT_VERSION_MAJOR"]="3"
-S["RT_DEVEL_MODE"]="0"
-S["RT_STANDALONE"]="0"
-S["APACHECTL"]="/usr/sbin/apachectl"
-S["RTGROUP"]="www"
-S["WEB_GROUP"]="www"
-S["WEB_USER"]="www"
-S["DB_RT_PASS"]="rt_pass"
-S["DB_RT_USER"]="rt_user"
-S["DB_DATABASE"]="rt3"
-S["DB_DBA"]="root"
-S["DB_RT_HOST"]="localhost"
-S["DB_PORT"]=""
-S["DB_HOST"]="localhost"
-S["DATABASE_ENV_PREF"]=""
-S["DB_TYPE"]="SQLite"
-S["LIBS_GROUP"]="bin"
-S["LIBS_OWNER"]="root"
-S["BIN_OWNER"]="root"
-S["rt_layout_name"]="RT3"
-S["exp_customlibdir"]="/opt/rt3/local/lib"
-S["customlibdir"]="/opt/rt3/local/lib"
-S["exp_customlexdir"]="/opt/rt3/local/po"
-S["customlexdir"]="/opt/rt3/local/po"
-S["exp_customhtmldir"]="/opt/rt3/local/html"
-S["customhtmldir"]="/opt/rt3/local/html"
-S["exp_custometcdir"]="/opt/rt3/local/etc"
-S["custometcdir"]="/opt/rt3/local/etc"
-S["exp_customdir"]="/opt/rt3/local"
-S["customdir"]="/opt/rt3/local"
-S["exp_sessionstatedir"]="/opt/rt3/var/session_data"
-S["sessionstatedir"]="/opt/rt3/var/session_data"
-S["exp_masonstatedir"]="/opt/rt3/var/mason_data"
-S["masonstatedir"]="/opt/rt3/var/mason_data"
-S["exp_logfiledir"]="/opt/rt3/var/log"
-S["logfiledir"]="/opt/rt3/var/log"
-S["exp_localstatedir"]="/opt/rt3/var"
-S["exp_manualdir"]="/opt/rt3/share/doc"
-S["manualdir"]="/opt/rt3/share/doc"
-S["exp_htmldir"]="/opt/rt3/share/html"
-S["exp_datadir"]="/opt/rt3/share"
-S["exp_libdir"]="/opt/rt3/lib"
-S["exp_mandir"]="/opt/rt3/man"
-S["exp_sysconfdir"]="/opt/rt3/etc"
-S["exp_sbindir"]="/opt/rt3/sbin"
-S["exp_bindir"]="/opt/rt3/bin"
-S["exp_exec_prefix"]="/opt/rt3"
-S["exp_prefix"]="/opt/rt3"
-S["SPEEDY_BIN"]="/usr/local/bin/speedy"
-S["PERL"]="/usr/bin/perl"
-S["AWK"]="gawk"
-S["INSTALL_DATA"]="${INSTALL} -m 644"
-S["INSTALL_SCRIPT"]="${INSTALL}"
-S["INSTALL_PROGRAM"]="${INSTALL}"
-S["rt_version_patch"]="10"
-S["rt_version_minor"]="6"
-S["rt_version_major"]="3"
-S["target_alias"]=""
-S["host_alias"]=""
-S["build_alias"]=""
-S["LIBS"]=""
-S["ECHO_T"]=""
-S["ECHO_N"]=""
-S["ECHO_C"]="\\c"
-S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.6.10\\\" -DPACKAGE_STRING=\\\"RT\\ 3.6.10\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpracti"\
-"cal.com\\\" -DPACKAGE_URL=\\\"\\\""
-S["mandir"]="/opt/rt3/man"
-S["localedir"]="${datarootdir}/locale"
-S["libdir"]="/opt/rt3/lib"
-S["psdir"]="${docdir}"
-S["pdfdir"]="${docdir}"
-S["dvidir"]="${docdir}"
-S["htmldir"]="/opt/rt3/share/html"
-S["infodir"]="${datarootdir}/info"
-S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
-S["oldincludedir"]="/usr/include"
-S["includedir"]="${prefix}/include"
-S["localstatedir"]="/opt/rt3/var"
-S["sharedstatedir"]="${prefix}/com"
-S["sysconfdir"]="/opt/rt3/etc"
-S["datadir"]="/opt/rt3/share"
-S["datarootdir"]="${prefix}/share"
-S["libexecdir"]="${exec_prefix}/libexec"
-S["sbindir"]="/opt/rt3/sbin"
-S["bindir"]="/opt/rt3/bin"
-S["program_transform_name"]="s,x,x,"
-S["prefix"]="/opt/rt3"
-S["exec_prefix"]="/opt/rt3"
-S["PACKAGE_URL"]=""
-S["PACKAGE_BUGREPORT"]="rt-bugs@bestpractical.com"
-S["PACKAGE_STRING"]="RT 3.6.10"
-S["PACKAGE_VERSION"]="3.6.10"
-S["PACKAGE_TARNAME"]="rt"
-S["PACKAGE_NAME"]="RT"
-S["PATH_SEPARATOR"]=":"
-S["SHELL"]="/bin/sh"
-_ACAWK
-cat >>"$tmp/subs1.awk" <<_ACAWK &&
- for (key in S) S_is_set[key] = 1
- FS = ""
-
-}
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
{
- line = $ 0
- nfields = split(line, field, "@")
- substed = 0
- len = length(field[1])
- for (i = 2; i < nfields; i++) {
- key = field[i]
- keylen = length(key)
- if (S_is_set[key]) {
- value = S[key]
- line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
- len += length(value) + length(field[++i])
- substed = 1
- } else
- len += 1 + keylen
- }
-
- print line
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
}
-_ACAWK
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
- sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
- cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
-fi # test -n "$CONFIG_FILES"
+#
+# CONFIG_FILES section.
+#
-eval set X " :F $CONFIG_FILES "
-shift
-for ac_tag
-do
- case $ac_tag in
- :[FHLC]) ac_mode=$ac_tag; continue;;
- esac
- case $ac_mode$ac_tag in
- :[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[FH]-) ac_tag=-:-;;
- :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
- esac
- ac_save_IFS=$IFS
- IFS=:
- set x $ac_tag
- IFS=$ac_save_IFS
- shift
- ac_file=$1
- shift
-
- case $ac_mode in
- :L) ac_source=$1;;
- :[FH])
- ac_file_inputs=
- for ac_f
- do
- case $ac_f in
- -) ac_f="$tmp/stdin";;
- *) # Look for the file first in the build tree, then in the source tree
- # (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
- test -f "$ac_f" ||
- case $ac_f in
- [\\/$]*) false;;
- *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
- esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append ac_file_inputs " '$ac_f'"
- done
-
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- configure_input='Generated from '`
- $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
- `' by configure.'
- if test x"$ac_file" != x-; then
- configure_input="$ac_file. $configure_input"
- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
+s,@SHELL@,/bin/sh,;t t
+s,@PATH_SEPARATOR@,:,;t t
+s,@PACKAGE_NAME@,RT,;t t
+s,@PACKAGE_TARNAME@,rt,;t t
+s,@PACKAGE_VERSION@,3.6.4,;t t
+s,@PACKAGE_STRING@,RT 3.6.4,;t t
+s,@PACKAGE_BUGREPORT@,rt-bugs@bestpractical.com,;t t
+s,@exec_prefix@,/opt/rt3,;t t
+s,@prefix@,/opt/rt3,;t t
+s,@program_transform_name@,s,x,x,,;t t
+s,@bindir@,/opt/rt3/bin,;t t
+s,@sbindir@,/opt/rt3/sbin,;t t
+s,@libexecdir@,${exec_prefix}/libexec,;t t
+s,@datadir@,/opt/rt3/share,;t t
+s,@sysconfdir@,/opt/rt3/etc,;t t
+s,@sharedstatedir@,${prefix}/com,;t t
+s,@localstatedir@,/opt/rt3/var,;t t
+s,@libdir@,/opt/rt3/lib,;t t
+s,@includedir@,${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,${prefix}/info,;t t
+s,@mandir@,/opt/rt3/man,;t t
+s,@build_alias@,,;t t
+s,@host_alias@,,;t t
+s,@target_alias@,,;t t
+s,@DEFS@,-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.6.4\" -DPACKAGE_STRING=\"RT\ 3.6.4\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" ,;t t
+s,@ECHO_C@,,;t t
+s,@ECHO_N@,-n,;t t
+s,@ECHO_T@,,;t t
+s,@LIBS@,,;t t
+s,@rt_version_major@,3,;t t
+s,@rt_version_minor@,6,;t t
+s,@rt_version_patch@,4,;t t
+s,@INSTALL_PROGRAM@,${INSTALL},;t t
+s,@INSTALL_SCRIPT@,${INSTALL},;t t
+s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
+s,@AWK@,gawk,;t t
+s,@PERL@,/usr/bin/perl,;t t
+s,@SPEEDY_BIN@,/usr/local/bin/speedy,;t t
+s,@exp_prefix@,/opt/rt3,;t t
+s,@exp_exec_prefix@,/opt/rt3,;t t
+s,@exp_bindir@,/opt/rt3/bin,;t t
+s,@exp_sbindir@,/opt/rt3/sbin,;t t
+s,@exp_sysconfdir@,/opt/rt3/etc,;t t
+s,@exp_mandir@,/opt/rt3/man,;t t
+s,@exp_libdir@,/opt/rt3/lib,;t t
+s,@exp_datadir@,/opt/rt3/share,;t t
+s,@htmldir@,/var/www/freeside/rt,;t t
+s,@exp_htmldir@,/var/www/freeside/rt,;t t
+s,@manualdir@,/opt/rt3/share/doc,;t t
+s,@exp_manualdir@,/opt/rt3/share/doc,;t t
+s,@exp_localstatedir@,/opt/rt3/var,;t t
+s,@logfiledir@,/opt/rt3/var/log,;t t
+s,@exp_logfiledir@,/opt/rt3/var/log,;t t
+s,@masonstatedir@,/usr/local/etc/freeside/masondata,;t t
+s,@exp_masonstatedir@,/usr/local/etc/freeside/masondata,;t t
+s,@sessionstatedir@,/opt/rt3/var/session_data,;t t
+s,@exp_sessionstatedir@,/opt/rt3/var/session_data,;t t
+s,@customdir@,/opt/rt3/local,;t t
+s,@exp_customdir@,/opt/rt3/local,;t t
+s,@custometcdir@,/opt/rt3/local/etc,;t t
+s,@exp_custometcdir@,/opt/rt3/local/etc,;t t
+s,@customhtmldir@,/opt/rt3/local/html,;t t
+s,@exp_customhtmldir@,/opt/rt3/local/html,;t t
+s,@customlexdir@,/opt/rt3/local/po,;t t
+s,@exp_customlexdir@,/opt/rt3/local/po,;t t
+s,@customlibdir@,/opt/rt3/local/lib,;t t
+s,@exp_customlibdir@,/opt/rt3/local/lib,;t t
+s,@rt_layout_name@,Freeside,;t t
+s,@BIN_OWNER@,root,;t t
+s,@LIBS_OWNER@,root,;t t
+s,@LIBS_GROUP@,bin,;t t
+s,@DB_TYPE@,Pg,;t t
+s,@DATABASE_ENV_PREF@,,;t t
+s,@DB_HOST@,localhost,;t t
+s,@DB_PORT@,,;t t
+s,@DB_RT_HOST@,localhost,;t t
+s,@DB_DBA@,freeside,;t t
+s,@DB_DATABASE@,freeside,;t t
+s,@DB_RT_USER@,freeside,;t t
+s,@DB_RT_PASS@,,;t t
+s,@WEB_USER@,freeside,;t t
+s,@WEB_GROUP@,freeside,;t t
+s,@RTGROUP@,freeside,;t t
+s,@APACHECTL@,/usr/sbin/apachectl,;t t
+s,@RT_STANDALONE@,0,;t t
+s,@RT_DEVEL_MODE@,0,;t t
+s,@RT_VERSION_MAJOR@,3,;t t
+s,@RT_VERSION_MINOR@,6,;t t
+s,@RT_VERSION_PATCH@,4,;t t
+s,@RT_PATH@,/opt/rt3,;t t
+s,@RT_DOC_PATH@,/opt/rt3/share/doc,;t t
+s,@RT_LOCAL_PATH@,/opt/rt3/local,;t t
+s,@RT_LIB_PATH@,/opt/rt3/lib,;t t
+s,@RT_ETC_PATH@,/opt/rt3/etc,;t t
+s,@CONFIG_FILE_PATH@,/opt/rt3/etc,;t t
+s,@RT_BIN_PATH@,/opt/rt3/bin,;t t
+s,@RT_SBIN_PATH@,/opt/rt3/sbin,;t t
+s,@RT_VAR_PATH@,/opt/rt3/var,;t t
+s,@RT_MAN_PATH@,/opt/rt3/man,;t t
+s,@MASON_DATA_PATH@,/usr/local/etc/freeside/masondata,;t t
+s,@MASON_SESSION_PATH@,/opt/rt3/var/session_data,;t t
+s,@MASON_HTML_PATH@,/var/www/freeside/rt,;t t
+s,@LOCAL_ETC_PATH@,/opt/rt3/local/etc,;t t
+s,@MASON_LOCAL_HTML_PATH@,/opt/rt3/local/html,;t t
+s,@LOCAL_LEXICON_PATH@,/opt/rt3/local/po,;t t
+s,@LOCAL_LIB_PATH@,/opt/rt3/local/lib,;t t
+s,@DESTDIR@,/opt/rt3,;t t
+s,@RT_LOG_PATH@,/opt/rt3/var/log,;t t
+s,@LIBOBJS@,,;t t
+s,@LTLIBOBJS@,,;t t
+CEOF
+
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
- # Neutralize special characters interpreted by sed in replacement strings.
- case $configure_input in #(
- *\&* | *\|* | *\\* )
- ac_sed_conf_input=`$as_echo "$configure_input" |
- sed 's/[\\\\&|]/\\\\&/g'`;; #(
- *) ac_sed_conf_input=$configure_input;;
- esac
-
- case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
- esac
- ;;
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- ac_dir=`$as_dirname -- "$ac_file" ||
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir="$ac_dir"; as_fn_mkdir_p
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
ac_builddir=.
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
- ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
- # A ".." for each directory in $ac_dir_suffix.
- ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
- case $ac_top_builddir_sub in
- "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
- *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
- esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
case $srcdir in
- .) # We are building in place.
+ .) # No --srcdir option. We are building in place.
ac_srcdir=.
- ac_top_srcdir=$ac_top_builddir_sub
- ac_abs_top_srcdir=$ac_pwd ;;
- [\\/]* | ?:[\\/]* ) # Absolute name.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir
- ac_abs_top_srcdir=$srcdir ;;
- *) # Relative name.
- ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_build_prefix$srcdir
- ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- case $ac_mode in
- :F)
- #
- # CONFIG_FILE
- #
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
- p
- q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
- ac_datarootdir_hack='
- s&@datadir@&/opt/rt3/share&g
- s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
- s&@infodir@&${datarootdir}/info&g
- s&@localedir@&${datarootdir}/locale&g
- s&@mandir@&/opt/rt3/man&g
- s&\${datarootdir}&${prefix}/share&g' ;;
-esac
-ac_sed_extra="/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[ ]*$//
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ sed "/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
}
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
-
- rm -f "$tmp/stdin"
- case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
- esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
- esac
-
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
- case $ac_file$ac_mode in
- "sbin/rt-dump-database":F) chmod ug+x $ac_file
+ # Run the commands associated with the file.
+ case $ac_file in
+ sbin/rt-dump-database ) chmod ug+x $ac_file
;;
- "sbin/rt-setup-database":F) chmod ug+x $ac_file
+ sbin/rt-setup-database ) chmod ug+x $ac_file
;;
- "sbin/rt-test-dependencies":F) chmod ug+x $ac_file
+ sbin/rt-test-dependencies ) chmod ug+x $ac_file
;;
- "bin/mason_handler.fcgi":F) chmod ug+x $ac_file
+ bin/mason_handler.fcgi ) chmod ug+x $ac_file
;;
- "bin/mason_handler.scgi":F) chmod ug+x $ac_file
+ bin/mason_handler.scgi ) chmod ug+x $ac_file
;;
- "bin/standalone_httpd":F) chmod ug+x $ac_file
+ bin/standalone_httpd ) chmod ug+x $ac_file
;;
- "bin/rt-crontool":F) chmod ug+x $ac_file
+ bin/rt-crontool ) chmod ug+x $ac_file
;;
- "bin/rt-mailgate":F) chmod ug+x $ac_file
+ bin/rt-mailgate ) chmod ug+x $ac_file
;;
- "bin/rt":F) chmod ug+x $ac_file
+ bin/rt ) chmod ug+x $ac_file
;;
-
esac
-done # for ac_tag
-
+done
-as_fn_exit 0
+{ (exit 0); exit 0; }
diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm
index 34a424342..7f7eadcca 100644
--- a/rt/etc/RT_Config.pm
+++ b/rt/etc/RT_Config.pm
@@ -69,7 +69,7 @@ Set($Timezone , 'US/Eastern');
# Database driver beeing used. Case matters
# Valid types are "mysql", "Oracle" and "Pg"
-Set($DatabaseType , 'SQLite');
+Set($DatabaseType , 'Pg');
# The domain name of your database server
# If you're running mysql and it's on localhost,
@@ -82,13 +82,13 @@ Set($DatabaseRTHost , 'localhost');
Set($DatabasePort , '');
#The name of the database user (inside the database)
-Set($DatabaseUser , 'rt_user');
+Set($DatabaseUser , 'freeside');
# Password the DatabaseUser should use to access the database
-Set($DatabasePassword , 'rt_pass');
+Set($DatabasePassword , '');
# The name of the RT's database on your database server
-Set($DatabaseName , 'rt3');
+Set($DatabaseName , 'freeside');
# If you're using Postgres and have compiled in SSL support,
# set DatabaseRequireSSL to 1 to turn on SSL communication
@@ -357,16 +357,9 @@ Set($LogoURL , $WebImagesURL . "bplogo.gif");
# WebNoAuthRegex - What portion of RT's URLspace should not require
# authentication.
-Set($WebNoAuthRegex, qr!^(?:/+NoAuth/|
+Set($WebNoAuthRegex, qr!^/rt(?:/+NoAuth/|
/+REST/\d+\.\d+/NoAuth/)!x );
-# SelfServiceRegex - What portion of RT's URLspace should
-# be accessible to Unprivileged users
-# This does not override the redirect from /Ticket/Display.html
-# to /SelfService/Display.html when Unprivileged
-# users attempt to access ticked displays
-Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
-
# For message boxes, set the entry box width and what type of wrapping
# to use.
#
@@ -421,13 +414,6 @@ Set($WebExternalGecos , undef);
Set($WebExternalAuto , undef);
-# If $WebExternalAuto is true, this will be passed to User's
-# Create method. Use it to set defaults, such as creating
-# Unprivileged users with { Privileged => 0 }
-# Must be a hashref of arguments
-
-Set($AutoCreate, undef);
-
# $WebSessionClass is the class you wish to use for managing Sessions.
# It defaults to use your SQL database, but if you are using MySQL 3.x and
# plans to use non-ascii Queue names, uncomment and add this line to
@@ -519,13 +505,6 @@ Set($SuppressInlineTextFiles, undef);
Set($DontSearchFileAttachments, undef);
-# The GD module (which RT uses for graphs) uses a builtin font that doesn't
-# have full Unicode support. You can use a particular TrueType font by setting
-# $ChartFont to the absolute path of that font. Your GD library must have
-# support for TrueType fonts to use this option.
-
-Set($ChartFont, undef);
-
# }}}
@@ -556,11 +535,8 @@ Set($EmailOutputEncoding , 'utf-8');
Set($DateDayBeforeMonth , 1);
-# Should an unspecified day or year in a date refer to a future or a
-# past value? For example, should a date of "Tuesday" default to mean
-# the date for next Tuesday or last Tuesday? Should the date "March 1"
-# default to the date for next March or last March?
-# Set to 0 for the next date or 1 for the last date.
+# Should "Tuesday" default to meaning "Next Tuesday" or "Last Tuesday"?
+# Set to 0 for "Next" or 1 for "Last".
Set($AmbiguousDayInPast , 1);
diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in
index 18d691965..cf089fb8d 100644
--- a/rt/etc/RT_Config.pm.in
+++ b/rt/etc/RT_Config.pm.in
@@ -357,16 +357,9 @@ Set($LogoURL , $WebImagesURL . "bplogo.gif");
# WebNoAuthRegex - What portion of RT's URLspace should not require
# authentication.
-Set($WebNoAuthRegex, qr!^(?:/+NoAuth/|
+Set($WebNoAuthRegex, qr!^/rt(?:/+NoAuth/|
/+REST/\d+\.\d+/NoAuth/)!x );
-# SelfServiceRegex - What portion of RT's URLspace should
-# be accessible to Unprivileged users
-# This does not override the redirect from /Ticket/Display.html
-# to /SelfService/Display.html when Unprivileged
-# users attempt to access ticked displays
-Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
-
# For message boxes, set the entry box width and what type of wrapping
# to use.
#
@@ -421,13 +414,6 @@ Set($WebExternalGecos , undef);
Set($WebExternalAuto , undef);
-# If $WebExternalAuto is true, this will be passed to User's
-# Create method. Use it to set defaults, such as creating
-# Unprivileged users with { Privileged => 0 }
-# Must be a hashref of arguments
-
-Set($AutoCreate, undef);
-
# $WebSessionClass is the class you wish to use for managing Sessions.
# It defaults to use your SQL database, but if you are using MySQL 3.x and
# plans to use non-ascii Queue names, uncomment and add this line to
@@ -556,11 +542,8 @@ Set($EmailOutputEncoding , 'utf-8');
Set($DateDayBeforeMonth , 1);
-# Should an unspecified day or year in a date refer to a future or a
-# past value? For example, should a date of "Tuesday" default to mean
-# the date for next Tuesday or last Tuesday? Should the date "March 1"
-# default to the date for next March or last March?
-# Set to 0 for the next date or 1 for the last date.
+# Should "Tuesday" default to meaning "Next Tuesday" or "Last Tuesday"?
+# Set to 0 for "Next" or 1 for "Last".
Set($AmbiguousDayInPast , 1);
diff --git a/rt/etc/RT_SiteConfig.pm b/rt/etc/RT_SiteConfig.pm
index f5cc2985b..7a6f40735 100644
--- a/rt/etc/RT_SiteConfig.pm
+++ b/rt/etc/RT_SiteConfig.pm
@@ -14,5 +14,41 @@
#
# perl -c /path/to/your/etc/RT_SiteConfig.pm
-Set( $rtname, 'example.com');
+#Set( $rtname, 'example.com');
+
+# These settings should have been inserted by the initial Freeside install.
+# Sometimes you may want to change domain, timezone, or freeside::URL later,
+# everything else should probably stay untouched.
+
+$RT::rtname = '%%%RT_DOMAIN%%%';
+$RT::Organization = '%%%RT_DOMAIN%%%';
+
+$RT::Timezone = '%%%RT_TIMEZONE%%%';
+
+$RT::WebExternalAuth = 1;
+$RT::WebFallbackToInternal = 1; #no
+$RT::WebExternalAuto = 1;
+
+$RT::URI::freeside::IntegrationType = 'Internal';
+$RT::URI::freeside::URL = '%%%FREESIDE_URL%%%';
+
+$RT::URI::freeside::URL =~ m(^(https?://[^/]+)(/.*)$)i;
+$RT::WebBaseURL = $1;
+$RT::WebPath = "$2/rt";
+
+Set($DatabaseHost , '');
+
+# These settings are user-editable.
+
+#old, RT 3.4 style (deprecated, useless):
+#$RT::MyTicketsLength = 10;
+#NEW, RT 3.6 style (uncomment to use):
+#Set($DefaultSummaryRows, 10);
+
+$RT::QuickCreateLong = 0; #set to true to cause quick ticket creation to
+ #redirect to the "long" ticket creation screen
+ #instead of just creating a ticket with the subject.
+
+Set($MessageBoxWidth , 80);
+
1;
diff --git a/rt/etc/acl.Oracle b/rt/etc/acl.Oracle
index ac29215c2..c8667c031 100644
--- a/rt/etc/acl.Oracle
+++ b/rt/etc/acl.Oracle
@@ -1,10 +1,10 @@
sub acl {
return (
-"CREATE USER ${RT::DatabaseUser} identified by ${RT::DatabasePassword} ".
-"default tablespace USERS " .
-"temporary tablespace TEMP " .
-"quota unlimited on USERS" ,
-"grant connect, resource to ${RT::DatabaseUser}"
-);
+"CREATE USER ${RT::DatabaseUser} identified by ${RT::DatabasePassword}".
+"temporary tablespace TEMP" .
+"default tablespace USERS" .
+"quota unlimited on USERS;" ,
+"grant connect, resource to ${RT::DatabaseUser};",
+"exit;");
}
1;
diff --git a/rt/etc/acl.Pg b/rt/etc/acl.Pg
index fb625592d..16ea71b2d 100755
--- a/rt/etc/acl.Pg
+++ b/rt/etc/acl.Pg
@@ -7,42 +7,38 @@ sub acl {
attachments_id_seq
Attachments
- Attributes
- attributes_id_seq
queues_id_seq
- Queues
+ Queues
links_id_seq
- Links
+ Links
principals_id_seq
- Principals
+ Principals
groups_id_seq
- Groups
+ Groups
scripconditions_id_seq
- ScripConditions
+ ScripConditions
transactions_id_seq
- Transactions
+ Transactions
scrips_id_seq
- Scrips
+ Scrips
acl_id_seq
- ACL
+ ACL
groupmembers_id_seq
- GroupMembers
+ GroupMembers
cachedgroupmembers_id_seq
- CachedGroupMembers
+ CachedGroupMembers
users_id_seq
- Users
+ Users
tickets_id_seq
- Tickets
+ Tickets
scripactions_id_seq
- ScripActions
+ ScripActions
templates_id_seq
- Templates
- objectcustomfieldvalues_id_s
- ObjectCustomFieldValues
+ Templates
+ ticketcustomfieldvalues_id_s
+ TicketCustomFieldValues
customfields_id_seq
- CustomFields
- objectcustomfields_id_s
- ObjectCustomFields
+ CustomFields
customfieldvalues_id_seq
CustomFieldValues
sessions
diff --git a/rt/etc/acl.mysql b/rt/etc/acl.mysql
index 724c7f12a..0ecaa3b15 100755
--- a/rt/etc/acl.mysql
+++ b/rt/etc/acl.mysql
@@ -1,9 +1,8 @@
sub acl {
-return () if !$RT::DatabaseUser or $RT::DatabaseUser eq 'root';
return (
"USE mysql;",
"DELETE FROM user WHERE user = '${RT::DatabaseUser}';",
"DELETE FROM db where db = '${RT::DatabaseName}';",
-"GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE ON ${RT::DatabaseName}.* TO '${RT::DatabaseUser}'\@'${RT::DatabaseRTHost}' IDENTIFIED BY '${RT::DatabasePassword}';");
+"GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE ON ${RT::DatabaseName}.* TO ${RT::DatabaseUser}\@${RT::DatabaseRTHost} IDENTIFIED BY '${RT::DatabasePassword}';");
}
1;
diff --git a/rt/etc/schema.Oracle b/rt/etc/schema.Oracle
deleted file mode 100644
index 77efefadb..000000000
--- a/rt/etc/schema.Oracle
+++ /dev/null
@@ -1,398 +0,0 @@
-
-CREATE SEQUENCE ATTACHMENTS_seq;
-CREATE TABLE Attachments (
- id NUMBER(11,0)
- CONSTRAINT Attachments_Key PRIMARY KEY,
- TransactionId NUMBER(11,0) NOT NULL,
- Parent NUMBER(11,0) DEFAULT 0 NOT NULL,
- MessageId VARCHAR2(160),
- Subject VARCHAR2(255),
- Filename VARCHAR2(255),
- ContentType VARCHAR2(80),
- ContentEncoding VARCHAR2(80),
- Content CLOB,
- Headers CLOB,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE
-);
-CREATE INDEX Attachments2 ON Attachments (TransactionId);
-CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId);
-
-
-CREATE SEQUENCE QUEUES_seq;
-CREATE TABLE Queues (
- id NUMBER(11,0)
- CONSTRAINT Queues_Key PRIMARY KEY,
- Name VARCHAR2(200) CONSTRAINT Queues_Name_Unique UNIQUE NOT NULL,
- Description VARCHAR2(255),
- CorrespondAddress VARCHAR2(120),
- CommentAddress VARCHAR2(120),
- InitialPriority NUMBER(11,0) DEFAULT 0 NOT NULL,
- FinalPriority NUMBER(11,0) DEFAULT 0 NOT NULL,
- DefaultDueIn NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE,
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
- CREATE INDEX Queues1 ON Queues (LOWER(Name));
-CREATE INDEX Queues2 ON Queues (Disabled);
-
-
-CREATE SEQUENCE LINKS_seq;
-CREATE TABLE Links (
- id NUMBER(11,0)
- CONSTRAINT Links_Key PRIMARY KEY,
- Base VARCHAR2(240),
- Target VARCHAR2(240),
- Type VARCHAR2(20) NOT NULL,
- LocalTarget NUMBER(11,0) DEFAULT 0 NOT NULL,
- LocalBase NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE
-);
-CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type);
-CREATE INDEX Links2 ON Links (Base, Type);
-CREATE INDEX Links3 ON Links (Target, Type);
-CREATE INDEX Links4 ON Links(Type,LocalBase);
-
-
-CREATE SEQUENCE PRINCIPALS_seq;
-CREATE TABLE Principals (
- id NUMBER(11,0)
- CONSTRAINT Principals_Key PRIMARY KEY,
- PrincipalType VARCHAR2(16),
- ObjectId NUMBER(11,0),
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-CREATE UNIQUE INDEX Principals2 ON Principals (ObjectId);
-
-
-CREATE SEQUENCE GROUPS_seq;
-CREATE TABLE Groups (
- id NUMBER(11,0)
- CONSTRAINT Groups_Key PRIMARY KEY,
- Name VARCHAR2(200),
- Description VARCHAR2(255),
- Domain VARCHAR2(64),
- Type VARCHAR2(64),
- Instance NUMBER(11,0) DEFAULT 0 -- NOT NULL
--- Instance VARCHAR2(64)
-);
-CREATE INDEX Groups1 ON Groups (LOWER(Domain), Instance, LOWER(Type), id);
-CREATE INDEX Groups2 ON Groups (LOWER(Type), Instance, LOWER(Domain));
-
-
-CREATE SEQUENCE SCRIPCONDITIONS_seq;
-CREATE TABLE ScripConditions (
- id NUMBER(11, 0)
- CONSTRAINT ScripConditions_Key PRIMARY KEY,
- Name VARCHAR2(200),
- Description VARCHAR2(255),
- ExecModule VARCHAR2(60),
- Argument VARCHAR2(255),
- ApplicableTransTypes VARCHAR2(60),
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE TRANSACTIONS_seq;
-CREATE TABLE Transactions (
- id NUMBER(11,0)
- CONSTRAINT Transactions_Key PRIMARY KEY,
- ObjectType VARCHAR2(255),
- ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
- TimeTaken NUMBER(11,0) DEFAULT 0 NOT NULL,
- Type VARCHAR2(20),
- Field VARCHAR2(40),
- OldValue VARCHAR2(255),
- NewValue VARCHAR2(255),
- ReferenceType VARCHAR2(255),
- OldReference NUMBER(11,0),
- NewReference NUMBER(11,0),
- Data VARCHAR2(255),
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE
-);
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
-
-
-CREATE SEQUENCE SCRIPS_seq;
-CREATE TABLE Scrips (
- id NUMBER(11,0)
- CONSTRAINT Scrips_Key PRIMARY KEY,
- Description VARCHAR2(255),
- ScripCondition NUMBER(11,0) DEFAULT 0 NOT NULL,
- ScripAction NUMBER(11,0) DEFAULT 0 NOT NULL,
- ConditionRules CLOB,
- ActionRules CLOB,
- CustomIsApplicableCode CLOB,
- CustomPrepareCode CLOB,
- CustomCommitCode CLOB,
- Stage VARCHAR2(32),
- Queue NUMBER(11,0) DEFAULT 0 NOT NULL,
- Template NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE ACL_seq;
-CREATE TABLE ACL (
- id NUMBER(11,0)
- CONSTRAINT ACL_Key PRIMARY KEY,
- PrincipalType VARCHAR2(25) NOT NULL,
- PrincipalId NUMBER(11,0) NOT NULL,
- RightName VARCHAR2(25) NOT NULL,
- ObjectType VARCHAR2(25) NOT NULL,
- ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
- DelegatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- DelegatedFrom NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-CREATE INDEX ACL1 ON ACL(RightName, ObjectType, ObjectId, PrincipalType, PrincipalId);
-
-
-CREATE SEQUENCE GROUPMEMBERS_seq;
-CREATE TABLE GroupMembers (
- id NUMBER(11,0)
- CONSTRAINT GroupMembers_Key PRIMARY KEY,
- GroupId NUMBER(11,0) DEFAULT 0 NOT NULL,
- MemberId NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, MemberId);
-
-
-CREATE SEQUENCE CachedGroupMembers_seq;
-CREATE TABLE CachedGroupMembers (
- id NUMBER(11,0)
- CONSTRAINT CachedGroupMembers_Key PRIMARY KEY,
- GroupId NUMBER(11,0),
- MemberId NUMBER(11,0),
- Via NUMBER(11,0),
- ImmediateParentId NUMBER(11,0),
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-CREATE INDEX DisGrouMem ON CachedGroupMembers (GroupId, MemberId, Disabled);
-CREATE INDEX GrouMem ON CachedGroupMembers (GroupId, MemberId);
-
-
-CREATE SEQUENCE USERS_seq;
-CREATE TABLE Users (
- id NUMBER(11,0)
- CONSTRAINT Users_Key PRIMARY KEY,
- Name VARCHAR2(200) CONSTRAINT Users_Name_Unique
- unique NOT NULL,
- Password VARCHAR2(40),
- Comments CLOB,
- Signature CLOB,
- EmailAddress VARCHAR2(120),
- FreeFormContactInfo CLOB,
- Organization VARCHAR2(200),
- RealName VARCHAR2(120),
- NickName VARCHAR2(16),
- Lang VARCHAR2(16),
- EmailEncoding VARCHAR2(16),
- WebEncoding VARCHAR2(16),
- ExternalContactInfoId VARCHAR2(100),
- ContactInfoSystem VARCHAR2(30),
- ExternalAuthId VARCHAR2(100),
- AuthSystem VARCHAR2(30),
- Gecos VARCHAR2(16),
- HomePhone VARCHAR2(30),
- WorkPhone VARCHAR2(30),
- MobilePhone VARCHAR2(30),
- PagerPhone VARCHAR2(30),
- Address1 VARCHAR2(200),
- Address2 VARCHAR2(200),
- City VARCHAR2(100),
- State VARCHAR2(100),
- Zip VARCHAR2(16),
- Country VARCHAR2(50),
- Timezone VARCHAR2(50),
- PGPKey CLOB,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
--- CREATE UNIQUE INDEX Users1 ON Users (Name);
-
-CREATE INDEX Users2 ON Users( LOWER(Name));
-CREATE INDEX Users4 ON Users (LOWER(EmailAddress));
-
-
-CREATE SEQUENCE TICKETS_seq;
-CREATE TABLE Tickets (
- id NUMBER(11, 0)
- CONSTRAINT Tickets_Key PRIMARY KEY,
- EffectiveId NUMBER(11,0) DEFAULT 0 NOT NULL,
- Queue NUMBER(11,0) DEFAULT 0 NOT NULL,
- Type VARCHAR2(16),
- IssueStatement NUMBER(11,0) DEFAULT 0 NOT NULL,
- Resolution NUMBER(11,0) DEFAULT 0 NOT NULL,
- Owner NUMBER(11,0) DEFAULT 0 NOT NULL,
- Subject VARCHAR2(200) DEFAULT '[no subject]',
- InitialPriority NUMBER(11,0) DEFAULT 0 NOT NULL,
- FinalPriority NUMBER(11,0) DEFAULT 0 NOT NULL,
- Priority NUMBER(11,0) DEFAULT 0 NOT NULL,
- TimeEstimated NUMBER(11,0) DEFAULT 0 NOT NULL,
- TimeWorked NUMBER(11,0) DEFAULT 0 NOT NULL,
- Status VARCHAR2(10),
- TimeLeft NUMBER(11,0) DEFAULT 0 NOT NULL,
- Told DATE,
- Starts DATE,
- Started DATE,
- Due DATE,
- Resolved DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-CREATE INDEX Tickets1 ON Tickets (Queue, Status);
-CREATE INDEX Tickets2 ON Tickets (Owner);
-CREATE INDEX Tickets4 ON Tickets (id, Status);
-CREATE INDEX Tickets5 ON Tickets (id, EffectiveId);
-CREATE INDEX Tickets6 ON Tickets (EffectiveId, Type);
-
-
-CREATE SEQUENCE SCRIPACTIONS_seq;
-CREATE TABLE ScripActions (
- id NUMBER(11,0)
- CONSTRAINT ScripActions_Key PRIMARY KEY,
- Name VARCHAR2(200),
- Description VARCHAR2(255),
- ExecModule VARCHAR2(60),
- Argument VARCHAR2(255),
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE TEMPLATES_seq;
-CREATE TABLE Templates (
- id NUMBER(11,0)
- CONSTRAINT Templates_Key PRIMARY KEY,
- Queue NUMBER(11,0) DEFAULT 0 NOT NULL,
- Name VARCHAR2(200) NOT NULL,
- Description VARCHAR2(255),
- Type VARCHAR2(16),
- Language VARCHAR2(16),
- TranslationOf NUMBER(11,0) DEFAULT 0 NOT NULL,
- Content CLOB,
- LastUpdated DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE
-);
-
-
-CREATE SEQUENCE OBJECTCUSTOMFIELDS_seq;
-CREATE TABLE ObjectCustomFields (
- id NUMBER(11,0)
- CONSTRAINT ObjectCustomFields_Key PRIMARY KEY,
- CustomField NUMBER(11,0) NOT NULL,
- ObjectId NUMBER(11,0) NOT NULL,
- SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE OBJECTCUSTOMFIELDVALUES_seq;
-CREATE TABLE ObjectCustomFieldValues (
- id NUMBER(11,0)
- CONSTRAINT ObjectCustomFieldValues_Key PRIMARY KEY,
- CustomField NUMBER(11,0) NOT NULL,
- ObjectType VARCHAR2(25) NOT NULL,
- ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
- SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL,
- Content VARCHAR2(255),
- LargeContent CLOB,
- ContentType VARCHAR2(80),
- ContentEncoding VARCHAR2(80),
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE,
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-
-CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content);
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
-
-CREATE SEQUENCE CUSTOMFIELDS_seq;
-CREATE TABLE CustomFields (
- id NUMBER(11,0)
- CONSTRAINT CustomFields_Key PRIMARY KEY,
- Name VARCHAR2(200),
- Type VARCHAR2(200),
- MaxValues NUMBER(11,0) DEFAULT 0 NOT NULL,
- Pattern VARCHAR2(255),
- Repeated NUMBER(11,0) DEFAULT 0 NOT NULL,
- Description VARCHAR2(255),
- SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL,
- LookupType VARCHAR2(255),
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE,
- Disabled NUMBER(11,0) DEFAULT 0 NOT NULL
-);
-
-
-CREATE SEQUENCE CUSTOMFIELDVALUES_seq;
-CREATE TABLE CustomFieldValues (
- id NUMBER(11,0)
- CONSTRAINT CustomFieldValues_Key PRIMARY KEY,
- CustomField NUMBER(11,0),
- Name VARCHAR2(200),
- Description VARCHAR2(255),
- SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField);
-
-CREATE SEQUENCE ATTRIBUTES_seq;
-CREATE TABLE Attributes (
- id NUMBER(11,0) PRIMARY KEY,
- Name VARCHAR2(255) NOT NULL,
- Description VARCHAR2(255),
- Content CLOB,
- ContentType VARCHAR(16),
- ObjectType VARCHAR2(25) NOT NULL,
- ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL,
- Creator NUMBER(11,0) DEFAULT 0 NOT NULL,
- Created DATE,
- LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL,
- LastUpdated DATE
-);
-
-CREATE INDEX Attributes1 on Attributes(Name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
-
-
-CREATE TABLE sessions (
- id VARCHAR2(32)
- CONSTRAINT Sessions_Key PRIMARY KEY,
- a_session CLOB,
- LastUpdated DATE
-);
-
diff --git a/rt/etc/schema.mysql b/rt/etc/schema.mysql
index b7d53f884..46f8ec562 100755
--- a/rt/etc/schema.mysql
+++ b/rt/etc/schema.mysql
@@ -16,6 +16,7 @@ CREATE TABLE Attachments (
PRIMARY KEY (id)
) TYPE=InnoDB;
+CREATE INDEX Attachments1 ON Attachments (Parent) ;
CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
# }}}
@@ -58,9 +59,9 @@ CREATE TABLE Links (
PRIMARY KEY (id)
) TYPE=InnoDB;
+CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ;
CREATE INDEX Links2 ON Links (Base, Type) ;
CREATE INDEX Links3 ON Links (Target, Type) ;
-CREATE INDEX Links4 ON Links (Type,LocalBase);
# }}}
@@ -86,12 +87,12 @@ CREATE TABLE Groups (
Description varchar(255) NULL ,
Domain varchar(64),
Type varchar(64),
- Instance integer,
+ Instance varchar(64),
PRIMARY KEY (id)
) TYPE=InnoDB;
CREATE INDEX Groups1 ON Groups (Domain,Instance,Type,id);
-CREATE INDEX Groups2 On Groups (Type, Instance);
+CREATE INDEX Groups2 On Groups (Type, Instance, Domain);
# }}}
@@ -117,23 +118,21 @@ CREATE TABLE ScripConditions (
# {{{ Transactions
CREATE TABLE Transactions (
id INTEGER NOT NULL AUTO_INCREMENT,
- ObjectType varchar(64) NOT NULL,
- ObjectId integer NOT NULL DEFAULT 0 ,
+ EffectiveTicket integer NOT NULL DEFAULT 0 ,
+ Ticket integer NOT NULL DEFAULT 0 ,
TimeTaken integer NOT NULL DEFAULT 0 ,
Type varchar(20) NULL ,
Field varchar(40) NULL ,
OldValue varchar(255) NULL ,
NewValue varchar(255) NULL ,
- ReferenceType varchar(255) NULL,
- OldReference integer NULL ,
- NewReference integer NULL ,
- Data varchar(255) NULL ,
+ Data varchar(100) NULL ,
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
) TYPE=InnoDB;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId);
+CREATE INDEX Transactions1 ON Transactions (Ticket);
+CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
# }}}
@@ -211,6 +210,7 @@ create table CachedGroupMembers (
) TYPE=InnoDB;
CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled);
+CREATE INDEX GrouMem on CachedGroupMembers (GroupId,MemberId);
# }}}
@@ -257,6 +257,8 @@ CREATE TABLE Users (
CREATE UNIQUE INDEX Users1 ON Users (Name) ;
+CREATE INDEX Users2 ON Users (Name);
+CREATE INDEX Users3 ON Users (id, EmailAddress);
CREATE INDEX Users4 ON Users (EmailAddress);
@@ -297,6 +299,9 @@ CREATE TABLE Tickets (
CREATE INDEX Tickets1 ON Tickets (Queue, Status) ;
CREATE INDEX Tickets2 ON Tickets (Owner) ;
+CREATE INDEX Tickets3 ON Tickets (EffectiveId) ;
+CREATE INDEX Tickets4 ON Tickets (id, Status) ;
+CREATE INDEX Tickets5 ON Tickets (id, EffectiveId) ;
CREATE INDEX Tickets6 ON Tickets (EffectiveId, Type) ;
# }}}
@@ -338,31 +343,21 @@ CREATE TABLE Templates (
# }}}
-# {{{ ObjectCustomFieldValues
+# {{{ TicketCustomFieldValues
-CREATE TABLE ObjectCustomFieldValues (
+CREATE TABLE TicketCustomFieldValues (
id INTEGER NOT NULL AUTO_INCREMENT,
+ Ticket int NOT NULL ,
CustomField int NOT NULL ,
- ObjectType varchar(255) NOT NULL, # Final target of the Object
- ObjectId int NOT NULL , # New -- Replaces Ticket
- SortOrder integer NOT NULL DEFAULT 0 , # New -- ordering for multiple values
-
Content varchar(255) NULL ,
- LargeContent LONGTEXT NULL, # New -- to hold 255+ strings
- ContentType varchar(80) NULL, # New -- only text/* gets searched
- ContentEncoding varchar(80) NULL , # New -- for binary Content
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
- Disabled int2 NOT NULL DEFAULT 0 , # New -- whether the value was current
PRIMARY KEY (id)
) TYPE=InnoDB;
-CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content);
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId);
-
# }}}
# {{{ CustomFields
@@ -370,13 +365,10 @@ CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,Ob
CREATE TABLE CustomFields (
id INTEGER NOT NULL AUTO_INCREMENT,
Name varchar(200) NULL ,
- Type varchar(200) NULL , # Changed -- 'Single' and 'Multiple' is moved out
- MaxValues integer, # New -- was 'Single'(1) and 'Multiple'(0)
- Pattern varchar(255) NULL , # New -- Must validate against this
- Repeated int2 NOT NULL DEFAULT 0 , # New -- repeated table entry
+ Type varchar(200) NULL ,
+ Queue integer NOT NULL DEFAULT 0 ,
Description varchar(255) NULL ,
SortOrder integer NOT NULL DEFAULT 0 ,
- LookupType varchar(255) NOT NULL,
Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
@@ -386,22 +378,8 @@ CREATE TABLE CustomFields (
PRIMARY KEY (id)
) TYPE=InnoDB;
-# }}}
-
-# {{{ ObjectCustomFields
+CREATE INDEX CustomFields1 on CustomFields (Disabled, Queue);
-CREATE TABLE ObjectCustomFields (
- id INTEGER NOT NULL AUTO_INCREMENT,
- CustomField int NOT NULL ,
- ObjectId integer NOT NULL,
- SortOrder integer NOT NULL DEFAULT 0 ,
-
- Creator integer NOT NULL DEFAULT 0 ,
- Created DATETIME NULL ,
- LastUpdatedBy integer NOT NULL DEFAULT 0 ,
- LastUpdated DATETIME NULL ,
- PRIMARY KEY (id)
-) TYPE=InnoDB;
# }}}
@@ -421,31 +399,6 @@ CREATE TABLE CustomFieldValues (
PRIMARY KEY (id)
) TYPE=InnoDB;
-CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField);
-
-# }}}
-
-
-# {{{ Attributes
-
-CREATE TABLE Attributes (
- id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(255) NULL ,
- Description varchar(255) NULL ,
- Content text,
- ContentType varchar(16),
- ObjectType varchar(64),
- ObjectId integer, # foreign key to anything
- Creator integer NOT NULL DEFAULT 0 ,
- Created DATETIME NULL ,
- LastUpdatedBy integer NOT NULL DEFAULT 0 ,
- LastUpdated DATETIME NULL ,
- PRIMARY KEY (id)
-) TYPE=InnoDB;
-
-CREATE INDEX Attributes1 on Attributes(Name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId);
-
# }}}
# {{{ Sessions
diff --git a/rt/etc/upgrade/2.1.71 b/rt/etc/upgrade/2.1.71
deleted file mode 100644
index cb89a3ac3..000000000
--- a/rt/etc/upgrade/2.1.71
+++ /dev/null
@@ -1,211 +0,0 @@
-@Queues = ( {
- Name => '___Approvals',
- Description => 'A system-internal queue for the approvals system',
- Disabled => 2,
- }
-);
-
-
-
-
-
-# {{{ Templates
-@Templates = (
- {
- Queue => '___Approvals',
- Name => "New Pending Approval", # loc
- Description => "Notify Owners and AdminCcs of new items pending their approval", # loc
- Content => 'Subject: New Pending Approval: {$Ticket->Subject}
-
-Greetings,
-
-There is a new item pending your approval: "{$Ticket->Subject()}",
-a summary of which appears below.
-
-Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id}
-to approve or reject this ticket, or {$RT::WebURL}Approvals/ to
-batch-process all your pending approvals.
-
--------------------------------------------------------------------------
-{$Transaction->Content()}
-'
- },
-);
-
-# }}}
-
-1;
-
-@ScripActions = (
- { Name => 'Open Tickets',
- Description => 'Open tickets on correspondence',
- ExecModule => 'AutoOpen' },
-
-);
-
- @Scrips = (
- { ScripCondition => 'On Correspond',
- ScripAction => 'Open Tickets',
- Template => 'Blank',
- Queue => '0'
- },
- { ScripCondition => 'On Create',
- ScripAction => 'AutoReply To Requestors',
- Template => 'AutoReply' },
- { ScripCondition => 'On Create',
- ScripAction => 'Notify AdminCcs',
- Template => 'Transaction' },
- { ScripCondition => 'On Correspond',
- ScripAction => 'Notify AdminCcs',
- Template => 'Admin Correspondence' },
- { ScripCondition => 'On Correspond',
- ScripAction => 'Notify Requestors And Ccs',
- Template => 'Correspondence' },
- { ScripCondition => 'On Correspond',
- ScripAction => 'Notify Other Recipients',
- Template => 'Correspondence' },
- { ScripCondition => 'On Comment',
- ScripAction => 'Notify AdminCcs As Comment',
- Template => 'Admin Comment' },
- { ScripCondition => 'On Comment',
- ScripAction => 'Notify Other Recipients As Comment',
- Template => 'Correspondence' },
- { ScripCondition => 'On Resolve',
- ScripAction => 'Notify Requestors',
- Template => 'Resolved' },
-
-
- {
- Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc
- Queue => '___Approvals',
- ScripCondition => 'On Create',
- ScripAction => 'Notify AdminCcs',
- Template => 'New Pending Approval'
- },
- {
- Description => "If an approval is rejected, reject the original and delete pending approvals", # loc
- Queue => '___Approvals',
- ScripCondition => 'On Status Change',
- ScripAction => 'User Defined',
- CustomCommitCode => q[
-# ------------------------------------------------------------------- #
-return(1) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or
- lc($self->TransactionObj->NewValue) eq "deleted" );
-
-my $links = $self->TicketObj->DependedOnBy;
-foreach my $link (@{ $links->ItemsArrayRef }) {
- my $obj = $link->BaseObj;
- if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
- if ($obj->Type eq 'ticket') {
- $obj->Correspond(
- Content => $self->loc("Your request was rejected."),
- );
- $obj->SetStatus(
- Status => 'rejected',
- Force => 1,
- );
- }
- else {
- $obj->SetStatus(
- Status => 'deleted',
- Force => 1,
- );
- }
- }
-}
-
-$links = $self->TicketObj->DependsOn;
-foreach my $link (@{ $links->ItemsArrayRef }) {
- my $obj = $link->TargetObj;
- if ($obj->QueueObj->IsActiveStatus($obj->Status)) {
- $obj->SetStatus(
- Status => 'deleted',
- Force => 1,
- );
- }
-}
-
-return 1;
-# ------------------------------------------------------------------- #
- ],
- CustomPrepareCode => '1',
- Template => 'Admin Comment',
- },
- {
- Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc
- Queue => '___Approvals',
- ScripCondition => 'On Resolve',
- ScripAction => 'User Defined',
- CustomPrepareCode => 'return(1);',
- CustomCommitCode => q[
-# ------------------------------------------------------------------- #
-return(1) unless ($self->TicketObj->Type eq 'approval');
-
-foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
- $obj->Correspond(
- Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc
- $self->TransactionObj->CreatorObj->Name,
- ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc
- $self->TicketObj->Transactions->Last->Content,
- ),
- _reopen => 0,
- );
-}
-
-return 1;
-# ------------------------------------------------------------------- #
- ],
- Template => 'Admin Comment'
- },
- {
- Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc
- Queue => '___Approvals',
- ScripCondition => 'On Resolve',
- ScripAction => 'User Defined',
- CustomPrepareCode => 'return(1);',
- CustomCommitCode => q[
-# ------------------------------------------------------------------- #
-# Find all the tickets that depend on this (that this is approving)
-
-my $Ticket = $self->TicketObj;
-my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' );
-my $links = $Ticket->DependedOnBy;
-
-while (my $link = $links->Next) {
- my $obj = $link->BaseObj;
- next if ($obj->HasUnresolvedDependencies( Type => 'approval' ));
-
- if ($obj->Type eq 'ticket') {
- $obj->Correspond(
- Content => $self->loc("Your request has been approved."),
- _reopen => 0,
- );
- }
- elsif ($obj->Type eq 'code') {
- my $code = $obj->Transactions->First->Content;
- my $rv;
-
- foreach my $TOP (@TOP) {
- local $@;
- $rv++ if eval $code;
- $RT::Logger->error("Cannot eval code: $@") if $@;
- }
-
- if ($rv or !@TOP) {
- $obj->SetStatus( Status => 'resolved', Force => 1,);
- }
- else {
- $obj->SetStatus( Status => 'rejected', Force => 1,);
- }
- }
-}
-
-return 1;
-# ------------------------------------------------------------------- #
- ],
- Template => 'Admin Comment',
- },
-);
-
-# }}}
-
diff --git a/rt/html/Admin/Elements/ModifyQueue b/rt/html/Admin/Elements/ModifyQueue
deleted file mode 100644
index 36f9ce17f..000000000
--- a/rt/html/Admin/Elements/ModifyQueue
+++ /dev/null
@@ -1,78 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/TitleBoxStart, title => loc('Editing Configuration for queue [_1]', $QueueObj->Id) &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
-<TABLE>
-<TR><TD ALIGN=RIGHT>
-<&|/l&>Queue Name</&>:
-</TD>
-<TD><INPUT name="Name" value="<%$QueueObj->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Description</&>:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$QueueObj->Description%>" size=60></TD></TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Correspondence Address</&>:
-</TD><TD>
-<INPUT name="CorrespondAddress" value="<%$QueueObj->CorrespondAddress%>">
-</TD>
-<TD ALIGN=RIGHT>
-
-<&|/l&>Comment Address</&>: </TD><TD>
-<INPUT NAME="CommentAddress" value="<%$QueueObj->CommentAddress%>">
-</TD>
-</TR><TR>
-
-<TD ALIGN=RIGHT>
-<&|/l&>Priority starts at</&>:
-</TD><TD><INPUT NAME="InitialPriority" value="<%$QueueObj->InitialPriority %>">
-</TD>
-<TD ALIGN=RIGHT>
-<&|/l&>Over time, priority moves toward</&>:
-</TD><TD><INPUT NAME="FinalPriority" value="<%$QueueObj->FinalPriority %>">
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-<&|/l&>Requests should be due in</&>:
-</TD><TD>
-<INPUT NAME="DefaultDueIn" VALUE="<%$QueueObj->DefaultDueIn%>"> <&|/l&>days</&>.
-</TD>
-</TR>
-</TABLE>
-<& /Elements/Submit, Label => loc('Save Changes') &>
-</form>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-</%INIT>
-
-<%ARGS>
-
-
-$QueueObj => undef
-</%ARGS>
diff --git a/rt/html/Admin/Elements/ModifyUser b/rt/html/Admin/Elements/ModifyUser
deleted file mode 100644
index 2faefefaa..000000000
--- a/rt/html/Admin/Elements/ModifyUser
+++ /dev/null
@@ -1,99 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/TitleBoxStart, title => loc('Editing Configuration for user [_1]', $UserObj->Name) &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
-
-<&|/l&>Name</&>: <input name="Name" value="<%$UserObj->Name%>">
-<BR>
-<&|/l&>New Password</&>: <input type=password name="Pass1"><BR>
-<&|/l&>Retype Password</&>: <input type=password name="Pass2"><BR>
-
-<&|/l&>Comments</&>: <TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL>
-<%$UserObj->Comments%></TEXTAREA>
-
-<BR>
-<&|/l&>Signature</&>: <TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
-<%$UserObj->Signature%></TEXTAREA>
-<BR>
-<&|/l&>EmailAddress</&>: <input name="EmailAddress" value="<%$UserObj->EmailAddress%>">
-<BR>
-<&|/l&>FreeformContactInfo</&>: <input name="FreeformContactInfo" value="<%$UserObj->FreeformContactInfo%>">
-<BR>
-<&|/l&>Organization</&>: <input name="Organization" value="<%$UserObj->Organization%>">
-<BR>
-<&|/l&>RealName</&>: <input name="RealName" value="<%$UserObj->RealName%>">
-<BR>
-<&|/l&>NickName</&>: <input name="NickName" value="<%$UserObj->NickName%>">
-<BR>
-<&|/l&>Lang</&>: <input name="Lang" value="<%$UserObj->Lang%>">
-<BR>
-<&|/l&>EmailEncoding</&>: <input name="EmailEncoding" value="<%$UserObj->EmailEncoding%>">
-<BR>
-<&|/l&>WebEncoding</&>: <input name="WebEncoding" value="<%$UserObj->WebEncoding%>">
-<BR>
-<&|/l&>ExternalContactInfoId</&>: <input name="ExternalContactInfoId" value="<%$UserObj->ExternalContactInfoId%>">
-<BR>
-<&|/l&>ContactInfoSystem</&>: <input name="ContactInfoSystem" value="<%$UserObj->ContactInfoSystem%>">
-<BR>
-<&|/l&>UnixUsername</&>: <input name="Gecos" value="<%$UserObj->Gecos%>">
-<BR>
-<&|/l&>ExternalAuthId</&>: <input name="ExternalAuthId" value="<%$UserObj->ExternalAuthId%>">
-<BR>
-<&|/l&>AuthSystem</&>: <input name="AuthSystem" value="<%$UserObj->AuthSystem%>">
-<BR>
-<&|/l&>HomePhone</&>: <input name="HomePhone" value="<%$UserObj->HomePhone%>">
-<BR>
-<&|/l&>WorkPhone</&>: <input name="WorkPhone" value="<%$UserObj->WorkPhone%>">
-<BR>
-<&|/l&>MobilePhone</&>: <input name="MobilePhone" value="<%$UserObj->MobilePhone%>">
-<BR>
-<&|/l&>PagerPhone</&>: <input name="PagerPhone" value="<%$UserObj->PagerPhone%>">
-<BR>
-<&|/l&>Address1</&>: <input name="Address1" value="<%$UserObj->Address1%>">
-<BR>
-<&|/l&>Address2</&>: <input name="Address2" value="<%$UserObj->Address2%>">
-<BR>
-<&|/l&>City</&>: <input name="City" value="<%$UserObj->City%>">
-<BR>
-<&|/l&>State</&>: <input name="State" value="<%$UserObj->State%>">
-<BR>
-<&|/l&>Zip</&>: <input name="Zip" value="<%$UserObj->Zip%>">
-<BR>
-<&|/l&>Country</&>: <input name="Country" value="<%$UserObj->Country%>">
-<BR>
-<& /Elements/Submit, Label => loc('Save Changes') &>
-</form>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-</%INIT>
-
-<%ARGS>
-
-
-$UserObj => undef
-</%ARGS>
diff --git a/rt/html/Admin/Global/CustomField.html b/rt/html/Admin/Global/CustomField.html
deleted file mode 100644
index 3871d8998..000000000
--- a/rt/html/Admin/Global/CustomField.html
+++ /dev/null
@@ -1,86 +0,0 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2004 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., 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
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/SystemTabs,
- current_tab => 'Admin/Global/CustomFields.html',
- current_subtab => $current_subtab,
- subtabs => $subtabs,
- Title => $title &>
-
-<& /Admin/Elements/EditCustomField, title => $title, %ARGS &>
-
-<%INIT>
-my ($title, $current_subtab);
-
-my $subtabs = {
- A => { title => loc('Select custom field'),
- path => "Admin/Global/CustomFields.html"
- },
- B => { title => loc('New custom field'),
- path => "Admin/Global/CustomField.html?create=1&Queue=0",
- separator => 1,
- }
- };
-if ( $ARGS{'create'} ) {
- $current_subtab = "Admin/Global/CustomField.html?create=1&Queue=0";
- $title = loc('Create a CustomField which applies to all queues');
-}
-else {
- $current_subtab =
- "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0";
- $title = loc('Modify a CustomField which applies to all queues');
- $subtabs->{"C"} = {
- title => loc( 'Custom Field #[_1]', $CustomField ),
- path => "Admin/Global/CustomField.html?CustomField=" . $CustomField . "&Queue=0"
- };
-}
-</%INIT>
-<%ARGS>
-$CustomField => undef
-</%ARGS>
-<%ATTR>
-AutoFlush => 0
-</%ATTR>
diff --git a/rt/html/Admin/Global/CustomFields.html b/rt/html/Admin/Global/CustomFields.html
deleted file mode 100644
index 593040218..000000000
--- a/rt/html/Admin/Global/CustomFields.html
+++ /dev/null
@@ -1,69 +0,0 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2004 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., 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
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/SystemTabs,
- current_tab => 'Admin/Global/CustomFields.html',
- current_subtab => 'Admin/Global/CustomFields.html',
- subtabs => $subtabs,
- Title => $title &>
-
-<& /Admin/Elements/EditCustomFields, title => $title, %ARGS &>
-
-<%INIT>
-my $subtabs = {
- A => { title => loc('Select custom field'),
- path => "Admin/Global/CustomFields.html"
- },
- B => { title => loc('New custom field'),
- path => "Admin/Global/CustomField.html?create=1&Queue=0",
- separator => 1,
- }
- };
-my $title = loc("Modify Custom Fields which apply to all queues");
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html
index 75a7696a5..be50dca0f 100644
--- a/rt/html/Admin/Users/Modify.html
+++ b/rt/html/Admin/Users/Modify.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -105,6 +105,12 @@
</table>
</&>
<br />
+
+<&| /Widgets/TitleBox, title => loc('Customers') &>
+<& /Elements/EditCustomers, Object => $UserObj, CustomerString=> $CustomerString, ServiceString => $ServiceString &>
+</&>
+<br />
+
<&| /Widgets/TitleBox, title => loc('Access control') &>
<input type="hidden" class="hidden" name="SetEnabled" value="1" />
<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> />
@@ -339,6 +345,8 @@ if ($UserObj->Id && $id ne 'new') {
push (@results,@fieldresults);
push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
+ #deal with freeside customer links
+ push @results, ProcessObjectCustomers( ARGSRef => \%ARGS, Object => $UserObj );
# {{{ Deal with special fields: Privileged, Enabled
if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
@@ -430,4 +438,8 @@ $Country => undef
$Pass1 => undef
$Pass2=> undef
$Create=> undef
+$OnlySearchForCustomers => undef
+$OnlySearchForServices => undef
+$CustomerString => undef
+$ServiceString => undef
</%ARGS>
diff --git a/rt/html/Admin/Users/Prefs.html b/rt/html/Admin/Users/Prefs.html
deleted file mode 100644
index 0bba9fadd..000000000
--- a/rt/html/Admin/Users/Prefs.html
+++ /dev/null
@@ -1,122 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/Header, Title => loc("User view") &>
-
-<& /Elements/ViewUser, User=>$u &>
-
-<h2 class="title"><%loc("User view")%></h2>
-
-%if ($session{CurrentUser} && ($session{CurrentUser}->Id == $id)) {
- <& /Elements/TitleBoxStart, title => loc('Signature') &>
-<form method=post>
-<input type="hidden" name="id" value=<%$id%>>
-<TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $u->Signature %></TEXTAREA><br><br>
-<input type="submit" value="<&|/l&>Update signature</&>">
-</form>
- <& /Elements/TitleBoxEnd &>
- <form method=post>
- <&|/l&>Open tickets (from listing) in another window</&>: <input type="checkbox" name="NewWindowOption" <%exists $session{NewWindowOption} && "CHECKED"%>><br>
- <&|/l&>Open tickets (from listing) in a new window</&>: <input type="checkbox" name="AlwaysNewWindowOption" <%exists $session{AlwaysNewWindowOption} && "CHECKED"%>><br>
- <input type="submit" name="NewWindowSetting" value="<&|/l&>New window setting</&>">
- </form>
-%}
-
- <& /Elements/TitleBoxStart, title => loc('Email') &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="Email" value="<% $u->EmailAddress %>"><input type="submit" value="<&|/l&>Update email</&>">
-</form>
- <& /Elements/TitleBoxEnd &>
- <& /Elements/TitleBoxStart, title => loc('Real Name') &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="RealName" value="<% $u->RealName %>"><input type="submit" value="<&|/l&>Update name</&>">
-</form>
- <& /Elements/TitleBoxEnd &>
-
- <& /Elements/TitleBoxStart, title => loc('User ID') &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="Name" value="<% $u->Name %>"><input type="submit" value="<&|/l&>Update ID</&>">
-</form>
- <& /Elements/TitleBoxEnd &>
-
-%# TODO: alternative email addresses + merging users
-
-<%ARGS>
-$id => $session{CurrentUser} ? $session{CurrentUser}->Id : 0
-$Signature => undef
-$Email => undef
-$RealName => undef
-$Name => undef
-</%ARGS>
-
-<%INIT>
-require RT::User;
-my $u=RT::User->new($session{CurrentUser});
-$u->Load($id) || die loc("Couldn't load that user ([_1])", $id);
-if ($Signature) {
-my ($val, $msg)=$u->SetSignature($Signature);
-$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg);
-}
-
-if ($Email) {
-my ($val, $msg)=$u->SetEmailAddress($Email);
-$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg);
-}
-
-if ($RealName) {
-my ($val, $msg)=$u->SetRealName($RealName);
-$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg);
-}
-
-if ($Name) {
-my ($val, $msg)=$u->SetName($Name);
-$RT::Logger->log(level=>($val ? 'info' : 'error'), message=>$msg);
-}
-
-if ($ARGS{NewWindowSetting}) {
-if ($ARGS{NewWindowOption}) {
-$session{NewWindowOption}=1;
-} else {
-delete $session{NewWindowOption};
-}
-if ($ARGS{AlwaysNewWindowOption}) {
-$session{NewWindowOption}=1;
-$session{AlwaysNewWindowOption}=1;
-} else {
-delete $session{AlwaysNewWindowOption};
-}
-}
-
-</%INIT>
-
-
-
-
-
-
-
-
-
diff --git a/rt/html/Callbacks/ActivityReports/Elements/Tabs/Default b/rt/html/Callbacks/ActivityReports/Elements/Tabs/Default
new file mode 100644
index 000000000..f85d2e010
--- /dev/null
+++ b/rt/html/Callbacks/ActivityReports/Elements/Tabs/Default
@@ -0,0 +1,7 @@
+<%init>
+if ($ARGS{current_toptab} eq "Tools/Offline.html") {
+ $ARGS{tabs}{r} ||= { path => 'Reports/Activity/index.html',
+ title => 'Reports',
+ };
+}
+</%init> \ No newline at end of file
diff --git a/rt/html/Callbacks/ActivityReports/NoAuth/webrt.css/Default b/rt/html/Callbacks/ActivityReports/NoAuth/webrt.css/Default
new file mode 100644
index 000000000..30480f7b6
--- /dev/null
+++ b/rt/html/Callbacks/ActivityReports/NoAuth/webrt.css/Default
@@ -0,0 +1,71 @@
+table.miniplot {
+ width: 100%;
+ border-collapse: collapse;
+}
+table.miniplot td {
+ margin: 0;
+ padding: 0;
+ border-bottom: 1px solid black;
+}
+table.miniplot .graph {
+ margin-left: auto;
+ margin-right: auto;
+ position: relative;
+ width: 60px;
+}
+table.miniplot .graph ul {
+ height: 100px;
+ margin: 0;
+ padding: 0;
+}
+table.miniplot .graph ul li {
+ list-style: none;
+ position: absolute;
+ bottom: 0px;
+ padding: 0 !important;
+ margin: 0 !important;
+ border-bottom: none;
+}
+table.miniplot .graph ul li .data {
+ display: none;
+}
+
+.miniplot .demoblock { margin: 0 10px; padding: 0 30px; }
+
+.miniplot .c1 { border: 2px solid #990000; background: #ff0000; }
+.miniplot .c2 { border: 2px solid #996600; background: #ff9900; }
+.miniplot .c3 { border: 2px solid #009900; background: #00ff00; }
+.miniplot .c4 { border: 2px solid #009999; background: #00ffff; }
+.miniplot .c5 { border: 2px solid #000099; background: #0000ff; }
+.miniplot .c6 { border: 2px solid #990099; background: #ff00ff; }
+graph .c5 { border: 2px solid #000099; background: #0000ff; }
+.graph .c6 { border: 2px solid #990099; background: #ff00ff; }
+
+tr.titlerow th {
+
+ border-bottom: solid black 1px;
+ margin: 0;
+ font-size:80%;
+ text-wrap: none;
+
+}
+
+tr.grandtotal td{
+ border-top: 1px solid black;
+}
+
+tr.grandtotal th{
+ border-top: 1px solid black;
+}
+
+th.label {
+ align: left;
+
+}
+
+table.miniplot th.legend {
+ font-style: normal;
+ font-size: 80%;
+
+}
+
diff --git a/rt/html/Callbacks/ActivityReports/Search/Results.html/SearchActions b/rt/html/Callbacks/ActivityReports/Search/Results.html/SearchActions
new file mode 100644
index 000000000..4775a9af3
--- /dev/null
+++ b/rt/html/Callbacks/ActivityReports/Search/Results.html/SearchActions
@@ -0,0 +1,7 @@
+<a href="<% $RT::WebPath %>/Reports/Activity/index.html?<% $QueryString %>">Generate reports</a>
+<%init>
+use YAML;
+my %args = $m->caller_args(2);
+
+my $QueryString = $m->comp('/Elements/QueryString', query => $args{Query});
+</%init> \ No newline at end of file
diff --git a/rt/html/Callbacks/RT-WebCronTool/Elements/Tabs/Default b/rt/html/Callbacks/RT-WebCronTool/Elements/Tabs/Default
new file mode 100644
index 000000000..db74ced2d
--- /dev/null
+++ b/rt/html/Callbacks/RT-WebCronTool/Elements/Tabs/Default
@@ -0,0 +1,13 @@
+%# The day after tomorrow is the third day of the rest of your life.
+<%INIT>
+if ($session{'CurrentUser'}->UserObj->HasRight(
+ Right => 'SuperUser',
+ Object => $RT::System,
+)) {
+ $toptabs->{'ZZ-RT-WebCronTool'} = { title =>loc("Web CronTool"),
+ path => "Developer/CronTool/index.html" };
+}
+</%init>
+<%args>
+$toptabs =>undef
+</%args>
diff --git a/rt/html/Callbacks/kStatistics/Elements/Tabs/Default b/rt/html/Callbacks/kStatistics/Elements/Tabs/Default
new file mode 100644
index 000000000..d4ca2b95e
--- /dev/null
+++ b/rt/html/Callbacks/kStatistics/Elements/Tabs/Default
@@ -0,0 +1,11 @@
+<%init>
+use RTx::Statistics;
+if (($Statistics::RestrictAccess == 0) || ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab',
+ Object => $RT::System ))) {
+ $toptabs->{'ZZ-RTx-STATS'} = { title => 'RTx-Statistics',
+ path => "RTx/Statistics/index.html" };
+}
+</%init>
+<%args>
+ $toptabs =>undef
+</%args>
diff --git a/rt/html/Developer/CronTool/autohandler b/rt/html/Developer/CronTool/autohandler
new file mode 100644
index 000000000..7daa09e8d
--- /dev/null
+++ b/rt/html/Developer/CronTool/autohandler
@@ -0,0 +1,9 @@
+%# All theoretical chemistry is really physics;
+%# and all theoretical chemists know it.
+%# -- Richard P. Feynman
+<%INIT>
+$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight(
+ Right => 'SuperUser',
+ Object => $RT::System,
+);
+</%INIT>
diff --git a/rt/html/Developer/CronTool/index.html b/rt/html/Developer/CronTool/index.html
new file mode 100644
index 000000000..67c9e5634
--- /dev/null
+++ b/rt/html/Developer/CronTool/index.html
@@ -0,0 +1,116 @@
+% if ($@) {
+<P><FONT Color="red"><% $@ %></FONT></P>
+% }
+% if (!$NoUI) {
+<HR>
+<FORM Action="index.html" Method="POST">
+<TABLE>
+% foreach my $class (qw( Search Condition Action )) {
+<TR><TH>
+<% loc($class) %>
+</TH><TD>
+<SELECT NAME="<% $class %>">
+% require File::Find;
+% my @modules;
+% File::Find::find(sub {
+% push @modules, $1 if /^(?!Generic|UserDefined)(\w+)\.pm$/i;
+% }, grep -d, map "$_/RT/$class", @INC);
+<OPTION <% $ARGS{$class} ? '' : 'SELECTED' %>></OPTION>
+% foreach my $module (sort @modules) {
+% my $fullname = "RT::$class\::$module";
+ <OPTION VALUE="<% $fullname %>" <% ($fullname eq $ARGS{$class}) ? 'SELECTED' : '' %>><% $module %></OPTION>
+% }
+</SELECT>
+</TD><TH>
+<&|/l&>Parameter</&>
+</TH><TD>
+<INPUT NAME="<% $class %>Arg" VALUE="<% $ARGS{$class.'Arg'} %>">
+</TD></TR>
+% }
+<TR>
+<TD COLSPAN="4" ALIGN="Right">
+<LABEL>
+<INPUT TYPE="CheckBox" NAME="Verbose" <% $Verbose ? 'CHECKED' : '' %>><&|/l&>Verbose</&>
+</LABEL>
+<INPUT TYPE="Submit" VALUE="<&|/l&>Run</&>">
+</TD>
+</TABLE>
+</FORM>
+<HR>
+% }
+<%INIT>
+$m->print("<H1>", loc("Web CronTool"), "</H1>");
+if ($Search) {
+ my $load_module = sub {
+ my $modname = $_[0];
+ $modname =~ s{::}{/}g;
+ require "$modname.pm" or die (
+ loc( "Failed to load module [_1]. ([_2])", $_[0], $@ ) . "\n"
+ );
+ };
+ $m->print(loc("Starting..."), "<UL>");
+ eval {
+ $load_module->($Search);
+ $load_module->($Action) if $Action;
+ $load_module->($Condition) if $Condition;
+
+ if ($TemplateId and !$TemplateObj) {
+ $TemplateObj = RT::Template->new($RT::Nobody);
+ $TemplateObj->LoadById($TemplateId);
+ }
+
+ my $tickets = RT::Tickets->new($RT::SystemUser);
+ my $search = $Search->new( TicketsObj => $tickets, Argument => $SearchArg );
+ $search->Prepare;
+ my $tickets_found = $search->TicketsObj;
+
+ #for each ticket we've found
+ while ( my $ticket = $tickets_found->Next ) {
+ $m->print("<LI>" . $ticket->Id . ": ") if $Verbose;
+ $m->print(loc("Checking...")) if $Verbose;
+
+ # perform some more advanced check
+ if ($Condition) {
+ my $ConditionObj = $Condition->new(
+ TicketObj => $ticket,
+ Argument => $ConditionArg
+ );
+
+ # if the condition doesn't apply, get out of here
+ next unless ( $ConditionObj->IsApplicable );
+ $m->print(loc("Condition matches...")) if $Verbose;
+ }
+
+ if ($Action) {
+ #prepare our action
+ my $ActionObj = $Action->new(
+ TicketObj => $ticket,
+ TemplateObj => $TemplateObj,
+ Argument => $ActionArg
+ );
+
+ #if our preparation, move onto the next ticket
+ next unless ( $ActionObj->Prepare );
+ $m->print(loc("Action prepared...")) if $Verbose;
+
+ #commit our action.
+ next unless ( $ActionObj->Commit );
+ $m->print(loc("Action committed.")) if $Verbose;
+ }
+ }
+ };
+ $m->print('</UL>', loc("Finished."));
+}
+</%INIT>
+<%ARGS>
+$Search => undef
+$SearchArg => undef
+$Condition => undef
+$ConditionArg => undef
+$Action => undef
+$ActionArg => undef
+$TemplateId => undef
+$TemplateObj => undef
+$Verbose => 1
+$NoUI => 0
+</%ARGS>
diff --git a/rt/html/Elements/AddCustomers b/rt/html/Elements/AddCustomers
new file mode 100644
index 000000000..aaf8ca8ba
--- /dev/null
+++ b/rt/html/Elements/AddCustomers
@@ -0,0 +1,59 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%# Copyright (c) 2008 Freeside Internet Services, Inc.
+%#
+%# 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.
+<BR>
+<%$msg%><br>
+
+% if (@Customers) {
+
+<br><i>(Check box to link)<i>
+<table>
+% foreach my $customer (@Customers) {
+<tr>
+ <td>
+ <input type="checkbox" name="Object-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
+ <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %>
+ </td>
+</tr>
+% }
+</table>
+
+% }
+
+<%INIT>
+my ($msg);
+
+my $freeside_url = &RT::URI::freeside::FreesideURL();
+
+warn "/Elements/AddCustomers called with CustomerString $CustomerString\n"
+ if $Debug;
+
+my @Customers = ();
+if ( $CustomerString ) {
+ @Customers = &RT::URI::freeside::smart_search( 'search' => $CustomerString );
+}
+
+my @Services = ();
+if ($ServiceString) {
+ @Services = (); #service_search();
+}
+
+warn "/Elements/AddCustomers displaying ". scalar(@Customers). " customers\n"
+ if $Debug;
+
+</%INIT>
+
+<%ARGS>
+$CustomerString => undef
+$ServiceString => undef
+$Debug => 0
+</%ARGS>
diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row
index bb9032149..d8492265e 100644
--- a/rt/html/Elements/CollectionAsTable/Row
+++ b/rt/html/Elements/CollectionAsTable/Row
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/EditCustomers b/rt/html/Elements/EditCustomers
new file mode 100644
index 000000000..68efb5f40
--- /dev/null
+++ b/rt/html/Elements/EditCustomers
@@ -0,0 +1,63 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%# Copyright (c) 2008 Freeside Internet Services, Inc.
+%#
+%# 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.
+<TABLE width=100%>
+ <TR>
+ <TD VALIGN=TOP WIDTH=50%>
+ <h3><&|/l&>Current Customers</&></h3>
+
+<table>
+ <tr>
+ <td><i><&|/l&>(Check box to disassociate)</&></i></td>
+ </tr>
+ <tr>
+ <td class="value">
+% foreach my $link ( @{ $Object->Customers->ItemsArrayRef } ) {
+
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
+%# <& ShowLink, URI => $link->TargetURI &><br>
+ <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A>
+ <BR>
+% }
+ </td>
+ </tr>
+</table>
+
+</TD>
+
+<TD VALIGN=TOP>
+<h3><&|/l&>New Customer Links</&></h3>
+<&|/l&>Find customer</&><BR>
+<input name="CustomerString">
+<input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>">
+<br><i>cust #, name, company or phone</i>
+<BR>
+%#<BR>
+%#<&|/l&>Find service</&><BR>
+%#<input name="ServiceString">
+%#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>">
+%#<br><i>username, username@domain, domain, or IP address</i>
+%#<BR>
+
+<& AddCustomers, Object => $Object,
+ CustomerString => $CustomerString,
+ ServiceString => $ServiceString, &>
+
+</TD>
+</TR>
+</TABLE>
+
+<%ARGS>
+$CustomerString => undef
+$ServiceString => undef
+$Object => undef
+</%ARGS>
diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer
index c3d766258..6604bd211 100644
--- a/rt/html/Elements/Footer
+++ b/rt/html/Elements/Footer
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,25 +47,31 @@
%# END BPS TAGGED BLOCK }}}
%# End of div#body from /Elements/PageLayout
</div>
+</td>
+</tr>
+<tr>
+<td>
<& /Elements/Callback, %ARGS &>
-<div id="footer">
- <p id="time">
- <span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span>
- </p>
- <p id="bpscredits">
- <span>
-<&|/l, '&#187;&#124;&#171;', $RT::VERSION, '2009', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
-</span>
-</p>
-% if (!$Menu) {
- <p id="legal">
-<&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br />
-<&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br />
- </p>
-% }
+%# <div id="footer">
+%# <p id="time">
+%# <span><&|/l&>Time to display</&>: <%Time::HiRes::tv_interval( $m->{'rt_base_time'} )%></span>
+%# </p>
+
+%# <p id="bpscredits">
+%# <span>
+%# <&|/l, '&#187;&#124;&#171;', $RT::VERSION, '2006', '<a href="http://www.bestpractical.com?rt='.$RT::VERSION.'">Best Practical Solutions, LLC</a>', &>[_1] RT [_2] Copyright 1996-[_3] [_4].</&>
+%# </span>
+%# </p>
+%# % if (!$Menu) {
+%# <p id="legal">
+%# <&|/l&>Distributed under version 2 <a href="http://www.gnu.org/copyleft/gpl.html"> of the GNU GPL.</a></&><br />
+%# <&|/l, '<a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a>' &>To inquire about support, training, custom development or licensing, please contact [_1].</&><br />
+%# </p>
+%# % }
+
+%# </div>
-</div>
% if ($Debug >= 2 ) {
% require Data::Dumper;
% my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]);
@@ -74,6 +80,10 @@
</pre>
% }
+</TD>
+</TR>
+</TABLE>
+
</body>
</html>
% $m->abort();
diff --git a/rt/html/Elements/FreesideInvoiceSearch b/rt/html/Elements/FreesideInvoiceSearch
new file mode 100644
index 000000000..3842b2ff9
--- /dev/null
+++ b/rt/html/Elements/FreesideInvoiceSearch
@@ -0,0 +1,20 @@
+% if ( $FS::CurrentUser::CurrentUser->access_right('View invoices') ) {
+
+ <form action="<% $RT::URI::freeside::URL %>/search/cust_bill.html" STYLE="margin:0">
+ <SCRIPT TYPE="text/javascript">
+ function clearhint_search_invoice (what) {
+ if ( what.value == '(inv #)' )
+ what.value = '';
+ }
+ </SCRIPT>
+ <input name="invnum" accesskey="0" VALUE="(inv #)" SIZE="4" onFocus="clearhint_search_invoice(this);" onClick="clearhint_search_invoice(this);" STYLE="text-align:right; margin-bottom:1px; font-family: Arial, Verdana, Helvetica, sans-serif;">
+
+% if ( $FS::CurrentUser::CurrentUser->access_right('List invoices') ) {
+ <A HREF="<% $RT::URI::freeside::URL %>search/report_cust_bill.html" STYLE="color: #ffffff; font-size: 70%; font-weight:normal">Advanced</A>
+% }
+ <BR>
+
+ <input type="submit" value="<&|/l&>Search invoices</&>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
+ </form>
+
+% }
diff --git a/rt/html/Elements/FreesideNewCust b/rt/html/Elements/FreesideNewCust
new file mode 100644
index 000000000..f60e99559
--- /dev/null
+++ b/rt/html/Elements/FreesideNewCust
@@ -0,0 +1,3 @@
+<form action="<% $RT::URI::freeside::URL %>/edit/cust_main.cgi" STYLE="margin:0">
+<INPUT TYPE="submit" VALUE="<&|/l&>New customer</&>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="vertical-align:bottom; font-size:100%">&nbsp;
+</FORM>
diff --git a/rt/html/Elements/FreesideSearch b/rt/html/Elements/FreesideSearch
new file mode 100644
index 000000000..8e609bb4b
--- /dev/null
+++ b/rt/html/Elements/FreesideSearch
@@ -0,0 +1,13 @@
+% if ( $FS::CurrentUser::CurrentUser->access_right('List customers') ) {
+<form action="<% $RT::URI::freeside::URL %>/search/cust_main.cgi" STYLE="margin:0">
+ <SCRIPT TYPE="text/javascript">
+ function clearhint_search_cust (what) {
+ if ( what.value == '(cust #, name, company or phone)' )
+ what.value = '';
+ }
+ </SCRIPT>
+<input name="search_cust" accesskey="0" VALUE="(cust #, name, company or phone)" SIZE="28" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="text-align:right; font-family: Arial, Verdana, Helvetica, sans-serif;"><BR>
+<A HREF="<% $RT::URI::freeside::URL %>/search/report_cust_main.html" STYLE="color: #ffffff; font-size: 70%; font-weight:normal">Advanced</A>
+<input type="submit" value="<&|/l&>Search customers</&>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
+</form>
+% }
diff --git a/rt/html/Elements/FreesideSvcSearch b/rt/html/Elements/FreesideSvcSearch
new file mode 100644
index 000000000..d68122da5
--- /dev/null
+++ b/rt/html/Elements/FreesideSvcSearch
@@ -0,0 +1,13 @@
+% if ( $FS::CurrentUser::CurrentUser->access_right('View customer services') ) {
+<form action="<% $RT::URI::freeside::URL %>/search/cust_svc.html" STYLE="margin:0">
+ <SCRIPT TYPE="text/javascript">
+ function clearhint_search_svc (what) {
+ if ( what.value == '(user, user@domain or domain)' )
+ what.value = '';
+ }
+ </SCRIPT>
+<input name="search_svc" accesskey="0" VALUE="(user, user@domain or domain)" SIZE="26" onFocus="clearhint_search_svc(this);" onClick="clearhint_search_svc(this);" STYLE="text-align:right; font-family: Arial, Verdana, Helvetica, sans-serif;"><BR>
+ <A NOTYET="<% $RT::URI::freeside::URL %>search/svc_Smarter.html" STYLE="color: #000000; font-size: 70%; font-weight:normal">Advanced</A>
+<input type="submit" value="<&|/l&>Search services</&>" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
+</form>
+% }
diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header
index 02450b1e0..a32784e35 100644
--- a/rt/html/Elements/Header
+++ b/rt/html/Elements/Header
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,70 +45,24 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<% include( '/elements/header.html', {
+ 'title' => $Title,
+ 'head' => $head,
+ 'nobr' => 1,
+ 'nocss' => 1,
+ }) |n
+%>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
-
-<title><%$Title%></title>
-
-% if ($Refresh && $Refresh > 0) {
- <meta http-equiv="refresh" content="<%$Refresh%>" />
-% }
-
-<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/<% $RT::WebDefaultStylesheet %>/main-squished.css" type="text/css" media="all" />
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/css/print.css" type="text/css" media="print" />
-
-% if ( $RSSAutoDiscovery ) {
- <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" />
-% }
-
-<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/util.js"></script>
-<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/ahah.js"></script>
-<script type="text/javascript" src="<%$RT::WebPath%>/NoAuth/js/titlebox-state.js"></script>
-<script type="text/javascript"><!--
- onLoadHook("loadTitleBoxStates()");
-% if ( $Focus ) {
- onLoadHook("focusElementById('<% $Focus %>')");
-% }
-% if ( $onload ) {
- onLoadHook("<% $onload |n %>");
-% }
---></script>
-
-<& /Elements/Callback, _CallbackName => 'Head', %ARGS &>
-
-</head>
- <body<% $id && qq[ id="comp-$id"] |n %>>
-
-% if ($ShowBar) {
-<& /Elements/Logo &>
-
-<div id="quickbar">
- <div id="quick-personal">
- <span class="hide"><a href="#skipnav"><&|/l&>Skip Menu</&></a> | </span>
-% if ($session{'CurrentUser'}->Name) {
- <&|/l, "<span>".$session{'CurrentUser'}->Name."</span>" &>Logged in as [_1]</&>
-% if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) {
- | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a>
-% }
-% } else {
- <&|/l&>Not logged in.</&>
-% }
- <& /Elements/Callback, %ARGS &>
-% unless (!$session{'CurrentUser'}->Name
-% or ($RT::WebExternalAuth and !$RT::WebFallbackToInternalAuth)) {
- | <a href="<%$RT::WebPath%>/NoAuth/Logout.html<%$URL ? "?URL=".$URL : ''%>"><&|/l&>Logout</&></a>
-% }
- </div>
-% }
+%# if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => $RT::System )) {
+%# | <a href="<%$RT::WebPath%><%$Prefs%>"><&|/l&>Preferences</&></a>
+%# }
<%INIT>
$r->headers_out->{'Pragma'} = 'no-cache';
$r->headers_out->{'Cache-control'} = 'no-cache';
+require RT::URI::freeside;
+
my $id = $m->request_comp->path;
$id =~ s|^/||g;
$id =~ s|/|-|g;
@@ -116,6 +70,45 @@ $id =~ s|\.html$||g;
$id =~ s|index$||g
if $id ne 'index';
$id =~ s|-$||g;
+
+my $head = '';
+
+if ($Refresh && $Refresh > 0) {
+ $head .= '<meta http-equiv="refresh" content="$Refresh" />';
+}
+
+$head .= <<END;
+<link rel="shortcut icon" href="$RT::WebImagesURL/favicon.png" type="image/png" />
+<link rel="stylesheet" href="$RT::WebPath/NoAuth/css/$RT::WebDefaultStylesheet/main-squished.css" type="text/css" media="all" />
+<link rel="stylesheet" href="$RT::WebPath/NoAuth/css/print.css" type="text/css" media="print" />
+END
+
+if ( $RSSAutoDiscovery ) {
+ $head .= qq(<link rel="alternate" href="$RSSAutoDiscovery" type="application/rss+xml" title="RSS RT Search" />);
+}
+
+$head .= <<END;
+<script type="text/javascript" src="$RT::WebPath/NoAuth/js/util.js"></script>
+<script type="text/javascript" src="$RT::WebPath/NoAuth/js/ahah.js"></script>
+<script type="text/javascript" src="$RT::WebPath/NoAuth/js/titlebox-state.js"></script>
+<script type="text/javascript"><!--
+ onLoadHook("loadTitleBoxStates()");
+END
+
+if ( $Focus ) {
+ $head .= qq{ onLoadHook("focusElementById('$Focus')");\n};
+}
+if ( $onload ) {
+ $head .= qq{ onLoadHook("$onload");\n};
+}
+
+$head .= '--></script>';
+
+$head .= $m->scomp( '/Elements/Callback', _CallbackName => 'Head', %ARGS );
+
+my $etc = '';
+$etc .= qq[ id="comp-$id"] if $id;
+
</%INIT>
<%ARGS>
diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu
index 48fceebc0..b5b2bdad5 100644
--- a/rt/html/Elements/Menu
+++ b/rt/html/Elements/Menu
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout
index 6897ede1a..b9d15e9d3 100644
--- a/rt/html/Elements/PageLayout
+++ b/rt/html/Elements/PageLayout
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,34 +45,116 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
- <div id="topactions">
-% foreach my $action (reverse sort keys %{$topactions}) {
- <span class="topaction">
-% $m->out($topactions->{"$action"}->{'html'});
- </span>
-% }
- </div>
+% #false laziness w/menubar.html... shouldn't these just go in freeside.css?
+<style type="text/css">
+a.fsblackbutton {
+ background-color:#333333;
+ color: #ffffff;
+ border:1px solid;
+ border-top-color:#cccccc;
+ border-left-color:#cccccc;
+ border-right-color:#aaaaaa;
+ border-bottom-color:#aaaaaa;
+ /*font-weight:bold;*/
+ /*padding-left:12px;
+ padding-right:12px;*/
+ padding-left:4px;
+ padding-right:4px;
+ font-size:16px;
+ text-decoration:none;
+ overflow:visible;
+ filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff333333',EndColorStr='#ff666666')
+}
-%# End of div#quickbar from /Elements/Header
-</div>
+a.fsblackbuttonselected,
+a:link:hover.fsblackbutton,
+a:visited:hover.fsblackbutton {
+ background-color:#7e0079;
+ color: #ffffff;
+ border:1px solid;
+ border-top-color:#cccccc;
+ border-left-color:#cccccc;
+ border-right-color:#aaaaaa;
+ border-bottom-color:#aaaaaa;
+ /*font-weight:bold;*/
+ /*padding-left:12px;
+ padding-right:12px;*/
+ padding-left:4px;
+ padding-right:4px;
+ font-size:16px;
+ text-decoration:none;
+ overflow:visible;
+ filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
+}
+
+a.fsdarkbutton {
+ background-color:#555555;
+ color: #ffffff;
+ border:1px solid;
+ border-top-color:#cccccc;
+ border-left-color:#cccccc;
+ border-right-color:#aaaaaa;
+ border-bottom-color:#aaaaaa;
+ /*font-weight:bold;*/
+ /*padding-left:12px;
+ padding-right:12px;*/
+ padding-left:4px;
+ padding-right:4px;
+ font-size:16px;
+ text-decoration:none;
+ overflow:visible;
+ filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff555555',EndColorStr='#ff666666')
+}
+
+a.fsdarkbuttonselected,
+a:link:hover.fsdarkbutton,
+a:visited:hover.fsdarkbutton {
+ background-color:#7e0079;
+ color: #ffffff;
+ border:1px solid;
+ border-top-color:#cccccc;
+ border-left-color:#cccccc;
+ border-right-color:#aaaaaa;
+ border-bottom-color:#aaaaaa;
+ /*font-weight:bold;*/
+ /*padding-left:12px;
+ padding-right:12px;*/
+ padding-left:4px;
+ padding-right:4px;
+ font-size:16px;
+ text-decoration:none;
+ overflow:visible;
+ filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#ff330033',EndColorStr='#ff7e0079')
+}
+</style>
+<% include('/elements/init_calendar.html') |n %>
+<table border=0 cellspacing=0 cellpadding=0 width="100%" height="100%">
+ <TR HEIGHT="100%">
+ <TD valign="top">
-% if ( $show_menu ) {
+% if (0) { ##FREESIDE MENUS INSTEAD## if ( $show_menu ) {
+%# if ( $show_menu ) {
<div id="nav">
<& /Elements/Menu, toptabs => $toptabs, current_toptab => $current_toptab &>
</div>
% }
-<div id="header">
- <h1><%$title%></h1>
+%#already shown <h1><%$title%></h1>
% my $sep = 0;
% my $postsep = 0;
% my $count = 0;
% my $class = { };
%
- <ul id="page-menu"<% (($actions && %$actions) || ($subactions && %$subactions)) && q[ class="actions-present"] | n %>>
- <div><div><div>
+
+ <TABLE BGCOLOR="#000000" BORDER=0 CELLSPACING=0 CELLPADDING=0>
+ <TR>
+
+%# <ul id="page-menu"<% (($actions && %$actions) || ($subactions && %$subactions)) && q[ class="actions-present"] | n %>>
+
% if ($page_tabs) {
+ <TD><IMG SRC="<%$fsurl%>images/gray-black-side.png" WIDTH=13 HEIGHT=25></TD>
+ <TD>
% foreach my $tab (sort keys %{$page_tabs}) {
% next if $tab =~ /^(?:current_toptab|this)$/;
% $count++;
@@ -100,22 +182,24 @@
% $class->{li} = join ' ', @li;
%
%
- <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
-%
-% if ($sep) {
- <li class="separator">&#183;&#183;&#183;</li>
-% }
-% $postsep = $sep;
+
+%# <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && "&#183; "|n%><a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a></li>
+
+% $class->{a} = $path eq $current ? ' class="fsblackbuttonselected"' : ' class="fsblackbutton"';
+ <a href="<%$RT::WebPath%>/<%$page_tabs->{$tab}->{'path'}%>"<%$class->{a}|n%><% $class->{a} =~ 'selected' ? ' name="focus"' : ''|n %>><% $page_tabs->{$tab}->{'title'} %></a>
+
% }
-% } else {
-&nbsp;
+ </TD>
+%# } else {
+%#&nbsp;
% }
- </div></div></div>
- </ul>
% if (($actions && %$actions) || ($subactions && %$subactions)) {
- <ul id="actions-menu">
- <div><div><div>
+ <TD><IMG SRC="<%$fsurl%>images/<% $page_tabs ? 'black-gray' : 'gray-black' %>-side.png" WIDTH=13 HEIGHT=25></TD>
+% if ( $page_tabs ) {
+ <TD BGCOLOR="#333333">&nbsp;&nbsp;</TD>
+% }
+ <TD BGCOLOR="#333333">
% $sep = 0;
% $postsep = 0;
% $count = 0;
@@ -141,24 +225,30 @@
%
% $class->{li} = join ' ', @li;
%
- <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
+
+%# <li<% $class->{li} ? qq[ class="$class->{li}"] : ''|n %>><% $count > 1 && !$postsep && qq[<span class="bullet">&#183; </span>]|n%>
+
+% #$class->{a} = $path eq $current ? ' class="fsblackbuttonselected"' : ' class="fsblackbutton"';
+% $type->{$action}->{class} ||= 'fsdarkbutton';
+
% if ($type->{"$action"}->{'html'}) {
<% $type->{"$action"}->{'html'} | n %>
% } else {
<a href="<%$RT::WebPath%>/<%$type->{$action}->{'path'}%>"<% $type->{$action}->{class} && ' class="'.$type->{$action}->{class}.'"' |n %><% $type->{$action}->{id} && ' id="'.$type->{$action}->{id}.'"' |n %>><%$type->{$action}->{'title'}%></a>
% }
- </li>
-% if ($sep) {
- <li class="separator">&#183;&#183;&#183;</li>
-% }
-% $postsep = $sep;
+
% }
% }
% }
- </div></div></div>
- </ul>
+
+ </TD>
+
% }
-</div>
+
+ <TD><IMG SRC="<%$fsurl%>images/black-gray-side.png" WIDTH=13 HEIGHT=25></TD>
+ </TR>
+</TABLE>
+
<div id="body">
<& /Elements/Callback, _CallbackName => 'BeforeBody', %ARGS &>
diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate
index 5669a4544..75b3a4598 100644
--- a/rt/html/Elements/QuickCreate
+++ b/rt/html/Elements/QuickCreate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -47,11 +47,11 @@
%# END BPS TAGGED BLOCK }}}
<div class="quick-create">
<&| /Widgets/TitleBox, title => loc('Quick ticket creation') &>
-<form method="post" action="<%$RT::WebPath%>/index.html">
+<form method="post" action="<%$RT::WebPath%>/<% $RT::QuickCreateLong ? 'Ticket/Create.html' : 'index.html' %>">
<input type="hidden" class="hidden" name="QuickCreate" value="1" />
<table>
<tr><td>
-<&|/l&>Subject</&>:<br /><input size="15" name="Subject" />
+<&|/l&>Subject</&>:<br /><input size="30" name="Subject" />
</td><td>
<&|/l&>Queue</&>:<br /><& /Elements/SelectNewTicketQueue, Name => 'Queue', ShowNullOption => 0 &>
</td><td>
diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate
index 5767074fb..23df246ce 100644
--- a/rt/html/Elements/SelectDate
+++ b/rt/html/Elements/SelectDate
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,10 +45,21 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+%# in PageLayout instead, once <% include('/elements/init_calendar.html') |n %>
+<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
+<IMG SRC="<%$fsurl%>images/calendar.png" ID="<% $Name %>_date_button" STYLE="cursor: pointer" TITLE="Select date">
<script type="text/javascript"><!--
- onLoadHook('createCalendarLink("<% $Name %>");');
+Calendar.setup({
+ inputField: "<%$Name%>",
+% if ( defined($ShowTime) && $ShowTime ) {
+ ifFormat: "%Y-%m-%d %H:%M",
+ showsTime: true,
+% } else {
+ ifFormat: "%Y-%m-%d",
+% }
+ button: "<%$Name%>_date_button",
+});
--></script>
-<input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Default %>" size="<% $Size %>" />
<%init>
unless ((defined $Default) or
($current <= 0)) {
diff --git a/rt/html/Elements/ShadedBox b/rt/html/Elements/ShadedBox
deleted file mode 100644
index 36b9cae7c..000000000
--- a/rt/html/Elements/ShadedBox
+++ /dev/null
@@ -1,33 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<table>
- <tr>
- <td class="label"><%$title |n %>:</td>
- <td class="value"><%$content |n %></td>
- </tr>
-</table>
-<%ARGS>
-$title => undef
-$content => "&nbsp;"
-</%ARGS>
diff --git a/rt/html/Elements/ShadedInputRow b/rt/html/Elements/ShadedInputRow
deleted file mode 100644
index e9fb69e5f..000000000
--- a/rt/html/Elements/ShadedInputRow
+++ /dev/null
@@ -1,35 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<tr>
- <td class="label"><%$title |n %>:</td>
- <td class="value">
- <input name=<%$name%> value="<%$content|h%>" SIZE=<%$size%>>
- </td>
-</tr>
-<%ARGS>
-$title => undef
-$content => "&nbsp;"
-$name => undef
-$size => undef
-</%ARGS>
diff --git a/rt/html/Elements/ShadedRow b/rt/html/Elements/ShadedRow
deleted file mode 100644
index 8947fcd82..000000000
--- a/rt/html/Elements/ShadedRow
+++ /dev/null
@@ -1,31 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<tr>
- <td class="label"><%$title |n %>:</td>
- <td class="value"><%$content |n %></td>
-</tr>
-<%ARGS>
-$title => undef
-$content => "&nbsp;"
-</%ARGS>
diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch
index 2876a2957..a4fd7e270 100644
--- a/rt/html/Elements/SimpleSearch
+++ b/rt/html/Elements/SimpleSearch
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +45,14 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<form action="<% $RT::WebPath %>/Search/Simple.html">
- <input size="12" name="q" autocomplete="off" accesskey="0" class="field" />
- <input type="submit" class="button" value="<&|/l&>Search</&>" />
+<form action="<% $RT::WebPath %>/Search/Simple.html" STYLE="margin:0">
+<SCRIPT TYPE="text/javascript">
+ function clearhint_search_ticket (what) {
+ if ( what.value == '(ticket # or subject string)' )
+ what.value = '';
+ }
+</SCRIPT>
+<input name="q" autocomplete="off" accesskey="0" class="field" VALUE="(ticket # or subject string)" onFocus="clearhint_search_ticket(this);" onClick="clearhint_search_ticket(this);" STYLE="text-align:right; font-family: Arial, Verdana, Helvetica, sans-serif;"><BR>
+<A HREF="<% $RT::WebPath %>/Search/Build.html" STYLE="color: #ffffff; font-size: 70%; font-weight:normal">Advanced</A>
+<input type="submit" class="fsblackbutton" value="<&|/l&>Search tickets</&>" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%;padding-left:2px;padding-right:2px">
</form>
diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs
index 3b0f3da6d..36ecfa5a6 100644
--- a/rt/html/Elements/Tabs
+++ b/rt/html/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -59,19 +59,18 @@
<a name="skipnav" id="skipnav" accesskey="8"></a>
<%INIT>
my $action;
-my $basetopactions = {
- A => { html => $m->scomp('/Elements/CreateTicket')
- },
- B => { html => $m->scomp('/Elements/SimpleSearch')
- }
- };
-my $basetabs = { A => { title => loc('Homepage'),
+my $basetabs = {
+ ' A'=> { title => 'Billing Main',
+ path => &RT::URI::freeside::FreesideURL(),
+ },
+ A => { #title => loc('Homepage'),
+ title => 'Ticketing Main',
path => '',
},
- Ab => { title => loc('Simple Search'),
+ Ab => { title => loc('Simple Ticket Search'),
path => 'Search/Simple.html'
},
- B => { title => loc('Tickets'),
+ B => { title => loc('Adv. Ticket Search'),
path => 'Search/Build.html'
},
C => { title => loc('Tools'),
@@ -99,9 +98,8 @@ if ($session{'CurrentUser'}->HasRight( Right => 'ModifySelf',
if (!defined $toptabs) {
$toptabs = $basetabs;
}
-if (!defined $topactions) {
- $topactions = $basetopactions;
-}
+
+ require RT::URI::freeside;
# Now let callbacks add their extra tabs
$m->comp('/Elements/Callback',
diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList
index 81e265d93..b36101e73 100644
--- a/rt/html/Elements/TicketList
+++ b/rt/html/Elements/TicketList
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -65,7 +65,8 @@
% while (my $record = $Collection->Next) {
% $i++;
% # Every ten rows, flush the buffer and put something on the page.
-% $m->flush_buffer() unless ($i % 10);
+% # hun, this flushes things out out-of-order for me on "RT at a glance"...?
+% # $m->flush_buffer() unless ($i % 10);
<& /Elements/CollectionAsTable/Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &>
% }
diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart
index da04f8b7d..ba24fd92e 100644
--- a/rt/html/Elements/TitleBoxStart
+++ b/rt/html/Elements/TitleBoxStart
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/html/Elements/ViewUser b/rt/html/Elements/ViewUser
deleted file mode 100644
index 657272496..000000000
--- a/rt/html/Elements/ViewUser
+++ /dev/null
@@ -1,51 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/TitleBoxStart,
- title => "<a class='inverse' href=\"$RT::WebPath/Search/Listing.html?LimitRequestorById=1&IdOfRequestor=".$User->id."\">".loc("Tickets from [_1]", $name)."</a>",
- titleright=> "<a class='inverse' href=\"$RT::WebPath/EditUserComments.html?id=".$User->id."\">".loc("Comments about [_1]", $name)."</a>" &>
-<TABLE WIDTH="100%">
-<tr>
-<td halign=left valign=top>
-%while (my $w=$tickets->Next) {
-<%$w->Id%>: <a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$w->id%>"><%$w->Subject%></a> (<%$w->Status%>)<BR>
-%}
-</td>
-<td align=right valign=top>
- <% ($User->Comments || loc("No comment entered about this user")) %>
-</tr>
-</table>
-<& /Elements/TitleBoxEnd &>
-
-<%ARGS>
-$User=>undef
-</%ARGS>
-
-<%INIT>
-my $name=$User->RealName || $User->EmailAddress;
-
-my $tickets = new RT::Tickets($session{'CurrentUser'});
-$tickets->LimitWatcher(TYPE => 'Requestor', VALUE => $User->EmailAddress);
-
-
-</%INIT>
diff --git a/rt/html/NoAuth/css/3.5-default/freeside.css b/rt/html/NoAuth/css/3.5-default/freeside.css
new file mode 100644
index 000000000..5e7e0a04a
--- /dev/null
+++ b/rt/html/NoAuth/css/3.5-default/freeside.css
@@ -0,0 +1,9 @@
+
+div.titlebox {
+ background: #d4d4d4;
+}
+
+div.titlebox-title {
+ background: #e8e8e8;
+}
+
diff --git a/rt/html/NoAuth/css/3.5-default/main.css b/rt/html/NoAuth/css/3.5-default/main.css
index 3a5fdfb5d..7c4fa5a20 100644
--- a/rt/html/NoAuth/css/3.5-default/main.css
+++ b/rt/html/NoAuth/css/3.5-default/main.css
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -58,4 +58,5 @@
@import "nav.css";
@import "header.css";
@import "footer.css";
+@import "freeside.css";
diff --git a/rt/html/NoAuth/css/3.5-default/misc.css b/rt/html/NoAuth/css/3.5-default/misc.css
index 038e65def..cf7068a87 100755
--- a/rt/html/NoAuth/css/3.5-default/misc.css
+++ b/rt/html/NoAuth/css/3.5-default/misc.css
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,10 +46,12 @@
%#
%# END BPS TAGGED BLOCK }}}
body {
- font-family: Verdana, sans-serif;
+ /* font-family: Verdana, sans-serif; */
+ font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 76%;
margin: 0;
- background-color: white;
+ /* background-color: white; */
+ background-color: #e8e8e8;
}
.hide, .hidden { display: none !important; }
@@ -73,9 +75,11 @@ body {
.evenline { background-color: white; }
.oddline { background-color: #ddd; }
+/*
td {
padding: 0.1em 0.5em 0.1em 0.5em;
}
+*/
.clear { clear: both; }
diff --git a/rt/html/NoAuth/css/3.5-default/titlebox.css b/rt/html/NoAuth/css/3.5-default/titlebox.css
index 3bd4e97cf..1e3f7c48e 100644
--- a/rt/html/NoAuth/css/3.5-default/titlebox.css
+++ b/rt/html/NoAuth/css/3.5-default/titlebox.css
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -51,7 +51,8 @@
.titlebox .titlebox-content {
margin-top: -1px;
- padding: 1em 2em 0.5em 2em;
+ padding: 0.25em .50em 0.125em .50em;
+ /*padding: 1em 2em 0.5em 2em;*/
margin: 0;
/*margin: 1em 2em 0.5em 2em;*/
}
diff --git a/rt/html/NoAuth/css/3.5-default/transactions.css b/rt/html/NoAuth/css/3.5-default/transactions.css
index fdf8ea824..e9decf8ee 100755
--- a/rt/html/NoAuth/css/3.5-default/transactions.css
+++ b/rt/html/NoAuth/css/3.5-default/transactions.css
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -57,6 +57,10 @@
.ticket-transaction.even {
background: #eee;
}
+.ticket-transaction.odd {
+ background: #fff;
+}
+
.ticket-transaction .date {
font-size: 0.9em;
diff --git a/rt/html/NoAuth/images/back_home.gif b/rt/html/NoAuth/images/back_home.gif
deleted file mode 100644
index 40b19c153..000000000
--- a/rt/html/NoAuth/images/back_home.gif
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cb.gif b/rt/html/NoAuth/images/css/cb.gif
index 53bb2aec2..49a4a97b6 100644
--- a/rt/html/NoAuth/images/css/cb.gif
+++ b/rt/html/NoAuth/images/css/cb.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/cbr.gif b/rt/html/NoAuth/images/css/cbr.gif
index 754cee19b..eeb7ff444 100644
--- a/rt/html/NoAuth/images/css/cbr.gif
+++ b/rt/html/NoAuth/images/css/cbr.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ct.gif b/rt/html/NoAuth/images/css/ct.gif
index d16a5c57f..d2ae8d8ae 100644
--- a/rt/html/NoAuth/images/css/ct.gif
+++ b/rt/html/NoAuth/images/css/ct.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/css/ctr.gif b/rt/html/NoAuth/images/css/ctr.gif
index 9754e1567..d17e647c0 100644
--- a/rt/html/NoAuth/images/css/ctr.gif
+++ b/rt/html/NoAuth/images/css/ctr.gif
Binary files differ
diff --git a/rt/html/NoAuth/images/head_requestracker.gif b/rt/html/NoAuth/images/head_requestracker.gif
deleted file mode 100644
index 73315e918..000000000
--- a/rt/html/NoAuth/images/head_requestracker.gif
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/images/rt.jpg b/rt/html/NoAuth/images/rt.jpg
deleted file mode 100644
index a137a932b..000000000
--- a/rt/html/NoAuth/images/rt.jpg
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/images/small-logo.png b/rt/html/NoAuth/images/small-logo.png
new file mode 100644
index 000000000..1e415e6d8
--- /dev/null
+++ b/rt/html/NoAuth/images/small-logo.png
Binary files differ
diff --git a/rt/html/NoAuth/images/space.gif b/rt/html/NoAuth/images/space.gif
deleted file mode 100644
index 1d11fa9ad..000000000
--- a/rt/html/NoAuth/images/space.gif
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/images/spacer.gif b/rt/html/NoAuth/images/spacer.gif
deleted file mode 100644
index 5bfd67a2d..000000000
--- a/rt/html/NoAuth/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/images/squares_blue.gif b/rt/html/NoAuth/images/squares_blue.gif
deleted file mode 100644
index a28da5ce1..000000000
--- a/rt/html/NoAuth/images/squares_blue.gif
+++ /dev/null
Binary files differ
diff --git a/rt/html/NoAuth/printrt.css b/rt/html/NoAuth/printrt.css
deleted file mode 100644
index 72e7e8b7e..000000000
--- a/rt/html/NoAuth/printrt.css
+++ /dev/null
@@ -1,77 +0,0 @@
-%# {{{ BEGIN BPS TAGGED BLOCK
-%#
-%#
-%#
-%# 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
-%#
-%# Special stylesheet for printing tickets
-%# Koos van den Hout koos@cs.uu.nl 2005-11-21
-%#
-
-SPAN.nav { display: none !important; }
-.nav2 { display: none !important; }
-.nav { display: none !important; }
-.topnav { display: none !important; }
-.blue { display: none !important; }
-.darkblue { display: none !important; }
-.blueright { display: none !important; }
-.currentnav { display: none !important; }
-th.titlebox { border-top: none; border-bottom: none; }
-th.titleboxright { display:none !important; border-top: none; border-bottom: none; }
-.titlebox { border-top: none; border-bottom: none; }
-
-div.downloadattachment, div.downloadcontenttype {
- display: none !important;
-}
-
-
-a[href$="Respond"], a[href$="Comment"], a[href*="ShowEmailRecord"] {
- display: none !important;
-}
-
-
-%# Provide a callback for adding/modifying the style sheet.
-%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says:
-%# "latter specified rule wins"
-<& /Elements/Callback &>
-<%flags>
-inherit => undef
-</%flags>
-<%init>
-$r->content_type('text/css');
-$r->headers_out->{'Expires'} = '+30m';
-</%init>
diff --git a/rt/html/NoAuth/webrt.css b/rt/html/NoAuth/webrt.css
deleted file mode 100644
index 7fa2f83f8..000000000
--- a/rt/html/NoAuth/webrt.css
+++ /dev/null
@@ -1,628 +0,0 @@
-%# BEGIN BPS TAGGED BLOCK {{{
-%#
-%# COPYRIGHT:
-%#
-%# This software is Copyright (c) 1996-2005 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., 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 }}}
-SPAN.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-.nav2 { font-size: 10px;
- white-space: nowrap}
-.nav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-.currentnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 13px;
- font-weight: bold;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-.topnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 16px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-
-%# .topnav is the original RT class for the sidebar navigation tabs.
-%# Font-sizing by level depth was originally hard-coded into Elements/Menu.
-%# This modification sets a different class name for each level, allowing
-%# style sheet control over the formats.
-
-a.topnav-0 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 16px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-1 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 14px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-2 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-3 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-4 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-a.topnav-5 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-li.topnav-0-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-1-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-2-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-3-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-4-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-5-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.topnav-0-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-1-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-2-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-3-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-4-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.topnav-5-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
-.currenttopnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 16px;
- font-weight: bold;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-
-%# .currenttopnav is the original RT class for the sidebar navigation tabs.
-%# Font-sizing by level depth was originally hard-coded into Elements/Menu.
-%# This modification sets a different class name for each level, allowing
-%# style sheet control over the formats
-
-a.currenttopnav-0 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 16px;
- font-weight: bold;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-1 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 14px;
- font-weight: bold;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-2 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: normal;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-3 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-4 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-a.currenttopnav-5 { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-li.currenttopnav-0-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-1-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-2-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-3-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-4-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-5-minor {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-li.currenttopnav-0-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-1-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-2-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-3-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-4-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-li.currenttopnav-5-major {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
-.topactions { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-.subnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: normal;
- color: #FFFFFF;
- text-decoration: none;
- white-space: nowrap}
-.currentsubnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- color: #FFFF66;
- text-decoration: none;
- white-space: nowrap}
-.error { background-color: #ff0000;
- background-position: left top;
- vertical-align: top;
- text-align: left;
- }
-.oldblue { background-color: #0066CC;
- background-position: left top;
- vertical-align: top;
- text-align: left;
- }
-.blue { background-color: #4682B4;
- background-position: left top;
- vertical-align: top;
- text-align: left;
- }
-%# Actually the "topactions" section
-.blueright { background-color: #4682B4;
- background-position: left top;
- vertical-align: top;
- text-align: right;
- padding-right: 1em;
- }
-.olddarkblue { background-color: #003399;
- background-position: left top;
- vertical-align: top;
- text-align: left;
- }
-.darkblue { background-color: #000080;
- background-position: left top;
- vertical-align: top;
- text-align: left;
- }
-.darkblueright { background-color: #000080;
- background-position: left top;
- vertical-align: top;
- text-align: right;
- }
-.overdue {
- color: red;
-}
-
-div.messagebody {
- padding: 2em;
-
-}
-
-
-div.downloadattachment {
- font-size: 10px;
- text-align: right;
-
-}
-
-
-td { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- background-position: left top;
- }
-.black { background-color: #000000;
- background-position: left top;
- }
-span.rtname { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 18px;
- font-weight: normal;
- color: #ffffff}
-span.title { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 20px;
- font-weight: bold;
- color: #ffffff}
-.header { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: bold;
- color: #0066CC}
-.subheader { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- font-weight: bold;
- color: #0066CC }
-.value { font-weight: bold; }
-.entry { font-weight: normal; }
-.label { font-weight: normal;
- text-align: right; }
-.labeltop { font-weight: normal;
- text-align: right;
- vertical-align: top }
-.productnav { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- color: #000000;
- text-align: center;
- vertical-align: middle;
- text-decoration: none}
-.rtblue { background-color: #3399FF;
- margin-top: 0.2em;
- background-position: left top;
- vertical-align: top }
-
-
-.currenttab { margin: 0.2em; background: #336699; }
-.othertab { margin: 0.2em; background: #efefef; }
-.oddline { background-color : #ccccee; }
-
-UL.topnav LI :focus { text-decoration: underline; }
-
-TD.mainbody {
- padding-top: 0.5em;
- padding-left: 1em;
- padding-right: 1em;
- margin-left: 1em;
- margin-right: 1em;
-}
-
-td.boxcontainer + td.boxcontainer {
- margin-left: 1em;
- padding-left: 1em;
- border-collapse: collapse;
-}
-
-th.ticketheader { font-size: 80%;
- font-weight: bold;
- color: #336699;
- background: #cccccc;
-}
-
-th.titlebox {
- text-align: left;
- padding-left: 0.5em;
- padding-right: 0.5em;
- margin-left: 0.5em;
- margin-right: 0.5em;
- border-top: solid black 1px;
- border-bottom: solid black 1px;
-}
-th.titleboxright {
- text-align: right;
- padding-left: 0.5em;
- padding-right: 0.5em;
- margin-left: 0.5em;
- margin-right: 0.5em;
- border-top: solid black 1px;
- border-bottom: solid black 1px;
-}
-
-TD.titlebox {
- padding-left: 1em;
- padding-right: 1em;
- padding-top: 1em;
- padding-bottom: 1em;
-}
-
-SPAN.message {
- font-size: 100%;
- font-family: Verdana, Arial, Helvetica, sans-serif;
-}
-
-
-BODY {
- color: #000;
- background: #FFFFFF;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- margin-top: 0px;
- margin-bottom: 0px;
- margin-left: 0px;
- margin-right: 0px;
- border-top: 0px;
- border-bottom: 0px;
- border-left: 0px;
- border-right: 0px;
-}
-
-
-TR.oddline {
- background-color : #ffffff;
-}
-
-TR.evenline {
- background-color : #ccccee;
-}
-
-H1, H2, H3 {
- margin-top: 0.2em;
- color: #336699;
- font-family: Verdana, Arial, Helvetica, sans-serif;
-
- clear: both;
-}
-
-
-DIV.endmatter { margin-left: -7% }
-.bpscredits {margin-top: 1em;
- text-align: right;
- color: #666666;
- }
-
-
-A { font-weight: bold; color: #000000;
- }
-
-.currenttab { color: #ffffff;}
-.othertab { color: #336699; }
-
-.inverse { color: #ffffff; }
-
-
-
-A:link IMG, A:visited IMG { border-style: none }
-a:focus {text-decoration: underline }
-A IMG { color: white } /* The only way to hide the border in NS 4.x */
-
-a:link { text-decoration: none}
-a:visited { text-decoration: none}
-a:hover { text-decoration: underline}
-/* a:focus { background-color: #ccccee } */
-
-.hide {
- display: none;
- color: white;
-}
-
-SPAN.date { font-size: 0.8em }
-
-span.title { font-size: 1.6em;
- vertical-align: middle;
- color: #ffffff;}
-span.productname { font-size: 2em;
- color: #0066cc;}
-SPAN.titleboxtitle, SPAN.titleboxclose {
- font-size: 80%;
- color: #ffffff;
- vertical-align: middle;
- text-align: left;
- }
-SPAN.titleboxtitle a {
- color: #ffffff;
-}
-SPAN.titleboxtitle a:after {
- content: "...";
-}
-
-SPAN.titleboxright {
- font-size: 0.8em;
- color: #ffffff;
- vertical-align: middle;
- text-align: right;
- }
-
-SPAN.attribution {
- font-weight: bold;
-}
-
-SPAN.label { font-size: 0.8em;
-}
-
-DIV.page-stats { font-size: 0.8em;
- color: #cccccc;
- text-align: right;
- }
-
-
-BLOCKQUOTE {
- font-style: italic;
-}
-
-.emphasized {
- font-weight: bold
-}
-
-
-.oddline {
- background-color : #ccccee;
-}
-
-ul.topnav {
- list-style: none;
- margin-left: 0;
- margin-right: 0.25em;
- padding-left: 0.25em;
- padding-bottom: 0;
- padding-top:0;
- margin-top: 0;
- margin-bottom:0;
-}
-
-.menu-major-separator {
- border-bottom: solid white 1px;
- padding-top: .25em;
- padding-bottom: .5em;
-}
-
-.menu-minor-separator {
- border-top: solid #999999 1px;
- padding-top: .1em;
- margin-top: .5em;
-}
-
-TH.collection-as-table { text-align: center;
- font-size: 0.8em;
- padding-left: .5em;
- padding-right: .5em;
- color: #333333;
- background-color: #cccccc;
- white-space: nowrap;
- }
-
-TD.collection-as-table { text-align: left;
- padding-left: .5em;
- padding-right: .5em;
- }
-
-textarea.signature {
- width: 100%;
-}
-textarea.comments {
- width: 100%;
-}
-
-textarea.messagebox {
- width: 100%;
-}
-
-%# Provide a callback for adding/modifying the style sheet.
-%# http://www.w3.org/TR/REC-CSS1 - section 3.2, says:
-%# "latter specified rule wins"
-<& /Elements/Callback &>
-<%flags>
-inherit => undef
-</%flags>
-<%init>
-$r->content_type('text/css');
-#$r->headers_out->{'Expires'} = '+30m';
-</%init>
diff --git a/rt/html/Prefs/SearchOptions.html b/rt/html/Prefs/SearchOptions.html
index 655d6ec39..fd292d8eb 100644
--- a/rt/html/Prefs/SearchOptions.html
+++ b/rt/html/Prefs/SearchOptions.html
@@ -3,7 +3,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,7 +46,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Search Preferences") &>
+<& /Elements/Header, Title => loc("Ticketing Search Preferences") &>
<& /User/Elements/Tabs,
current_tab => "Prefs/SearchOptions.html",
Title => loc("Search Preferences")
diff --git a/rt/html/RTx/Statistics/CallsMultiQueue/Elements/Chart b/rt/html/RTx/Statistics/CallsMultiQueue/Elements/Chart
new file mode 100755
index 000000000..02a183b2c
--- /dev/null
+++ b/rt/html/RTx/Statistics/CallsMultiQueue/Elements/Chart
@@ -0,0 +1,39 @@
+<%perl>
+$r->content_type("image/$format");
+print $graph->plot(\@data)->$format();
+$m->abort();
+</%perl>
+<em><&|/l, $#data+1&>[_1] Plot Elements</&></em><p>
+% foreach my $value (@data) {
+<% $value %><p>
+% }
+<em><&|/l&>x_labels</&>:</em><p>
+<% $ARGS{x_labels} %>
+<p>
+<em><&|/l&>legend</&>:</em><p>
+<% $ARGS{set_legend} %>
+<p>
+<em><&|/l, (keys %ARGS) - 2&>[_1] data sets</&>:</em><p>
+
+% for (1..(scalar keys %ARGS)-2) {
+<% $_ %> <% $ARGS{"data$_"} %><p>
+% }
+
+<%INIT>
+use GD::Graph::lines;
+
+my @data;
+my $graph = GD::Graph::lines->new($Statistics::GraphWidth,$Statistics::GraphHeight);
+$graph->set(export_format => "png",
+ x_label => 'Day of Week',
+ y_label => 'Tickets per day');
+$graph->set_legend(split /,/ , $ARGS{set_legend});
+my $format = $graph->export_format;
+push @data, [split /,/ , $ARGS{x_labels}];
+for (1..((scalar keys %ARGS)-2)) {
+ push @data, [split /,/ , $ARGS{"data".$_}];
+}
+
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/CallsMultiQueue/index.html b/rt/html/RTx/Statistics/CallsMultiQueue/index.html
new file mode 100755
index 000000000..abf8aa74a
--- /dev/null
+++ b/rt/html/RTx/Statistics/CallsMultiQueue/index.html
@@ -0,0 +1,330 @@
+<& /Elements/Header, Title => loc('Tickets per day in Multiple queues') &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc('Tickets per day in Multiple Queues by status') &>
+
+<h3>Description</h3>
+<p>This chart shows details of tickets per day by their status. You can select multiple queues to display at the same time, but only one status. You can chose any of the defined status values.
+There is also the option to display all available queues at the same time.
+The default display shows tickets resolved in your default queue (General unless altered locally).
+The line chart below shows the same information in a graphical form.
+
+<br />
+
+<form method="POST" action="index.html">
+
+%# Build Legend
+% my @legend;
+% for (sort keys %queues_to_show) {
+% push @legend, $_;
+% }
+
+%my $title = "Tickets with Status $status in " . join(', ', @queues) . ", per day from " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[0]) . " through " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$#dates-1]);
+
+<& /Elements/TitleBoxStart, title => $title, title_href => "/RTx/Statistics/OpenStalled/index.html?$QueryString"&>
+<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH="100%">
+% if ($ShowHeader) {
+<& /RTx/Statistics/Elements/CollectionAsTable/Header,
+ Format => \@RowFormat,
+ FormatString => $RowFormat,
+ AllowSorting => $AllowSorting,
+ Order => $Order,
+ Query => undef,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy ,
+ BaseURL => $BaseURL,
+ maxitems => $maxitems &>
+% }
+% my $line = 0;
+% LINE: for my $d (0..$#dates) {
+% if ($d == $#dates ){
+% next LINE;
+% }
+% $line++;
+% my $x = 1;
+% $values{Statistics_Date} = Statistics::FormatDate($dateformat, $dates[$d]);
+% my $row_total=0;
+% foreach my $q (sort keys %queues_to_show) {
+% my $tix = new RT::Tickets($session{'CurrentUser'});
+% if ($status eq "resolved") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitResolved(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitResolved(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% elsif ($status eq "new") {
+% $tix->LimitCreated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitCreated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% elsif ($status eq "deleted") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% elsif ($status eq "stalled") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% elsif ($status eq "open") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% elsif ($status eq "rejected") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% }
+% $tix->LimitQueue (VALUE => $q);
+% $values{$q} = $tix->Count;
+% $row_total += $tix->Count;
+% $data[$x++][$d] = $tix->Count;
+% }
+% $values{Statistics_Totals} = $row_total;
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@RowFormat, i => $line, record => $record, maxitems => $maxitems &>
+% }
+</table>
+<& /Elements/TitleBoxEnd&>
+
+<hr>
+
+<BR />
+<BR />
+
+<!-- <td>Show:</td>
+ <td COLSPAN=2><SELECT NAME="status">
+% for (qw(resolved new deleted stalled rejected open)) {
+ <OPTION VALUE="<% $_ %>" <% $_ eq $status && "SELECTED" %>>
+ <% loc($_) %></OPTION>
+% }
+--!>
+
+<%perl>
+# Create the graph URL
+my $url = 'Elements/Chart?x_labels=';
+#$url .= join ",", @{ shift @data } . "&";
+for (0..$max) {
+ $url .= $m->interp->apply_escapes($data[0][$_],'u') . ",";
+}
+chop $url;
+$url .= "&";
+shift @data;
+$url .= 'set_legend='.(join ",", @legend)."&";
+for (0..$#data) {
+ $url .= "data".(1+$_)."=". (join ",", @{$data[$_]})."&";
+}
+chop $url;
+</%perl>
+
+<& /RTx/Statistics/Elements/GraphBox, GraphURL => $url &>
+
+<& /RTx/Statistics/Elements/ControlsAsTable/ControlBox,
+ Title => "Change Status, Queues or Dates",
+ ShowDates => 1, sMonth => \$sMonth, sDay => \$sDay, sYear => \$sYear,
+ eMonth => \$eMonth, eDay => \$eDay, eYear => \$eYear,
+ weekends => $weekends,
+ ShowMultiQueues => 1, queues_ref => \@queues,
+ ShowStatus => 1, Status => $status
+ &>
+
+</form>
+
+<a href="<%$RT::WebPath%>/RTx/Statistics/CallsMultiQueue/index.html?<% $QueryString %>"><&|/l&>Bookmarkable link</&></a>
+%# | <a href="<%$RT::WebPath%>/RTx/Statistics/CallsMultiQueue/Results.tsv?<%$QueryString%>"><&|/l&>spreadsheet</&></a>
+<BR>
+<BR>
+
+<%ARGS>
+$status => $Statistics::MultiQueueStatus
+$max => $Statistics::MultiQueueMaxRows
+@queues => @Statistics::MultiQueueQueueList
+$weekends => $Statistics::PerDayWeekends;
+$sMonth=>undef
+$sDay=>undef
+$sYear=>undef
+$eMonth=>undef
+$eDay=>undef
+$eYear=>undef
+$days=>undef
+$dateformat => $Statistics::MultiQueueDateFormat
+$currentMonth=>undef
+
+$AllowSorting => undef
+$Order => undef
+$OrderBy => undef
+$ShowNavigation => 1
+$ShowHeader => 1
+$Rows => 50
+$Page => 1
+$BaseURL => undef
+$AddAllCheck => undef
+</%ARGS>
+
+<%INIT>
+
+use RTx::Statistics;
+use Time::Local;
+my $n = 0;
+my @data = ([]);
+my @dates;
+my @msgs;
+my $selected;
+my $diff;
+my %queues_to_show;
+my $secsPerDay=86400;
+my $sEpoch;
+my $eEpoch;
+my $QueryString;
+my $maxitems;
+my $RowFormat;
+my $BoldRowFormat;
+my %record;
+my %values;
+my $record = \%record;
+
+$record{values} = \%values;
+
+Statistics::DebugClear();
+Statistics::DebugLog("CallsQueueDay/index.html ARGS:\n");
+for my $key (keys %ARGS) {
+ Statistics::DebugLog("ARG{ $key }=" . $ARGS{$key} . "\n");
+}
+
+
+ # Handle the Add All Checkbox
+ if($AddAllCheck eq "on") {
+ $AddAllCheck = undef;
+ undef (@queues);
+ my $q=new RT::Queues($session{'CurrentUser'});
+ $q->UnLimit;
+ while (my $queue=$q->Next) {
+ next if !$queue->CurrentUserHasRight('SeeQueue');
+ push @queues, $queue->Name;
+ }
+ }
+
+ # If the user has the right to see the queue, put it into the map
+ for my $q (@queues) {
+ my $Queueobj = new RT::Queue($session{'CurrentUser'});
+ $Queueobj->Load($q);
+ next if !$Queueobj->CurrentUserHasRight('SeeQueue');
+ $queues_to_show{$q} = 1;
+ }
+
+ $maxitems = (scalar @queues) + 2;
+
+ # Build the format strings
+ $RowFormat = "'__Statistics_Date__'";
+ $BoldRowFormat = "'<B>__Statistics_Date__</B>'";
+ for my $q (@queues) {
+ $RowFormat .= ",'__Statistics_Dynamic__/KEY:$q/TITLE:$q/STYLE:text-align:right;'";
+ $BoldRowFormat .= ",'<B>__Statistics_Dynamic__</B>/KEY:$q/TITLE:$q/STYLE:text-align:right;'";
+ }
+ $RowFormat .= ",'<B>__Statistics_Totals__</B>/STYLE:text-align:right;'";
+ $BoldRowFormat .= ",'<B>__Statistics_Totals__</B>/STYLE:text-align:right;'";
+ # Parse the formats into structures.
+ my (@RowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $RowFormat);
+ my (@BoldRowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldRowFormat);
+
+if ($sDay > $Statistics::monthsMaxDay{$sMonth}) {
+ $sDay = $Statistics::monthsMaxDay{$sMonth};
+}
+
+if ($eDay > $Statistics::monthsMaxDay{$eMonth}) {
+ $eDay = $Statistics::monthsMaxDay{$eMonth};
+}
+
+if ($sYear){
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear-1900);
+}
+if ($eYear){
+Statistics::DebugLog("eMonth = " . $eMonth . "\n");
+ $eEpoch = timelocal(0, 0, 0, $eDay, $eMonth, $eYear-1900);
+} else {
+ # This case happens when the page is first loaded
+ my @local = localtime(time);
+ ($eDay, $eMonth, $eYear) = ($local[3], $local[4], $local[5]);
+ $eYear += 1900;
+ $eEpoch = timelocal(0, 0, 0, $local[3], $local[4], $local[5], $local[6], $local[7], $local[8]);
+Statistics::DebugLog("Setting eEpoch=$eEpoch from current time.\n");
+}
+
+if (($eEpoch < $sEpoch) || ($sEpoch == 0)) {
+ # We have an end, but not a start, or, overlapping.
+
+ # if $currentMonth is set, just set the day to 1
+ if($currentMonth) {
+ # set start vars from end, but with day set to 1
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($eEpoch);
+ $sDay=1;
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear);
+ } else {
+ # If the user has specified how many days back to go, use that,
+ # If not, set start to configured default period before end
+ if(defined $days) {
+ $sEpoch = $eEpoch - ($days * $Statistics::secsPerDay);
+ } else {
+ $sEpoch = $eEpoch - ($Statistics::PerDayPeriod * $Statistics::secsPerDay);
+ }
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($sEpoch);
+ }
+ $sYear += 1900;
+}
+
+# Compute days to chart.
+# The +1 is because we need to generate one more date. If the user
+# selected a 10 day range, we need to generate 11 days.
+$diff = int(($eEpoch - $sEpoch + $Statistics::secsPerDay - 1) / $Statistics::secsPerDay)+1;
+Statistics::DebugLog("Setting diff=$diff\n");
+
+Statistics::DebugLog("sEpoch=$sEpoch, components=" . join(',', localtime($sEpoch)) . "\n");
+Statistics::DebugLog("eEpoch=$eEpoch, components=" . join(',', localtime($eEpoch)) . "\n");
+
+# Build the new query string
+$QueryString = "queues=" . join("&queues=", @queues);
+$QueryString .= "&sDay=$sDay&sMonth=$sMonth&sYear=$sYear&eDay=$eDay&eMonth=$eMonth&eYear=$eYear&weekends=$weekends";
+
+
+
+
+# Set up the end date to be midnight(morning) of the date after the one the user wanted.
+my $endRange = $eEpoch + $Statistics::secsPerDay;
+$n = 0;
+until ($#dates == $diff) {
+ my $date = new RT::Date($session{CurrentUser});
+ $date->Set(Value=>$endRange - $n, Format => 'unix');
+ # Note: we used to adjust the time to local midnight, but
+ # none of the other date entry fields in RT seem to adjust, so we've stopped.
+ #Statistics::DebugLog("Before adjust to midnight date " . Statistics::FormatDate("%c", $date) . "\n");
+ $n+= $Statistics::secsPerDay;
+ # If we aren't showing weekends and this is one, decrement the number
+ # of days to show and skip to the next date.
+ if(!$weekends and Statistics::RTDateIsWeekend($date)) {$diff--; next;}
+ unshift @dates, $date;
+Statistics::DebugLog("pushing date " . Statistics::FormatDate("%c", $date) . "\n");
+ unshift @{ $data[0] }, Statistics::FormatDate($Statistics::PerDayLabelDateFormat, $date);
+}
+
+# We put an extra day into the lists to cover up till midnight of the next day,
+# But we don't want that to appear in the labels, so pop it off.
+pop( @{ $data[0] } );
+
+my $queue = new RT::Queues($session{CurrentUser});
+$queue->UnLimit;
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($queue);
+</%INIT>
diff --git a/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart b/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart
new file mode 100755
index 000000000..9a3a50574
--- /dev/null
+++ b/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart
@@ -0,0 +1,29 @@
+<%perl>
+$r->content_type("image/$format");
+print $graph->plot(\@data)->$format();
+$m->abort();
+print $#data+1 . " Elements:<p>";
+for (0..$#data) {
+print $data[$_];
+print "<p>";
+}
+</%perl>
+<%INIT>
+use GD::Graph::lines;
+
+my @data;
+my $graph = GD::Graph::lines->new($Statistics::GraphWidth,$Statistics::GraphHeight);
+$graph->set(export_format => "png",
+ x_label => 'Day of Week',
+ y_label => 'Tickets per Day',
+ x_labels_vertical => 1,
+ );
+my $format = $graph->export_format;
+$graph->set_legend(split /,/ , $ARGS{set_legend});
+push @data, [split /,/ , $ARGS{x_labels}];
+push @data, [split /,/ , $ARGS{data1}];
+push @data, [split /,/ , $ARGS{data2}];
+push @data, [split /,/ , $ARGS{data3}];
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/CallsQueueDay/Results.tsv b/rt/html/RTx/Statistics/CallsQueueDay/Results.tsv
new file mode 100644
index 000000000..23f0c699c
--- /dev/null
+++ b/rt/html/RTx/Statistics/CallsQueueDay/Results.tsv
@@ -0,0 +1,191 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 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., 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 }}}
+<%ARGS>
+$Queue => undef
+$weekends => $Statistics::PerDayWeekends;
+$sMonth=>undef
+$sDay=>undef
+$sYear=>undef
+$eMonth=>undef
+$eDay=>undef
+$eYear=>undef
+$days=>undef
+$currentMonth=>undef
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+use Time::Local;
+my @dates;
+my $n = 0;
+my %Totals;
+my $now = new RT::Date($session{CurrentUser});
+my $sEpoch;
+my $eEpoch;
+
+if (!defined $Queue) {
+ $Queue = $Statistics::PerDayQueue;
+}
+
+if ($sDay > $Statistics::monthsMaxDay{$sMonth}) {
+ $sDay = $Statistics::monthsMaxDay{$sMonth};
+}
+
+if ($eDay > $Statistics::monthsMaxDay{$eMonth}) {
+ $eDay = $Statistics::monthsMaxDay{$eMonth};
+}
+
+if ($sYear){
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear-1900);
+}
+if ($eYear){
+Statistics::DebugLog("eMonth = " . $eMonth . "\n");
+ $eEpoch = timelocal(0, 0, 0, $eDay, $eMonth, $eYear-1900);
+} else {
+ # This case happens when the page is first loaded
+ my @local = localtime(time);
+ ($eDay, $eMonth, $eYear) = ($local[3], $local[4], $local[5]);
+ $eYear += 1900;
+ $eEpoch = timelocal(0, 0, 0, $local[3], $local[4], $local[5], $local[6], $local[7], $local[8]);
+Statistics::DebugLog("Setting eEpoch=$eEpoch from current time.\n");
+}
+
+if (($eEpoch < $sEpoch) || ($sEpoch == 0)) {
+ # We have an end, but not a start, or, overlapping.
+
+ # if $currentMonth is set, just set the day to 1
+ if($currentMonth) {
+ # set start vars from end, but with day set to 1
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($eEpoch);
+ $sDay=1;
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear);
+ } else {
+ # If the user has specified how many days back to go, use that,
+ # If not, set start to configured default period before end
+ if(defined $days) {
+ $sEpoch = $eEpoch - ($days * $Statistics::secsPerDay);
+ } else {
+ $sEpoch = $eEpoch - ($Statistics::PerDayPeriod * $Statistics::secsPerDay);
+ }
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($sEpoch);
+ }
+ $sYear += 1900;
+}
+
+# set content type
+$r->content_type('application/vnd.ms-excel');
+
+# Put out some data about the generation of this file
+$m->out("Tickets per day for Queue:\t" . $Queue . "\tGenerated at:\t" . Statistics::FormatDate("%x %X", $now). "\n\n");
+
+
+# Compute days to chart.
+# The +1 is because we need to generate one more date. If the user
+# selected a 10 day range, we need to generate 11 days.
+my $diff = int(($eEpoch - $sEpoch + $Statistics::secsPerDay - 1) / $Statistics::secsPerDay)+1;
+
+# Build array of dates
+my $endRange = $eEpoch + $Statistics::secsPerDay;
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+until ($#dates == $diff) {
+ my $date = new RT::Date($session{CurrentUser});
+ $date->Set(Value=>$endRange - $n, Format => 'unix');
+ # Note: we used to adjust the time to local midnight, but
+ # none of the other date entry fields in RT seem to adjust, so we've stopped.
+ #Statistics::DebugLog("Before adjust to midnight date " . Statistics::FormatDate("%c", $date) . "\n");
+ $n+= $Statistics::secsPerDay;
+ # If we aren't showing weekends and this is one, decrement the number
+ # of days to show and skip to the next date.
+ if(!$weekends and Statistics::RTDateIsWeekend($date)) {$diff--; next;}
+ unshift @dates, $date;
+}
+
+# Output header row
+$m->out("Date\tcreate\tresolved\tdeleted\n");
+
+
+LINE: for my $d (0..$#dates) {
+ if ($d == $#dates){
+ next LINE;
+ }
+ my $x = 1;
+ # Output the date for this row
+ $m->out(Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$d]));
+
+ # output the 3 columns for this row
+ for my $status (qw(created resolved deleted)) {
+ my $tix = new RT::Tickets($session{'CurrentUser'});
+ if ($status eq "created") {
+ $tix->LimitCreated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+ if ($dates[$d+1]) {
+ $tix->LimitCreated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+ }
+ } elsif ($status eq "resolved") {
+ $tix->LimitStatus(VALUE => $status);
+ $tix->LimitResolved(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+ if ($dates[$d+1]) {
+ $tix->LimitResolved(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+ }
+ } elsif ($status eq "deleted") {
+ $tix->LimitStatus(VALUE => $status);
+ $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+ if ($dates[$d+1]) {
+ $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+ }
+ }
+ $tix->LimitQueue (VALUE => $Queue);
+ $m->out( "\t" . $tix->Count );
+ $Totals{$status} += $tix->Count;
+ }
+ $m->out("\n");
+}
+
+# Output the totals
+$m->out("Totals\t$Totals{created}\t$Totals{resolved}\t$Totals{deleted}\n");
+
+$m->abort();
+</%INIT>
diff --git a/rt/html/RTx/Statistics/CallsQueueDay/index.html b/rt/html/RTx/Statistics/CallsQueueDay/index.html
new file mode 100755
index 000000000..06fc484d1
--- /dev/null
+++ b/rt/html/RTx/Statistics/CallsQueueDay/index.html
@@ -0,0 +1,275 @@
+<& /Elements/Header, Title => loc("Tickets per day in Queue:" . $QueueObj->Name()) &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc("Tickets by status per day in Queue:" . $QueueObj->Name()) &>
+
+<h3>Description</h3>
+<p>This page displays details about tickets in the selected queue over the date range chosen. It shows how many tickets were created on
+each day in the chosen range, and how many of those were either Resolved or Deleted.</p>
+<p>To always show the current month to date, bookmark this <a href="<%$RT::WebPath%>/RTx/Statistics/CallsQueueDay/index.html?currentMonth=1">link</a>, or
+for a spreadsheet, use this <a href="<%$RT::WebPath%>/RTx/Statistics/CallsQueueDay/Results.tsv?currentMonth=1">link</a>.</p>
+
+<form method="POST" action="index.html">
+
+% Statistics::DebugLog("queue name=" . $QueueObj->Name() . "\n");
+
+%my $title = "Ticket counts in " . $QueueObj->Name() . " by status per day from " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[0]) . " through " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$#dates-1]);
+<&|/Elements/TitleBox,
+ title => $title,
+ title_href => "/RTx/Statistics/CallsQueueDay/index.html?$QueryString" &>
+<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
+% if ($ShowHeader) {
+<& /RTx/Statistics/Elements/CollectionAsTable/Header,
+ Format => \@Format,
+ FormatString => $Format,
+ AllowSorting => $AllowSorting,
+ Order => $Order,
+ Query => undef,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy ,
+ BaseURL => $BaseURL,
+ maxitems => $maxitems &>
+% }
+% my $line = 1;
+% LINE: for my $d (0..$#dates) {
+% if ($d == $#dates){
+% next LINE;
+% }
+% my $x = 1;
+% $values{Statistics_Date} = Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$d]);
+%# NOTE need to handle all status values here....
+% for my $status (qw(created resolved deleted)) {
+% my $tix = new RT::Tickets($session{'CurrentUser'});
+% $tix->LimitQueue (VALUE => $Queue);
+% if ($status eq "created") {
+% $tix->LimitCreated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitCreated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% $values{Statistics_Created_Count} = $tix->Count;
+% $Totals{Statistics_Created_Count} += $tix->Count;
+% }
+% elsif ($status eq "resolved") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitResolved(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitResolved(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% $values{Statistics_Resolved_Count} = $tix->Count;
+% $Totals{Statistics_Resolved_Count} += $tix->Count;
+% }
+% elsif ($status eq "deleted") {
+% $tix->LimitStatus(VALUE => $status);
+% $tix->LimitLastUpdated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitLastUpdated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% $values{Statistics_Deleted_Count} = $tix->Count;
+% $Totals{Statistics_Deleted_Count} += $tix->Count;
+% }
+% $data[$x++][$d] = $tix->Count;
+% }
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@Format, i => $line, record => $record, maxitems => $maxitems &>
+% $line++;
+% }
+% $values {Statistics_Date} = "Totals";
+% $values {Statistics_Created_Count} = $Totals{Statistics_Created_Count};
+% $values {Statistics_Resolved_Count} = $Totals{Statistics_Resolved_Count};
+% $values {Statistics_Deleted_Count} = $Totals{Statistics_Deleted_Count};
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@BoldFormat, i => $line, record => $record, maxitems => $maxitems &>
+</table>
+</&>
+
+<hr>
+
+<BR />
+<BR />
+
+<%perl>
+# Create the graph URL
+my $url= 'Elements/Chart?x_labels=';
+for (1..$diff) {
+ $url .= $data[0][$_] . ",";
+}
+chop $url;
+$url .= "&";
+shift @data;
+for (0..$#data) {
+ $url .= "data".(1+$_)."=".(join ",", @{$data[$_]})."&";
+}
+chop $url;
+$url .= "&set_legend=Created,Resolved,Deleted";
+</%perl>
+
+<& /RTx/Statistics/Elements/GraphBox, GraphURL => $url &>
+
+<& /RTx/Statistics/Elements/ControlsAsTable/ControlBox,
+ Title => "Change Queue or Dates",
+ ShowDates => 1, sMonth => \$sMonth, sDay => \$sDay, sYear => \$sYear,
+ eMonth => \$eMonth, eDay => \$eDay, eYear => \$eYear,
+ weekends => $weekends,
+ ShowSingleQueue => 1, Queue => $Queue
+ &>
+
+</form>
+
+<a href="<%$RT::WebPath%>/RTx/Statistics/CallsQueueDay/index.html?<% $QueryString %>"><&|/l&>Bookmarkable link</&></a> |
+<a href="<%$RT::WebPath%>/RTx/Statistics/CallsQueueDay/Results.tsv?<%$QueryString%>"><&|/l&>spreadsheet</&></a>
+<BR>
+<BR>
+
+
+% Statistics::DebugLog("ref of eMonth is " . ref($eMonth) . "\n");
+% Statistics::DebugInit( $m );
+
+<%ARGS>
+$Queue => undef
+$weekends => $Statistics::PerDayWeekends;
+$sMonth=>undef
+$sDay=>undef
+$sYear=>undef
+$eMonth=>undef
+$eDay=>undef
+$eYear=>undef
+$days=>undef
+$currentMonth=>undef
+
+$AllowSorting => undef
+$Order => undef
+$OrderBy => undef
+$ShowNavigation => 1
+$ShowHeader => 1
+$Rows => 50
+$Page => 1
+$BaseURL => undef
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+use Time::Local;
+my $selected;
+my $n = 0;
+my @data = ([]);
+my @dates;
+my @msgs;
+my $diff;
+my $sEpoch=0;
+my $eEpoch=0;
+my %Totals;
+my $QueryString;
+my $maxitems = 4;
+my %record;
+my %values;
+my $record = \%record;
+
+$record{values} = \%values;
+
+
+# If debugging, set things up and display all the args
+Statistics::DebugClear();
+Statistics::DebugLog("CallsQueueDay/index.html ARGS:\n");
+for my $key (keys %ARGS) {
+ Statistics::DebugLog("ARG{ $key }=" . $ARGS{$key} . "\n");
+}
+
+my $Format = qq{ Statistics_Date,
+ '__Statistics_Created_Count__/STYLE:text-align:right;',
+ '__Statistics_Resolved_Count__/STYLE:text-align:right;',
+ '__Statistics_Deleted_Count__/STYLE:text-align:right;' };
+my $BoldFormat = qq{ '<B>__Statistics_Date__</B>',
+ '<B>__Statistics_Created_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Resolved_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Deleted_Count__</B>/STYLE:text-align:right;' };
+my (@Format) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $Format);
+my (@BoldFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldFormat);
+Statistics::DebugLog("CallsQueueDay/index.html Format array=" . join(',', @Format) . "\n");
+
+if (!defined $Queue) {
+ my $QueueObj = new RT::Queue($session{'CurrentUser'});
+ $QueueObj->Load($Statistics::PerDayQueue);
+ $Queue = $QueueObj->Id();
+}
+
+if ($sDay > $Statistics::monthsMaxDay{$sMonth}) {
+ $sDay = $Statistics::monthsMaxDay{$sMonth};
+}
+
+if ($eDay > $Statistics::monthsMaxDay{$eMonth}) {
+ $eDay = $Statistics::monthsMaxDay{$eMonth};
+}
+
+if ($sYear){
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear-1900);
+}
+if ($eYear){
+Statistics::DebugLog("eMonth = " . $eMonth . "\n");
+ $eEpoch = timelocal(0, 0, 0, $eDay, $eMonth, $eYear-1900);
+} else {
+ # This case happens when the page is first loaded
+ my @local = localtime(time);
+ ($eDay, $eMonth, $eYear) = ($local[3], $local[4], $local[5]);
+ $eYear += 1900;
+ $eEpoch = timelocal(0, 0, 0, $local[3], $local[4], $local[5], $local[6], $local[7], $local[8]);
+Statistics::DebugLog("Setting eEpoch=$eEpoch from current time.\n");
+}
+
+if (($eEpoch < $sEpoch) || ($sEpoch == 0)) {
+ # We have an end, but not a start, or, overlapping.
+
+ # if $currentMonth is set, just set the day to 1
+ if($currentMonth) {
+ # set start vars from end, but with day set to 1
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($eEpoch);
+ $sDay=1;
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear);
+ } else {
+ # If the user has specified how many days back to go, use that,
+ # If not, set start to configured default period before end
+ if(defined $days) {
+ $sEpoch = $eEpoch - ($days * $Statistics::secsPerDay);
+ } else {
+ $sEpoch = $eEpoch - ($Statistics::PerDayPeriod * $Statistics::secsPerDay);
+ }
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($sEpoch);
+ }
+ $sYear += 1900;
+}
+
+# Compute days to chart.
+# The +1 is because we need to generate one more date. If the user
+# selected a 10 day range, we need to generate 11 days.
+$diff = int(($eEpoch - $sEpoch + $Statistics::secsPerDay - 1) / $Statistics::secsPerDay)+1;
+Statistics::DebugLog("Setting diff=$diff\n");
+
+Statistics::DebugLog("sEpoch=$sEpoch, components=" . join(',', localtime($sEpoch)) . "\n");
+Statistics::DebugLog("eEpoch=$eEpoch, components=" . join(',', localtime($eEpoch)) . "\n");
+
+# Set up the string for the current query for bookmarkable link
+$QueryString = "sDay=$sDay&sMonth=$sMonth&sYear=$sYear&eDay=$eDay&eMonth=$eMonth&eYear=$eYear&weekends=$weekends&Queue=$Queue";
+
+# Set up the end date to be midnight(morning) of the date after the one the user wanted.
+my $endRange = $eEpoch + $Statistics::secsPerDay;
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+$n = 0;
+until ($#dates == $diff) {
+ my $date = new RT::Date($session{CurrentUser});
+ $date->Set(Value=>$endRange - $n, Format => 'unix');
+ # Note: we used to adjust the time to local midnight, but
+ # none of the other date entry fields in RT seem to adjust, so we've stopped.
+ #Statistics::DebugLog("Before adjust to midnight date " . Statistics::FormatDate("%c", $date) . "\n");
+ $n+= $Statistics::secsPerDay;
+ # If we aren't showing weekends and this is one, decrement the number
+ # of days to show and skip to the next date.
+ if(!$weekends and Statistics::RTDateIsWeekend($date)) {$diff--; next;}
+ unshift @dates, $date;
+Statistics::DebugLog("pushing date " . Statistics::FormatDate("%c", $date) . "\n");
+ unshift @{ $data[0] }, Statistics::FormatDate($Statistics::PerDayLabelDateFormat, $date);
+}
+
+# We put an extra day into the lists to cover up till midnight of the next day,
+# But we don't want that to appear in the labels, so pop it off.
+pop( @{ $data[0] } );
+
+</%INIT>
diff --git a/rt/html/RTx/Statistics/DayOfWeek/Elements/Chart b/rt/html/RTx/Statistics/DayOfWeek/Elements/Chart
new file mode 100755
index 000000000..239c09541
--- /dev/null
+++ b/rt/html/RTx/Statistics/DayOfWeek/Elements/Chart
@@ -0,0 +1,26 @@
+% $r->content_type("image/$format");
+% $m->print($graph->plot(\@data)->$format());
+% $m->abort();
+<&|/l, $#data+1&>[_1] Elements</&>:<p>
+% for (0..$#data) {
+<% $data[$_] %><p>
+% }
+<%INIT>
+use GD::Graph::bars;
+
+my @data;
+my $graph = GD::Graph::bars->new($Statistics::GraphWidth,$Statistics::GraphHeight);
+$graph->set(export_format => "png",
+ x_label => 'Day of Week',
+ y_label => 'Ticket actions per Day by type');
+$graph->set_legend(split /,/ , $ARGS{set_legend});
+push @data, [split /,/ , $ARGS{x_labels}];
+push @data, [split /,/ , $ARGS{data1}];
+push @data, [split /,/ , $ARGS{data2}];
+push @data, [split /,/ , $ARGS{data3}];
+
+my $format = $graph->export_format;
+$r->content_type("image/$format");
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/DayOfWeek/index.html b/rt/html/RTx/Statistics/DayOfWeek/index.html
new file mode 100755
index 000000000..2e82b9c24
--- /dev/null
+++ b/rt/html/RTx/Statistics/DayOfWeek/index.html
@@ -0,0 +1,155 @@
+<& /Elements/Header, Title =>loc('Tickets by Day Of Week in Queue:' . $QueueObj->Name()) &>
+<& /RTx/Statistics/Elements/Tabs, Title =>loc('Trends in ticket status by Day Of Week in Queue:' . $QueueObj->Name()) &>
+
+<h3>Description</h3>
+<p>The purpose of this page is to show historical trends for each day of the week.
+It displays details of number of tickets created in your
+selected queue for each day. It also hows how many of those created tickets were Resolved or Deleted</p>
+
+<form method="POST" action="index.html">
+
+
+%my $title = "Ticket counts by day of week in " . $QueueObj->Name();
+<&|/Elements/TitleBox,
+ title => $title,
+ title_href => "/RTx/Statistics/DayOfWeek/index.html?$QueryString" &>
+<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
+% if ($ShowHeader) {
+<& /RTx/Statistics/Elements/CollectionAsTable/Header,
+ Format => \@Format,
+ FormatString => $Format,
+ AllowSorting => $AllowSorting,
+ Order => $Order,
+ Query => undef,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy ,
+ BaseURL => $BaseURL,
+ maxitems => $maxitems &>
+% }
+% my $line = 1;
+% for my $d (0..$#days) {
+% my $x = 1;
+% $values{Statistics_Date} = $days[$d];
+%# NOTE Show all status values???
+% $values{Statistics_Created_Count} = $counts[$d]{new};
+% $values{Statistics_Resolved_Count} = $counts[$d]{resolved};
+% $values{Statistics_Deleted_Count} = $counts[$d]{deleted};
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@Format, i => $line, record => $record, maxitems => $maxitems &>
+% $line++;
+% }
+% $values {Statistics_Date} = "Totals";
+% $values {Statistics_Created_Count} = $Totals{new};
+% $values {Statistics_Resolved_Count} = $Totals{resolved};
+% $values {Statistics_Deleted_Count} = $Totals{deleted};
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@BoldFormat, i => $line, record => $record, maxitems => $maxitems &>
+</table>
+</&>
+
+<hr>
+
+<BR />
+<BR />
+
+<%perl>
+my $url = 'Elements/Chart?&x_labels=';
+for (0..$#days) {
+ $url .= $days[$_] . "," ;
+}
+chop $url;
+$url .= "&";
+
+my @things = qw(new resolved deleted);
+for my $th (0..$#things) {
+ $url .= "data".(1+$th)."=".(join ",", map { $counts[$_]{$things[$th]} } (0..6))."&";
+}
+chop $url;
+$url .= '&set_legend=Created,Resolved,Deleted';
+</%perl>
+
+<& /RTx/Statistics/Elements/GraphBox, GraphURL => $url &>
+
+% Statistics::DebugLog("queue name=" . $QueueObj->Id() . "\n");
+
+<& /RTx/Statistics/Elements/ControlsAsTable/ControlBox,
+ Title => "Change Queue",
+ ShowSingleQueue => 1, Queue => $QueueObj->Id()
+ &>
+
+</form>
+
+% Statistics::DebugInit( $m );
+
+<%ARGS>
+$Queue => $Statistics::DayOfWeekQueue
+
+$AllowSorting => undef
+$Order => undef
+$OrderBy => undef
+$ShowNavigation => 1
+$ShowHeader => 1
+$Rows => 50
+$Page => 1
+$BaseURL => undef
+</%ARGS>
+
+<%INIT>
+use GD::Graph;
+use RTx::Statistics;
+my @days = qw(Sun Mon Tue Wed Thu Fri Sat);
+my $n = 0;
+my @data = ([]);
+my @msgs;
+my @counts;
+my %Totals = (
+ resolved => 0,
+ deleted => 0,
+ new => 0
+);
+my $QueryString = "Queue=$Queue";
+my $maxitems = 4;
+my %record;
+my %values;
+my $record = \%record;
+
+$record{values} = \%values;
+
+my $Format = qq{ Statistics_Date,
+ '__Statistics_Created_Count__/STYLE:text-align:right;',
+ '__Statistics_Resolved_Count__/STYLE:text-align:right;',
+ '__Statistics_Deleted_Count__/STYLE:text-align:right;' };
+my $BoldFormat = qq{ '<B>__Statistics_Date__</B>',
+ '<B>__Statistics_Created_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Resolved_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Deleted_Count__</B>/STYLE:text-align:right;' };
+my (@Format) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $Format);
+my (@BoldFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldFormat);
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($Queue);
+$RT::Logger->warning("Loaded queue $Queue, name=". $QueueObj->Name());
+
+my $tix = new RT::Tickets($session{'CurrentUser'});
+$tix->LimitQueue (VALUE => $Queue);
+$tix->UnLimit;
+if ($tix->Count) {
+ # Initialize the counters to zero, so that all the cells show up
+ foreach my $day (0..@days) {
+ $counts[$day]{resolved} = 0;
+ $counts[$day]{deleted} = 0;
+ $counts[$day]{new} = 0;
+ }
+ while (my $t = $tix->RT::SearchBuilder::Next) { # BLOODY HACK
+ if($t->Status eq "resolved") {
+ $counts[(localtime($t->ResolvedObj->Unix))[6]]{resolved}++;
+ $Totals{resolved}++;
+ }
+ if($t->Status eq "deleted") {
+ $counts[(localtime($t->LastUpdatedObj->Unix))[6]]{deleted}++;
+ $Totals{deleted}++;
+ }
+ $counts[(localtime($t->CreatedObj->Unix))[6]]{new}++;
+ $Totals{new}++;
+ }
+}
+</%INIT>
diff --git a/rt/html/RTx/Statistics/DurationAsString b/rt/html/RTx/Statistics/DurationAsString
new file mode 100755
index 000000000..c0b4d9af4
--- /dev/null
+++ b/rt/html/RTx/Statistics/DurationAsString
@@ -0,0 +1,18 @@
+<%$days|'00'%> days <%$hours|'00'%>:<%$minutes|'00'%>
+<%INIT>
+
+my $MINUTE = 60;
+my $HOUR = $MINUTE*60;
+my $DAY = $HOUR * 24;
+my $WEEK = $DAY * 7;
+my $days = int($Duration / $DAY);
+$Duration = $Duration % $DAY;
+my $hours = int($Duration / $HOUR);
+$hours = sprintf("%02d", $hours);
+$Duration = $Duration % $HOUR;
+my $minutes = int($Duration/$MINUTE);
+$minutes = sprintf("%02d", $minutes);
+</%INIT>
+<%ARGS>
+$Duration => undef
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/Elements/CollectionAsTable/Header b/rt/html/RTx/Statistics/Elements/CollectionAsTable/Header
new file mode 100644
index 000000000..cecb02eee
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/CollectionAsTable/Header
@@ -0,0 +1,126 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 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., 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 }}}
+<%ARGS>
+@Format => undef
+$FormatString => undef
+$AllowSorting => undef
+$Order=>undef
+$BaseURL => undef
+$Query => undef
+$Rows => undef
+$Page => undef
+$maxitems => undef
+</%ARGS>
+<TR class="collection-as-table">
+<%perl>
+
+my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString );
+
+my $item = 0;
+foreach my $col (@Format) {
+ $item++;
+ if ( $col->{title} eq 'NEWLINE' ) {
+ while ( $item < $maxitems ) {
+ $m->out(qq{<th class="collection-as-table">&nbsp;</th>\n});
+ $item++;
+ }
+
+ $item = 0;
+ $m->out(qq{</TR>\n<TR class="collection-as-table">});
+ }
+ else {
+ $m->out('<TH class="collection-as-table" ');
+ $m->out( 'align="' . $col->{align} . '"' ) if ( $col->{align} );
+ $m->out( 'style="' . $col->{style} . '"' ) if ( $col->{style} );
+ $m->out('>');
+ my $title = $col->{title};
+ $title =~ s/^__(.*)__$/$1/o;
+ $title = (
+ $m->comp(
+ '/RTx/Statistics/Elements/StatColumnMap',
+ Name => $title,
+ Attr => 'title'
+ )
+ || $title
+ );
+ if (
+ $AllowSorting
+ && $col->{'attribute'}
+ && $m->comp(
+ '/RTx/Statistics/Elements/StatColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute'
+ )
+ )
+ {
+
+ $m->out(
+ '<a href="' . $BaseURL
+ . $m->comp(
+ '/Elements/QueryString',
+ %generic_query_args,
+ OrderBy => (
+ $m->comp(
+ '/RTx/Statistics/Elements/StatColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute'
+ )
+ || $col->{'attribute'}
+ ),
+ Order => ( $ARGS{'Order'} eq 'ASC' ? 'DESC' : 'ASC' )
+ )
+ . '">'
+ . loc($title) . '</a>'
+ );
+ }
+ else {
+ $m->out( loc($title) );
+ }
+ $m->out('</TH>');
+ }
+}
+</%perl>
+</TR>
diff --git a/rt/html/Ticket/Elements/ShowReferences b/rt/html/RTx/Statistics/Elements/CollectionAsTable/ParseFormat
index bb323f66c..a482f817e 100644
--- a/rt/html/Ticket/Elements/ShowReferences
+++ b/rt/html/RTx/Statistics/Elements/CollectionAsTable/ParseFormat
@@ -43,30 +43,67 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<UL>
-% while (my $Link = $Ticket->RefersTo->Next) {
-<LI>
-% if ($Link->TargetURI->IsLocal) {
-% my $member = $Link->TargetObj;
+<%ARGS>
+$Format
+</%ARGS>
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
-% } else {
-<A HREF="<%$Link->TargetURI->HREF%>"><%$Link->Target%></A>
-% }
-%}
+<%init>
+use Regexp::Common;
+my @Columns;
+while ($Format =~ /($RE{delimited}{-delim=>qq{\'"}}|[{}\w.]+)/go) {
+ my $col = $1;
+ if ($col =~ /^$RE{quoted}$/o) {
+ substr($col,0,1) = "";
+ substr($col,-1,1) = "";
+ }
-% while (my $Link = $Ticket->ReferredToBy->Next) {
-<LI>
-% if ($Link->BaseURI->IsLocal) {
-% my $member = $Link->BaseObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
-% } else {
-<A HREF="<%$Link->BaseURI->HREF%>"><%$Link->Base%></A>
-%}
-% }
-</UL>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
+ my $colref;
+
+ # kfh at mqsoftware.com added this to be able
+ # to create columns where the actual heading and value
+ # aren't know ahead of time. For instance queue names.
+ # it will work with subcols, but all subcols will have the same KEY
+ if ( $col =~ s!/KEY:([^/]+)!!io ) {
+ $colref->{'keyname'} = $1;
+ }
+ if ( $col =~ s!/STYLE:([^/]+)!!io ) {
+ $colref->{'style'} = $1;
+ }
+ if ( $col =~ s!/CLASS:([^/]+)!!io ) {
+ $colref->{'class'} = $1;
+ }
+ if ( $col =~ s!/TITLE:([^/]+)!!io ) {
+ $colref->{'title'} = $1;
+ }
+ if ( $col =~ s!/ALIGN:([^\/]+)!!io ) {
+ $colref->{'align'} = $1;
+ }
+ if ( $col =~ /__(.*?)__/gio ) {
+ my @subcols;
+ while ( $col =~ s/^(.*?)__(.*?)__//o ) {
+ push ( @subcols, $1 ) if ($1);
+ push ( @subcols, "__$2__" );
+ $colref->{'attribute'} = $2;
+ }
+ push ( @subcols, $col );
+ @{ $colref->{'output'} } = @subcols;
+ }
+ else {
+ @{ $colref->{'output'} } = ( "__" . $col . "__" );
+ $colref->{'attribute'} = $col;
+ }
+
+ if ( !$colref->{'title'} && grep { /^__(.*?)__$/io }
+ @{ $colref->{'output'} } )
+ {
+ $colref->{'title'} = $1;
+ $colref->{'attribute'} = $1;
+ }
+
+
+ push @Columns, $colref;
+}
+ return(@Columns);
+</%init>
diff --git a/rt/html/RTx/Statistics/Elements/CollectionAsTable/Row b/rt/html/RTx/Statistics/Elements/CollectionAsTable/Row
new file mode 100644
index 000000000..bcfabe5c3
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/CollectionAsTable/Row
@@ -0,0 +1,112 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 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., 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 }}}
+<%ARGS>
+$i => undef
+@Format => undef
+$record => undef
+$maxitems => undef
+$Depth => undef
+$Warning => undef
+</%ARGS>
+
+<%PERL>
+$m->out('<TR class="' . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
+my $item;
+foreach my $column (@Format) {
+ if ( $column->{title} eq 'NEWLINE' ) {
+ while ( $item < $maxitems ) {
+ $m->out(qq{<td class="collection-as-table">&nbsp;</td>\n});
+ $item++;
+ }
+ $item = 0;
+ $m->out('</TR>');
+ $m->out('<TR class="'
+ . ( $Warning ? 'warnline' : $i % 2 ? 'oddline' : 'evenline' )
+ . '" >' );
+ next;
+ }
+ $item++;
+ $m->out('<td class="collection-as-table" ');
+ $m->out( 'align="' . $column->{align} . '"' ) if ( $column->{align} );
+ $m->out( 'style="' . $column->{style} . '"' ) if ( $column->{style} );
+ $m->out('>');
+ foreach my $subcol ( @{ $column->{output} } ) {
+ if ( $subcol =~ /^__(.*?)__$/o ) {
+ my $col = $1;
+ my $value = $m->comp(
+ '/RTx/Statistics/Elements/StatColumnMap',
+ Name => $col,
+ Attr => 'value'
+ );
+ my @out;
+
+ if ( $value && ref($value) ) {
+
+ # All HTML snippets are returned by the callback function
+ # as scalar references. Data fetched from the objects are
+ # plain scalars, and needs to be escaped properly.
+ @out =
+ map {
+ ref($_) ? $$_ : $m->interp->apply_escapes( $_ => 'h' )
+ } &{$value}( $record, $i, $column->{keyname} );
+ ;
+ }
+ else {
+
+ # Simple value; just escape it.
+ @out = $m->interp->apply_escapes( $value => 'h' );
+ }
+ s/\n/<br>/gs for @out;
+ $m->out( @out );
+ }
+ else {
+ $m->out($subcol);
+ }
+ }
+ $m->out('</td>');
+}
+$m->out('</TR>');
+</%PERL>
diff --git a/rt/html/RTx/Statistics/Elements/ControlsAsTable/ControlBox b/rt/html/RTx/Statistics/Elements/ControlsAsTable/ControlBox
new file mode 100644
index 000000000..ce043e294
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/ControlsAsTable/ControlBox
@@ -0,0 +1,103 @@
+<table class="box" bgcolor="#336699" style="border-style:none solid solid solid;border-width:1px;border-color:#2E2E8C;" cellpadding="0" cellspacing="0">
+ <tbody>
+ <tr>
+ <th style="color: rgb(51, 102, 153);" class="titlebox">
+ <span class="titleboxclose">
+ <a href="#" onclick="hideshow('stats_control')">X</a></span>&nbsp;
+ <span class="titleboxtitle" style="color: rgb(255, 255, 255);">
+ <b><% $Title %></b></span>
+ </th>
+ <th style="color: rgb(51, 102, 153);" class="titleboxright">
+ <span class="titleboxright">&nbsp;</span>
+ </th>
+ </tr>
+ <tr id="element-stats_control">
+ <td colspan="3" class="" bgcolor="#dddddd">
+ <table border="0" cellpadding="1" cellspacing="0">
+% if (defined $ShowStatus) {
+ <tr>
+ <td class="collection-as-table" style="text-align:left;">Show Status:</td>
+ <td COLSPAN=3 class="collection-as-table" style="text-align:left;">
+ <& /Elements/SelectStatus, Name=>"status", Default => $Status, DefaultValue => undef &>
+ </td>
+ </tr>
+% }
+% if (defined $ShowSingleQueue) {
+ <tr>
+ <td class="collection-as-table" style="text-align:left;">Show Queue:</td>
+ <td COLSPAN=3 class="collection-as-table" style="text-align:left;">
+ <& /Elements/SelectQueue, Name=>"Queue", Default=>$Queue ,ShowNullOption=>0,
+ CheckQueueRight=>'SeeQueue' &>
+ </td>
+ </tr>
+% }
+% if (defined $ShowDates) {
+ <tr>
+ <& /RTx/Statistics/Elements/DateSelectRow, Label => "Start Date:",
+ refMonth => $sMonth, nameMonth => "sMonth",
+ refDay => $sDay, nameDay => "sDay",
+ refYear => $sYear, nameYear => "sYear" &>
+ </tr>
+ <tr>
+ <& /RTx/Statistics/Elements/DateSelectRow, Label => "End Date:",
+ refMonth => $eMonth, nameMonth => "eMonth",
+ refDay => $eDay, nameDay => "eDay",
+ refYear => $eYear, nameYear => "eYear" &>
+ </tr>
+ <tr>
+ <td class="collection-as-table" style="text-align:left;">Show Weekends:</td>
+ <td class="collection-as-table" style="text-align:left;">
+ <select name=weekends>
+ <option value=0 <% (!$weekends) && 'selected' %> >No</option>
+ <option value=1 <% $weekends && 'selected' %> >Yes</option>
+ </select>
+ </td>
+ </tr>
+% }
+% if (defined $ShowMultiQueues) {
+ <tr>
+% if (defined $ShowDates) {
+%# If we're showing the dates, we put these side by side.
+ <td COLSPAN=2 class="collection-as-table" style="text-align:left;">Select All Queues: <input type=checkbox name="AddAllCheck"></td>
+ <td COLSPAN=3 class="collection-as-table" >
+ <& /RTx/Statistics/Elements/SelectMultiQueue, Name=>"queues", Selected=>$queues_ref,
+ ShowNullOption=>0, CheckQueueRight=>'SeeQueue', Size => 10, NamedValues => 1 &>
+ </td>
+% } else {
+ <td COLSPAN=3 class="collection-as-table" style="text-align:left;">
+ <& /RTx/Statistics/Elements/SelectMultiQueue, Name=>"queues", Selected=>$queues_ref,
+ ShowNullOption=>0, CheckQueueRight=>'SeeQueue', Size => 10, NamedValues => 1 &>
+ </td>
+ </tr>
+ <tr>
+ <td class="collection-as-table" style="text-align:left;">Select All Queues: <input type=checkbox name="AddAllCheck"></td>
+% }
+ </tr>
+% }
+ <& /RTx/Statistics/Elements/ControlsAsTable/UpdatePage &>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+<BR>
+<%args>
+$Title => undef
+$ShowMultiQueues => undef
+$queues_ref => undef
+$ShowDates => undef
+$sMonth => undef
+$sDay => undef
+$sYear => undef
+$eMonth => undef
+$eDay => undef
+$eYear => undef
+$weekends => undef
+$ShowSingleQueue => undef
+$Queue => undef
+$ShowStatus => undef
+$Status => undef
+</%args>
+
diff --git a/rt/html/RTx/Statistics/Elements/ControlsAsTable/UpdatePage b/rt/html/RTx/Statistics/Elements/ControlsAsTable/UpdatePage
new file mode 100644
index 000000000..b4ccfd56f
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/ControlsAsTable/UpdatePage
@@ -0,0 +1,5 @@
+<tr>
+ <td colspan="4" style="text-align:center;padding-top:3px; background-color:#C8C8C8;">
+ <INPUT TYPE="submit" VALUE="<&|/l&>Update Page</&>">
+ </td>
+</tr>
diff --git a/rt/html/RTx/Statistics/Elements/DateSelectRow b/rt/html/RTx/Statistics/Elements/DateSelectRow
new file mode 100644
index 000000000..325e168c9
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/DateSelectRow
@@ -0,0 +1,55 @@
+ <td class="collection-as-table" style="text-align:left;"><% $Label %></td>
+ <td class="collection-as-table" style="text-align:left;">
+ <select name=<% $nameMonth %> >
+% for ($n=0;$n<=$#Statistics::months;$n++){
+% if ($$refMonth eq $n){
+% $selected ="selected";
+% }else {
+% $selected ="";
+% }
+ <option value=<% $n %> <% $selected %> ><% $Statistics::months[$n] %></option>
+%}
+ </select>
+ </td>
+ <td class="collection-as-table" style="text-align:left;">
+ <select name=<% $nameDay %> >
+% for ($n=1;$n<=31;$n++){
+% if ($$refDay == $n ){
+% $selected ="selected";
+% }else {
+% $selected ="";
+% }
+ <option value=<% $n %> <% $selected %> ><% $n %></option>
+% }
+ </select>
+ </td>
+ <td class="collection-as-table" style="text-align:left;">
+ <select name=<% $nameYear %> >
+%
+% for ($n=0;$n <= scalar @Statistics::years-1;$n++){
+% if ($Statistics::years[$n] == $$refYear){
+% $selected ="selected";
+% }else{
+% $selected ="";
+% }
+ <option value=<% $Statistics::years[$n] %> <% $selected %> ><% $Statistics::years[$n] %></option>
+% }
+ </select>
+ </td>
+
+
+<%args>
+$Label => undef
+$refMonth => undef
+$nameMonth => undef
+$refDay => undef
+$nameDay => undef
+$refYear => undef
+$nameYear => undef
+</%args>
+<%init>
+use RTx::Statistics;
+my $n;
+my $selected;
+
+</%init>
diff --git a/rt/html/RTx/Statistics/Elements/DurationAsString b/rt/html/RTx/Statistics/Elements/DurationAsString
new file mode 100755
index 000000000..c0b4d9af4
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/DurationAsString
@@ -0,0 +1,18 @@
+<%$days|'00'%> days <%$hours|'00'%>:<%$minutes|'00'%>
+<%INIT>
+
+my $MINUTE = 60;
+my $HOUR = $MINUTE*60;
+my $DAY = $HOUR * 24;
+my $WEEK = $DAY * 7;
+my $days = int($Duration / $DAY);
+$Duration = $Duration % $DAY;
+my $hours = int($Duration / $HOUR);
+$hours = sprintf("%02d", $hours);
+$Duration = $Duration % $HOUR;
+my $minutes = int($Duration/$MINUTE);
+$minutes = sprintf("%02d", $minutes);
+</%INIT>
+<%ARGS>
+$Duration => undef
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/Elements/GraphBox b/rt/html/RTx/Statistics/Elements/GraphBox
new file mode 100644
index 000000000..3dc06973e
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/GraphBox
@@ -0,0 +1,27 @@
+<div style="float:left; padding-right:30px;">
+<table class="box" bgcolor="#336699" style="border-style:none solid solid solid;border-width:1px;border-color:#2E2E8C;" cellpadding="0" cellspacing="0">
+ <tbody><tr>
+ <th style="color: rgb(51, 102, 153);" class="titlebox">
+ <span class="titleboxclose">
+ <a href="#" onclick="hideshow('stats_chart')">X</a></span>&nbsp;
+
+ <span class="titleboxtitle">
+ <b><a href="<% $GraphURL %>">Download Chart as Image</a></b>
+ </span>
+ </th>
+ <th style="color: rgb(51, 102, 153);" class="titleboxright">
+ <span class="titleboxright">&nbsp;</span>
+ </th>
+ </tr>
+
+ <tr id="element-stats_chart">
+ <td colspan="3" class="" bgcolor="#dddddd">
+ <img src="<% $GraphURL %>" ALT="Result Graph" >
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<%args>
+$GraphURL => undef
+</%args>
diff --git a/rt/html/Ticket/Elements/ShowMemberOf b/rt/html/RTx/Statistics/Elements/SelectMultiQueue
index e443132bc..637f6dc80 100644..100755
--- a/rt/html/Ticket/Elements/ShowMemberOf
+++ b/rt/html/RTx/Statistics/Elements/SelectMultiQueue
@@ -43,15 +43,39 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<UL>
-% my $memberof = $Ticket->MemberOf;
-% while (my $member_of = $memberof->Next) {
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>]
+<SELECT NAME ="<%$Name%>" multiple size="<% $Size %>">
+% if ($ShowNullOption) {
+<OPTION VALUE="">-</OPTION>
% }
-</UL>
+% while (my $queue=$q->Next) {
+% if ($ShowAllQueues || $queue->CurrentUserHasRight($CheckQueueRight)) {
+% my $targ="," . $queue->Name . ",";
+<OPTION VALUE="<%($NamedValues ? $queue->Name : $queue->Id) %>" <%( ($sel_list =~ m/$targ/) ? 'SELECTED' : '')%>><%$queue->Name%>
+% if (($Verbose) and ($queue->Description) ){
+(<%$queue->Description%>)
+% }
+</OPTION>
+% }
+% }
+</SELECT>
+<%ARGS>
+$CheckQueueRight => 'CreateTicket'
+$ShowNullOption => 1
+$ShowAllQueues => 1
+$Name => undef
+$Verbose => undef
+$NamedValues => 0
+$Selected => undef # ref to array containing selected queue names
+$Lite => 0
+$Size => 5
+</%ARGS>
<%INIT>
+
+# put list of queue names into string, starting and ending with commas
+my $sel_list = "," . join(",", @$Selected) . ",";
+
+my $q=new RT::Queues($session{'CurrentUser'});
+$q->UnLimit;
+
</%INIT>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/html/RTx/Statistics/Elements/StatColumnMap b/rt/html/RTx/Statistics/Elements/StatColumnMap
new file mode 100644
index 000000000..aef9e2f3e
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/StatColumnMap
@@ -0,0 +1,173 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 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., 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 }}}
+<%ARGS>
+$Name => undef
+$Attr => undef
+</%ARGS>
+
+
+<%ONCE>
+our ( $STAT_COLUMN_MAP );
+
+sub StatColumnMap {
+ my $name = shift;
+ my $attr = shift;
+
+ # First deal with the simple things from the map
+ if ( $STAT_COLUMN_MAP->{$name} ) {
+ return ( $STAT_COLUMN_MAP->{$name}->{$attr} );
+ }
+
+ # now, let's deal with harder things, like Custom Fields
+
+ elsif ( $name =~ /^(?:CF|CustomField)\.\{(.+)\}$/ ) {
+ my $field = $1;
+
+ if ( $attr eq 'attribute' ) {
+ return (undef);
+ }
+ elsif ( $attr eq 'title' ) {
+ return ( $field );
+ }
+ elsif ( $attr eq 'value' ) {
+ # Display custom field contents, separated by newlines.
+ # For Image custom fields we also show a thumbnail here.
+ return sub {
+ my $values = $_[0]->CustomFieldValues($field);
+ return map {
+ (
+ ($_->CustomFieldObj->Type eq 'Image')
+ ? \($m->scomp( '/Elements/ShowCustomFieldImage', Object => $_ ))
+ : $_->Content
+ ),
+ \'<br>',
+ } @{ $values->ItemsArrayRef }
+ };
+ }
+ }
+}
+
+sub LinkCallback {
+ my $method = shift;
+
+ my $mode = $RT::Ticket::LINKTYPEMAP{$method}{Mode};
+ my $type = $RT::Ticket::LINKTYPEMAP{$method}{Type};
+ my $mode_uri = $mode.'URI';
+ my $local_type = 'Local'.$mode;
+
+ return sub {
+ map {
+ \'<A HREF="',
+ $_->$mode_uri->Resolver->HREF,
+ \'">',
+ ( $_->$mode_uri->IsLocal ? $_->$local_type : $_->$mode ),
+ \'</A><BR>',
+ } @{ $_[0]->Links($mode,$type)->ItemsArrayRef }
+ }
+}
+
+$STAT_COLUMN_MAP = {
+ LastUpdated => {
+ attribute => 'LastUpdated',
+ title => 'Last Updated',
+ value => sub { return $_[0]->LastUpdatedObj->AsString }
+ },
+
+ Statistics_Date => {
+ title => 'Date',
+ value => sub { return $_[0]{values}{Statistics_Date} }
+ },
+
+ Statistics_Created_Count => {
+ title => 'Created',
+ value => sub { return $_[0]{values}{Statistics_Created_Count} }
+ },
+
+ Statistics_Resolved_Count => {
+ title => 'Resolved',
+ value => sub { return $_[0]{values}{Statistics_Resolved_Count} }
+ },
+
+ Statistics_Deleted_Count => {
+ title => 'Deleted',
+ value => sub { return $_[0]{values}{Statistics_Deleted_Count} }
+ },
+
+ Statistics_Totals => {
+ title => 'Totals',
+ value => sub { return $_[0]{values}{Statistics_Totals} }
+ },
+
+ Statistics_Status => {
+ title => 'Status',
+ value => sub { return $_[0]{values}{Statistics_Status} }
+ },
+
+ Statistics_Dynamic => {
+ # Depends on having a KEY as second param
+ value => sub {
+ my $record = shift;
+ my $line = shift;
+ my $key = shift;
+ return $$record{values}{$key}
+ }
+ },
+
+ # Everything from LINKTYPEMAP
+ (map {
+ $_ => { value => LinkCallback( $_ ) }
+ } keys %RT::Ticket::LINKTYPEMAP),
+
+ '_CLASS' => {
+ value => sub { return $_[1] % 2 ? 'oddline' : 'evenline' }
+ },
+
+};
+</%ONCE>
+<%init>
+$m->comp( '/Elements/Callback', STAT_COLUMN_MAP => $STAT_COLUMN_MAP, _CallbackName => 'StatColumnMap');
+return StatColumnMap($Name, $Attr);
+</%init>
diff --git a/rt/html/RTx/Statistics/Elements/Tabs b/rt/html/RTx/Statistics/Elements/Tabs
new file mode 100755
index 000000000..4fde113ea
--- /dev/null
+++ b/rt/html/RTx/Statistics/Elements/Tabs
@@ -0,0 +1,72 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# 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.
+%#
+%# 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.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Elements/Tabs,
+ tabs => $tabs,
+ current_toptab => 'RTx/Statistics/index.html',
+ current_tab => $current_tab,
+ Title => $Title &>
+
+<%INIT>
+ my $tabs = { A => { title => loc('Tickets per Day'),
+ path => 'RTx/Statistics/CallsQueueDay/index.html',
+ },
+ B => { title => loc('Tickets by status'),
+ path => 'RTx/Statistics/OpenStalled/index.html',
+ },
+ C => { title => loc('Multiple Queues'),
+ path => 'RTx/Statistics/CallsMultiQueue/index.html',
+ },
+ D => { title => loc('Ticket Trends by Day'),
+ path => 'RTx/Statistics/DayOfWeek/index.html',
+ },
+ E => { 'title' => loc('Time to Resolve'),
+ path => 'RTx/Statistics/Resolution/index.html',
+ },
+ F => { 'title' => loc('Resolve Time Graph'),
+ path => 'RTx/Statistics/TimeToResolve/index.html',
+ },
+ Z => { 'title' => loc('FAQ'),
+ path => 'RTx/Statistics/FAQ/index.html',
+ },
+ };
+
+ # Now let callbacks add their extra tabs
+ $m->comp('/Elements/Callback', tabs => $tabs, %ARGS);
+
+ foreach my $tab (sort keys %{$tabs}) {
+ if ($tabs->{$tab}->{'path'} eq $current_tab) {
+ $tabs->{$tab}->{"subtabs"} = $subtabs;
+ $tabs->{$tab}->{"current_subtab"} = $current_subtab;
+ }
+ }
+
+</%INIT>
+
+
+<%ARGS>
+$subtabs => undef
+$current_tab => undef
+$current_subtab => undef
+$Title => undef
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/FAQ/index.html b/rt/html/RTx/Statistics/FAQ/index.html
new file mode 100644
index 000000000..e7839eaad
--- /dev/null
+++ b/rt/html/RTx/Statistics/FAQ/index.html
@@ -0,0 +1,23 @@
+<& /Elements/Header, Title => 'FAQ and known issues' &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc("FAQ and Known Issues") &>
+<hr noshade size="1">
+<p>This page will be used to contain known issues and FAQ`s for the Statistics
+package<br />
+This will also be used to clarify limitations of the package as they stand.</p>
+
+<p><strong>What Version of the Statistics package is this?</strong></p>
+<p>0.1.8</p>
+
+<p><strong>What time zone are the charts set to?</strong></p>
+<p>Because of the new programming method of the date functions, the charts are currently built in GMT(UTC). This may once again be
+customisable in a future release.</p>
+
+<p><strong>What is the default date period and queue?</strong></p>
+<p>The default date period is the previous 10 days, except where the chart is over a fixed 7 day period. The default queue is either
+General, or another queue set in your local configuration.</p>
+
+<p><strong>What are the limitations of the date function?</strong></p>
+<p>It has few, but it will not let you chose less than one day. you cannot select an end date before the start date and it is not
+recommended to select a date in the future or an illegal date, such at 30th February. Code has been put in place to trap these, but it may
+not be fool proof.</p>
+<hr size="1" noshade>
diff --git a/rt/html/RTx/Statistics/OpenStalled/Elements/Chart b/rt/html/RTx/Statistics/OpenStalled/Elements/Chart
new file mode 100755
index 000000000..9505881e8
--- /dev/null
+++ b/rt/html/RTx/Statistics/OpenStalled/Elements/Chart
@@ -0,0 +1,27 @@
+<%perl>
+$r->content_type("image/$format");
+print $graph->plot(\@data)->$format();
+$m->abort();
+print $#data+1 . " Elements:<p>";
+for (0..$#data) {
+print $data[$_];
+print "<p>";
+}
+</%perl>
+<%INIT>
+use GD::Graph::bars;
+
+my @data;
+my $graph = GD::Graph::bars->new($Statistics::GraphWidth,$Statistics::GraphHeight);
+$graph->set(export_format => "png",
+ x_label => 'Queue name',
+ y_label => 'Total per queue by status');
+my $format = $graph->export_format;
+$graph->set_legend(split /,/ , $ARGS{set_legend});
+push @data, [split /,/ , $ARGS{x_labels}];
+push @data, [split /,/ , $ARGS{data1}];
+push @data, [split /,/ , $ARGS{data2}];
+push @data, [split /,/ , $ARGS{data3}];
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/OpenStalled/Results.tsv b/rt/html/RTx/Statistics/OpenStalled/Results.tsv
new file mode 100644
index 000000000..2ec1e0c4a
--- /dev/null
+++ b/rt/html/RTx/Statistics/OpenStalled/Results.tsv
@@ -0,0 +1,114 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2005 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., 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 }}}
+<%ARGS>
+@queues => @Statistics::OpenStalledQueueList
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+use Time::Local;
+
+ my $n = 0;
+ my @data;
+ my @msgs;
+ my %totals;
+ my $QueryString;
+ my $now = new RT::Date($session{CurrentUser});
+ my $tix = new RT::Tickets($session{'CurrentUser'});
+
+ my %queues = map {
+ $_ => 1;
+ } (@queues);
+
+ # set content type
+ $r->content_type('application/vnd.ms-excel');
+
+ $QueryString = "queues=" . join("&queues=", @queues);
+
+ my $queue = new RT::Queues($session{CurrentUser});
+ $queue->UnLimit;
+
+ my $QueueObj = new RT::Queue($session{'CurrentUser'});
+ $QueueObj->Load($queue);
+
+ # Put out some data about the generation of this file
+ $m->out("Tickets by Status by Queue for Queues:\t" . join(',', @queues) . "\tGenerated at:\t" . Statistics::FormatDate("%x %X", $now). "\n\n");
+
+ # basically the same as index.html
+
+ # Output header row
+ $m->out("Status");
+ for ( sort keys %queues) {
+ push @data, $_;
+ my $Queueobj = new RT::Queue($session{'CurrentUser'});
+ $Queueobj->Load($_);
+ next if !$Queueobj->CurrentUserHasRight('SeeQueue');
+ $m->out("\t" . $_);
+ }
+ $m->out("\tTotals\n");
+
+ foreach my $s (qw(new open stalled)) {
+ $m->out("$s");
+ my $total=0;
+ foreach my $q (sort keys %queues) {
+ $tix = new RT::Tickets($session{'CurrentUser'});
+ $tix->LimitQueue(VALUE => "$q");
+ $tix->LimitStatus(VALUE => "$s");
+ $totals{$q} += $tix->Count; # Add up columns for each queue
+ $m->out("\t" . $tix->Count);
+ $total += $tix->Count;
+ }
+ $m->out("\t$total\n");
+ $totals{"Totals"} += $total;
+ }
+ $m->out("Totals");
+ foreach my $q (sort keys %queues) {
+ $m->out("\t" . $totals{$q});
+ }
+ $m->out("\t" . $totals{"Totals"} . "\n");
+
+ $m->abort();
+</%INIT>
diff --git a/rt/html/RTx/Statistics/OpenStalled/index.html b/rt/html/RTx/Statistics/OpenStalled/index.html
new file mode 100755
index 000000000..d0cd9f158
--- /dev/null
+++ b/rt/html/RTx/Statistics/OpenStalled/index.html
@@ -0,0 +1,188 @@
+<& /Elements/Header, Title => loc('New, Open and Stalled tickets by Queue') &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc('New, Open and Stalled tickets by Queue') &>
+
+<h3>Description</h3>
+<p>The purpose of this page is to show a snapshot of the current status of tickets by Queue. You can multi select Queues from the dropdown
+list or simply show all available queues. This will indicate how many tickets have not yet been viewed (New), how many have been at least
+viewed once (Open) and how many have had their status changed to stalled.</p>
+
+<form method="POST" action="index.html">
+
+%my $tix = new RT::Tickets($session{'CurrentUser'});
+%if ($queue) {
+% $tix->LimitQueue (VALUE => $queue);
+%}
+
+
+%my $title = "New, Open and Stalled Tickets in " . join(', ', @queues);
+<& /Elements/TitleBoxStart, title => $title, title_href => "/RTx/Statistics/OpenStalled/index.html?$QueryString"&>
+<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH="100%">
+% if ($ShowHeader) {
+<& /RTx/Statistics/Elements/CollectionAsTable/Header,
+ Format => \@RowFormat,
+ FormatString => $RowFormat,
+ AllowSorting => $AllowSorting,
+ Order => $Order,
+ Query => undef,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy ,
+ BaseURL => $BaseURL,
+ maxitems => $maxitems &>
+% }
+
+% for ( sort keys %queues_to_show) {
+% push @data, $_;
+% }
+% my @legend;
+% my $total = 0;
+% my $line = 0;
+%# NOTE need to handle all status values (see share/html/Elements/SelectStatus).
+% foreach my $s (qw(new open stalled)) {
+% $line++;
+% push @legend, $s;
+% $total=0;
+% foreach my $q (sort keys %queues_to_show) {
+% $tix = new RT::Tickets($session{'CurrentUser'});
+% $tix->LimitQueue(VALUE => "$q");
+% $tix->LimitStatus(VALUE => "$s");
+% push @data, $tix->Count;
+% $totals{$q} += $tix->Count; # Add up columns for each queue
+% $total += $tix->Count;
+% $values{$q} = $tix->Count;
+% }
+% $totals{"Totals"} += $total;
+% $values{Statistics_Status} = $s;
+% $values{Statistics_Totals} = $total;
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@RowFormat, i => $line, record => $record, maxitems => $maxitems &>
+% }
+% $values{Statistics_Status} = "Totals";
+% foreach my $q (sort keys %queues_to_show) {
+% $values{$q} = $totals{$q};
+% }
+% $values{Statistics_Totals} = $totals{"Totals"};
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@BoldRowFormat, i => $line+1, record => $record, maxitems => $maxitems &>
+</table>
+<& /Elements/TitleBoxEnd&>
+
+<hr>
+
+<BR />
+<BR />
+
+% use Data::Dumper;
+% Statistics::DebugLog("Dump of data array is " . Dumper(@data) . "\n");
+% my $url = 'Elements/Chart?x_labels=';
+% for (1..(scalar keys %queues_to_show)) {
+% $url .= $m->interp->apply_escapes((shift @data),'u') . ',';
+% }
+% chop $url;
+% $url .= '&data1=' ;
+% for (1..(scalar keys %queues_to_show)) {
+% $url .= $m->interp->apply_escapes((shift @data),'u') . ',';
+% }
+% chop $url;
+% $url .= '&data2=' ;
+% for (1..(scalar keys %queues_to_show)) {
+% $url .= $m->interp->apply_escapes((shift @data),'u') . ',';
+% }
+% chop $url;
+% $url .= '&data3=' ;
+% for (1..(scalar keys %queues_to_show)) {
+% $url .= $m->interp->apply_escapes((shift @data),'u') . ',';
+% }
+% $url .= '&set_legend='.(join ",", @legend);
+
+
+<& /RTx/Statistics/Elements/GraphBox, GraphURL => $url &>
+
+<& /RTx/Statistics/Elements/ControlsAsTable/ControlBox, Title => "Select Queues", ShowMultiQueues => 1, queues_ref => \@queues &>
+
+<a href="<%$RT::WebPath%>/RTx/Statistics/OpenStalled/index.html?<% $QueryString %>"><&|/l&>Bookmarkable link</&></a>
+%# | <a href="<%$RT::WebPath%>/RTx/Statistics/OpenStalled/Results.tsv?<%$QueryString%>"><&|/l&>spreadsheet</&></a>
+<BR>
+<BR>
+
+</FORM>
+
+% Statistics::DebugInit( $m );
+
+<%ARGS>
+@queues => @Statistics::OpenStalledQueueList
+$AllowSorting => undef
+$Order => undef
+$OrderBy => undef
+$ShowNavigation => 1
+$ShowHeader => 1
+$Rows => 50
+$Page => 1
+$BaseURL => undef
+$AddAllCheck => undef
+</%ARGS>
+
+<%INIT>
+ use RTx::Statistics;
+
+ my $n = 0;
+ my @data;
+ my @msgs;
+ my %totals;
+ my $QueryString;
+ my %queues_to_show;
+ my $maxitems;
+ my $RowFormat;
+ my $BoldRowFormat;
+ my %record;
+ my %values;
+ my $record = \%record;
+
+ $record{values} = \%values;
+
+ Statistics::DebugClear();
+
+ # Handle the Add All Checkbox
+ if($AddAllCheck eq "on") {
+ $AddAllCheck = undef;
+ undef (@queues);
+ my $q=new RT::Queues($session{'CurrentUser'});
+ $q->UnLimit;
+ while (my $queue=$q->Next) {
+ next if !$queue->CurrentUserHasRight('SeeQueue');
+ push @queues, $queue->Name;
+ }
+ }
+
+ # If the user has the right to see the queue, put it into the map
+ for my $q (@queues) {
+ my $Queueobj = new RT::Queue($session{'CurrentUser'});
+ $Queueobj->Load($q);
+ next if !$Queueobj->CurrentUserHasRight('SeeQueue');
+ $queues_to_show{$q} = 1;
+ }
+
+ $maxitems = (scalar @queues) + 2;
+
+ # Build the new query string
+ $QueryString = "queues=" . join("&queues=", @queues);
+
+ # Build the format strings
+ $RowFormat = "'__Statistics_Status__'";
+ $BoldRowFormat = "'<B>__Statistics_Status__</B>'";
+ for my $q (@queues) {
+ $RowFormat .= ",'__Statistics_Dynamic__/KEY:$q/TITLE:$q/STYLE:text-align:right;'";
+ $BoldRowFormat .= ",'<B>__Statistics_Dynamic__</B>/KEY:$q/TITLE:$q/STYLE:text-align:right;'";
+ }
+ $RowFormat .= ",'<B>__Statistics_Totals__</B>/STYLE:text-align:right;'";
+ $BoldRowFormat .= ",'<B>__Statistics_Totals__</B>/STYLE:text-align:right;'";
+ # Parse the formats into structures.
+ my (@RowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $RowFormat);
+ my (@BoldRowFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldRowFormat);
+
+
+ my $queue = new RT::Queues($session{CurrentUser});
+ $queue->UnLimit;
+
+ my $QueueObj = new RT::Queue($session{'CurrentUser'});
+ $QueueObj->Load($queue);
+
+</%INIT>
diff --git a/rt/html/RTx/Statistics/Resolution/Elements/Chart b/rt/html/RTx/Statistics/Resolution/Elements/Chart
new file mode 100755
index 000000000..fa0ac5538
--- /dev/null
+++ b/rt/html/RTx/Statistics/Resolution/Elements/Chart
@@ -0,0 +1,29 @@
+<%perl>
+$r->content_type("image/$format");
+print $graph->plot(\@data)->$format();
+$m->abort();
+print $#data+1 . " Elements:<p>";
+for (0..$#data) {
+print $data[$_];
+print "<p>";
+}
+</%perl>
+<%INIT>
+use GD::Graph::lines;
+
+my @data;
+my $graph = GD::Graph::lines->new($Statistics::GraphWidth,$Statistics::GraphHeight);
+$graph->set(export_format => "png",
+ x_label => 'Days',
+ y_label => 'Average time in Days');
+
+push @data, [split /,/ , $ARGS{x_labels}];
+push @data, [split /,/ , $ARGS{data1}];
+push @data, [split /,/ , $ARGS{data2}];
+push @data, [split /,/ , $ARGS{data3}];
+
+my $format = $graph->export_format;
+#$r->content_type("image/$format");
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/Resolution/index.html b/rt/html/RTx/Statistics/Resolution/index.html
new file mode 100644
index 000000000..d9885b093
--- /dev/null
+++ b/rt/html/RTx/Statistics/Resolution/index.html
@@ -0,0 +1,269 @@
+<& /Elements/Header, Title => 'Time to Resolution' &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc("Time To Resolve tickets by Queue for : " .$QueueObj->Name()) &>
+<h3>Description</h3>
+<p>This page shows details of resolution of tickets in the selected queue. It displays tickets created on each day in your selected date
+range. Of those tickets created on that day, how many have been resolved and the total time it has taken for all tickets created on that
+day to be resolved.</p>
+<p>At the bottom of the chart is shows total time taken to resolve all tickets
+in the selected date range and the average time per ticket to
+resolve.</p>
+
+<form method="POST" action="index.html">
+
+%my $title = "Time to resolve in " . $QueueObj->Name() . " per day from " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[0]) . " through " .
+% Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$#dates-1]);
+<&|/Elements/TitleBox,
+ title => $title,
+ title_href => "/RTx/Statistics/Resolution/index.html?$QueryString" &>
+<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
+% if ($ShowHeader) {
+<& /RTx/Statistics/Elements/CollectionAsTable/Header,
+ Format => \@Format,
+ FormatString => $Format,
+ AllowSorting => $AllowSorting,
+ Order => $Order,
+ Query => undef,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy ,
+ BaseURL => $BaseURL,
+ maxitems => $maxitems &>
+% }
+% my $line = 1;
+% LINE: for my $d (0..$#dates ) {
+% if ($d == $#dates ){
+% next LINE;
+% }
+% my $x = 1;
+% $values{Statistics_Date} = Statistics::FormatDate($Statistics::PerDayDateFormat, $dates[$d]);
+% my $tix = new RT::Tickets($session{'CurrentUser'});
+% $tix->LimitCreated(VALUE => $dates[$d]->ISO, OPERATOR => ">=");
+% if ($dates[$d+1]) {
+% $tix->LimitCreated(VALUE => $dates[$d+1]->ISO, OPERATOR => "<=");
+% }
+% if ($Queue) {
+% $tix->LimitQueue (VALUE => $Queue);
+% }
+% $values{Statistics_Created_Count} = $tix->Count;
+% $tix->LimitStatus(VALUE => "resolved");
+% $values{Statistics_Resolved_Count} = $tix->Count;
+% if ($tix->Count) {
+% my @tix = @{$tix->ItemsArrayRef};
+% my $total;
+% $total += ($_->ResolvedObj->Unix - $_->CreatedObj->Unix) for @tix;
+% $size+= ($#tix +1);
+% $grandtotal += $total;
+% $values{Duration} = Statistics::DurationAsString($total);
+% $data[$x++][$d] = int ($total );
+% } else {
+% $values{Duration} = "N/A";
+% }
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@Format, i => $line, record => $record, maxitems => $maxitems &>
+% $line++;
+%}
+% $size =1 if $size==0;
+% $values{text} = "Average time to resolve = " . Statistics::DurationAsString($grandtotal / $size);
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@OneCellFormat, i => $line, record => $record, maxitems => $maxitems &>
+% $line++;
+% $values{text} = "Total time to resolve = " . Statistics::DurationAsString( $grandtotal );
+<& /RTx/Statistics/Elements/CollectionAsTable/Row, Format => \@OneCellFormat, i => $line, record => $record, maxitems => $maxitems &>
+% $line++;
+</table>
+</&>
+
+<hr>
+
+<BR />
+<BR />
+
+<%perl>
+# Create the graph URL
+
+# change the total time to resolve to a floating point number of days
+foreach my $dat(@{$data[1]} ){
+ $dat = ($dat / $Statistics::secsPerDay);
+ $dat = sprintf("%0.4f", $dat);
+}
+
+my $url = 'Elements/Chart?x_labels=';
+for (0..$diff-1) {
+ $url .= $data[0][$_] . ",";
+}
+chop $url;
+shift @data;
+$url .= "&data1=";
+for(0..$diff-1) {
+ $data[0][$_] = 0 if !$data[0][$_];
+ $url .= $data[0][$_] . ",";
+}
+</%perl>
+
+<& /RTx/Statistics/Elements/GraphBox, GraphURL => $url &>
+
+<& /RTx/Statistics/Elements/ControlsAsTable/ControlBox,
+ Title => "Change Queue or Dates",
+ ShowDates => 1, sMonth => \$sMonth, sDay => \$sDay, sYear => \$sYear,
+ eMonth => \$eMonth, eDay => \$eDay, eYear => \$eYear,
+ weekends => $weekends,
+ ShowSingleQueue => 1, Queue => $Queue
+ &>
+
+</form>
+
+<%ARGS>
+$max => $Statistics::TimeToResolveMaxRows
+$Queue => undef
+$weekends =>$Statistics::TimeToResolveWeekends
+$sMonth=>undef
+$sDay=>undef
+$sYear=>undef
+$eMonth=>undef
+$eDay=>undef
+$eYear=>undef
+$days=>undef
+$currentMonth=>undef
+
+$AllowSorting => undef
+$Order => undef
+$OrderBy => undef
+$ShowNavigation => 1
+$ShowHeader => 1
+$Rows => 50
+$Page => 1
+$BaseURL => undef
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+use Time::Local;
+my $n = 0;
+my @data = ([]);
+my @dates;
+my @msgs;
+my $size;
+my $selected;
+my $grandtotal = 0;
+my $diff;
+my $sEpoch=0;
+my $eEpoch=0;
+my $QueryString;
+
+my $maxitems = 4;
+my %record;
+my %values;
+my $record = \%record;
+
+$record{values} = \%values;
+
+
+# If debugging, set things up and display all the args
+Statistics::DebugClear();
+Statistics::DebugLog("CallsQueueDay/index.html ARGS:\n");
+for my $key (keys %ARGS) {
+ Statistics::DebugLog("ARG{ $key }=" . $ARGS{$key} . "\n");
+}
+
+my $Format = qq{ Statistics_Date,
+ '__Statistics_Created_Count__/STYLE:text-align:right;',
+ '__Statistics_Resolved_Count__/STYLE:text-align:right;',
+ '__Statistics_Dynamic__/KEY:Duration/TITLE:Time To Resolve/STYLE:text-align:right;' };
+my $BoldFormat = qq{ '<B>__Statistics_Date__</B>',
+ '<B>__Statistics_Created_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Resolved_Count__</B>/STYLE:text-align:right;',
+ '<B>__Statistics_Dynamic__</B>/KEY:Duration/TITLE:Time To Resolve/STYLE:text-align:right;' };
+
+# TODO need way to make this cell do colspan
+my $OneCellFormat = qq{ '<B>__Statistics_Dynamic__</B>/KEY:text/STYLE:text-align:left;','','','' };
+
+my (@Format) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $Format);
+my (@BoldFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $BoldFormat);
+my (@OneCellFormat) = $m->comp('/RTx/Statistics/Elements/CollectionAsTable/ParseFormat', Format => $OneCellFormat);
+
+Statistics::DebugLog("CallsQueueDay/index.html Format array=" . join(',', @Format) . "\n");
+
+if ($sDay > $Statistics::monthsMaxDay{$sMonth}) {
+ $sDay = $Statistics::monthsMaxDay{$sMonth};
+}
+
+if ($eDay > $Statistics::monthsMaxDay{$eMonth}) {
+ $eDay = $Statistics::monthsMaxDay{$eMonth};
+}
+
+if ($sYear){
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear-1900);
+}
+if ($eYear){
+Statistics::DebugLog("eMonth = " . $eMonth . "\n");
+ $eEpoch = timelocal(0, 0, 0, $eDay, $eMonth, $eYear-1900);
+} else {
+ # This case happens when the page is first loaded
+ my @local = localtime(time);
+ ($eDay, $eMonth, $eYear) = ($local[3], $local[4], $local[5]);
+ $eYear += 1900;
+ $eEpoch = timelocal(0, 0, 0, $local[3], $local[4], $local[5], $local[6], $local[7], $local[8]);
+Statistics::DebugLog("Setting eEpoch=$eEpoch from current time.\n");
+}
+
+if (($eEpoch < $sEpoch) || ($sEpoch == 0)) {
+ # We have an end, but not a start, or, overlapping.
+
+ # if $currentMonth is set, just set the day to 1
+ if($currentMonth) {
+ # set start vars from end, but with day set to 1
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($eEpoch);
+ $sDay=1;
+ $sEpoch = timelocal(0, 0, 0, $sDay, $sMonth, $sYear);
+ } else {
+ # If the user has specified how many days back to go, use that,
+ # If not, set start to configured default period before end
+ if(defined $days) {
+ $sEpoch = $eEpoch - ($days * $Statistics::secsPerDay);
+ } else {
+ $sEpoch = $eEpoch - ($Statistics::PerDayPeriod * $Statistics::secsPerDay);
+ }
+ (undef, undef, undef, $sDay, $sMonth, $sYear) = localtime($sEpoch);
+ }
+ $sYear += 1900;
+}
+
+# Compute days to chart.
+# The +1 is because we need to generate one more date. If the user
+# selected a 10 day range, we need to generate 11 days.
+$diff = int(($eEpoch - $sEpoch + $Statistics::secsPerDay - 1) / $Statistics::secsPerDay)+1;
+Statistics::DebugLog("Setting diff=$diff\n");
+
+Statistics::DebugLog("sEpoch=$sEpoch, components=" . join(',', localtime($sEpoch)) . "\n");
+Statistics::DebugLog("eEpoch=$eEpoch, components=" . join(',', localtime($eEpoch)) . "\n");
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+if (!defined $Queue) {
+ $QueueObj->Load($Statistics::TimeToResolveQueue);
+ $Queue = $QueueObj->Id();
+}
+
+# Set up the string for the current query for bookmarkable link
+$QueryString = "sDay=$sDay&sMonth=$sMonth&sYear=$sYear&eDay=$eDay&eMonth=$eMonth&eYear=$eYear&weekends=$weekends&Queue=$Queue";
+
+# Set up the end date to be midnight(morning) of the date after the one the user wanted.
+my $endRange = $eEpoch + $Statistics::secsPerDay;
+$QueueObj->Load($Queue);
+# NOTE: list loop starts at the end of the date range, unshifting dates onto
+# the arrays, so that they end up in start to finish order.
+$eEpoch += $Statistics::secsPerDay;
+$n = 0;
+until ($#dates == $diff ) {
+ my $date = new RT::Date($session{CurrentUser});
+ $date->Set(Value=>$endRange - $n, Format => 'unix');
+ # Note: we used to adjust the time to local midnight, but
+ # none of the other date entry fields in RT seem to adjust, so we've stopped.
+ #Statistics::DebugLog("Before adjust to midnight date " . Statistics::FormatDate("%c", $date) . "\n");
+ $n+= $Statistics::secsPerDay;
+ # If we aren't showing weekends and this is one, decrement the number
+ # of days to show and skip to the next date.
+ if(!$weekends and Statistics::RTDateIsWeekend($date)) {$diff--; next;}
+ unshift @dates, $date;
+Statistics::DebugLog("pushing date " . Statistics::FormatDate("%c", $date) . "\n");
+ unshift @{ $data[0] }, Statistics::FormatDate($Statistics::PerDayLabelDateFormat, $date);
+}
+</%INIT>
diff --git a/rt/html/RTx/Statistics/TimeToResolve/Elements/Chart b/rt/html/RTx/Statistics/TimeToResolve/Elements/Chart
new file mode 100755
index 000000000..a069a7bfb
--- /dev/null
+++ b/rt/html/RTx/Statistics/TimeToResolve/Elements/Chart
@@ -0,0 +1,23 @@
+<%perl>
+print $graph->plot(\@data)->$format();
+$m->abort();
+</%perl>
+<%INIT>
+use GD::Graph::points;
+
+my @data;
+my $graph = GD::Graph::points->new(400,300);
+$graph->set(export_format => "png",
+ marker_size => $ARGS{marker_size},
+ x_label => 'Average time to resolve (Days)',
+ y_label => 'Number of tickets resolved' );
+#$r->content_type("image/$format");
+my $format = $graph->export_format;
+push @data, [split /,/ , $ARGS{x_labels}];
+for (1..((scalar keys %ARGS)-2)) {
+ push @data, [split /,/ , $ARGS{"data".$_}];
+}
+
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/TimeToResolve/index.html b/rt/html/RTx/Statistics/TimeToResolve/index.html
new file mode 100755
index 000000000..2124b538d
--- /dev/null
+++ b/rt/html/RTx/Statistics/TimeToResolve/index.html
@@ -0,0 +1,75 @@
+<& /Elements/Header, Title => 'Time to Resolve in Queue' &>
+<& /RTx/Statistics/Elements/Tabs, Title => 'Time to Resolve, by ticket in Queue:' . $QueueObj->Name() &>
+
+<h3>Description</h3>
+<p>This page displays the same information as the Time to Resolve chart, but in a scattergraph format and only for the previous 7 calendar
+days. It only displays data for tickets which have been resolved. Each division on the Days axis is one day and the granularity of this chart
+is 30 minutes.</p>
+<form method="POST">
+
+<table>
+ <tr>
+ <td>Show Queue:</td>
+ <td COLSPAN=3><& /Elements/SelectQueue, Name=>"queue", Default=>$queue ,ShowNullOption=>0,
+ CheckQueueRight=>'SeeQueue' &></td>
+ </tr>
+</table>
+<INPUT TYPE="submit" VALUE="Update Page"</INPUT>
+</form>
+
+<BR>
+% my $url = 'Elements/Chart?x_labels=';
+% my $i;
+% $url .= join ",", (map {(int($_/2) == $_/2 && (++$i)%2) ? $_/2 : ""} grep {$counts[$_]} 0..($#counts-1)), "longer";
+% $url .= '&';
+% $url .= "marker_size=1&";
+% $url .= "data1=".(join ",", map { $_ || () } @counts)."&";
+% chop $url;
+<IMG SRC="<% $url %>">
+
+<BR>
+
+%Statistics::DebugInit($m);
+
+<%ARGS>
+$queue => undef
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+
+my @days = qw(Sun Mon Tue Wed Thu Fri Sat);
+my $n = 0;
+my @data = ([]);
+my @msgs;
+my @counts;
+
+Statistics::DebugClear();
+Statistics::DebugLog("TimeToResolve/index.html ARGS:\n");
+for my $key (keys %ARGS) {
+ Statistics::DebugLog("ARG{ $key }=" . $ARGS{$key} . "\n");
+}
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+if (!defined $queue) {
+ $QueueObj->Load($Statistics::TimeToResolveGraphQueue);
+ $queue = $QueueObj->Id();
+} else {
+ $QueueObj->Load($queue);
+}
+
+
+my $tix = new RT::Tickets($session{'CurrentUser'});
+$tix->LimitQueue (VALUE => $queue) if $queue;
+$tix->LimitStatus(VALUE => "resolved");
+$tix->UnLimit;
+if ($tix->Count) {
+ while (my $t = $tix->RT::SearchBuilder::Next) { # BLOODY HACK
+ my $when = $t->ResolvedObj->Unix - $t->CreatedObj->Unix;
+ next unless $when > 0; # Doubly bloody hack
+ my $max = (60*60*24*2) / 1800;
+ my $x = int($when / 1800);
+ $counts[$x > $max ? $max : $x]++;
+ }
+}
+</%INIT>
diff --git a/rt/html/RTx/Statistics/UserTest/Elements/Chart b/rt/html/RTx/Statistics/UserTest/Elements/Chart
new file mode 100755
index 000000000..99eb2a2b1
--- /dev/null
+++ b/rt/html/RTx/Statistics/UserTest/Elements/Chart
@@ -0,0 +1,28 @@
+<%perl>
+print $graph->plot(\@data)->$format();
+$m->abort();
+print $#data+1 . " Elements:<p>";
+for (0..$#data) {
+print $data[$_];
+print "<p>";
+}
+</%perl>
+<%INIT>
+use GD::Graph::lines;
+
+my @data;
+my $graph = GD::Graph::lines->new(640,480);
+$graph->set(export_format => "png",
+ x_label => 'Days',
+ y_label => 'Average time in Days');
+
+push @data, [split /,/ , $ARGS{x_labels}];
+push @data, [split /,/ , $ARGS{data1}];
+push @data, [split /,/ , $ARGS{data2}];
+push @data, [split /,/ , $ARGS{data3}];
+
+my $format = $graph->export_format;
+#$r->content_type("image/$format");
+</%INIT>
+<%ARGS>
+</%ARGS>
diff --git a/rt/html/RTx/Statistics/UserTest/index.html b/rt/html/RTx/Statistics/UserTest/index.html
new file mode 100755
index 000000000..7bc25da70
--- /dev/null
+++ b/rt/html/RTx/Statistics/UserTest/index.html
@@ -0,0 +1,54 @@
+<& /Elements/Header, Title => 'Time to Resolve in Queue' &>
+<& /RTx/Statistics/Elements/Tabs, Title => 'Time to Resolve, by ticket in Queue:' . $QueueObj->Name() &>
+
+
+<form method="POST">
+
+See Queue:<BR>
+<& /Elements/SelectQueue, Name=>"queue", Default => "$queue" &>
+<BR>
+<INPUT TYPE="submit" VALUE="Go!"</INPUT>
+</form>
+
+<BR>
+% my $url = 'Elements/Chart?x_labels=';
+% my $i;
+% $url .= join ",", (map {(int($_/2) == $_/2 && (++$i)%2) ? $_/2 : ""} grep {$counts[$_]} 0..($#counts-1)), "longer";
+% $url .= '&';
+% $url .= "marker_size=1&";
+% $url .= "data1=".(join ",", map { $_ || () } @counts)."&";
+% chop $url;
+<IMG SRC="<% $url %>">
+
+<BR>
+
+<%ARGS>
+$queue => $Statistics::TimeToResolveGraphQueue;
+</%ARGS>
+
+<%INIT>
+use RTx::Statistics;
+
+my @days = qw(Sun Mon Tue Wed Thu Fri Sat);
+my $n = 0;
+my @data = ([]);
+my @msgs;
+my @counts;
+
+my $QueueObj = new RT::Queue($session{'CurrentUser'});
+$QueueObj->Load($queue);
+
+my $tix = new RT::Tickets($session{'CurrentUser'});
+$tix->LimitQueue (VALUE => $queue) if $queue;
+$tix->LimitStatus(VALUE => "resolved");
+$tix->UnLimit;
+if ($tix->Count) {
+ while (my $t = $tix->RT::SearchBuilder::Next) { # BLOODY HACK
+ my $when = $t->ResolvedObj->Unix - $t->CreatedObj->Unix;
+ next unless $when > 0; # Doubly bloody hack
+ my $max = (60*60*24*2) / 1800;
+ my $x = int($when / 1800);
+ $counts[$x > $max ? $max : $x]++;
+ }
+}
+</%INIT>
diff --git a/rt/html/RTx/Statistics/index.html b/rt/html/RTx/Statistics/index.html
new file mode 100755
index 000000000..41490de18
--- /dev/null
+++ b/rt/html/RTx/Statistics/index.html
@@ -0,0 +1,59 @@
+%# BEGIN LICENSE BLOCK
+%#
+%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+%#
+%# (Except where explictly superceded by other copyright notices)
+%#
+%# Copyright this file (c) 2003 Harald Wagener <hwagener@hamburg.fcb.com>
+%#
+%# 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.
+%#
+%# 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.
+%#
+%#
+%# END LICENSE BLOCK
+<& /Elements/Header, Title => loc('RT Statistics') &>
+<& /RTx/Statistics/Elements/Tabs, Title => loc('RT Statistics') &>
+
+<&|/l&><h2>Description</h2>
+<p>These 6 options below enable you to display management data from the RT Database in table and graphical forms, enabling trends, bottlenecks, load problems etc to be identified.
+Each contains a description of how the data is displayed and describes the options available to you.</p></&>
+<ul>
+<li><strong><a href="CallsQueueDay/index.html">
+<&|/l&>Tickets per day per Queue</&></a></strong><br />
+<&|/l&>View the number of tickets created, resolved or deleted in a<br /> specific Queue, over the requested period of days</&>
+</li>
+<li><strong><a href="OpenStalled/index.html">
+<&|/l&>Tickets status by Queue</&></a></strong><br>
+<&|/l&>View numbers of new, open and stalled tickets in a selected Queue</&>
+</li>
+<li><strong><a href="CallsMultiQueue/index.html">
+<&|/l&>Tickets per Day in Multiple Queues</&>
+</a></strong><br>
+<&|/l&>View tickets created, resolved or deleted on in one or more Queues<br /> over a specified time period</&>
+</li>
+<li><strong><a href="DayOfWeek/index.html">
+<&|/l&>Tickets per Day of Week (absolute)</&></a></strong><br>
+<&|/l&>View trends showing when tickets are created, resolved or deleted</&>
+</li>
+<li><strong><a href="Resolution/index.html">
+<&|/l&>Time to Resolve</&></a></strong><br>
+<&|/l&>View how long tickets take to be resolved by Queue</&>
+</li>
+</li>
+<li><strong><a href="TimeToResolve/index.html">
+<&|/l&>Time to Resolve (scatter graph)</&></a></strong><br>
+<&|/l&>View a detailed scatter graph of time to resolve tickets by Queue</&>
+</li>
+</ul>
diff --git a/rt/html/Reports/Activity/ActivityDetail.html b/rt/html/Reports/Activity/ActivityDetail.html
new file mode 100644
index 000000000..ef0d830f7
--- /dev/null
+++ b/rt/html/Reports/Activity/ActivityDetail.html
@@ -0,0 +1,83 @@
+<&|Elements/Wrapper, %ARGS, title => loc("Activity detail"),
+ path => "Reports/Activity/ActivityDetail.html",
+ &>
+
+<& Elements/MiniPlot, data => \%counts &>
+
+<table style="width: 100%">
+<tr class="titlerow">
+<th>Queue</th><th>Activity</th><th>Date</th><th>Time</th><th>Ticket #</th><th>User</th><th>Short description</th>
+</tr>
+% for my $item (@items) {
+<tr>
+<td><% $item->{queue} %></td>
+<td><% $item->{status} %></td>
+<td><% $item->{date} %></td>
+<td><% $item->{time} %></td>
+<td><% $item->{id} %></td>
+<td><% $item->{actor} %></td>
+<td><% $item->{notes} %></td>
+</tr>
+% }
+</table>
+
+</&>
+<%args>
+$query => 'id > 0'
+$start => "2005/01/01"
+$end => "2006/01/01"
+</%args>
+<%init>
+
+
+my $summary_tickets = RT::Tickets->new($session{'CurrentUser'});
+$summary_tickets->FromSQL($query . " AND ( Updated >= '$start' AND Updated <= '$end')");
+my %counts;
+while (my $ticket = $summary_tickets->Next) {
+ my $txns = $ticket->Transactions;
+ $txns->Limit(FIELD => 'Created', OPERATOR => '>=', VALUE => $start);
+ $txns->Limit(FIELD => 'Created', OPERATOR => '<=', VALUE => $end);
+ # I think they really don't just want status changes
+ $txns->Limit(FIELD => 'Type', VALUE => 'Status', ENTRYAGGREGATOR => 'OR');
+ $txns->Limit(FIELD => 'Type', VALUE => 'Create');
+
+ while (my $txn = $txns->Next){
+ my $date = substr($txn->Created, 0, 10);
+ # we don't have data on the status of a new ticket, default to 'new'
+ $counts{$date}{$txn->NewValue || 'new'}++;
+ }
+}
+
+
+my $tickets = RT::Tickets->new($session{'CurrentUser'});
+$tickets->FromSQL($query);
+my @items;
+while (my $ticket = $tickets->Next) {
+ my $txns = $ticket->Transactions;
+ $txns->Limit(FIELD => 'Created', OPERATOR => '>=', VALUE => $start);
+ $txns->Limit(FIELD => 'Created', OPERATOR => '<=', VALUE => $end);
+ # I think they really don't just want status changes
+ $txns->Limit(FIELD => 'Type', VALUE => 'Status', ENTRYAGGREGATOR => 'OR');
+ $txns->Limit(FIELD => 'Type', VALUE => 'Create');
+
+ while (my $txn = $txns->Next) {
+ push @items, { queue => $txn->TicketObj->QueueObj->Name,
+ id => $txn->TicketObj->id,
+ date => (split ' ', $txn->CreatedObj->ISO)[0],
+ time => (split ' ', $txn->CreatedObj->ISO)[1],
+ status => $txn->NewValue || 'new',
+ actor => $txn->CreatorObj->Name,
+ notes => ($txn->Content ne 'This transaction appears to have no content' ? substr($txn->Content, 0, 60) : $txn->BriefDescription)
+ };
+ }
+}
+
+@items = sort {
+ $a->{queue} cmp $b->{'queue'}
+ || $a->{'status'} cmp $b->{'status'}
+ || $a->{'id'} <=> $b->{'id'}
+ || $a->{'actor'} cmp $b->{'actor'}
+ || $a->{'notes'} <=> $b->{'notes'}
+} @items;
+
+</%init>
diff --git a/rt/html/Reports/Activity/ActivitySummary.html b/rt/html/Reports/Activity/ActivitySummary.html
new file mode 100644
index 000000000..7bb756fbc
--- /dev/null
+++ b/rt/html/Reports/Activity/ActivitySummary.html
@@ -0,0 +1,61 @@
+<&|Elements/Wrapper, %ARGS, title => loc("Activity summary"),
+ path => "Reports/Activity/ActivitySummary.html",
+ &>
+
+<& Elements/MiniPlot, data => \%queues &>
+
+<table style="width: 100%">
+<tr class="titlerow">
+<th>Queue</th>
+% for my $status (sort keys %status) {
+<th><% $status %></th>
+% }
+<th>Total</th>
+</tr>
+% for my $queue (sort keys %queues) {
+<th class="label"><% $queue %></th>
+% for my $status (sort keys %status) {
+<td><% $queues{$queue}{$status} || 0 %>
+% }
+<td><% $total{$queue} %></td>
+</tr>
+% }
+<tr class="grandtotal">
+<th class="label" >Grand Total</th>
+% for my $status (sort keys %status) {
+<td><% $status{$status} %></td>
+% }
+<td><% $total %></td>
+</table>
+</&>
+<%args>
+$query => 'id > 0'
+$start => "2005/01/01"
+$end => "2006/01/01"
+</%args>
+<%init>
+
+my $tickets = RT::Tickets->new($session{'CurrentUser'});
+$tickets->FromSQL($query . " AND ( Updated >= '$start' AND Updated <= '$end')");
+
+my %queues;
+my %status;
+my %total;
+my $total;
+while (my $ticket = $tickets->Next) {
+ my $txns = $ticket->Transactions;
+ $txns->Limit(FIELD => 'Created', OPERATOR => '>=', VALUE => $start);
+ $txns->Limit(FIELD => 'Created', OPERATOR => '<=', VALUE => $end);
+ $txns->Limit(FIELD => 'Type', VALUE => 'Status', ENTRYAGGREGATOR => 'OR');
+ $txns->Limit(FIELD => 'Type', VALUE => 'Create');
+
+ while (my $txn = $txns->Next) {
+ $queues{$txn->TicketObj->QueueObj->Name}{$txn->NewValue || 'new'}++;
+ $status{$txn->NewValue || 'new'}++;
+ $total{$txn->TicketObj->QueueObj->Name}++;
+ $total++;
+ }
+}
+
+
+</%init>
diff --git a/rt/html/Reports/Activity/Elements/LimitReport b/rt/html/Reports/Activity/Elements/LimitReport
new file mode 100644
index 000000000..7c4aac73b
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/LimitReport
@@ -0,0 +1,23 @@
+<form action="index.html" method="POST" enctype="multipart/form-data">
+Query:
+<textarea name="query" rows="5" cols="80"><% $query %></textarea><br />
+
+Report type: <select name="type">
+<option value="ActivityDetail" <% $ARGS{path} =~ /ActivityDetail/ ? 'selected' : '' %>>Activity detail</option>
+<option value="ActivitySummary" <% $ARGS{path} =~ /ActivitySummary/ ? 'selected' : '' %>>Activity summary</option>
+<option value="ResolutionComments" <% $ARGS{path} =~ /ResolutionComments/ ? 'selected' : '' %>>Resolution comments</option>
+<option value="ResolutionStatistics" <% $ARGS{path} =~ /ResolutionStatistics/ ? 'selected' : '' %>>Resolution statistics</option>
+</select><br />
+
+Start date: <input type="text" name="start" value="<% $start %>" /><br />
+End date: <input type="text" name="end" value="<% $end %>" /><br />
+<& /Elements/Submit, Label => loc('Report') &>
+</form>
+<%args>
+$type => undef
+$start => undef
+$end => undef
+$query => undef
+</%args>
+<%init>
+</%init>
diff --git a/rt/html/Reports/Activity/Elements/MiniPlot b/rt/html/Reports/Activity/Elements/MiniPlot
new file mode 100644
index 000000000..f92032818
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/MiniPlot
@@ -0,0 +1,57 @@
+<table class="miniplot"><tr>
+% for my $major (@major) {
+<td><div class="graph">
+ <ul>
+% my $i = 0;
+% for my $minor (@minor) {
+% my $percent = int( 100 * ($data->{$major}{$minor} || 0) / $max );
+ <li class="c<% ($i % 6) + 1%>" style="width: <% $barwidth %>%;
+ left: <% $baroffset + $each * $i %>%;
+ height: <% $percent %>%;"><div class="data"><% $minor %>: <% $percent %>%</div></li>
+% $i++;
+% }
+ </ul>
+</div></td>
+% }
+</tr><tr>
+% for my $major (@major) {
+<th class="legend"><% $major %></th>
+% }
+</tr>
+</table>
+
+<table class="miniplot"><tr>
+% my $i = 0;
+% for my $minor (@minor) {
+<th><span class="demoblock c<% ($i++ % 6) + 1 %>"></span> <% $minor %></th>
+% }
+</tr>
+</table>
+
+<%args>
+$data
+$major => undef
+$minor => undef
+</%args>
+<%init>
+
+my $max = 1;
+
+my %minor;
+for my $major (keys %{$data}) {
+ for (keys %{$data->{$major}}) {
+ $minor{$_}++;
+ $max = $data->{$major}{$_} if $data->{$major}{$_} > $max;
+ }
+}
+
+my @major = $major ? @{$major} : sort keys %{$data};
+my @minor = $minor ? @{$minor} : sort keys %minor;
+
+return unless @minor and @major;
+
+my $each = int( (100 / @minor) );
+my $barwidth = int( (100 / @minor) * (3/4) );
+my $baroffset = int( (100 / @minor) * (1/8) );
+
+</%init>
diff --git a/rt/html/Reports/Activity/Elements/PrintFooter b/rt/html/Reports/Activity/Elements/PrintFooter
new file mode 100644
index 000000000..fa9f47582
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/PrintFooter
@@ -0,0 +1,7 @@
+<hr/>
+<div style="text-align: center;">
+<%$RT::ReportFooterMessage || 'Proprietary and Confidential' %>
+</div>
+</body>
+</html>
+%$m->abort();
diff --git a/rt/html/Reports/Activity/Elements/PrintHeader b/rt/html/Reports/Activity/Elements/PrintHeader
new file mode 100644
index 000000000..b7c4b3419
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/PrintHeader
@@ -0,0 +1,32 @@
+<%args>
+$title => undef
+$path => undef
+$query => undef
+</%args>
+<HTML>
+<HEAD>
+<TITLE><%$title%></TITLE>
+<link rel="shortcut icon" href="<%$RT::WebImagesURL%>/favicon.png" type="image/png" />
+<link media="all" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css" />
+<link media="print" rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/printrt.css" type="text/css" />
+%# XXX TODO THIS SHOULD NOT BE A TABLE
+<body>
+<table width="100%">
+<tr>
+<td align="left">
+<div id="username">User: <%$session{'CurrentUser'}->Name%></div>
+<div id="reportdate">
+%my $d= RT::Date->new($session{'CurrentUser'}); $d->SetToNow;
+<%$d->AsString%></div>
+</td>
+<td align="center">
+<h1><%$title%></h1>
+</td>
+<td align="right">
+<img src="<%$RT::LogoURL%>" alt="RT Logo"/>
+</td>
+</tr>
+</table>
+<hr/>
+<&|/l&>Report criteria:</&> <%$query%>
+<hr />
diff --git a/rt/html/Reports/Activity/Elements/ScreenFooter b/rt/html/Reports/Activity/Elements/ScreenFooter
new file mode 100644
index 000000000..235b7b306
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/ScreenFooter
@@ -0,0 +1,13 @@
+<& LimitReport, %ARGS &>
+% if ($show_print_link) {
+<div align="right">
+% my %printable_args = %ARGS;
+% delete $printable_args{$_} for (qw/path title mode/);
+% $printable_args{'mode'} = 'print';
+% my $url = $ARGS{'path'} .'?'. join(';', map { $_."=".$printable_args{$_} } keys %printable_args);
+<a href="<%$RT::WebPath|n%>/<%$url|n%>"><&|/l&>Printable version</&></a>
+</div>
+% }
+<%args>
+$show_print_link => 1
+</%args>
diff --git a/rt/html/Reports/Activity/Elements/ScreenHeader b/rt/html/Reports/Activity/Elements/ScreenHeader
new file mode 100644
index 000000000..080efc0dd
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/ScreenHeader
@@ -0,0 +1,8 @@
+<%args>
+$title => undef
+$path => undef
+</%args>
+<& /Elements/Header, Title => $title &>
+<& Tabs,
+ current_subtab => $path,
+ Title => $title &>
diff --git a/rt/html/Reports/Activity/Elements/Tabs b/rt/html/Reports/Activity/Elements/Tabs
new file mode 100644
index 000000000..a9498209e
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/Tabs
@@ -0,0 +1,52 @@
+<& /Elements/Tabs,
+ tabs => $tabs,
+ subtabs => $subtabs,
+ current_toptab => 'Tools/Offline.html',
+ current_tab => 'Reports/Activity/index.html'.$args,
+ Title => $Title &>
+
+<%INIT>
+my $subtabs = {};
+
+my $top = $m->caller_args(-1);
+my $args = "?" . $m->comp( '/Elements/QueryString',
+ query => $top->{query},
+ start => $top->{start},
+ end => $top->{end});
+if ($m->caller_args(-1)->{'query'}) {
+ $current_subtab .= $args;
+ $subtabs = {
+ a => { title => 'Activity detail',
+ path => 'Reports/Activity/ActivityDetail.html'.$args,
+ },
+ b => { title => 'Activity summary',
+ path => 'Reports/Activity/ActivitySummary.html'.$args,
+ },
+ c => { title => 'Resolution comments',
+ path => 'Reports/Activity/ResolutionComments.html'.$args,
+ },
+ d => { title => 'Resolution statistics',
+ path => 'Reports/Activity/ResolutionStatistics.html'.$args,
+ },
+ };
+}
+
+my $tabs = {
+ a => { title => loc('Offline'),
+ path => 'Tools/Offline.html',
+ },
+ r => { title => loc('Reports'),
+ path => 'Reports/Activity/index.html'.$args,
+ subtabs => $subtabs,
+ current_subtab => $current_subtab,
+ }
+ };
+
+</%INIT>
+
+
+<%ARGS>
+$current_tab => undef
+$current_subtab => undef
+$Title => undef
+</%ARGS>
diff --git a/rt/html/Reports/Activity/Elements/Wrapper b/rt/html/Reports/Activity/Elements/Wrapper
new file mode 100644
index 000000000..6f81f5f50
--- /dev/null
+++ b/rt/html/Reports/Activity/Elements/Wrapper
@@ -0,0 +1,16 @@
+<%args>
+$mode => 'screen'
+</%args>
+
+% if ($mode eq 'print') {
+<& PrintHeader, %ARGS &>
+%} else {
+<& ScreenHeader, %ARGS &>
+% }
+<%$m->content |n%>
+% if ($mode eq 'print') {
+<& PrintFooter, %ARGS &>
+%} else {
+<& ScreenFooter, %ARGS &>
+% }
+
diff --git a/rt/html/Reports/Activity/ResolutionComments.html b/rt/html/Reports/Activity/ResolutionComments.html
new file mode 100644
index 000000000..81ca301cc
--- /dev/null
+++ b/rt/html/Reports/Activity/ResolutionComments.html
@@ -0,0 +1,62 @@
+<&|Elements/Wrapper, %ARGS, title => loc("Resolution Comments"),
+ path => "Reports/Activity/ResolutionComments.html",
+ &>
+
+<table style="width: 100%">
+<tr>
+<th>Queue</th><th>Ticket #</th><th>Created</th><th>Resolved</th><th>Time to resolve</th>
+</tr>
+<tr>
+<th colspan="5">Resolution comments</th>
+</tr>
+% for my $item (@items) {
+<tr class="titlerow">
+<td><% $item->{queue} %></td>
+<td><% $item->{id} %></td>
+<td><% $item->{created} %></td>
+<td><% $item->{resolved} %></td>
+<td><% $item->{duration} %></td>
+</tr>
+<tr>
+<td colspan="5"><% $item->{whiteboard} %></td>
+</tr>
+% }
+</table>
+</&>
+
+<%args>
+$query => 'id > 0'
+$start => "2005/01/01"
+$end => "2006/01/01"
+</%args>
+<%init>
+
+use Time::Duration;
+
+my $summary_tickets = RT::Tickets->new( $session{'CurrentUser'} );
+$summary_tickets->FromSQL(
+ $query . " AND (Status = 'resolved') AND ( Updated >= '$start' AND Updated <= '$end')" );
+
+my @items;
+while ( my $ticket = $summary_tickets->Next ) {
+ push @items, {
+ queue => $ticket->QueueObj->Name,
+ id => $ticket->id,
+ created => $ticket->CreatedObj->AsString,
+ resolved => $ticket->ResolvedObj->AsString,
+ duration => Time::Duration::concise(
+ Time::Duration::duration(
+ $ticket->ResolvedObj->Unix - $ticket->CreatedObj->Unix
+ )
+ ),
+ whiteboard => $ticket->FirstCustomFieldValue('Whiteboard')
+ };
+}
+
+@items = sort { $a->{queue} cmp $b->{queue} || $a->{id} <=> $b->{id} } @items;
+
+
+
+
+
+</%init>
diff --git a/rt/html/Reports/Activity/ResolutionStatistics.html b/rt/html/Reports/Activity/ResolutionStatistics.html
new file mode 100644
index 000000000..4ecde2c82
--- /dev/null
+++ b/rt/html/Reports/Activity/ResolutionStatistics.html
@@ -0,0 +1,95 @@
+<&|Elements/Wrapper, %ARGS, title => loc("Resolution statistics"),
+ path => "Reports/Activity/ResolutionStatistics.html",
+ &>
+
+<& Elements/MiniPlot,
+ data => \%plot,
+ major => ['Date range','Last 30 days','Last 60 days','Last 90 days','Ever'],
+ minor => [(sort keys %queues), "Average"]
+ &>
+
+<table style="width: 100%">
+<tr>
+<td></td><th colspan="4">Number of tickets closed / Average resolution time per ticket</th>
+</tr>
+<tr class="titlerow">
+<th>Queue</th>
+<th>Date range</th>
+<th>Last 30 days</th>
+<th>Last 60 days</th>
+<th>Last 90 days</th>
+<th>Ever</th>
+</tr>
+% for my $queue (sort keys %queues) {
+<tr>
+<th><% $queue %></th>
+% for my $period ('Date range','Last 30 days','Last 60 days','Last 90 days','Ever') {
+<td><% scalar @{$closed{$period}{$queue}} %> / <% $average_resolve_times{$period}{$queue} %></td>
+% }
+</tr>
+% }
+<tr class="grandtotal">
+<th>Ticket average</th>
+% for my $period ('Date range','Last 30 days','Last 60 days','Last 90 days','Ever') {
+<td><% $average_resolve_times{$period}{_all_count} %> / <% $average_resolve_times{$period}{_all} %></td>
+% }
+</tr>
+</table>
+
+</&>
+<%args>
+$query => 'id > 0'
+$start => "2005/01/01"
+$end => "2006/01/01"
+</%args>
+<%init>
+
+my $in_30_days = RT::Date->new($session{'CurrentUser'});
+$in_30_days->Set(Format => 'Unix', Value => ( time - (86400*30)));
+my $in_60_days = RT::Date->new($session{'CurrentUser'});
+$in_60_days->Set(Format => 'Unix', Value => ( time - (86400*60)));
+my $in_90_days = RT::Date->new($session{'CurrentUser'});
+$in_90_days->Set(Format => 'Unix', Value => ( time - (86400*90)));
+
+my %queries;
+$queries{'Date range'} = "(Resolved >= '$start' AND Resolved <= '$end')";
+$queries{'Last 30 days'} = "(Resolved >= '".$in_30_days->ISO."')";
+$queries{'Last 60 days'} = "(Resolved >= '".$in_60_days->ISO."')";
+$queries{'Last 90 days'} = "(Resolved >= '".$in_90_days->ISO."')";
+$queries{'Ever'} = "(Status = 'resolved' OR Status = 'rejected')";
+
+
+my %closed;
+my %queues;
+foreach my $period (keys %queries) {
+ my $tix = RT::Tickets->new($session{'CurrentUser'});
+ $tix->FromSQL($query . " AND " .$queries{$period});
+
+ while (my $ticket = $tix->Next) {
+ push @{ $closed{$period}{$ticket->QueueObj->Name}}, $ticket;
+ $queues{$ticket->QueueObj->Name}++;
+ }
+}
+
+my %restimes;
+my %average_resolve_times;
+my %plot;
+use Time::Duration;
+foreach my $period ( keys %closed ) {
+ foreach my $queue ( keys %{$closed{$period}} ) {
+ foreach my $ticket (@{$closed{$period}{$queue}} ) {
+ push @{$restimes{$period}{$queue}}, ( $ticket->ResolvedObj->Unix - $ticket->CreatedObj->Unix);
+ }
+
+ my $total_time = 0;
+ $total_time+= $_ for @{$restimes{$period}{$queue}};
+ $average_resolve_times{$period}{'_all_time'} += $total_time;
+ $average_resolve_times{$period}{'_all_count'} += @{$restimes{$period}{$queue}};
+ $plot{$period}{$queue} = $total_time / @{$restimes{$period}{$queue}};
+ $average_resolve_times{$period}{$queue} = Time::Duration::concise(Time::Duration::duration($plot{$period}{$queue}));
+ }
+ $plot{$period}{Average} = $average_resolve_times{$period}{'_all_time'} / $average_resolve_times{$period}{'_all_count'};
+ $average_resolve_times{$period}{'_all'} = Time::Duration::concise(Time::Duration::duration($plot{$period}{Average}));
+}
+
+</%init>
diff --git a/rt/html/Reports/Activity/index.html b/rt/html/Reports/Activity/index.html
new file mode 100644
index 000000000..1f6ddb0d5
--- /dev/null
+++ b/rt/html/Reports/Activity/index.html
@@ -0,0 +1,29 @@
+<&| Elements/Wrapper, %ARGS, title => loc("Activity reports"), show_print_link => 0 &>
+
+
+</&>
+
+<%args>
+$type => undef
+$start => undef
+$end => undef
+$query => "Status = 'resolved'"
+</%args>
+<%init>
+
+unless ($start) {
+ my $then = RT::Date->new($session{'CurrentUser'});
+ $then->Set(Format => 'Unix', Value => time - (86400*7));
+ $ARGS{start} = substr($then->ISO,0,10);
+}
+
+unless ($end) {
+ my $now = RT::Date->new($session{'CurrentUser'});
+ $now->SetToNow();
+ $ARGS{end} = substr($now->ISO,0,10);
+}
+
+if ($type) {
+ $m->redirect($type . ".html?" . $m->comp('/Elements/QueryString', query => $query, start => $start, end => $end));
+}
+</%init>
diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html
index 69ffba8eb..9742df5ae 100644
--- a/rt/html/Search/Bulk.html
+++ b/rt/html/Search/Bulk.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -335,7 +335,6 @@ while ( my $Ticket = $Tickets->Next ) {
foreach my $key (@$list) {
my ( $cfid, $cf );
- next if $key =~ /CustomField-(\d+)-Category$/;
if ( $key =~ /CustomField-(\d+)-/ ) {
$cfid = $1;
$cf = RT::CustomField->new( $session{'CurrentUser'} );
diff --git a/rt/html/Search/Elements/PickRestriction b/rt/html/Search/Elements/PickRestriction
deleted file mode 100644
index ff9b86ba5..000000000
--- a/rt/html/Search/Elements/PickRestriction
+++ /dev/null
@@ -1,142 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<FORM ACTION="<%$RT::WebPath%>/Search/Listing.html" METHOD="GET">
-<INPUT TYPE=HIDDEN NAME="Bookmark" VALUE="<% $session{'tickets'}->FreezeLimits()%>">
-<& /Elements/TitleBoxStart, title => loc('Refine search')&>
-<INPUT TYPE=HIDDEN NAME="CompileRestriction" VALUE=1>
-
-<ul>
-<li><&|/l&>Owner is</&> <& /Elements/SelectBoolean, Name => "OwnerOp",
- TrueVal=> '=',
- FalseVal => '!='
-&>
-<& /Elements/SelectOwner, Name => "ValueOfOwner" &>
-
-<li>
-<& /Elements/SelectWatcherType, Name => "WatcherRole", AllowNull => 0 &>
-<&|/l&>email address</&>
-<& /Elements/SelectMatch, Name => "WatcherRoleOp" &>
-<INPUT Name="ValueOfWatcherRole" SIZE=20>
-
-<li>
-<&|/l&>Subject</&> <& /Elements/SelectMatch, Name => "SubjectOp" &>
-<INPUT Name="ValueOfSubject" SIZE=20>
-
-<li><&|/l&>Queue</&> <& /Elements/SelectBoolean, Name => "QueueOp" ,
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=',
- FalseVal => '!=' &>
-<& /Elements/SelectQueue, Name => "ValueOfQueue" &>
-
-
-<li><&|/l&>Priority</&> <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &>
-
-<INPUT Name="ValueOfPriority" SIZE=5>
-
-<li>
-<& /Elements/SelectDateType, Name => 'DateType' &>
-<& /Elements/SelectDateRelation, Name=>"DateOp" &>
-<& /Elements/SelectDate, Name => "ValueOfDate", ShowTime => 0, Default => '' &>
-
-<li><&|/l&>Ticket attachment</&>
-
-<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &>
-<& /Elements/SelectBoolean, Name => "AttachmentFieldOp",
- True => loc("matches"),
- False => loc("does not match"),
- TrueVal => 'LIKE',
- FalseVal => 'NOT LIKE'
-&>
-<Input Name="ValueOfAttachmentField" Size=20>
-
-<li><&|/l&>Status</&>
-<& /Elements/SelectBoolean, Name => "StatusOp",
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=',
- FalseVal => '!='
-&>
-<& /Elements/SelectStatus, Name => "ValueOfStatus", SkipDeleted => 1 &>
-
-
-% while ( my $CustomField = $CustomFields->Next ) {
-
-<li><% $CustomField->Name %>
- <& /Elements/SelectCustomFieldOperator, Name => "CustomFieldOp". $CustomField->id,
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=', FalseVal => '!=' &>
-
-<& /Elements/SelectCustomFieldValue, Name => "CustomField".$CustomField->id,
- CustomField => $CustomField,
- &>
-% }
-
-</UL>
-
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/TitleBoxStart, title => loc('Ordering and sorting')&>
-
-<UL>
-
-<li><&|/l&>Results per page</&> <& /Elements/SelectResultsPerPage, Name => "RowsPerPage",
- Default => $session{'tickets_rows_per_page'} || '50'
-&>
-
-<li><&|/l&>Sort results by</&> <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy",
- Default => $session{'tickets_sort_by'}
-&>
-<& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &>
-
-<li><input type="checkbox" name="HideResults" <%$ARGS{'HideResults'} && 'CHECKED'%>> <&|/l&>Don't show search results</&>
-<li><& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &>
-
-</UL>
-
-
-</DIV>
-
-
-
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/Submit, Label => loc('Search'), Name => 'Action'&>
-
-</FORM>
-
-
- <%INIT>
-my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
- foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
- # Gotta load up the $queue object, since queues get stored by name now.
- my $queue = RT::Queue->new($session{'CurrentUser'});
- $queue->Load($_);
- $CustomFields->LimitToQueue($queue->Id);
- }
-
- $CustomFields->LimitToGlobal();
-
-</%INIT>
diff --git a/rt/html/Search/Elements/TicketHeader b/rt/html/Search/Elements/TicketHeader
deleted file mode 100644
index ed2f60e4e..000000000
--- a/rt/html/Search/Elements/TicketHeader
+++ /dev/null
@@ -1,40 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<TR>
-<& TicketHeaderCell , Attribute => 'id', Header => '#'&>
-<& TicketHeaderCell , Attribute => 'Subject'&>
-<& TicketHeaderCell , Attribute => 'Status'&>
-<& TicketHeaderCell , Attribute => 'Queue'&>
-<& TicketHeaderCell , Attribute => 'Owner'&>
-<& TicketHeaderCell , Attribute => 'Priority'&>
-</TR>
-<TR>
-<TH class="ticketheader">&nbsp;</TH>
-<& TicketHeaderCell , Attribute => 'Requestor(s)'&>
-<& TicketHeaderCell , Attribute => 'Created'&>
-<& TicketHeaderCell , Attribute => 'Told', Header => 'Last Contact'&>
-<& TicketHeaderCell , Attribute => 'LastUpdated', Header => 'Last Updated'&>
-<& TicketHeaderCell , Attribute => 'TimeLeft', Header => 'Left'&>
-</TR>
-%# loc('Last Notified');
diff --git a/rt/html/Search/Elements/TicketHeaderCell b/rt/html/Search/Elements/TicketHeaderCell
deleted file mode 100644
index 5def9ea37..000000000
--- a/rt/html/Search/Elements/TicketHeaderCell
+++ /dev/null
@@ -1,55 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<%INIT>
-my ($order,$curorder);
- $Attribute =~ s/Obj->(Name|AsString|AgeAsString)//g;
- if ($session{'tickets_sort_order'} =~ /^asc$/i) {
- $order = 'DESC';
- $curorder = 'ASC';
- } else {
- $order = 'ASC';
- $curorder = 'DESC';
- }
-$Header = $Attribute unless ($Header);
-
-</%INIT>
-<th class="ticketheader">
-% if (grep (/^$Attribute$/i, $session{'tickets'}->SortFields)) {
-<A
-% if ($Attribute eq $session{'tickets_sort_by'}) {
-class="currenttab"
-HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$Attribute%>&TicketsSortOrder=<%$order%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">
-% } else {
-HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$Attribute%>&TicketsSortOrder=<%$curorder%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">
-% }
-<% loc($Header) %>
-</A>
-% } else {
-<% loc($Header) %>
-% }
-</th>
-<%ARGS>
-$Header => undef
-$Attribute => undef
-</%ARGS>
diff --git a/rt/html/Search/Elements/TicketRow b/rt/html/Search/Elements/TicketRow
deleted file mode 100644
index 5d1ad209a..000000000
--- a/rt/html/Search/Elements/TicketRow
+++ /dev/null
@@ -1,55 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<SPAN class="search">
-<TR
-% if ($i%2) {
-CLASS="oddline"
-% } else {
-CLASS="evenline"
-% }
->
-<TD ROWSPAN="2"><B><A HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->id%></a></B></TD>
-<TD><B><A HREF="<%$RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Subject%></a></B></TD>
-<TD><%loc($Ticket->Status)%></TD>
-<TD><%$Ticket->QueueObj->Name%></TD>
-<TD><%$Ticket->Owner == $RT::Nobody->Id ? loc('Nobody') : $Ticket->OwnerObj->Name%></TD>
-<TD><%$Ticket->Priority%></TD>
-</TR>
-<TR
-% if ($i%2) {
-CLASS="oddline"
-% } else {
-CLASS="evenline"
-% }
-><TD><small><%$Ticket->Requestors->MemberEmailAddressesAsString%></small></TD>
-<TD><SMALL><%$Ticket->CreatedObj->AgeAsString || '-'%></SMALL></TD>
-<TD><SMALL><%$Ticket->ToldObj->AgeAsString || '-'%></SMALL></TD>
-<TD><SMALL><%$Ticket->LastUpdatedObj->AgeAsString || '-'%></SMALL></TD>
-<TD><SMALL><%$Ticket->TimeLeft%></SMALL></TD>
-</TR>
-</SPAN>
-<%ARGS>
-$Ticket => undef
-$i => undef
-</%ARGS>
diff --git a/rt/html/Search/Listing.html b/rt/html/Search/Listing.html
deleted file mode 100644
index 68b1fd75c..000000000
--- a/rt/html/Search/Listing.html
+++ /dev/null
@@ -1,113 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
-<& /Ticket/Elements/Tabs,
- current_tab => 'Search/Listing.html',
- Title => $title &>
-
-%if ($ticketcount && ! $ARGS{'HideResults'}) {
-<TABLE WIDTH=100% border=0 cellpadding=2 CELLSPACING=0>
-<& Elements/TicketHeader, %ARGS &>
-% my $i;
-%while (my $Ticket = $session{'tickets'}->Next) {
-% $i++;
-<& Elements/TicketRow, Ticket => $Ticket, i=> $i, %ARGS &>
-%}
-</TABLE>
-<div align=center>
-<font size=2>
-<a href="<%$RT::WebPath%>/Search/Listing.html?GotoPage=1"><&|/l&>First page</&></a>
-&nbsp;&nbsp;
-% if ( $session{'tickets'}->FirstRow >= $session{'tickets_rows_per_page'}-1 ) {
-<a href="<%$RT::WebPath%>/Search/Listing.html?GotoPage=Prev">&lt;<&|/l&>Previous page</&></a>
-&nbsp;&nbsp;
-% }
-% if ( $session{'tickets'}->FirstRow + $session{'tickets_rows_per_page'} < $ticketcount ) {
-<a href="<%$RT::WebPath%>/Search/Listing.html?GotoPage=Next"><&|/l&>Next page</&>&gt;</a>
-% }
-%#&nbsp;&nbsp;<form method=get action="<%$RT::WebPath%>/Search/Listing.html"><&|/l&>Goto page</&> <input name=GotoPage size=2></form>
-</font>
-</div>
-<!--<div align=right>-->
-<table width="100%" border=0 cellpadding=3 CELLSPACING=1>
-<tr>
-<td align=left>
-(<&|/l, ($session{'tickets'}->FirstRow+1), ($session{'tickets'}->FirstRow() + $session{'tickets'}->RowsPerPage() ) &>[_1] - [_2] shown</&>)
-</td>
-<td align=right>
-
-<a href="<%$RT::WebPath%>/Search/Bulk.html"><&|/l&>Update all these tickets at once</&></a>
-<!--</div>-->
-</td>
-</tr>
-</table>
-
-% }
-<TABLE WIDTH="100%">
-<TR>
-<TD VALIGN="TOP">
-<& /Elements/TitleBoxStart, title => loc('Current search criteria')&>
-
-%my %restrictions=$session{'tickets'}->DescribeRestrictions();
-%foreach my $row (keys %restrictions){
-<%$restrictions{"$row"}%> <A HREF="<% $RT::WebPath %>/Search/Listing.html?DeleteRestriction=<%$row%>">[<&|/l&>delete</&>]</a><br>
-%}
-<BR>
-<BR>
-<A HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|nu%>&TicketsSortBy=<%$session{'tickets_sort_by'}%>&TicketsSortOrder=<%$session{'tickets_sort_order'}%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>"><&|/l&>Bookmarkable URL for this search</&></a>
-<& /Elements/TitleBoxEnd&>
-</TD>
-<TD>
-
-<& Elements/PickRestriction, %ARGS &>
-
-</TD>
-</TR>
-</TABLE>
-
-<%INIT>
-
-my ($title, $ticketcount);
-$session{'i'}++;
-if ($session{'tickets'}) {
- if ($ARGS{'DeleteRestriction'}) {
- $session{'tickets'}->DeleteRestriction($ARGS{'DeleteRestriction'});
- }
- if ( ($ARGS{'ClearRestrictions'}) || ($ARGS{'NewSearch'}) ) {
- $session{'tickets'}->ClearRestrictions;
- $session{'tickets'}->CleanSlate;
- }
-}
- ProcessSearchQuery(ARGS=>\%ARGS);
- $session{'tickets'}->RedoSearch();
- if ( $session{'tickets'}->DescribeRestrictions()) {
- $ticketcount = $session{tickets}->CountAll();
- $title = loc('Found [quant,_1,ticket]', $ticketcount);
- } else {
- $title = loc("Find tickets");
- }
-</%INIT>
-<%CLEANUP>
-$session{'tickets'}->PrepForSerialization();
-</%CLEANUP>
diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html
index c35ed9122..b22a67593 100644
--- a/rt/html/Ticket/Create.html
+++ b/rt/html/Ticket/Create.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -86,7 +86,7 @@
</td>
</tr>
<tr>
-<td class="label">
+<td class="labeltop">
<&|/l&>Cc</&>:
</td>
<td class="value" colspan="5">
@@ -96,7 +96,7 @@
</td>
</tr>
<tr>
-<td class="label">
+<td class="labeltop">
<&|/l&>Admin Cc</&>:
</td>
<td class="value" colspan="5">
@@ -152,7 +152,6 @@
<tr>
<td colspan="6">
<&|/l&>Describe the issue below</&>:<br />
-<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', QueueObj => $QueueObj, %ARGS &>
% if (exists $ARGS{Content}) {
<& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &>
% } else {
@@ -388,10 +387,10 @@ if ((!exists $ARGS{'AddMoreAttach'}) and ($ARGS{'id'} eq 'new')) { # new ticket?
my $actions = {
A => {
- html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Show basics') . q[</a>],
+ html => q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');" CLASS="fsblackbutton">] . loc('Show basics') . q[</a>],
},
B => {
- html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Show details') . q[</a>],
+ html => q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');" CLASS="fsblackbutton">] . loc('Show details') . q[</a>],
},
};
</%INIT>
diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html
index 7bdd57f93..ca6939821 100644
--- a/rt/html/Ticket/Display.html
+++ b/rt/html/Ticket/Display.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -46,11 +46,11 @@
%#
%# END BPS TAGGED BLOCK }}}
<& /Elements/Header,
- Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
+ Title => loc("Ticket #[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
<& /Ticket/Elements/Tabs,
Ticket => $TicketObj,
current_tab => 'Ticket/Display.html?id='.$TicketObj->id,
- Title => loc("#[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
+ Title => loc("Ticket #[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject) &>
<& /Elements/ListActions, actions => \@Actions &>
<& /Elements/Callback, _CallbackName => 'BeforeShowSummary', Ticket => $TicketObj, %ARGS &>
@@ -135,10 +135,11 @@ if ($ARGS{'id'} eq 'new') {
}
$ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
- if ( ( defined $ARGS{'UpdateContent'}
+ if ( $ARGS{'UpdateTimeWorked'} || (
+ defined $ARGS{'UpdateContent'}
&& $ARGS{'UpdateContent'} ne ''
&& $ARGS{'UpdateContent'} ne "-- \n"
- . $session{'CurrentUser'}->UserObj->Signature ) || $session{'Attachments'} )
+ . $session{'CurrentUser'}->UserObj->Signature ) )
{
$ARGS{UpdateAttachments} = $session{'Attachments'};
ProcessUpdateMessage(
@@ -147,9 +148,6 @@ if ($ARGS{'id'} eq 'new') {
TicketObj => $TicketObj,
);
delete $session{'Attachments'};
- } elsif ( $ARGS{'UpdateTimeWorked'} ) {
- # Add UpdateTimeWorked to TimeWorked (processed below with ProcessTicketBasics)
- $ARGS{'TimeWorked'} = $TicketObj->TimeWorked + $ARGS{'UpdateTimeWorked'};
}
#Process status updates
my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj);
diff --git a/rt/html/Ticket/Elements/AddCustomers b/rt/html/Ticket/Elements/AddCustomers
new file mode 100644
index 000000000..e04c07702
--- /dev/null
+++ b/rt/html/Ticket/Elements/AddCustomers
@@ -0,0 +1,52 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%# Copyright (c) 2008 Freeside Internet Services, Inc.
+%#
+%# 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.
+<BR>
+<%$msg%><br>
+
+% if (@Customers) {
+
+<br><i>(Check box to link)<i>
+<table>
+% foreach my $customer (@Customers) {
+<tr>
+ <td>
+ <input type="checkbox" name="Ticket-AddCustomer-<% $customer->{'custnum'} %>" VALUE="1" <% scalar(@Customers) == 1 ? 'CHECKED' : '' %>>
+ <A HREF="<%$freeside_url%>/view/cust_main.cgi?<% $customer->{'custnum'} %>"><% &RT::URI::freeside::small_custview($customer->{'custnum'}, &RT::URI::freeside::FreesideGetConfig('countrydefault'), 1) |n %>
+ </td>
+</tr>
+% }
+</table>
+
+% }
+
+<%INIT>
+my ($msg);
+
+my $freeside_url = &RT::URI::freeside::FreesideURL();
+
+my @Customers = ();
+if ( $CustomerString ) {
+ @Customers = &RT::URI::freeside::smart_search( 'search' => $CustomerString );
+}
+
+my @Services = ();
+if ($ServiceString) {
+ @Services = (); #service_search();
+}
+
+</%INIT>
+
+<%ARGS>
+$CustomerString => undef
+$ServiceString => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/EditCustomers b/rt/html/Ticket/Elements/EditCustomers
new file mode 100644
index 000000000..0ba6e447b
--- /dev/null
+++ b/rt/html/Ticket/Elements/EditCustomers
@@ -0,0 +1,63 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%# Copyright (c) 2008 Freeside Internet Services, Inc.
+%#
+%# 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.
+<TABLE width=100%>
+ <TR>
+ <TD VALIGN=TOP WIDTH=50%>
+ <h3><&|/l&>Current Customers</&></h3>
+
+<table>
+ <tr>
+ <td><i><&|/l&>(Check box to disassociate)</&></i></td>
+ </tr>
+ <tr>
+ <td class="value">
+% foreach my $link ( @{ $Ticket->Customers->ItemsArrayRef } ) {
+
+ <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
+%# <& ShowLink, URI => $link->TargetURI &><br>
+ <A HREF="<% $link->TargetURI->Resolver->HREF %>"><% $link->TargetURI->Resolver->AsStringLong |n %></A>
+ <BR>
+% }
+ </td>
+ </tr>
+</table>
+
+</TD>
+
+<TD VALIGN=TOP>
+<h3><&|/l&>New Customer Links</&></h3>
+<&|/l&>Find customer</&><BR>
+<input name="CustomerString">
+<input type=submit name="OnlySearchForCustomers" value="<&|/l&>Go!</&>">
+<br><i>cust #, name, company or phone</i>
+<BR>
+%#<BR>
+%#<&|/l&>Find service</&><BR>
+%#<input name="ServiceString">
+%#<input type=submit name="OnlySearchForServices" value="<&|/l&>Go!</&>">
+%#<br><i>username, username@domain, domain, or IP address</i>
+%#<BR>
+
+<& AddCustomers, Ticket => $Ticket,
+ CustomerString => $CustomerString,
+ ServiceString => $ServiceString, &>
+
+</TD>
+</TR>
+</TABLE>
+
+<%ARGS>
+$CustomerString => undef
+$ServiceString => undef
+$Ticket => undef
+</%ARGS>
diff --git a/rt/html/Ticket/Elements/EditLinks b/rt/html/Ticket/Elements/EditLinks
deleted file mode 100644
index bdb8a6b7d..000000000
--- a/rt/html/Ticket/Elements/EditLinks
+++ /dev/null
@@ -1,133 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<TABLE width=100%>
- <TR>
- <TD VALIGN=TOP WIDTH=50%>
- <h3><&|/l&>Current Relationships</&></h3>
-
-<table>
- <tr>
- <td></td>
- <td><i><&|/l&>(Check box to delete)</&></i></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Depends on</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->DependsOn->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
- <& ShowLink, URI => $link->TargetURI &><br>
-% }
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Depended on by</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->DependedOnBy->Next) {
-% my $member = $link->BaseObj;
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
- <& ShowLink, URI => $link->BaseURI &><br>
-% }
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Parents</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->MemberOf->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
- <& ShowLink, URI => $link->TargetURI &><br>
-% }
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Children</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->Members->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
- <& ShowLink, URI => $link->BaseURI &><br>
-% }
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Refers to</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->RefersTo->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
- <& ShowLink, URI => $link->TargetURI &><br>
-%}
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Referred to by</&>:</td>
- <td class="value">
-% while (my $link = $Ticket->ReferredToBy->Next) {
- <INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
- <& ShowLink, URI => $link->BaseURI &><br>
-% }
- </td>
- </tr>
-</table>
-
-</TD>
-<TD VALIGN=TOP>
-<h3><&|/l&>New Relationships</&></h3>
-<i><&|/l&>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.</&></i><br>
-<TABLE>
- <TR>
- <TD class="label"><&|/l&>Merge into</&>:</TD>
- <TD class="entry"><input name="<%$Ticket->Id%>-MergeInto"> <i><&|/l&>(only one ticket)</&></i></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depends on</&>:</TD>
- <TD class="entry"><input name="<%$Ticket->Id%>-DependsOn"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Depended on by</&>:</TD>
- <TD class="entry"><input name="DependsOn-<%$Ticket->Id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Parents</&>:</TD>
- <TD class="entry"><input name="<%$Ticket->Id%>-MemberOf"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Children</&>:</TD>
- <TD class="entry"> <input name="MemberOf-<%$Ticket->Id%>"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Refers to</&>:</TD>
- <TD class="entry"><input name="<%$Ticket->Id%>-RefersTo"></TD>
- </TR>
- <TR>
- <TD class="label"><&|/l&>Referred to by</&>:</TD>
- <TD class="entry"> <input name="RefersTo-<%$Ticket->Id%>"></TD>
- </TR>
-</TABLE>
-</TD>
-</TR>
-</TABLE>
-
-
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowCustomers b/rt/html/Ticket/Elements/ShowCustomers
new file mode 100644
index 000000000..3acf92dd4
--- /dev/null
+++ b/rt/html/Ticket/Elements/ShowCustomers
@@ -0,0 +1,38 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%#
+%# 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.
+<table>
+% my $cust = 0;
+% foreach my $custResolver ( map { $_->TargetURI->Resolver }
+% @{ $Ticket->Customers->ItemsArrayRef }
+% )
+% {
+% $cust++;
+% my $cust_main = '';
+ <tr>
+ <td class="value">
+ <A HREF="<% $custResolver->HREF %>"><% $custResolver->AsStringLong |n %></A>
+ </td>
+ </tr>
+% }
+% unless ( $cust ) {
+ <tr>
+ <td class="labeltop">
+ <i>(none)<i>
+ </td>
+ </tr>
+
+% }
+</table>
+<%ARGS>
+$Ticket => undef
+</%ARGS>
+
diff --git a/rt/html/Ticket/Elements/ShowLink b/rt/html/Ticket/Elements/ShowLink
deleted file mode 100644
index 493fd95a5..000000000
--- a/rt/html/Ticket/Elements/ShowLink
+++ /dev/null
@@ -1,40 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<A href="<%$URI->Resolver->HREF%>">
-% if ($URI->IsLocal) {
-% my $member = $URI->Object;
-% if (UNIVERSAL::isa($member, "RT::Ticket")) {
-<%$member->Id%>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<% loc($member->Status) %>]
-% } elsif ( UNIVERSAL::can($member, 'Name')) {
-<%$URI->Resolver->AsString%>: <%$member->Name%>
-% } else {
-<%$URI->Resolver->AsString%>
-% }
-% } else {
-<%$URI->Resolver->AsString%>
-% }
-</a>
-<%ARGS>
-$URI => undef
-</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowLinks b/rt/html/Ticket/Elements/ShowLinks
deleted file mode 100644
index f88a6008d..000000000
--- a/rt/html/Ticket/Elements/ShowLinks
+++ /dev/null
@@ -1,87 +0,0 @@
-%# BEGIN LICENSE BLOCK
-%#
-%# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
-%#
-%# (Except where explictly superceded by other copyright notices)
-%#
-%# 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.
-%#
-%# 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.
-%#
-%#
-%# END LICENSE BLOCK
-<table>
- <tr>
- <td class="labeltop"><&|/l&>Depends on</&>:</td>
- <td class="value">
-<ul>
-% while (my $Link = $Ticket->DependsOn->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
-% }
-</ul>
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Depended on by</&>:</td>
- <td class="value">
-<ul>
-% while (my $Link = $Ticket->DependedOnBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
-% }
-</ul>
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Parents</&>:</td>
- <td class="value">
-<ul>
-% while (my $Link = $Ticket->MemberOf->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
-% }
-</ul>
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Children</&>:</td>
- <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Refers to</&>:</td>
- <td class="value">
-<ul>
-% while (my $Link = $Ticket->RefersTo->Next) {
-<li><& ShowLink, URI => $Link->TargetURI &>
-% }
-</ul>
- </td>
- </tr>
- <tr>
- <td class="labeltop"><&|/l&>Referred to by</&>:</td>
- <td class="value">
- <ul>
-% while (my $Link = $Ticket->ReferredToBy->Next) {
-<li><& ShowLink, URI => $Link->BaseURI &>
-% }
-</ul>
- </td>
- </tr>
-
-% # Allow people to add more rows to the table
-% $m->comp('/Elements/Callback', %ARGS );
-
-</table>
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary
index aeec0fdfb..e3464c732 100644
--- a/rt/html/Ticket/Elements/ShowSummary
+++ b/rt/html/Ticket/Elements/ShowSummary
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -67,6 +67,12 @@
<& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
</&>
+ <&| /Widgets/TitleBox, title => loc('Customers'),
+ title_href =>"$RT::WebPath/Ticket/ModifyCustomers.html?id=".$Ticket->Id,
+ class=> 'ticket-info-customers' &>
+ <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &>
+ </&>
+
<& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
<br />
<& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments
index 662b744ae..85e04e5e5 100644
--- a/rt/html/Ticket/Elements/ShowTransactionAttachments
+++ b/rt/html/Ticket/Elements/ShowTransactionAttachments
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -139,8 +139,14 @@ unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# if it's a text/plain show the body
elsif ( $message->ContentType =~ m{^(text|message|text)}i ) {
- eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
- if ($@) { 1; }
+ #don't want to use this even if it is installed, its
+ #segfaulting on weird characters and silently truncating the
+ #ticket history output
+ #see:
+ # r44838@pinglin: jesse | 2006-11-14 15:53:18 -0500
+ # * Move Text::Quoted back to being a run-time require. So that it's possible to turn off the feature if it causes your perl to segfault. (Text::Tabs is...not robust in the face of perl bugs)
+ #eval { require Text::Quoted; $content = Text::Quoted::extract($content); };
+ #if ($@) { 1; }
$m->comp(
'ShowMessageStanza',
diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs
index 98ed143e9..3dee8dff6 100644
--- a/rt/html/Ticket/Elements/Tabs
+++ b/rt/html/Ticket/Elements/Tabs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -121,6 +121,8 @@ my $ticket_page_tabs = {
{ title => loc('People'), path => "Ticket/ModifyPeople.html?id=" . $id, },
_E => { title => loc('Links'),
path => "Ticket/ModifyLinks.html?id=" . $id, },
+ _Eb=> { title => loc('Customers'),
+ path => "Ticket/ModifyCustomers.html?id=" . $id, },
_F => { title => loc('Reminders'),
path => "Ticket/Reminders.html?id=" . $id,
separator => 1, },
@@ -221,13 +223,13 @@ if ($args) {
$tabs->{"i"} = { path => "Search/Results.html$args",
title => loc('Show Results'),
};
- if ($current_tab =~ m{Search/Results.html}) {
+ if ($current_tab =~ "Search/Results.html") {
$current_tab = "Search/Results.html$args";
}
$tabs->{"j"} = { path => "Search/Bulk.html$args",
title => loc('Bulk Update'),
};
- if ($current_tab =~ m{Search/Bulk.html}) {
+ if ($current_tab =~ "Search/Bulk.html") {
$current_tab = "Search/Bulk.html$args";
}
foreach my $searchtab (keys %{$searchtabs}) {
diff --git a/rt/html/Ticket/ModifyCustomers.html b/rt/html/Ticket/ModifyCustomers.html
new file mode 100644
index 000000000..72d103b23
--- /dev/null
+++ b/rt/html/Ticket/ModifyCustomers.html
@@ -0,0 +1,49 @@
+%# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+%#
+%# 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.
+<& /Elements/Header, Title => loc("Customers for ticket #[_1]", $Ticket->Id) &>
+<& /Ticket/Elements/Tabs,
+ Ticket => $Ticket,
+ current_tab => "Ticket/ModifyCustomers.html?id=".$Ticket->Id,
+ Title => loc("Customers for ticket #[_1]", $Ticket->Id) &>
+
+<& /Elements/ListActions, actions => \@results &>
+
+<form action="ModifyCustomers.html" method="post">
+<input type="hidden" name="id" value="<%$Ticket->id%>">
+
+<& /Elements/TitleBoxStart, title => loc('Edit Customer Links'), color => "#7f007b"&>
+<& Elements/EditCustomers, Ticket => $Ticket, CustomerString => $CustomerString, ServiceString => $ServiceString &>
+<& /Elements/TitleBoxEnd &>
+<& /Elements/Submit, color => "#7f007b", Label => loc('Save Changes') &>
+</form>
+
+
+<%INIT>
+
+my @results = ();
+my $Ticket = LoadTicket($id);
+
+# if we're trying to search for customers/services and nothing else
+unless ( $OnlySearchForCustomers || $OnlySearchForServices) {
+ @results = ProcessTicketCustomers( TicketObj => $Ticket, ARGSRef => \%ARGS);
+}
+
+</%INIT>
+
+
+<%ARGS>
+$OnlySearchForCustomers => undef
+$OnlySearchForServices => undef
+$CustomerString => undef
+$ServiceString => undef
+$id => undef
+</%ARGS>
diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html
index 54a950d7c..bb38760da 100644
--- a/rt/html/User/Prefs.html
+++ b/rt/html/User/Prefs.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@ -45,7 +45,7 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title=>loc("Preferences") &>
+<& /Elements/Header, Title=>loc("Ticketing Preferences") &>
<& /User/Elements/Tabs,
current_tab => 'User/Prefs.html',
Title=>loc("Preferences") &>
diff --git a/rt/html/Widgets/TitleBoxStart b/rt/html/Widgets/TitleBoxStart
index 602106e71..1d8548d00 100755
--- a/rt/html/Widgets/TitleBoxStart
+++ b/rt/html/Widgets/TitleBoxStart
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
%# 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.
+%# http://www.gnu.org/copyleft/gpl.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm
index 42c9ea299..22fb9a11c 100644
--- a/rt/lib/RT.pm
+++ b/rt/lib/RT.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -68,7 +68,7 @@ use vars qw($VERSION $System $SystemUser $Nobody $Handle $Logger
$MasonSessionDir
);
-$VERSION = '3.6.10';
+$VERSION = '3.6.6';
$CORE_CONFIG_FILE = "/opt/rt3/etc/RT_Config.pm";
$SITE_CONFIG_FILE = "/opt/rt3/etc/RT_SiteConfig.pm";
@@ -85,7 +85,7 @@ $LocalLexiconPath = '/opt/rt3/local/po';
# $MasonComponentRoot is where your rt instance keeps its mason html files
-$MasonComponentRoot = '/opt/rt3/share/html';
+$MasonComponentRoot = '/var/www/freeside/rt';
# $MasonLocalComponentRoot is where your rt instance keeps its site-local
# mason html files.
@@ -94,7 +94,7 @@ $MasonLocalComponentRoot = '/opt/rt3/local/html';
# $MasonDataDir Where mason keeps its datafiles
-$MasonDataDir = '/opt/rt3/var/mason_data';
+$MasonDataDir = '/usr/local/etc/freeside/masondata';
# RT needs to put session data (for preserving state between connections
# via the web interface)
@@ -410,9 +410,7 @@ Load all modules that define base classes
sub InitClasses {
require RT::Tickets;
require RT::Transactions;
- require RT::Attachments;
require RT::Users;
- require RT::Principals;
require RT::CurrentUser;
require RT::Templates;
require RT::Queues;
@@ -425,31 +423,6 @@ sub InitClasses {
require RT::CustomFieldValues;
require RT::ObjectCustomFields;
require RT::ObjectCustomFieldValues;
- require RT::Attributes;
-
- # on a cold server (just after restart) people could have an object
- # in the session, as we deserialize it so we never call constructor
- # of the class, so the list of accessible fields is empty and we die
- # with "Method xxx is not implemented in RT::SomeClass"
- $_->_BuildTableAttributes foreach qw(
- RT::Ticket
- RT::Transaction
- RT::Attachment
- RT::User
- RT::Principal
- RT::Template
- RT::Queue
- RT::ScripAction
- RT::ScripCondition
- RT::Scrip
- RT::Group
- RT::GroupMember
- RT::CustomField
- RT::CustomFieldValue
- RT::ObjectCustomField
- RT::ObjectCustomFieldValue
- RT::Attribute
- );
}
# }}}
diff --git a/rt/lib/RT/ACE.pm b/rt/lib/RT/ACE.pm
index 0cd12174d..1501a125e 100755
--- a/rt/lib/RT/ACE.pm
+++ b/rt/lib/RT/ACE.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -128,7 +104,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -137,14 +113,14 @@ Returns the current value of id.
=cut
-=head2 PrincipalType
+=item PrincipalType
Returns the current value of PrincipalType.
(In the database, PrincipalType is stored as varchar(25).)
-=head2 SetPrincipalType VALUE
+=item SetPrincipalType VALUE
Set PrincipalType to VALUE.
@@ -155,14 +131,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 PrincipalId
+=item PrincipalId
Returns the current value of PrincipalId.
(In the database, PrincipalId is stored as int(11).)
-=head2 SetPrincipalId VALUE
+=item SetPrincipalId VALUE
Set PrincipalId to VALUE.
@@ -173,14 +149,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 RightName
+=item RightName
Returns the current value of RightName.
(In the database, RightName is stored as varchar(25).)
-=head2 SetRightName VALUE
+=item SetRightName VALUE
Set RightName to VALUE.
@@ -191,14 +167,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ObjectType
+=item ObjectType
Returns the current value of ObjectType.
(In the database, ObjectType is stored as varchar(25).)
-=head2 SetObjectType VALUE
+=item SetObjectType VALUE
Set ObjectType to VALUE.
@@ -209,14 +185,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ObjectId
+=item ObjectId
Returns the current value of ObjectId.
(In the database, ObjectId is stored as int(11).)
-=head2 SetObjectId VALUE
+=item SetObjectId VALUE
Set ObjectId to VALUE.
@@ -227,14 +203,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 DelegatedBy
+=item DelegatedBy
Returns the current value of DelegatedBy.
(In the database, DelegatedBy is stored as int(11).)
-=head2 SetDelegatedBy VALUE
+=item SetDelegatedBy VALUE
Set DelegatedBy to VALUE.
@@ -245,14 +221,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 DelegatedFrom
+=item DelegatedFrom
Returns the current value of DelegatedFrom.
(In the database, DelegatedFrom is stored as int(11).)
-=head2 SetDelegatedFrom VALUE
+=item SetDelegatedFrom VALUE
Set DelegatedFrom to VALUE.
@@ -264,25 +240,25 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
PrincipalType =>
- {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
PrincipalId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
RightName =>
- {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
ObjectType =>
- {read => 1, write => 1, sql_type => 12, length => 25, is_blob => 0, is_numeric => 0, type => 'varchar(25)', default => ''},
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
ObjectId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
DelegatedBy =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
DelegatedFrom =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
}
};
@@ -314,7 +290,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/ACL.pm b/rt/lib/RT/ACL.pm
index 9641292e6..81f59c6d0 100755
--- a/rt/lib/RT/ACL.pm
+++ b/rt/lib/RT/ACL.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::ACE item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Action/Autoreply.pm b/rt/lib/RT/Action/Autoreply.pm
index ea56b9f5b..81f7bddfa 100755
--- a/rt/lib/RT/Action/Autoreply.pm
+++ b/rt/lib/RT/Action/Autoreply.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.
-#
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
package RT::Action::Autoreply;
require RT::Action::SendEmail;
@@ -52,18 +28,6 @@ use strict;
use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
-=head2 Prepare
-
-Set up the relevant recipients, then call our parent.
-
-=cut
-
-
-sub Prepare {
- my $self = shift;
- $self->SetRecipients();
- $self->SUPER::Prepare();
-}
# {{{ sub SetRecipients
@@ -110,18 +74,10 @@ sub SetReturnAddress {
}
unless ($self->TemplateObj->MIMEObj->head->get('From')) {
- if ($RT::UseFriendlyFromLine) {
- my $friendly_name = $self->TicketObj->QueueObj->Description ||
- $self->TicketObj->QueueObj->Name;
- $friendly_name =~ s/"/\\"/g;
- $self->SetHeader( 'From',
- sprintf($RT::FriendlyFromLineFormat,
- $self->MIMEEncodeString( $friendly_name, $RT::EmailOutputEncoding ), $replyto),
- );
- }
- else {
- $self->SetHeader( 'From', $replyto );
- }
+ my $friendly_name = $self->TicketObj->QueueObj->Description ||
+ $self->TicketObj->QueueObj->Name;
+ $friendly_name =~ s/"/\\"/g;
+ $self->SetHeader('From', "\"$friendly_name\" <$replyto>");
}
unless ($self->TemplateObj->MIMEObj->head->get('Reply-To')) {
diff --git a/rt/lib/RT/Action/Generic.pm b/rt/lib/RT/Action/Generic.pm
index 3232d4898..007d299c7 100755
--- a/rt/lib/RT/Action/Generic.pm
+++ b/rt/lib/RT/Action/Generic.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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:
+# 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.
#
-# (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 }}}
+# END LICENSE BLOCK
=head1 NAME
RT::Action::Generic - a generic baseclass for RT Actions
@@ -68,9 +44,6 @@ ok (require RT::Action::Generic);
package RT::Action::Generic;
use strict;
-use Scalar::Util;
-
-use base qw/RT::Base/;
# {{{ sub new
sub new {
@@ -83,35 +56,31 @@ sub new {
}
# }}}
+# {{{ sub new
+sub loc {
+ my $self = shift;
+ return $self->{'ScripObj'}->loc(@_);
+}
+# }}}
+
# {{{ sub _Init
sub _Init {
my $self = shift;
- my %args = ( Argument => undef,
- CurrentUser => undef,
- ScripActionObj => undef,
- ScripObj => undef,
- TemplateObj => undef,
- TicketObj => undef,
- TransactionObj => undef,
- Type => undef,
-
- @_ );
-
+ my %args = ( TransactionObj => undef,
+ TicketObj => undef,
+ ScripObj => undef,
+ TemplateObj => undef,
+ Argument => undef,
+ Type => undef,
+ @_ );
+
+
$self->{'Argument'} = $args{'Argument'};
- $self->CurrentUser( $args{'CurrentUser'});
- $self->{'ScripActionObj'} = $args{'ScripActionObj'};
$self->{'ScripObj'} = $args{'ScripObj'};
- $self->{'TemplateObj'} = $args{'TemplateObj'};
$self->{'TicketObj'} = $args{'TicketObj'};
$self->{'TransactionObj'} = $args{'TransactionObj'};
+ $self->{'TemplateObj'} = $args{'TemplateObj'};
$self->{'Type'} = $args{'Type'};
-
- Scalar::Util::weaken($self->{'ScripActionObj'});
- Scalar::Util::weaken($self->{'ScripObj'});
- Scalar::Util::weaken($self->{'TemplateObj'});
- Scalar::Util::weaken($self->{'TicketObj'});
- Scalar::Util::weaken($self->{'TransactionObj'});
-
}
# }}}
@@ -152,13 +121,6 @@ sub ScripObj {
}
# }}}
-# {{{ sub ScripActionObj
-sub ScripActionObj {
- my $self = shift;
- return($self->{'ScripActionObj'});
-}
-# }}}
-
# {{{ sub Type
sub Type {
my $self = shift;
@@ -214,11 +176,13 @@ sub DESTROY {
# We need to clean up all the references that might maybe get
# oddly circular
- $self->{'ScripActionObj'} = undef;
- $self->{'ScripObj'} = undef;
$self->{'TemplateObj'} =undef
$self->{'TicketObj'} = undef;
$self->{'TransactionObj'} = undef;
+ $self->{'ScripObj'} = undef;
+
+
+
}
# }}}
diff --git a/rt/lib/RT/Action/Notify.pm b/rt/lib/RT/Action/Notify.pm
index 82cad1e58..1e4e4c073 100755
--- a/rt/lib/RT/Action/Notify.pm
+++ b/rt/lib/RT/Action/Notify.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,53 +14,20 @@
# 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.)
+# 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.
#
-# 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 }}}
-#
+# END LICENSE BLOCK
package RT::Action::Notify;
require RT::Action::SendEmail;
-use Mail::Address;
+
use strict;
use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
-
-=head2 Prepare
-
-Set up the relevant recipients, then call our parent.
-
-=cut
-
-
-sub Prepare {
- my $self = shift;
- $self->SetRecipients();
- $self->SUPER::Prepare();
-}
-
# {{{ sub SetRecipients
=head2 SetRecipients
@@ -86,18 +47,10 @@ sub SetRecipients {
my ( @To, @PseudoTo, @Cc, @Bcc );
- if ( $arg =~ /\bOtherRecipients\b/ ) {
- if ( $self->TransactionObj->Attachments->First ) {
- my @cc_addresses = Mail::Address->parse($self->TransactionObj->Attachments->First->GetHeader('RT-Send-Cc'));
- foreach my $addr (@cc_addresses) {
- push @Cc, $addr->address;
- }
- my @bcc_addresses = Mail::Address->parse($self->TransactionObj->Attachments->First->GetHeader('RT-Send-Bcc'));
-
- foreach my $addr (@bcc_addresses) {
- push @Bcc, $addr->address;
- }
-
+ if ($arg =~ /\bOtherRecipients\b/) {
+ if ($self->TransactionObj->Attachments->First) {
+ push (@Cc, $self->TransactionObj->Attachments->First->GetHeader('RT-Send-Cc'));
+ push (@Bcc, $self->TransactionObj->Attachments->First->GetHeader('RT-Send-Bcc'));
}
}
@@ -160,12 +113,12 @@ sub SetRecipients {
@{ $self->{'Bcc'} } = @Bcc;
}
else {
- @{ $self->{'To'} } = grep ( lc $_ ne lc $creator, @To );
- @{ $self->{'Cc'} } = grep ( lc $_ ne lc $creator, @Cc );
- @{ $self->{'Bcc'} } = grep ( lc $_ ne lc $creator, @Bcc );
+ @{ $self->{'To'} } = grep ( !/^$creator$/, @To );
+ @{ $self->{'Cc'} } = grep ( !/^$creator$/, @Cc );
+ @{ $self->{'Bcc'} } = grep ( !/^$creator$/, @Bcc );
}
@{ $self->{'PseudoTo'} } = @PseudoTo;
-
+ return (1);
}
diff --git a/rt/lib/RT/Action/NotifyAsComment.pm b/rt/lib/RT/Action/NotifyAsComment.pm
index 215f453d3..210e4ab15 100755
--- a/rt/lib/RT/Action/NotifyAsComment.pm
+++ b/rt/lib/RT/Action/NotifyAsComment.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
package RT::Action::NotifyAsComment;
require RT::Action::Notify;
diff --git a/rt/lib/RT/Action/ResolveMembers.pm b/rt/lib/RT/Action/ResolveMembers.pm
index fab049b0a..02ff3a58c 100644
--- a/rt/lib/RT/Action/ResolveMembers.pm
+++ b/rt/lib/RT/Action/ResolveMembers.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# This Action will resolve all members of a resolved group ticket
package RT::Action::ResolveMembers;
diff --git a/rt/lib/RT/Action/SendEmail.pm b/rt/lib/RT/Action/SendEmail.pm
index ed5ec4fd6..dac8fc8e7 100755
--- a/rt/lib/RT/Action/SendEmail.pm
+++ b/rt/lib/RT/Action/SendEmail.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Portions Copyright 2000 Tobias Brox <tobix@cpan.org>
package RT::Action::SendEmail;
@@ -57,8 +33,6 @@ use vars qw/@ISA/;
use MIME::Words qw(encode_mimeword);
use RT::EmailParser;
-use Mail::Address;
-use Date::Format qw(strftime);
=head1 NAME
@@ -77,6 +51,13 @@ RT::Action::AutoReply is a good example subclass.
Basically, you create another module RT::Action::YourAction which ISA
RT::Action::SendEmail.
+If you want to set the recipients of the mail to something other than
+the addresses mentioned in the To, Cc, Bcc and headers in
+the template, you should subclass RT::Action::SendEmail and override
+either the SetRecipients method or the SetTo, SetCc, etc methods (see
+the comments for the SetRecipients sub).
+
+
=begin testing
ok (require RT::Action::SendEmail);
@@ -96,409 +77,236 @@ perl(1).
# {{{ Scrip methods (_Init, Commit, Prepare, IsApplicable)
+# {{{ sub _Init
+# We use _Init from RT::Action
+# }}}
# {{{ sub Commit
-
+#Do what we need to do and send it out.
sub Commit {
- # DO NOT SHIFT @_ in this subroutine. It breaks Hook::LexWrap's
- # ability to pass @_ to a 'post' routine.
- my $self = $_[0];
-
- my ($ret) = $self->SendMessage( $self->TemplateObj->MIMEObj );
- if ( $ret > 0 ) {
- $self->RecordOutgoingMailTransaction( $self->TemplateObj->MIMEObj )
- if ($RT::RecordOutgoingEmail);
- }
- return (abs $ret);
-}
-
-# }}}
-
-# {{{ sub Prepare
-
-sub Prepare {
my $self = shift;
- my ( $result, $message ) = $self->TemplateObj->Parse(
- Argument => $self->Argument,
- TicketObj => $self->TicketObj,
- TransactionObj => $self->TransactionObj
- );
- if ( !$result ) {
- return (undef);
- }
-
my $MIMEObj = $self->TemplateObj->MIMEObj;
+ my $msgid = $MIMEObj->head->get('Message-Id');
+ chomp $msgid;
+ $RT::Logger->info($msgid." #".$self->TicketObj->id."/".$self->TransactionObj->id." - Scrip ". $self->ScripObj->id ." ".$self->ScripObj->Description);
+ #send the email
- # Header
- $self->SetRTSpecialHeaders();
+ # Weed out any RT addresses. We really don't want to talk to ourselves!
+ @{$self->{'To'}} = RT::EmailParser::CullRTAddresses("", @{$self->{'To'}});
+ @{$self->{'Cc'}} = RT::EmailParser::CullRTAddresses("", @{$self->{'Cc'}});
+ @{$self->{'Bcc'}} = RT::EmailParser::CullRTAddresses("", @{$self->{'Bcc'}});
+ # If there are no recipients, don't try to send the message.
+ # If the transaction has content and has the header RT-Squelch-Replies-To
+
+ if ( defined $self->TransactionObj->Attachments->First() ) {
- $self->RemoveInappropriateRecipients();
+ my $squelch = $self->TransactionObj->Attachments->First->GetHeader( 'RT-Squelch-Replies-To');
- my %seen;
- foreach my $type qw(To Cc Bcc) {
- @{ $self->{ $type } } =
- grep defined && length && !$seen{ lc $_ }++,
- @{ $self->{ $type } };
+ if ($squelch) {
+ my @blacklist = split ( /,/, $squelch );
+
+ # Cycle through the people we're sending to and pull out anyone on the
+ # system blacklist
+
+ foreach my $person_to_yank (@blacklist) {
+ $person_to_yank =~ s/\s//g;
+ @{ $self->{'To'} } =
+ grep ( !/^$person_to_yank$/, @{ $self->{'To'} } );
+ @{ $self->{'Cc'} } =
+ grep ( !/^$person_to_yank$/, @{ $self->{'Cc'} } );
+ @{ $self->{'Bcc'} } =
+ grep ( !/^$person_to_yank$/, @{ $self->{'Bcc'} } );
+ }
+ }
}
# Go add all the Tos, Ccs and Bccs that we need to to the message to
# make it happy, but only if we actually have values in those arrays.
- # TODO: We should be pulling the recipients out of the template and shove them into To, Cc and Bcc
+ $self->SetHeader( 'To', join ( ',', @{ $self->{'To'} } ) )
+ if ( $self->{'To'} && @{ $self->{'To'} } );
+ $self->SetHeader( 'Cc', join ( ',', @{ $self->{'Cc'} } ) )
+ if ( $self->{'Cc'} && @{ $self->{'Cc'} } );
+ $self->SetHeader( 'Bcc', join ( ',', @{ $self->{'Bcc'} } ) )
+ if ( $self->{'Cc'} && @{ $self->{'Bcc'} } );
- $self->SetHeader( 'To', join ( ', ', @{ $self->{'To'} } ) )
- if ( ! $MIMEObj->head->get('To') && $self->{'To'} && @{ $self->{'To'} } );
- $self->SetHeader( 'Cc', join ( ', ', @{ $self->{'Cc'} } ) )
- if ( !$MIMEObj->head->get('Cc') && $self->{'Cc'} && @{ $self->{'Cc'} } );
- $self->SetHeader( 'Bcc', join ( ', ', @{ $self->{'Bcc'} } ) )
- if ( !$MIMEObj->head->get('Bcc') && $self->{'Bcc'} && @{ $self->{'Bcc'} } );
- # PseudoTo (fake to headers) shouldn't get matched for message recipients.
- # If we don't have any 'To' header (but do have other recipients), drop in
- # the pseudo-to header.
- $self->SetHeader( 'To', join ( ', ', @{ $self->{'PseudoTo'} } ) )
- if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )
- and ( !$MIMEObj->head->get('To') ) ) and ( $MIMEObj->head->get('Cc') or $MIMEObj->head->get('Bcc'));
+ $self->SetHeader('MIME-Version', '1.0');
- # We should never have to set the MIME-Version header
- $self->SetHeader( 'MIME-Version', '1.0' );
+ # try to convert message body from utf-8 to $RT::EmailOutputEncoding
+ $self->SetHeader( 'Content-Type', 'text/plain; charset="utf-8"' );
- # fsck.com #5959: Since RT sends 8bit mail, we should say so.
- $self->SetHeader( 'Content-Transfer-Encoding','8bit');
+ RT::I18N::SetMIMEEntityToEncoding( $MIMEObj, $RT::EmailOutputEncoding, 'mime_words_ok' );
+ $self->SetHeader( 'Content-Type', 'text/plain; charset="' . $RT::EmailOutputEncoding . '"' );
- # For security reasons, we only send out textual mails.
- my @parts = $MIMEObj;
- while (my $part = shift @parts) {
- if ($part->is_multipart) {
- push @parts, $part->parts;
- }
- else {
- if ( RT::I18N::IsTextualContentType( $part->mime_type ) ) {
- $part->head->mime_attr( "Content-Type" => $part->mime_type )
- } else {
- $part->head->mime_attr( "Content-Type" => 'text/plain' );
- }
- $part->head->mime_attr( "Content-Type.charset" => 'utf-8' );
- }
- }
+ # Build up a MIME::Entity that looks like the original message.
- RT::I18N::SetMIMEEntityToEncoding( $MIMEObj, $RT::EmailOutputEncoding, 'mime_words_ok' );
+ my $do_attach = $self->TemplateObj->MIMEObj->head->get('RT-Attach-Message');
- # Build up a MIME::Entity that looks like the original message.
- $self->AddAttachments() if ( $MIMEObj->head->get('RT-Attach-Message') );
+ if ($do_attach) {
+ $self->TemplateObj->MIMEObj->head->delete('RT-Attach-Message');
- return $result;
+ my $attachments = RT::Attachments->new($RT::SystemUser);
+ $attachments->Limit( FIELD => 'TransactionId',
+ VALUE => $self->TransactionObj->Id );
+ $attachments->OrderBy('id');
-}
+ my $transaction_content_obj = $self->TransactionObj->ContentObj;
-# }}}
+ # attach any of this transaction's attachments
+ while ( my $attach = $attachments->Next ) {
-# }}}
+ # Don't attach anything blank
+ next unless ( $attach->ContentLength );
+ # We want to make sure that we don't include the attachment that's being sued as the "Content" of this message"
+ next
+ if ( $transaction_content_obj
+ && $transaction_content_obj->Id == $attach->Id
+ && $transaction_content_obj->ContentType =~ qr{text/plain}i
+ );
+ $MIMEObj->make_multipart('mixed');
+ $MIMEObj->attach( Type => $attach->ContentType,
+ Charset => $attach->OriginalEncoding,
+ Data => $attach->OriginalContent,
+ Filename => $self->MIMEEncodeString( $attach->Filename, $RT::EmailOutputEncoding ),
+ Encoding => '-SUGGEST');
+ }
+ }
-=head2 To
-Returns an array of Mail::Address objects containing all the To: recipients for this notification
+ my $retval = $self->SendMessage($MIMEObj);
-=cut
-sub To {
- my $self = shift;
- return ($self->_AddressesFromHeader('To'));
+ return ($retval);
}
-=head2 Cc
-
-Returns an array of Mail::Address objects containing all the Cc: recipients for this notification
+# }}}
-=cut
+# {{{ sub Prepare
-sub Cc {
+sub Prepare {
my $self = shift;
- return ($self->_AddressesFromHeader('Cc'));
-}
-=head2 Bcc
+ # This actually populates the MIME::Entity fields in the Template Object
-Returns an array of Mail::Address objects containing all the Bcc: recipients for this notification
+ unless ( $self->TemplateObj ) {
+ $RT::Logger->warning("No template object handed to $self\n");
+ }
-=cut
+ unless ( $self->TransactionObj ) {
+ $RT::Logger->warning("No transaction object handed to $self\n");
+ }
-sub Bcc {
- my $self = shift;
- return ($self->_AddressesFromHeader('Bcc'));
+ unless ( $self->TicketObj ) {
+ $RT::Logger->warning("No ticket object handed to $self\n");
-}
+ }
-sub _AddressesFromHeader {
- my $self = shift;
- my $field = shift;
- my $header = $self->TemplateObj->MIMEObj->head->get($field);
- my @addresses = Mail::Address->parse($header);
+ my ( $result, $message ) = $self->TemplateObj->Parse(
+ Argument => $self->Argument,
+ TicketObj => $self->TicketObj,
+ TransactionObj => $self->TransactionObj
+ );
+ if ($result) {
+
+ # Header
+ $self->SetSubject();
+ $self->SetSubjectToken();
+ $self->SetRecipients();
+ $self->SetReturnAddress();
+ $self->SetRTSpecialHeaders();
+ if ($RT::EmailOutputEncoding) {
+
+ # l10n related header
+ $self->SetHeaderAsEncoding( 'Subject', $RT::EmailOutputEncoding );
+ }
+ }
+
+ return $result;
- return (@addresses);
}
+# }}}
-# {{{ SendMessage
+# }}}
+# {{{ SendMessage
=head2 SendMessage MIMEObj
sends the message using RT's preferred API.
-TODO: Break this out to a separate module
+TODO: Break this out to a seperate module
=cut
sub SendMessage {
- # DO NOT SHIFT @_ in this subroutine. It breaks Hook::LexWrap's
- # ability to pass @_ to a 'post' routine.
- my ( $self, $MIMEObj ) = @_;
+ my $self = shift;
+ my $MIMEObj = shift;
- my $msgid = $MIMEObj->head->get('Message-ID');
- chomp $msgid;
+ my $msgid = $MIMEObj->head->get('Message-Id');
- $self->ScripActionObj->{_Message_ID}++;
-
- $RT::Logger->info( $msgid . " #"
- . $self->TicketObj->id . "/"
- . $self->TransactionObj->id
- . " - Scrip "
- . $self->ScripObj->id . " "
- . $self->ScripObj->Description );
#If we don't have any recipients to send to, don't send a message;
- unless ( $MIMEObj->head->get('To')
- || $MIMEObj->head->get('Cc')
- || $MIMEObj->head->get('Bcc') )
- {
- $RT::Logger->info( $msgid . " No recipients found. Not sending.\n" );
- return (-1);
- }
-
- unless ($MIMEObj->head->get('Date')) {
- # We coerce localtime into an array since strftime has a flawed prototype that only accepts
- # a list
- $MIMEObj->head->replace(Date => strftime('%a, %d %b %Y %H:%M:%S %z', @{[localtime()]}));
- }
-
- return (0) unless ($self->OutputMIMEObject($MIMEObj));
-
- my $success = $msgid . " sent ";
- foreach( qw(To Cc Bcc) ) {
- my $recipients = $MIMEObj->head->get($_);
- $success .= " $_: ". $recipients if $recipients;
- }
- $success =~ s/\n//g;
-
- $RT::Logger->info($success);
-
- return (1);
-}
-
-
-=head2 OutputMIMEObject MIME::Entity
-
-Sends C<MIME::Entity> as an email message according to RT's mailer configuration.
-
-=cut
-
-
-
-sub OutputMIMEObject {
- my $self = shift;
- my $MIMEObj = shift;
-
- my $msgid = $MIMEObj->head->get('Message-ID');
- chomp $msgid;
-
- my $SendmailArguments = $RT::SendmailArguments;
- if (defined $RT::VERPPrefix && defined $RT::VERPDomain) {
- my $EnvelopeFrom = $self->TransactionObj->CreatorObj->EmailAddress;
- $EnvelopeFrom =~ s/@/=/g;
- $EnvelopeFrom =~ s/\s//g;
- $SendmailArguments .= " -f ${RT::VERPPrefix}${EnvelopeFrom}\@${RT::VERPDomain}";
+ unless ( $MIMEObj->head->get('To')
+ || $MIMEObj->head->get('Cc')
+ || $MIMEObj->head->get('Bcc') ) {
+ $RT::Logger->info($msgid. " No recipients found. Not sending.\n");
+ return (1);
}
+ # PseudoTo (fake to headers) shouldn't get matched for message recipients.
+ # If we don't have any 'To' header, drop in the pseudo-to header.
+ $self->SetHeader( 'To', join ( ',', @{ $self->{'PseudoTo'} } ) )
+ if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )
+ and ( !$MIMEObj->head->get('To') ) );
if ( $RT::MailCommand eq 'sendmailpipe' ) {
eval {
- # don't ignore CHLD signal to get proper exit code
- local $SIG{'CHLD'} = 'DEFAULT';
-
- my $mail;
- unless( open $mail, "|$RT::SendmailPath $SendmailArguments" ) {
- die "Couldn't run $RT::SendmailPath: $!";
- }
-
- # if something wrong with $mail->print we will get PIPE signal, handle it
- local $SIG{'PIPE'} = sub { die "$RT::SendmailPath closed pipe" };
- $MIMEObj->print($mail);
-
- unless ( close $mail ) {
- die "Close failed: $!" if $!; # system error
- # sendmail exit statuses mostly errors with data not software
- # TODO: status parsing: core dump, exit on signal or EX_*
- $RT::Logger->warning( "$RT::SendmailPath exitted with status $?" );
- }
- };
- if ($@) {
- $RT::Logger->crit( $msgid . "Could not send mail: " . $@ );
- return 0;
+ open( MAIL, "|$RT::SendmailPath $RT::SendmailArguments" );
+ print MAIL $MIMEObj->as_string;
+ close(MAIL);
+ };
+ if ($@) {
+ $RT::Logger->crit($msgid. "Could not send mail. -".$@ );
}
}
else {
- my @mailer_args = ($RT::MailCommand);
- my $method = 'send';
-
- local $ENV{MAILADDRESS};
+ my @mailer_args = ($RT::MailCommand);
+ local $ENV{MAILADDRESS};
if ( $RT::MailCommand eq 'sendmail' ) {
- push @mailer_args, split(/\s+/, $SendmailArguments);
+ push @mailer_args, $RT::SendmailArguments;
}
elsif ( $RT::MailCommand eq 'smtp' ) {
- $ENV{MAILADDRESS} = $RT::SMTPFrom || $MIMEObj->head->get('From');
- push @mailer_args, ( Host => $RT::SMTPServer );
- push @mailer_args, ( Debug => $RT::SMTPDebug );
- $method = 'smtpsend';
- }
- else {
- push @mailer_args, $RT::MailParams;
+ $ENV{MAILADDRESS} = $RT::SMTPFrom || $MIMEObj->head->get('From');
+ push @mailer_args, (Server => $RT::SMTPServer);
+ push @mailer_args, (Debug => $RT::SMTPDebug);
}
+ else {
+ push @mailer_args, $RT::MailParams;
+ }
- unless ( $MIMEObj->$method(@mailer_args) ) {
- $RT::Logger->crit( $msgid . "Could not send mail." );
+ unless ( $MIMEObj->send( @mailer_args ) ) {
+ $RT::Logger->crit($msgid. "Could not send mail." );
return (0);
}
}
- return 1;
-}
-# }}}
-
-# {{{ AddAttachments
-
-=head2 AddAttachments
-
-Takes any attachments to this transaction and attaches them to the message
-we're building.
-
-=cut
-
-
-sub AddAttachments {
- my $self = shift;
- my $MIMEObj = $self->TemplateObj->MIMEObj;
-
- $MIMEObj->head->delete('RT-Attach-Message');
-
- my $attachments = RT::Attachments->new($RT::SystemUser);
- $attachments->Limit(
- FIELD => 'TransactionId',
- VALUE => $self->TransactionObj->Id
- );
- $attachments->OrderBy( FIELD => 'id');
-
- my $transaction_content_obj = $self->TransactionObj->ContentObj;
-
- # attach any of this transaction's attachments
- while ( my $attach = $attachments->Next ) {
-
- # Don't attach anything blank
- next unless ( $attach->ContentLength );
-
-# We want to make sure that we don't include the attachment that's being used as the "Content" of this message.
- next
- if ( $transaction_content_obj
- && $transaction_content_obj->Id == $attach->Id
- && $transaction_content_obj->ContentType =~ qr{text/plain}i );
- $MIMEObj->make_multipart('mixed');
- $MIMEObj->attach(
- Type => $attach->ContentType,
- Charset => $attach->OriginalEncoding,
- Data => $attach->OriginalContent,
- Filename => $self->MIMEEncodeString( $attach->Filename,
- $RT::EmailOutputEncoding ),
- 'RT-Attachment:' => $self->TicketObj->Id."/".$self->TransactionObj->Id."/".$attach->id,
- Encoding => '-SUGGEST'
- );
- }
+ my $success = ($msgid. " sent To: ".$MIMEObj->head->get('To') . " Cc: ".$MIMEObj->head->get('Cc') . " Bcc: ".$MIMEObj->head->get('Bcc'));
+ $success =~ s/\n//gi;
+ $RT::Logger->info($success);
+ return (1);
}
# }}}
-# {{{ RecordOutgoingMailTransaction
-
-=head2 RecordOutgoingMailTransaction MIMEObj
-
-Record a transaction in RT with this outgoing message for future record-keeping purposes
-
-=cut
-
-
-
-sub RecordOutgoingMailTransaction {
- my $self = shift;
- my $MIMEObj = shift;
-
-
- my @parts = $MIMEObj->parts;
- my @attachments;
- my @keep;
- foreach my $part (@parts) {
- my $attach = $part->head->get('RT-Attachment');
- if ($attach) {
- $RT::Logger->debug("We found an attachment. we want to not record it.");
- push @attachments, $attach;
- } else {
- $RT::Logger->debug("We found a part. we want to record it.");
- push @keep, $part;
- }
- }
- $MIMEObj->parts(\@keep);
- foreach my $attachment (@attachments) {
- $MIMEObj->head->add('RT-Attachment', $attachment);
- }
-
- RT::I18N::SetMIMEEntityToEncoding( $MIMEObj, 'utf-8', 'mime_words_ok' );
-
- my $transaction = RT::Transaction->new($self->TransactionObj->CurrentUser);
-
- # XXX: TODO -> Record attachments as references to things in the attachments table, maybe.
-
- my $type;
- if ($self->TransactionObj->Type eq 'Comment') {
- $type = 'CommentEmailRecord';
- } else {
- $type = 'EmailRecord';
- }
-
- my $msgid = $MIMEObj->head->get('Message-ID');
- chomp $msgid;
-
- my ( $id, $msg ) = $transaction->Create(
- Ticket => $self->TicketObj->Id,
- Type => $type,
- Data => $msgid,
- MIMEObj => $MIMEObj,
- ActivateScrips => 0
- );
-
- if( $id ) {
- $self->{'OutgoingMailTransaction'} = $id;
- } else {
- $RT::Logger->warning( "Could not record outgoing message transaction: $msg" );
- }
- return $id;
-}
-
-# }}}
-#
+# {{{ Deal with message headers (Set* subs, designed for easy overriding)
# {{{ sub SetRTSpecialHeaders
@@ -512,161 +320,84 @@ that don't matter much to anybody else.
sub SetRTSpecialHeaders {
my $self = shift;
- $self->SetSubject();
- $self->SetSubjectToken();
- $self->SetHeaderAsEncoding( 'Subject', $RT::EmailOutputEncoding )
- if ($RT::EmailOutputEncoding);
- $self->SetReturnAddress();
- $self->SetReferencesHeaders();
-
- unless ($self->TemplateObj->MIMEObj->head->get('Message-ID')) {
- # Get Message-ID for this txn
- my $msgid = "";
- $msgid = $self->TransactionObj->Message->First->GetHeader("RT-Message-ID")
- || $self->TransactionObj->Message->First->GetHeader("Message-ID")
- if $self->TransactionObj->Message && $self->TransactionObj->Message->First;
-
- # If there is one, and we can parse it, then base our Message-ID on it
- if ($msgid
- and $msgid =~ s/<(rt-.*?-\d+-\d+)\.(\d+)-\d+-\d+\@\Q$RT::Organization\E>$/
- "<$1." . $self->TicketObj->id
- . "-" . $self->ScripObj->id
- . "-" . $self->ScripActionObj->{_Message_ID}
- . "@" . $RT::Organization . ">"/eg
- and $2 == $self->TicketObj->id) {
- $self->SetHeader( "Message-ID" => $msgid );
- } else {
- $self->SetHeader( 'Message-ID',
- "<rt-"
- . $RT::VERSION . "-"
- . $$ . "-"
- . CORE::time() . "-"
- . int(rand(2000)) . '.'
- . $self->TicketObj->id . "-"
- . $self->ScripObj->id . "-" # Scrip
- . $self->ScripActionObj->{_Message_ID} . "@" # Email sent
- . $RT::Organization
- . ">" );
- }
- }
+ $self->SetReferences();
+
+ $self->SetMessageID();
- $self->SetHeader( 'Precedence', "bulk" )
- unless ( $self->TemplateObj->MIMEObj->head->get("Precedence") );
+ $self->SetPrecedence();
$self->SetHeader( 'X-RT-Loop-Prevention', $RT::rtname );
$self->SetHeader( 'RT-Ticket',
- $RT::rtname . " #" . $self->TicketObj->id() );
+ $RT::rtname . " #" . $self->TicketObj->id() );
$self->SetHeader( 'Managed-by',
- "RT $RT::VERSION (http://www.bestpractical.com/rt/)" );
+ "RT $RT::VERSION (http://www.bestpractical.com/rt/)" );
$self->SetHeader( 'RT-Originator',
- $self->TransactionObj->CreatorObj->EmailAddress );
+ $self->TransactionObj->CreatorObj->EmailAddress );
+ return ();
}
-# }}}
-
-
-# }}}
-
-# {{{ RemoveInappropriateRecipients
+# {{{ sub SetReferences
-=head2 RemoveInappropriateRecipients
-
-Remove addresses that are RT addresses or that are on this transaction's blacklist
+=head2 SetReferences
+
+ # This routine will set the References: and In-Reply-To headers,
+# autopopulating it with all the correspondence on this ticket so
+# far. This should make RT responses threadable.
=cut
-sub RemoveInappropriateRecipients {
+sub SetReferences {
my $self = shift;
- my $msgid = $self->TemplateObj->MIMEObj->head->get ('Message-Id');
-
-
-
- my @blacklist;
+ # TODO: this one is broken. What is this email really a reply to?
+ # If it's a reply to an incoming message, we'll need to use the
+ # actual message-id from the appropriate Attachment object. For
+ # incoming mails, we would like to preserve the In-Reply-To and/or
+ # References.
- my @types = qw/To Cc Bcc/;
+ $self->SetHeader( 'In-Reply-To',
+ "<rt-" . $self->TicketObj->id() . "\@" . $RT::rtname . ">" );
- # Weed out any RT addresses. We really don't want to talk to ourselves!
- foreach my $type (@types) {
- @{ $self->{$type} } =
- RT::EmailParser::CullRTAddresses( "", @{ $self->{$type} } );
- }
-
- # If there are no recipients, don't try to send the message.
- # If the transaction has content and has the header RT-Squelch-Replies-To
-
- if ( $self->TransactionObj->Attachments->First() ) {
- if (
- $self->TransactionObj->Attachments->First->GetHeader(
- 'RT-DetectedAutoGenerated')
- )
- {
-
- # What do we want to do with this? It's probably (?) a bounce
- # caused by one of the watcher addresses being broken.
- # Default ("true") is to redistribute, for historical reasons.
-
- if ( !$RT::RedistributeAutoGeneratedMessages ) {
-
- # Don't send to any watchers.
- @{ $self->{'To'} } = ();
- @{ $self->{'Cc'} } = ();
- @{ $self->{'Bcc'} } = ();
-
- $RT::Logger->info( $msgid . " The incoming message was autogenerated. Not redistributing this message based on site configuration.\n");
- }
- elsif ( $RT::RedistributeAutoGeneratedMessages eq 'privileged' ) {
-
- # Only send to "privileged" watchers.
- #
-
- foreach my $type (@types) {
-
- foreach my $addr ( @{ $self->{$type} } ) {
- my $user = RT::User->new($RT::SystemUser);
- $user->LoadByEmail($addr);
- @{ $self->{$type} } =
- grep ( !/^\Q$addr\E$/, @{ $self->{$type} } )
- if ( !$user->Privileged );
+ # TODO We should always add References headers for all message-ids
+ # of previous messages related to this ticket.
+}
- }
- }
- $RT::Logger->info( $msgid . " The incoming message was autogenerated. Not redistributing this message to unprivileged users based on site configuration.\n");
+# }}}
- }
+# {{{ sub SetMessageID
- }
+=head2 SetMessageID
- my $squelch =
- $self->TransactionObj->Attachments->First->GetHeader(
- 'RT-Squelch-Replies-To');
+Without this one, threading won't work very nice in email agents.
+Anyway, I'm not really sure it's that healthy if we need to send
+several separate/different emails about the same transaction.
- if ($squelch) {
- @blacklist = split( /,/, $squelch );
- }
- }
-
- # Let's grab the SquelchMailTo attribue and push those entries into the @blacklist
- my @non_recipients = $self->TicketObj->SquelchMailTo;
- foreach my $attribute (@non_recipients) {
- push @blacklist, $attribute->Content;
- }
+=cut
- # Cycle through the people we're sending to and pull out anyone on the
- # system blacklist
+sub SetMessageID {
+ my $self = shift;
- foreach my $person_to_yank (@blacklist) {
- $person_to_yank =~ s/\s//g;
- foreach my $type (@types) {
- @{ $self->{$type} } =
- grep ( !/^\Q$person_to_yank\E$/, @{ $self->{$type} } );
- }
- }
+ # TODO this one might be sort of broken. If we have several scrips +++
+ # sending several emails to several different persons, we need to
+ # pull out different message-ids. I'd suggest message ids like
+ # "rt-ticket#-transaction#-scrip#-receipient#"
+
+ $self->SetHeader( 'Message-ID',
+ "<rt-"
+ . $RT::VERSION ."-"
+ . $self->TicketObj->id() . "-"
+ . $self->TransactionObj->id() . "."
+ . rand(20) . "\@"
+ . $RT::Organization . ">" )
+ unless $self->TemplateObj->MIMEObj->head->get('Message-ID');
}
# }}}
+
+# }}}
+
# {{{ sub SetReturnAddress
=head2 SetReturnAddress is_comment => BOOLEAN
@@ -678,10 +409,8 @@ Calculate and set From and Reply-To headers based on the is_comment flag.
sub SetReturnAddress {
my $self = shift;
- my %args = (
- is_comment => 0,
- @_
- );
+ my %args = ( is_comment => 0,
+ @_ );
# From and Reply-To
# $args{is_comment} should be set if the comment address is to be used.
@@ -697,27 +426,21 @@ sub SetReturnAddress {
}
unless ( $self->TemplateObj->MIMEObj->head->get('From') ) {
- if ($RT::UseFriendlyFromLine) {
- my $friendly_name = $self->TransactionObj->CreatorObj->RealName
- || $self->TransactionObj->CreatorObj->Name;
- if ( $friendly_name =~ /^"(.*)"$/ ) { # a quoted string
- $friendly_name = $1;
- }
-
- $friendly_name =~ s/"/\\"/g;
- $self->SetHeader(
- 'From',
- sprintf(
- $RT::FriendlyFromLineFormat,
- $self->MIMEEncodeString( $friendly_name,
- $RT::EmailOutputEncoding ),
- $replyto
- ),
- );
- }
- else {
- $self->SetHeader( 'From', $replyto );
- }
+ if ($RT::UseFriendlyFromLine) {
+ my $friendly_name = $self->TransactionObj->CreatorObj->RealName;
+ if ( $friendly_name =~ /^"(.*)"$/ ) { # a quoted string
+ $friendly_name = $1;
+ }
+
+ $friendly_name =~ s/"/\\"/g;
+ $self->SetHeader( 'From',
+ sprintf($RT::FriendlyFromLineFormat,
+ $self->MIMEEncodeString( $friendly_name, $RT::EmailOutputEncoding ), $replyto),
+ );
+ }
+ else {
+ $self->SetHeader( 'From', $replyto );
+ }
}
unless ( $self->TemplateObj->MIMEObj->head->get('Reply-To') ) {
@@ -750,166 +473,155 @@ sub SetHeader {
# }}}
+# {{{ sub SetRecipients
-# {{{ sub SetSubject
+=head2 SetRecipients
-=head2 SetSubject
-
-This routine sets the subject. it does not add the rt tag. that gets done elsewhere
-If $self->{'Subject'} is already defined, it uses that. otherwise, it tries to get
-the transaction's subject.
+Dummy method to be overriden by subclasses which want to set the recipients.
-=cut
+=cut
-sub SetSubject {
+sub SetRecipients {
my $self = shift;
- my $subject;
+ return ();
+}
- my $message = $self->TransactionObj->Attachments;
- if ( $self->TemplateObj->MIMEObj->head->get('Subject') ) {
- return ();
- }
- if ( $self->{'Subject'} ) {
- $subject = $self->{'Subject'};
- }
- elsif ( ( $message->First() ) && ( $message->First->Headers ) ) {
- my $header = $message->First->Headers();
- $header =~ s/\n\s+/ /g;
- if ( $header =~ /^Subject: (.*?)$/m ) {
- $subject = $1;
- }
- else {
- $subject = $self->TicketObj->Subject();
- }
+# }}}
- }
- else {
- $subject = $self->TicketObj->Subject();
- }
+# {{{ sub SetTo
- $subject =~ s/(\r\n|\n|\s)/ /gi;
+=head2 SetTo
- chomp $subject;
- $self->SetHeader( 'Subject', $subject );
+Takes a string that is the addresses you want to send mail to
+
+=cut
+sub SetTo {
+ my $self = shift;
+ my $addresses = shift;
+ return $self->SetHeader( 'To', $addresses );
}
# }}}
-# {{{ sub SetSubjectToken
+# {{{ sub SetCc
-=head2 SetSubjectToken
+=head2 SetCc
-This routine fixes the RT tag in the subject. It's unlikely that you want to overwrite this.
+Takes a string that is the addresses you want to Cc
=cut
-sub SetSubjectToken {
- my $self = shift;
- my $sub = $self->TemplateObj->MIMEObj->head->get('Subject');
- my $id = $self->TicketObj->id;
-
- my $token_re = $RT::EmailSubjectTagRegex;
- $token_re = qr/\Q$RT::rtname\E/o unless $token_re;
- return if $sub =~ /\[$token_re\s+#$id\]/;
+sub SetCc {
+ my $self = shift;
+ my $addresses = shift;
- $sub =~ s/(\r\n|\n|\s)/ /gi;
- chomp $sub;
- $self->TemplateObj->MIMEObj->head->replace(
- Subject => "[$RT::rtname #$id] $sub",
- );
+ return $self->SetHeader( 'Cc', $addresses );
}
# }}}
-=head2 SetReferencesHeaders
+# {{{ sub SetBcc
+
+=head2 SetBcc
-Set References and In-Reply-To headers for this message.
+Takes a string that is the addresses you want to Bcc
=cut
-sub SetReferencesHeaders {
+sub SetBcc {
+ my $self = shift;
+ my $addresses = shift;
- my $self = shift;
- my ( @in_reply_to, @references, @msgid );
+ return $self->SetHeader( 'Bcc', $addresses );
+}
- my $attachments = $self->TransactionObj->Message;
+# }}}
- if ( my $top = $attachments->First() ) {
- @in_reply_to = split(/\s+/m, $top->GetHeader('In-Reply-To') || '');
- @references = split(/\s+/m, $top->GetHeader('References') || '' );
- @msgid = split(/\s+/m, $top->GetHeader('Message-ID') || '');
- }
- else {
- return (undef);
- }
+# {{{ sub SetPrecedence
- # There are two main cases -- this transaction was created with
- # the RT Web UI, and hence we want to *not* append its Message-ID
- # to the References and In-Reply-To. OR it came from an outside
- # source, and we should treat it as per the RFC
- if ( "@msgid" =~ /<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@$RT::Organization>/) {
-
- # Make all references which are internal be to version which we
- # have sent out
- for (@references, @in_reply_to) {
- s/<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@$RT::Organization>$/
- "<$1." . $self->TicketObj->id .
- "-" . $self->ScripObj->id .
- "-" . $self->ScripActionObj->{_Message_ID} .
- "@" . $RT::Organization . ">"/eg
- }
-
- # In reply to whatever the internal message was in reply to
- $self->SetHeader( 'In-Reply-To', join( " ", ( @in_reply_to )));
-
- # Default the references to whatever we're in reply to
- @references = @in_reply_to unless @references;
-
- # References are unchanged from internal
- } else {
- # In reply to that message
- $self->SetHeader( 'In-Reply-To', join( " ", ( @msgid )));
-
- # Default the references to whatever we're in reply to
- @references = @in_reply_to unless @references;
-
- # Push that message onto the end of the references
- push @references, @msgid;
+sub SetPrecedence {
+ my $self = shift;
+
+ unless ( $self->TemplateObj->MIMEObj->head->get("Precedence") ) {
+ $self->SetHeader( 'Precedence', "bulk" );
}
+}
+
+# }}}
+
+# {{{ sub SetSubject
+
+=head2 SetSubject
+
+This routine sets the subject. it does not add the rt tag. that gets done elsewhere
+If $self->{'Subject'} is already defined, it uses that. otherwise, it tries to get
+the transaction's subject.
+
+=cut
- # Push pseudo-ref to the front
- my $pseudo_ref = $self->PseudoReference;
- @references = ($pseudo_ref, grep { $_ ne $pseudo_ref } @references);
+sub SetSubject {
+ my $self = shift;
+ my $subject;
+
+ unless ( $self->TemplateObj->MIMEObj->head->get('Subject') ) {
+ my $message = $self->TransactionObj->Attachments;
+ my $ticket = $self->TicketObj->Id;
+
+ if ( $self->{'Subject'} ) {
+ $subject = $self->{'Subject'};
+ }
+ elsif ( ( $message->First() )
+ && ( $message->First->Headers ) ) {
+ my $header = $message->First->Headers();
+ $header =~ s/\n\s+/ /g;
+ if ( $header =~ /^Subject: (.*?)$/m ) {
+ $subject = $1;
+ }
+ else {
+ $subject = $self->TicketObj->Subject();
+ }
+
+ }
+ else {
+ $subject = $self->TicketObj->Subject();
+ }
- # If there are more than 10 references headers, remove all but the
- # first four and the last six (Gotta keep this from growing
- # forever)
- splice(@references, 4, -6) if ($#references >= 10);
+ $subject =~ s/(\r\n|\n|\s)/ /gi;
- # Add on the references
- $self->SetHeader( 'References', join( " ", @references) );
- $self->TemplateObj->MIMEObj->head->fold_length( 'References', 80 );
+ chomp $subject;
+ $self->SetHeader( 'Subject', $subject );
+ }
+ return ($subject);
}
# }}}
-=head2 PseudoReference
+# {{{ sub SetSubjectToken
-Returns a fake Message-ID: header for the ticket to allow a base level of threading
+=head2 SetSubjectToken
-=cut
+This routine fixes the RT tag in the subject. It's unlikely that you want to overwrite this.
-sub PseudoReference {
+=cut
+sub SetSubjectToken {
my $self = shift;
- my $pseudo_ref = '<RT-Ticket-'.$self->TicketObj->id .'@'.$RT::Organization .'>';
- return $pseudo_ref;
+ my $tag = "[$RT::rtname #" . $self->TicketObj->id . "]";
+ my $sub = $self->TemplateObj->MIMEObj->head->get('Subject');
+ unless ( $sub =~ /\Q$tag\E/ ) {
+ $sub =~ s/(\r\n|\n|\s)/ /gi;
+ chomp $sub;
+ $self->TemplateObj->MIMEObj->head->replace( 'Subject', "$tag $sub" );
+ }
}
+# }}}
-# {{{ SetHeadingAsEncoding
+# }}}
+
+# {{{
=head2 SetHeaderAsEncoding($field_name, $charset_encoding)
@@ -928,6 +640,10 @@ sub SetHeaderAsEncoding {
my $value = $self->TemplateObj->MIMEObj->head->get($field);
+ # don't bother if it's us-ascii
+
+ # See RT::I18N, 'NOTES: Why Encode::_utf8_off before Encode::from_to'
+
$value = $self->MIMEEncodeString($value, $enc);
$self->TemplateObj->MIMEObj->head->replace( $field, $value );
@@ -936,7 +652,7 @@ sub SetHeaderAsEncoding {
}
# }}}
-# {{{ MIMEEncodeString
+# {{{ MIMENcodeString
=head2 MIMEEncodeString STRING ENCODING
@@ -947,52 +663,15 @@ Takes a string and a possible encoding and returns the string wrapped in MIME go
sub MIMEEncodeString {
my $self = shift;
my $value = shift;
- # using RFC2047 notation, sec 2.
- # encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
- my $charset = shift;
- my $encoding = 'B';
- # An 'encoded-word' may not be more than 75 characters long
- #
- # MIME encoding increases 4/3*(number of bytes), and always in multiples
- # of 4. Thus we have to find the best available value of bytes available
- # for each chunk.
- #
- # First we get the integer max which max*4/3 would fit on space.
- # Then we find the greater multiple of 3 lower or equal than $max.
- my $max = int(((75-length('=?'.$charset.'?'.$encoding.'?'.'?='))*3)/4);
- $max = int($max/3)*3;
+ my $enc = shift;
chomp $value;
-
- if ( $max <= 0 ) {
- # gives an error...
- $RT::Logger->crit("Can't encode! Charset or encoding too big.\n");
- return ($value);
- }
-
return ($value) unless $value =~ /[^\x20-\x7e]/;
$value =~ s/\s*$//;
-
- # we need perl string to split thing char by char
- Encode::_utf8_on($value) unless Encode::is_utf8( $value );
-
- my ($tmp, @chunks) = ('', ());
- while ( length $value ) {
- my $char = substr($value, 0, 1, '');
- my $octets = Encode::encode( $charset, $char );
- if ( length($tmp) + length($octets) > $max ) {
- push @chunks, $tmp;
- $tmp = '';
- }
- $tmp .= $octets;
- }
- push @chunks, $tmp if length $tmp;
-
- # encode an join chuncks
- $value = join "\n ",
- map encode_mimeword( $_, $encoding, $charset ), @chunks ;
- return($value);
+ Encode::_utf8_off($value);
+ my $res = Encode::from_to( $value, "utf-8", $enc );
+ $value = encode_mimeword( $value, 'B', $enc );
}
# }}}
diff --git a/rt/lib/RT/Attachment.pm b/rt/lib/RT/Attachment.pm
index f0a19874c..2ed520162 100755
--- a/rt/lib/RT/Attachment.pm
+++ b/rt/lib/RT/Attachment.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -134,7 +110,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -143,14 +119,14 @@ Returns the current value of id.
=cut
-=head2 TransactionId
+=item TransactionId
Returns the current value of TransactionId.
(In the database, TransactionId is stored as int(11).)
-=head2 SetTransactionId VALUE
+=item SetTransactionId VALUE
Set TransactionId to VALUE.
@@ -161,14 +137,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Parent
+=item Parent
Returns the current value of Parent.
(In the database, Parent is stored as int(11).)
-=head2 SetParent VALUE
+=item SetParent VALUE
Set Parent to VALUE.
@@ -179,14 +155,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 MessageId
+=item MessageId
Returns the current value of MessageId.
(In the database, MessageId is stored as varchar(160).)
-=head2 SetMessageId VALUE
+=item SetMessageId VALUE
Set MessageId to VALUE.
@@ -197,14 +173,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Subject
+=item Subject
Returns the current value of Subject.
(In the database, Subject is stored as varchar(255).)
-=head2 SetSubject VALUE
+=item SetSubject VALUE
Set Subject to VALUE.
@@ -215,14 +191,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Filename
+=item Filename
Returns the current value of Filename.
(In the database, Filename is stored as varchar(255).)
-=head2 SetFilename VALUE
+=item SetFilename VALUE
Set Filename to VALUE.
@@ -233,14 +209,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ContentType
+=item ContentType
Returns the current value of ContentType.
(In the database, ContentType is stored as varchar(80).)
-=head2 SetContentType VALUE
+=item SetContentType VALUE
Set ContentType to VALUE.
@@ -251,14 +227,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ContentEncoding
+=item ContentEncoding
Returns the current value of ContentEncoding.
(In the database, ContentEncoding is stored as varchar(80).)
-=head2 SetContentEncoding VALUE
+=item SetContentEncoding VALUE
Set ContentEncoding to VALUE.
@@ -269,14 +245,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Content
+=item Content
Returns the current value of Content.
(In the database, Content is stored as longtext.)
-=head2 SetContent VALUE
+=item SetContent VALUE
Set Content to VALUE.
@@ -287,14 +263,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Headers
+=item Headers
Returns the current value of Headers.
(In the database, Headers is stored as longtext.)
-=head2 SetHeaders VALUE
+=item SetHeaders VALUE
Set Headers to VALUE.
@@ -305,7 +281,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -314,7 +290,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -324,33 +300,33 @@ Returns the current value of Created.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
TransactionId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Parent =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
MessageId =>
- {read => 1, write => 1, sql_type => 12, length => 160, is_blob => 0, is_numeric => 0, type => 'varchar(160)', default => ''},
+ {read => 1, write => 1, type => 'varchar(160)', default => ''},
Subject =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
Filename =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
ContentType =>
- {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
+ {read => 1, write => 1, type => 'varchar(80)', default => ''},
ContentEncoding =>
- {read => 1, write => 1, sql_type => 12, length => 80, is_blob => 0, is_numeric => 0, type => 'varchar(80)', default => ''},
+ {read => 1, write => 1, type => 'varchar(80)', default => ''},
Content =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'longtext', default => ''},
+ {read => 1, write => 1, type => 'longtext', default => ''},
Headers =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'longtext', default => ''},
+ {read => 1, write => 1, type => 'longtext', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -382,7 +358,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Attachments.pm b/rt/lib/RT/Attachments.pm
index 44115492f..177cdd094 100755
--- a/rt/lib/RT/Attachments.pm
+++ b/rt/lib/RT/Attachments.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Attachment item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Condition/AnyTransaction.pm b/rt/lib/RT/Condition/AnyTransaction.pm
index 9b1bb8cfb..4519fcf5a 100644
--- a/rt/lib/RT/Condition/AnyTransaction.pm
+++ b/rt/lib/RT/Condition/AnyTransaction.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
package RT::Condition::AnyTransaction;
diff --git a/rt/lib/RT/Condition/Generic.pm b/rt/lib/RT/Condition/Generic.pm
index da6ec476c..bd269315e 100755
--- a/rt/lib/RT/Condition/Generic.pm
+++ b/rt/lib/RT/Condition/Generic.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
=head1 NAME
RT::Condition::Generic - ;
@@ -52,7 +28,7 @@
=head1 SYNOPSIS
use RT::Condition::Generic;
- my $foo = RT::Condition::Generic->new(
+ my $foo = new RT::Condition::IsApplicable(
TransactionObj => $tr,
TicketObj => $ti,
ScripObj => $scr,
@@ -81,8 +57,10 @@ ok (require RT::Condition::Generic);
package RT::Condition::Generic;
+use RT::Base;
use strict;
-use base qw/RT::Base/;
+use vars qw/@ISA/;
+@ISA = qw(RT::Base);
# {{{ sub new
sub new {
@@ -104,7 +82,6 @@ sub _Init {
TemplateObj => undef,
Argument => undef,
ApplicableTransTypes => undef,
- CurrentUser => undef,
@_ );
$self->{'Argument'} = $args{'Argument'};
@@ -112,7 +89,6 @@ sub _Init {
$self->{'TicketObj'} = $args{'TicketObj'};
$self->{'TransactionObj'} = $args{'TransactionObj'};
$self->{'ApplicableTransTypes'} = $args{'ApplicableTransTypes'};
- $self->CurrentUser($args{'CurrentUser'});
}
# }}}
diff --git a/rt/lib/RT/Condition/StatusChange.pm b/rt/lib/RT/Condition/StatusChange.pm
index 20da9e728..8afabcda0 100644
--- a/rt/lib/RT/Condition/StatusChange.pm
+++ b/rt/lib/RT/Condition/StatusChange.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
diff --git a/rt/lib/RT/CurrentUser.pm b/rt/lib/RT/CurrentUser.pm
index 3193034a5..4ca2f9891 100755
--- a/rt/lib/RT/CurrentUser.pm
+++ b/rt/lib/RT/CurrentUser.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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:
+# 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.
#
-# (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 }}}
+# END LICENSE BLOCK
=head1 NAME
RT::CurrentUser - an RT object representing the current user
@@ -75,7 +51,8 @@ use RT::Record;
use RT::I18N;
use strict;
-use base qw/RT::Record/;
+use vars qw/@ISA/;
+@ISA= qw(RT::Record);
# {{{ sub _Init
@@ -83,30 +60,17 @@ use base qw/RT::Record/;
# to be a CurrentUser object. but that's hard to do when we're trying to load
# the CurrentUser object
-sub _Init {
- my $self = shift;
- my $User = shift;
-
- $self->{'table'} = "Users";
-
- if ( defined($User) ) {
-
- if ( UNIVERSAL::isa( $User, 'RT::User' )
- || UNIVERSAL::isa( $User, 'RT::CurrentUser' ) )
- {
- $self->Load( $User->id );
+sub _Init {
+ my $self = shift;
+ my $Name = shift;
- }
- elsif ( ref($User) ) {
- $RT::Logger->crit(
- "RT::CurrentUser->new() called with a bogus argument: $User");
- }
- else {
- $self->Load($User);
- }
- }
+ $self->{'table'} = "Users";
- $self->_BuildTableAttributes();
+ if (defined($Name)) {
+ $self->Load($Name);
+ }
+
+ $self->CurrentUser($self);
}
# }}}
@@ -140,13 +104,15 @@ sub Delete {
sub UserObj {
my $self = shift;
+ unless ($self->{'UserObj'}) {
use RT::User;
- my $user = RT::User->new($self);
-
- unless ($user->Load($self->Id)) {
+ $self->{'UserObj'} = RT::User->new($self);
+ unless ($self->{'UserObj'}->Load($self->Id)) {
$RT::Logger->err($self->loc("Couldn't load [_1] from the users database.\n", $self->Id));
}
- return ($user);
+
+ }
+ return ($self->{'UserObj'});
}
# }}}
@@ -187,18 +153,18 @@ sub PrincipalId {
# {{{ sub _Accessible
-
-
- sub _CoreAccessible {
- {
- Name => { 'read' => 1 },
- Gecos => { 'read' => 1 },
- RealName => { 'read' => 1 },
- Lang => { 'read' => 1 },
- Password => { 'read' => 0, 'write' => 0 },
- EmailAddress => { 'read' => 1, 'write' => 0 }
- };
-
+sub _Accessible {
+ my $self = shift;
+ my %Cols = (
+ Name => 'read',
+ Gecos => 'read',
+ RealName => 'read',
+ Password => 'neither',
+ EmailAddress => 'read',
+ Privileged => 'read',
+ IsAdministrator => 'read'
+ );
+ return($self->SUPER::_Accessible(@_, %Cols));
}
# }}}
@@ -246,7 +212,6 @@ sub LoadByGecos {
Loads a User into this CurrentUser object.
Takes a Name.
-
=cut
sub LoadByName {
@@ -276,11 +241,6 @@ sub Load {
if ($identifier !~ /\D/) {
$self->SUPER::LoadById($identifier);
}
-
- elsif (UNIVERSAL::isa($identifier,"RT::User")) {
- # DWIM if they pass a user in
- $self->SUPER::LoadById($identifier->Id);
- }
else {
# This is a bit dangerous, we might get false authen if somebody
# uses ambigous userids or real names:
@@ -353,15 +313,12 @@ specification. but currently doesn't
=begin testing
ok (my $cu = RT::CurrentUser->new('root'));
-ok (my $lh = $cu->LanguageHandle('en-us'));
-ok (defined $lh);
+ok (my $lh = $cu->LanguageHandle);
+ok ($lh != undef);
ok ($lh->isa('Locale::Maketext'));
-is ($cu->loc('TEST_STRING'), "Concrete Mixer", "Localized TEST_STRING into English");
+ok ($cu->loc('TEST_STRING') eq "Concrete Mixer", "Localized TEST_STRING into English");
ok ($lh = $cu->LanguageHandle('fr'));
-SKIP: {
- skip "fr locale is not loaded", 1 unless grep $_ eq 'fr', @RT::LexiconLanguages;
- is ($cu->loc('Before'), "Avant", "Localized TEST_STRING into Frenc");
-}
+ok ($cu->loc('Before') eq "Avant", "Localized TEST_STRING into Frenc");
=end testing
@@ -369,24 +326,16 @@ SKIP: {
sub LanguageHandle {
my $self = shift;
- if ( ( !defined $self->{'LangHandle'} )
- || ( !UNIVERSAL::can( $self->{'LangHandle'}, 'maketext' ) )
- || (@_) ) {
- if ( !$RT::SystemUser or ($self->id || 0) == $RT::SystemUser->id() ) {
- @_ = qw(en-US);
- }
-
- elsif ( $self->Lang ) {
- push @_, $self->Lang;
- }
+ if ((!defined $self->{'LangHandle'}) ||
+ (!UNIVERSAL::can($self->{'LangHandle'}, 'maketext')) ||
+ (@_)) {
$self->{'LangHandle'} = RT::I18N->get_handle(@_);
}
-
# Fall back to english.
- unless ( $self->{'LangHandle'} ) {
+ unless ($self->{'LangHandle'}) {
die "We couldn't get a dictionary. Nye mogu naidti slovar. No puedo encontrar dictionario.";
}
- return ( $self->{'LangHandle'} );
+ return ($self->{'LangHandle'});
}
sub loc {
@@ -406,7 +355,7 @@ sub loc {
sub loc_fuzzy {
my $self = shift;
- return '' if (!$_[0] || $_[0] eq '');
+ return '' if $_[0] eq '';
# XXX: work around perl's deficiency when matching utf8 data
return $_[0] if Encode::is_utf8($_[0]);
@@ -416,62 +365,6 @@ sub loc_fuzzy {
}
# }}}
-
-=head2 CurrentUser
-
-Return the current currentuser object
-
-=cut
-
-sub CurrentUser {
- my $self = shift;
- return($self);
-
-}
-
-=head2 Authenticate
-
-Takes $password, $created and $nonce, and returns a boolean value
-representing whether the authentication succeeded.
-
-If both $nonce and $created are specified, validate $password against:
-
- encode_base64(sha1(
- $nonce .
- $created .
- sha1_hex( "$username:$realm:$server_pass" )
- ))
-
-where $server_pass is the md5_hex(password) digest stored in the
-database, $created is in ISO time format, and $nonce is a random
-string no longer than 32 bytes.
-
-=cut
-
-sub Authenticate {
- my ($self, $password, $created, $nonce, $realm) = @_;
-
- require Digest::MD5;
- require Digest::SHA1;
- require MIME::Base64;
-
- my $username = $self->UserObj->Name or return;
- my $server_pass = $self->UserObj->__Value('Password') or return;
- my $auth_digest = MIME::Base64::encode_base64(Digest::SHA1::sha1(
- $nonce .
- $created .
- Digest::MD5::md5_hex("$username:$realm:$server_pass")
- ));
-
- chomp($password);
- chomp($auth_digest);
-
- return ($password eq $auth_digest);
-}
-
-# }}}
-
-
eval "require RT::CurrentUser_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Vendor.pm});
eval "require RT::CurrentUser_Local";
diff --git a/rt/lib/RT/Date.pm b/rt/lib/RT/Date.pm
index 8e9383fd7..355370ada 100644
--- a/rt/lib/RT/Date.pm
+++ b/rt/lib/RT/Date.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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:
+# 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.
#
-# (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 }}}
+# END LICENSE BLOCK
=head1 NAME
RT::Date - a simple Object Oriented date.
@@ -227,28 +203,23 @@ sub Set {
# {{{ sub SetToMidnight
-=head2 SetToMidnight [Timezone => 'utc']
+=head2 SetToMidnight
-Sets the date to midnight (at the beginning of the day).
+Sets the date to midnight (at the beginning of the day) GMT
Returns the unixtime at midnight.
-Arguments:
-
-=over 4
-
-=item Timezone - Timezone context C<server> or C<UTC>
-
=cut
sub SetToMidnight {
my $self = shift;
- my %args = ( Timezone => 'UTC', @_ );
- if ( lc $args{'Timezone'} eq 'server' ) {
- $self->Unix( Time::Local::timelocal( 0,0,0,(localtime $self->Unix)[3..7] ) );
- } else {
- $self->Unix( Time::Local::timegm( 0,0,0,(gmtime $self->Unix)[3..7] ) );
- }
+
+ use Time::Local;
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($self->Unix);
+ $self->Unix(timegm (0,0,0,$mday,$mon,$year,$wday,$yday));
+
return ($self->Unix);
+
+
}
@@ -359,8 +330,7 @@ sub DurationAsString {
$s = int( $duration / $YEAR );
$time_unit = $self->loc("years");
}
-
- if ($negative) {
+ if (0) { # For now, never display the "AGO" # $negative) {
return $self->loc( "[_1] [_2] ago", $s, $time_unit );
}
else {
@@ -405,7 +375,6 @@ sub AsString {
# }}}
# {{{ GetWeekday
-
=head2 GetWeekday DAY
Takes an integer day of week and returns a localized string for that day of week
@@ -428,7 +397,6 @@ sub GetWeekday {
# }}}
# {{{ GetMonth
-
=head2 GetMonth DAY
Takes an integer month and returns a localized string for that month
@@ -561,65 +529,8 @@ sub ISO {
# }}}
-# {{{ sub Date
-
-=head2 Date
-
-Takes nothing
-
-Returns the object's date in yyyy-mm-dd format; this is the same as
-the ISO format without the time
-
-=cut
-
-sub Date {
- my $self = shift;
- my ($date, $time) = split ' ', $self->ISO;
- return $date;
-}
-
-# }}}}
-
-# {{{ sub Time
-
-=head2 Time
-
-Takes nothing
-
-Returns the object's time in hh:mm:ss format; this is the same as
-the ISO format without the date
-
-=cut
-
-sub Time {
- my $self = shift;
- my ($date, $time) = split ' ', $self->ISO;
- return $time;
-}
-
-# }}}}
-
-# {{{ sub W3CDTF
-
-=head2 W3CDTF
-
-Takes nothing
-
-Returns the object's date in W3C DTF format
-
-=cut
-
-sub W3CDTF {
- my $self = shift;
- my $date = $self->ISO . 'Z';
- $date =~ s/ /T/;
- return $date;
-};
-
-# }}}
# {{{ sub LocalTimezone
-
=head2 LocalTimezone
Returns the current timezone. For now, draws off a system timezone, RT::Timezone. Eventually, this may
diff --git a/rt/lib/RT/Extension/ActivityReports.pm b/rt/lib/RT/Extension/ActivityReports.pm
new file mode 100644
index 000000000..52d8ba6ab
--- /dev/null
+++ b/rt/lib/RT/Extension/ActivityReports.pm
@@ -0,0 +1,3 @@
+package RT::Extension::ActivityReports;
+
+our $VERSION = '0.2';
diff --git a/rt/lib/RT/Group.pm b/rt/lib/RT/Group.pm
index 53aa326ff..4dcef3f07 100755
--- a/rt/lib/RT/Group.pm
+++ b/rt/lib/RT/Group.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -93,7 +69,7 @@ Create takes a hash of values and creates a row in the database:
varchar(255) 'Description'.
varchar(64) 'Domain'.
varchar(64) 'Type'.
- int(11) 'Instance'.
+ varchar(64) 'Instance'.
=cut
@@ -122,7 +98,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -131,14 +107,14 @@ Returns the current value of id.
=cut
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -149,14 +125,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -167,14 +143,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Domain
+=item Domain
Returns the current value of Domain.
(In the database, Domain is stored as varchar(64).)
-=head2 SetDomain VALUE
+=item SetDomain VALUE
Set Domain to VALUE.
@@ -185,14 +161,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Type
+=item Type
Returns the current value of Type.
(In the database, Type is stored as varchar(64).)
-=head2 SetType VALUE
+=item SetType VALUE
Set Type to VALUE.
@@ -203,40 +179,40 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Instance
+=item Instance
Returns the current value of Instance.
-(In the database, Instance is stored as int(11).)
+(In the database, Instance is stored as varchar(64).)
-=head2 SetInstance VALUE
+=item SetInstance VALUE
Set Instance to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Instance will be stored as a int(11).)
+(In the database, Instance will be stored as a varchar(64).)
=cut
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
Domain =>
- {read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
Instance =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
}
};
@@ -268,7 +244,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/GroupMember.pm b/rt/lib/RT/GroupMember.pm
index f943bd927..8de1a73fe 100755
--- a/rt/lib/RT/GroupMember.pm
+++ b/rt/lib/RT/GroupMember.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -113,7 +89,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -122,14 +98,14 @@ Returns the current value of id.
=cut
-=head2 GroupId
+=item GroupId
Returns the current value of GroupId.
(In the database, GroupId is stored as int(11).)
-=head2 SetGroupId VALUE
+=item SetGroupId VALUE
Set GroupId to VALUE.
@@ -140,14 +116,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 MemberId
+=item MemberId
Returns the current value of MemberId.
(In the database, MemberId is stored as int(11).)
-=head2 SetMemberId VALUE
+=item SetMemberId VALUE
Set MemberId to VALUE.
@@ -159,15 +135,15 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
GroupId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
MemberId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
}
};
@@ -199,7 +175,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/GroupMembers.pm b/rt/lib/RT/GroupMembers.pm
index 8c4313383..31cb9536f 100755
--- a/rt/lib/RT/GroupMembers.pm
+++ b/rt/lib/RT/GroupMembers.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::GroupMember item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Groups.pm b/rt/lib/RT/Groups.pm
index 8522aa57c..29f12a5a0 100755
--- a/rt/lib/RT/Groups.pm
+++ b/rt/lib/RT/Groups.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Group item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Groups_Overlay.pm b/rt/lib/RT/Groups_Overlay.pm
index 0cbebec04..82e021c16 100644
--- a/rt/lib/RT/Groups_Overlay.pm
+++ b/rt/lib/RT/Groups_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -415,6 +415,7 @@ sub WithRight {
$from_group->WithGroupRight( %args );
#XXX: DIRTY HACK
+ use DBIx::SearchBuilder 1.50; #no version on ::Union :(
use DBIx::SearchBuilder::Union;
my $union = new DBIx::SearchBuilder::Union;
$union->add($from_role);
diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm
index b5f94d814..5cdb65e5b 100644
--- a/rt/lib/RT/Handle.pm
+++ b/rt/lib/RT/Handle.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.
-#
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
=head1 NAME
RT::Handle - RT's database handle
@@ -72,13 +48,7 @@ use vars qw/@ISA/;
eval "use DBIx::SearchBuilder::Handle::$RT::DatabaseType;
\@ISA= qw(DBIx::SearchBuilder::Handle::$RT::DatabaseType);";
-
-if ($@) {
- die "Unable to load DBIx::SearchBuilder database handle for '$RT::DatabaseType'.".
- "\n".
- "Perhaps you've picked an invalid database type or spelled it incorrectly.".
- "\n". $@;
-}
+#TODO check for errors here.
=head2 Connect
@@ -88,41 +58,29 @@ Takes nothing. Calls SUPER::Connect with the needed args
=cut
sub Connect {
- my $self = shift;
+my $self=shift;
- if ($RT::DatabaseType eq 'Oracle') {
- $ENV{'NLS_LANG'} = "AMERICAN_AMERICA.AL32UTF8";
- $ENV{'NLS_NCHAR'} = "AL32UTF8";
-
- }
+# Unless the database port is a positive integer, we really don't want to pass it.
- $self->SUPER::Connect(
+$self->SUPER::Connect(
User => $RT::DatabaseUser,
Password => $RT::DatabasePassword,
);
-
- $self->dbh->{LongReadLen} = $RT::MaxAttachmentSize;
}
-=head2 BuildDSN
+=item BuildDSN
Build the DSN for the RT database. doesn't take any parameters, draws all that
from the config file.
=cut
-use File::Spec;
sub BuildDSN {
my $self = shift;
-# Unless the database port is a positive integer, we really don't want to pass it.
$RT::DatabasePort = undef unless (defined $RT::DatabasePort && $RT::DatabasePort =~ /^(\d+)$/);
$RT::DatabaseHost = undef unless (defined $RT::DatabaseHost && $RT::DatabaseHost ne '');
-$RT::DatabaseName = File::Spec->catfile($RT::VarPath, $RT::DatabaseName)
- if ($RT::DatabaseType eq 'SQLite') and
- not File::Spec->file_name_is_absolute($RT::DatabaseName);
-
$self->SUPER::BuildDSN(Host => $RT::DatabaseHost,
Database => $RT::DatabaseName,
diff --git a/rt/lib/RT/I18N/en_malkovich.po b/rt/lib/RT/I18N/en_malkovich.po
deleted file mode 100644
index 74769f1a3..000000000
--- a/rt/lib/RT/I18N/en_malkovich.po
+++ /dev/null
@@ -1,3973 +0,0 @@
-msgid ""
-msgstr ""
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: html/Approvals/Elements/Approve:26 html/Approvals/Elements/ShowDependency:49 html/SelfService/Display.html:24 html/Ticket/Display.html:25 html/Ticket/Display.html:29
-#. ($TicketObj->Id, $TicketObj->Subject)
-#. ($Ticket->id, $Ticket->Subject)
-#. ($ticket->Id, $ticket->Subject)
-#. ($link->BaseObj->Id, $link->BaseObj->Subject)
-msgid "#%1: %2"
-msgstr "#%1: %2"
-
-#: html/Search/Elements/SelectPersonType:30 lib/RT/Date.pm:337
-#. ($s, $time_unit)
-#. ($option, $subtype)
-msgid "%1 %2"
-msgstr "%1 %2"
-
-#: lib/RT/Tickets_Overlay.pm:828
-#. ($args{'FIELD'}, $args{'OPERATOR'}, $args{'VALUE'})
-msgid "%1 %2 %3"
-msgstr "%1 %2 %3"
-
-#: lib/RT/Date.pm:373
-#. ($self->GetWeekday($wday), $self->GetMonth($mon), map {sprintf "%02d", $_} ($mday, $hour, $min, $sec), ($year+1900))
-msgid "%1 %2 %3 %4:%5:%6 %7"
-msgstr "%1 %2 %3 %4:%5:%6 %7"
-
-#: lib/RT/Ticket_Overlay.pm:3451 lib/RT/Transaction_Overlay.pm:550 lib/RT/Transaction_Overlay.pm:593
-#. ($cf->Name, $new_value->Content)
-#. ($field, $self->NewValue)
-#. ($self->Field, $principal->Object->Name)
-msgid "%1 %2 added"
-msgstr "%1 %2 Malkovich"
-
-#: lib/RT/Date.pm:334
-#. ($s, $time_unit)
-msgid "%1 %2 ago"
-msgstr "%1 %2 ago"
-
-#: lib/RT/Ticket_Overlay.pm:3457 lib/RT/Transaction_Overlay.pm:557
-#. ($cf->Name, $old_value, $new_value->Content)
-#. ($field, $self->OldValue, $self->NewValue)
-msgid "%1 %2 changed to %3"
-msgstr "%1 %2 Malkovich to %3"
-
-#: lib/RT/Ticket_Overlay.pm:3454 lib/RT/Transaction_Overlay.pm:553 lib/RT/Transaction_Overlay.pm:599
-#. ($cf->Name, $old_value)
-#. ($field, $self->OldValue)
-#. ($self->Field, $principal->Object->Name)
-msgid "%1 %2 deleted"
-msgstr "%1 %2 Malkovich"
-
-#: html/Admin/Elements/EditScrips:43 html/Admin/Elements/ListGlobalScrips:27 html/Ticket/Elements/PreviewScrips:53
-#. ($scrip->ConditionObj->Name, $scrip->ActionObj->Name, $scrip->TemplateObj->Name)
-#. (loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), loc($scrip->TemplateObj->Name))
-msgid "%1 %2 with template %3"
-msgstr "%1 %2 Malkovich %3"
-
-#: bin/rt-crontool:165 bin/rt-crontool:172 bin/rt-crontool:178
-#. ("--search-argument", "--search")
-#. ("--condition-argument", "--condition")
-#. ("--action-argument", "--action")
-msgid "%1 - An argument to pass to %2"
-msgstr "%1 - A Malkovich to pass to %2"
-
-#: bin/rt-crontool:181
-#. ("--verbose")
-msgid "%1 - Output status updates to STDOUT"
-msgstr "%1 - Malkovich Malkovich to MALKOVICH"
-
-#: bin/rt-crontool:175
-#. ("--action")
-msgid "%1 - Specify the action module you want to use"
-msgstr "%1 - Malkovich the Malkovich Malkovich to use"
-
-#: bin/rt-crontool:169
-#. ("--condition")
-msgid "%1 - Specify the condition module you want to use"
-msgstr "%1 - Malkovich the Malkovich Malkovich to use"
-
-#: bin/rt-crontool:162
-#. ("--search")
-msgid "%1 - Specify the search module you want to use"
-msgstr "%1 - Malkovich the Malkovich Malkovich to use"
-
-#: lib/RT/ScripAction_Overlay.pm:114
-#. ($self->Id)
-msgid "%1 ScripAction loaded"
-msgstr "%1 Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3484
-#. ($args{'Value'}, $cf->Name)
-msgid "%1 added as a value for %2"
-msgstr "%1 Malkovich as a Malkovich %2"
-
-#: lib/RT/Link_Overlay.pm:111 lib/RT/Link_Overlay.pm:118
-#. ($args{'Base'})
-#. ($args{'Target'})
-msgid "%1 appears to be a local object, but can't be found in the database"
-msgstr "%1 Malkovich to be a Malkovich, but can't be Malkovich in the Malkovich"
-
-#: html/Ticket/Elements/ShowDates:52 lib/RT/Transaction_Overlay.pm:458
-#. ($self->BriefDescription , $self->CreatorObj->Name)
-#. ($Ticket->LastUpdatedAsString, $Ticket->LastUpdatedByObj->Name)
-msgid "%1 by %2"
-msgstr "%1 by %2"
-
-#: lib/RT/Transaction_Overlay.pm:512 lib/RT/Transaction_Overlay.pm:688 lib/RT/Transaction_Overlay.pm:697 lib/RT/Transaction_Overlay.pm:700
-#. ($self->Field , ( $self->OldValue || $no_value ) , $self->NewValue)
-#. ($self->Field , $q1->Name , $q2->Name)
-#. ($self->Field, $t2->AsString, $t1->AsString)
-#. ($self->Field, $self->OldValue, $self->NewValue)
-msgid "%1 changed from %2 to %3"
-msgstr "%1 Malkovich %2 to %3"
-
-#: lib/RT/Record.pm:739
-msgid "%1 could not be set to %2."
-msgstr "%1 Malkovich be set to %2."
-
-#: lib/RT/Ticket_Overlay.pm:2739
-#. ($self)
-msgid "%1 couldn't set status to resolved. RT's Database may be inconsistent."
-msgstr "%1 couldn't Malkovich to Malkovich. RT's Malkovich be Malkovich."
-
-#: NOT FOUND IN SOURCE
-msgid "%1 highest priority tickets I own..."
-msgstr "%1 Malkovich Malkovich I Malkovich..."
-
-#: html/Elements/MyTickets:26
-#. ($rows)
-msgid "%1 highest priority tickets I requested..."
-msgstr "%1 Malkovich Malkovich I Malkovich..."
-
-#: bin/rt-crontool:157
-#. ($0)
-msgid "%1 is a tool to act on tickets from an external scheduling tool, such as cron."
-msgstr "%1 is a tool to act on Malkovich a Malkovich Malkovich, such as cron."
-
-#: lib/RT/Queue_Overlay.pm:784
-#. ($principal->Object->Name, $args{'Type'})
-msgid "%1 is no longer a %2 for this queue."
-msgstr "%1 is no Malkovich a %2 Malkovich."
-
-#: lib/RT/Ticket_Overlay.pm:3540
-#. ($args{'Value'}, $cf->Name)
-msgid "%1 is no longer a value for custom field %2"
-msgstr "%1 is no Malkovich a Malkovich Malkovich %2"
-
-#: html/Ticket/Create.html:155 html/Ticket/Create.html:156 html/Ticket/Elements/ShowBasics:36 html/Ticket/Elements/ShowBasics:42 html/Ticket/Elements/ShowBasics:47
-#. ('<input size=3 name="TimeWorked" value="'.$ARGS{TimeWorked}.'">')
-#. ('<input size=3 name="TimeLeft" value="'.$ARGS{TimeLeft}.'">')
-#. ($Ticket->TimeEstimated)
-#. ($Ticket->TimeWorked)
-#. ($Ticket->TimeLeft)
-msgid "%1 min"
-msgstr "%1 min"
-
-#: html/User/Elements/DelegateRights:75
-#. (loc($ObjectType =~ /^RT::(.*)$/))
-msgid "%1 rights"
-msgstr "%1 Malkovich"
-
-#: lib/RT/Action/ResolveMembers.pm:41
-#. (ref $self)
-msgid "%1 will resolve all members of a resolved group ticket."
-msgstr "%1 Malkovich Malkovich of a Malkovich Malkovich."
-
-#: lib/RT/Transaction_Overlay.pm:408
-#. ($self)
-msgid "%1: no attachment specified"
-msgstr "%1: no Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowTransactionAttachments:56
-#. ($size)
-msgid "%1b"
-msgstr "%1b"
-
-#: html/Ticket/Elements/ShowTransactionAttachments:53
-#. (int( $size / 102.4 ) / 10)
-msgid "%1k"
-msgstr "%1k"
-
-#: lib/RT/Ticket_Overlay.pm:1252
-#. ($args{'Status'})
-msgid "'%1' is an invalid value for status"
-msgstr "'%1' is a Malkovich Malkovich"
-
-#: html/Admin/Elements/EditCustomFieldValues:24 html/Admin/Elements/EditQueueWatchers:28 html/Admin/Elements/EditScrips:34 html/Admin/Elements/EditTemplates:35 html/Admin/Groups/Members.html:51 html/Elements/EditLinks:32 html/Ticket/Elements/EditPeople:45 html/User/Groups/Members.html:54
-msgid "(Check box to delete)"
-msgstr "(Malkovich to Malkovich)"
-
-#: html/Ticket/Elements/PreviewScrips:49
-msgid "(Check boxes to disable notifications to the listed recipients)"
-msgstr "(Malkovich to Malkovich Malkovich to the Malkovich Malkovich)"
-
-#: html/Ticket/Elements/PreviewScrips:71
-msgid "(Check boxes to enable notifications to the listed recipients)"
-msgstr "(Malkovich to Malkovich Malkovich to the Malkovich Malkovich)"
-
-#: NOT FOUND IN SOURCE
-msgid "(Enter ticket ids or URLs, seperated with spaces)"
-msgstr "(Malkovich Malkovich or URLs, Malkovich Malkovich)"
-
-#: html/Admin/Queues/Modify.html:53 html/Admin/Queues/Modify.html:59
-#. ($RT::CorrespondAddress)
-#. ($RT::CommentAddress)
-msgid "(If left blank, will default to %1"
-msgstr "(If Malkovich, Malkovich to %1"
-
-#: html/Admin/Elements/EditCustomFields:32 html/Admin/Elements/ListGlobalCustomFields:31
-msgid "(No custom fields)"
-msgstr "(No Malkovich)"
-
-#: html/Admin/Groups/Members.html:49 html/User/Groups/Members.html:52
-msgid "(No members)"
-msgstr "(No Malkovich)"
-
-#: html/Admin/Elements/EditScrips:31 html/Admin/Elements/ListGlobalScrips:31
-msgid "(No scrips)"
-msgstr "(No Malkovich)"
-
-#: html/Admin/Elements/EditTemplates:30
-msgid "(No templates)"
-msgstr "(No Malkovich)"
-
-#: html/Ticket/Update.html:66
-msgid "(Sends a blind carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)"
-msgstr "(Malkovich a Malkovich-copy of Malkovich to a Malkovich-Malkovich of Malkovich. Does <b>not</b> Malkovich Malkovich Malkovich Malkovich.)"
-
-#: html/Ticket/Create.html:78
-msgid "(Sends a carbon-copy of this update to a comma-delimited list of administrative email addresses. These people <b>will</b> receive future updates.)"
-msgstr "(Malkovich a Malkovich-copy of Malkovich to a Malkovich-Malkovich of Malkovich Malkovich Malkovich. Malkovich <b>will</b> Malkovich Malkovich.)"
-
-#: html/Ticket/Update.html:62
-msgid "(Sends a carbon-copy of this update to a comma-delimited list of email addresses. Does <b>not</b> change who will receive future updates.)"
-msgstr "(Malkovich a Malkovich-copy of Malkovich to a Malkovich-Malkovich of Malkovich. Does <b>not</b> Malkovich Malkovich Malkovich Malkovich.)"
-
-#: html/Ticket/Create.html:68
-msgid "(Sends a carbon-copy of this update to a comma-delimited list of email addresses. These people <b>will</b> receive future updates.)"
-msgstr "(Malkovich a Malkovich-copy of Malkovich to a Malkovich-Malkovich of Malkovich. Malkovich <b>will</b> Malkovich Malkovich.)"
-
-#: html/Admin/Groups/index.html:32 html/User/Groups/index.html:32
-msgid "(empty)"
-msgstr "(Malkovich)"
-
-#: html/Admin/Users/index.html:38
-msgid "(no name listed)"
-msgstr "(no Malkovich)"
-
-#: html/Admin/Elements/SelectRights:47 html/Elements/SelectCustomFieldValue:29 html/Ticket/Elements/EditCustomField:64 html/Ticket/Elements/ShowCustomFields:35 lib/RT/Transaction_Overlay.pm:511
-msgid "(no value)"
-msgstr "(no Malkovich)"
-
-#: html/Elements/EditLinks:105 html/Ticket/Elements/BulkLinks:27
-msgid "(only one ticket)"
-msgstr "(Malkovich)"
-
-#: html/Elements/TicketList:167
-msgid "(pending approval)"
-msgstr "(Malkovich Malkovich)"
-
-#: html/Elements/TicketList:170
-msgid "(pending other Collection)"
-msgstr "(Malkovich Malkovich)"
-
-#: NOT FOUND IN SOURCE
-msgid "(pending other tickets)"
-msgstr "(Malkovich Malkovich)"
-
-#: html/Admin/Users/Modify.html:49
-msgid "(required)"
-msgstr "(Malkovich)"
-
-#: html/Ticket/Elements/ShowTransactionAttachments:60
-msgid "(untitled)"
-msgstr "(Malkovich)"
-
-#: NOT FOUND IN SOURCE
-msgid "..."
-msgstr "..."
-
-#: html/Ticket/Elements/ShowBasics:31
-msgid "<% $Ticket->Status%>"
-msgstr "<% $Ticket->Status %>"
-
-#: html/Elements/SelectTicketTypes:26
-msgid "<% $_ %>"
-msgstr "<% $_ %>"
-
-#: docs/design_docs/string-extraction-guide.txt:54 html/Elements/CreateTicket:25 lib/RT/StyleGuide.pod:767
-#. ($m->scomp('/Elements/SelectNewTicketQueue'))
-msgid "<input type=\"submit\" value=\"New ticket in\">&nbsp;%1"
-msgstr "<input type=\"submit\" value=\"Malkovich in\">&nbsp;%1"
-
-#: etc/initialdata:218
-msgid "A blank template"
-msgstr "A Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:156 lib/RT/Principal_Overlay.pm:180
-msgid "ACE not found"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:830
-msgid "ACEs can only be created and deleted."
-msgstr "Malkovich be Malkovich and Malkovich."
-
-#: NOT FOUND IN SOURCE
-msgid "Aborting to avoid unintended ticket modifications.\\n"
-msgstr "Malkovich to Malkovich Malkovich Malkovich Malkovich.\\n"
-
-#: html/User/Elements/Tabs:31
-msgid "About me"
-msgstr "Malkovich me"
-
-#: html/Admin/Users/Modify.html:79
-msgid "Access control"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrip:49
-msgid "Action"
-msgstr "Malkovich"
-
-#: lib/RT/Scrip_Overlay.pm:148
-#. ($args{'ScripAction'})
-msgid "Action %1 not found"
-msgstr "Malkovich %1 Malkovich"
-
-#: bin/rt-crontool:119
-msgid "Action committed."
-msgstr "Malkovich Malkovich."
-
-#: bin/rt-crontool:115
-msgid "Action prepared..."
-msgstr "Malkovich..."
-
-#: html/Search/Bulk.html:93
-msgid "Add AdminCc"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:89
-msgid "Add Cc"
-msgstr "Add Cc"
-
-#: html/Ticket/Create.html:113 html/Ticket/Update.html:81
-msgid "Add More Files"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:85
-msgid "Add Requestor"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/AddCustomFieldValue:24
-msgid "Add Value"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Scrip.html:54
-msgid "Add a scrip which will apply to all queues"
-msgstr "Add a Malkovich Malkovich to Malkovich"
-
-#: html/Search/Bulk.html:125
-msgid "Add comments or replies to selected tickets"
-msgstr "Malkovich or Malkovich to Malkovich Malkovich"
-
-#: html/Admin/Groups/Members.html:41 html/User/Groups/Members.html:38
-msgid "Add members"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/People.html:65 html/Ticket/Elements/AddWatchers:27
-msgid "Add new watchers"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:684
-#. ($args{'Type'})
-msgid "Added principal as a %1 for this queue"
-msgstr "Malkovich as a %1 Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1547
-#. ($self->loc($args{'Type'}))
-msgid "Added principal as a %1 for this ticket"
-msgstr "Malkovich as a %1 Malkovich"
-
-#: html/Admin/Users/Modify.html:119 html/User/Prefs.html:111
-msgid "Address1"
-msgstr "Malkovich1"
-
-#: html/Admin/Users/Modify.html:124 html/User/Prefs.html:115
-msgid "Address2"
-msgstr "Malkovich2"
-
-#: html/Ticket/Create.html:73
-msgid "Admin Cc"
-msgstr "Malkovich Cc"
-
-#: etc/initialdata:295
-msgid "Admin Comment"
-msgstr "Malkovich"
-
-#: etc/initialdata:274
-msgid "Admin Correspondence"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/index.html:24 html/Admin/Queues/index.html:27
-msgid "Admin queues"
-msgstr "Malkovich"
-
-#: html/Admin/Global/index.html:25 html/Admin/Global/index.html:27
-msgid "Admin/Global configuration"
-msgstr "Malkovich/Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Admin/Queue/Basics"
-msgstr "Malkovich/Malkovich/Malkovich"
-
-#: etc/initialdata:56 html/Ticket/Elements/ShowPeople:38 lib/RT/ACE_Overlay.pm:88
-msgid "AdminCc"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:73
-msgid "AdminCustomFields"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Group_Overlay.pm:146
-msgid "AdminGroup"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:148
-msgid "AdminGroupMembership"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/System.pm:58
-msgid "AdminOwnPersonalGroups"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:69
-msgid "AdminQueue"
-msgstr "Malkovich"
-
-#: lib/RT/System.pm:59
-msgid "AdminUsers"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/People.html:47 html/Ticket/Elements/EditPeople:53
-msgid "Administrative Cc"
-msgstr "Malkovich Cc"
-
-#: html/Elements/SelectDateRelation:35
-msgid "After"
-msgstr "Malkovich"
-
-#: etc/initialdata:363
-msgid "All Approvals Passed"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/EditCustomFields:94
-msgid "All Custom Fields"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/index.html:52
-msgid "All Queues"
-msgstr "Malkovich"
-
-#: html/Elements/Tabs:58
-msgid "Approval"
-msgstr "Malkovich"
-
-#: html/Approvals/Display.html:45 html/Approvals/Elements/ShowDependency:41 html/Approvals/index.html:64
-#. ($Ticket->Id, $Ticket->Subject)
-#. ($ticket->id, $msg)
-#. ($link->BaseObj->Id, $link->BaseObj->Subject)
-msgid "Approval #%1: %2"
-msgstr "Malkovich #%1: %2"
-
-#: html/Approvals/index.html:53
-#. ($ticket->Id)
-msgid "Approval #%1: Notes not recorded due to a system error"
-msgstr "Malkovich #%1: Malkovich Malkovich to a Malkovich"
-
-#: html/Approvals/index.html:51
-#. ($ticket->Id)
-msgid "Approval #%1: Notes recorded"
-msgstr "Malkovich #%1: Malkovich"
-
-#: etc/initialdata:351
-msgid "Approval Passed"
-msgstr "Malkovich"
-
-#: etc/initialdata:374
-msgid "Approval Rejected"
-msgstr "Malkovich Malkovich"
-
-#: html/Approvals/Elements/Approve:43
-msgid "Approve"
-msgstr "Malkovich"
-
-#: etc/initialdata:504
-msgid "Approver's notes: %1"
-msgstr "Malkovich's Malkovich: %1"
-
-#: lib/RT/Date.pm:414
-msgid "Apr."
-msgstr "Apr."
-
-#: html/Elements/SelectSortOrder:34 html/Search/Elements/DisplayOptions:52
-msgid "Ascending"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:134 html/SelfService/Update.html:47 html/Ticket/ModifyAll.html:82 html/Ticket/Update.html:81
-msgid "Attach"
-msgstr "Malkovich"
-
-#: html/SelfService/Create.html:64 html/Ticket/Create.html:109
-msgid "Attach file"
-msgstr "Malkovich"
-
-#: html/SelfService/Update.html:36 html/Ticket/Create.html:97 html/Ticket/Update.html:70
-msgid "Attached file"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:416
-msgid "Attachment created"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1251
-msgid "Attachment filename"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowAttachments:25
-msgid "Attachments"
-msgstr "Malkovich"
-
-#: lib/RT/Attributes_Overlay.pm:158
-msgid "Attribute Deleted"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Date.pm:418
-msgid "Aug."
-msgstr "Aug."
-
-#: NOT FOUND IN SOURCE
-msgid "AuthSystem"
-msgstr "Malkovich"
-
-#: etc/initialdata:221
-msgid "Autoreply"
-msgstr "Malkovich"
-
-#: etc/initialdata:72
-msgid "Autoreply To Requestors"
-msgstr "Malkovich To Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Bad data in %1"
-msgstr "Malkovich in %1"
-
-#: html/Admin/Elements/GroupTabs:38 html/Admin/Elements/QueueTabs:38 html/Admin/Elements/UserTabs:37 html/Ticket/Elements/Tabs:91 html/User/Elements/GroupTabs:37
-msgid "Basics"
-msgstr "Malkovich"
-
-#: html/Ticket/Update.html:64
-msgid "Bcc"
-msgstr "Bcc"
-
-#: html/Admin/Elements/EditScrip:73
-msgid "Be sure to save your changes"
-msgstr "Be sure to Malkovich Malkovich"
-
-#: html/Elements/SelectDateRelation:33 lib/RT/CurrentUser.pm:336
-msgid "Before"
-msgstr "Malkovich"
-
-#: etc/initialdata:217
-msgid "Blank"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/ShowHistory:38 html/Ticket/Elements/ShowHistory:44
-msgid "Brief headers"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:24 html/Search/Bulk.html:25
-msgid "Bulk ticket update"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:1533
-msgid "Can not modify system users"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:68
-msgid "Can this principal see this queue"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:211
-msgid "Can't add a custom field value without a name"
-msgstr "Can't add a Malkovich Malkovich Malkovich a name"
-
-#: lib/RT/Link_Overlay.pm:126
-msgid "Can't link a ticket to itself"
-msgstr "Can't link a Malkovich to Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2716
-msgid "Can't merge into a merged ticket. You should never get this error"
-msgstr "Can't Malkovich a Malkovich. Malkovich Malkovich Malkovich"
-
-#: lib/RT/Record.pm:1060 lib/RT/Record.pm:1138
-msgid "Can't specifiy both base and target"
-msgstr "Can't Malkovich Malkovich and Malkovich"
-
-#: html/autohandler:132
-#. ($msg)
-msgid "Cannot create user: %1"
-msgstr "Malkovich Malkovich: %1"
-
-#: etc/initialdata:50 html/Admin/Queues/People.html:43 html/SelfService/Create.html:48 html/Ticket/Create.html:63 html/Ticket/Elements/EditPeople:50 html/Ticket/Elements/ShowPeople:34 html/Ticket/Update.html:59 lib/RT/ACE_Overlay.pm:87
-msgid "Cc"
-msgstr "Cc"
-
-#: html/SelfService/Prefs.html:30
-msgid "Change password"
-msgstr "Malkovich"
-
-#: html/SelfService/Update.html:39 html/Ticket/Create.html:100 html/Ticket/Update.html:73
-msgid "Check box to delete"
-msgstr "Malkovich to Malkovich"
-
-#: html/Admin/Elements/SelectRights:30
-msgid "Check box to revoke right"
-msgstr "Malkovich to Malkovich"
-
-#: html/Elements/EditLinks:121 html/Elements/EditLinks:63 html/Elements/ShowLinks:56 html/Ticket/Create.html:183 html/Ticket/Elements/BulkLinks:42
-msgid "Children"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:129 html/User/Prefs.html:119
-msgid "City"
-msgstr "City"
-
-#: html/Ticket/Elements/ShowDates:47
-msgid "Closed"
-msgstr "Malkovich"
-
-#: html/SelfService/Closed.html:24
-msgid "Closed Tickets"
-msgstr "Malkovich"
-
-#: html/SelfService/Elements/Tabs:44
-msgid "Closed tickets"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/ShowTransaction:152 html/Ticket/Elements/Tabs:154
-msgid "Comment"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/Modify.html:57
-msgid "Comment Address"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:88
-msgid "Comment on tickets"
-msgstr "Malkovich on Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:88
-msgid "CommentOnTicket"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Comments"
-msgstr "Malkovich"
-
-#: html/Ticket/ModifyAll.html:69 html/Ticket/Update.html:51
-msgid "Comments (Not sent to requestors)"
-msgstr "Malkovich (Malkovich to Malkovich)"
-
-#: html/Search/Bulk.html:129
-msgid "Comments (not sent to requestors)"
-msgstr "Malkovich (Malkovich to Malkovich)"
-
-#: NOT FOUND IN SOURCE
-msgid "Comments about %1"
-msgstr "Malkovich %1"
-
-#: html/Admin/Users/Modify.html:182 html/Ticket/Elements/ShowRequestor:45
-msgid "Comments about this user"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:537
-msgid "Comments added"
-msgstr "Malkovich"
-
-#: lib/RT/Action/Generic.pm:149
-msgid "Commit Stubbed"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrip:41
-msgid "Condition"
-msgstr "Malkovich"
-
-#: bin/rt-crontool:105
-msgid "Condition matches..."
-msgstr "Malkovich Malkovich..."
-
-#: lib/RT/Scrip_Overlay.pm:164
-msgid "Condition not found"
-msgstr "Malkovich Malkovich"
-
-#: html/Elements/Tabs:52
-msgid "Configuration"
-msgstr "Malkovich"
-
-#: html/SelfService/Prefs.html:32
-msgid "Confirm"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "ContactInfoSystem"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/ModifyTemplate:43 html/Elements/SelectAttachmentField:26 html/Ticket/ModifyAll.html:86
-msgid "Content"
-msgstr "Malkovich"
-
-#: etc/initialdata:286
-msgid "Correspondence"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Correspondence Address"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:533
-msgid "Correspondence added"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3471
-msgid "Could not add new custom field value for ticket. "
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich. "
-
-#: lib/RT/Ticket_Overlay.pm:2967 lib/RT/Ticket_Overlay.pm:2975 lib/RT/Ticket_Overlay.pm:2992
-msgid "Could not change owner. "
-msgstr "Malkovich Malkovich. "
-
-#: html/Admin/Elements/EditCustomField:84 html/Admin/Elements/EditCustomFields:164
-#. ($msg)
-msgid "Could not create CustomField"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/User/Groups/Modify.html:76 lib/RT/Group_Overlay.pm:474 lib/RT/Group_Overlay.pm:481
-msgid "Could not create group"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Global/Template.html:74 html/Admin/Queues/Template.html:71
-#. ($msg)
-msgid "Could not create template: %1"
-msgstr "Malkovich Malkovich: %1"
-
-#: lib/RT/Ticket_Overlay.pm:1185 lib/RT/Ticket_Overlay.pm:364
-msgid "Could not create ticket. Queue not set"
-msgstr "Malkovich Malkovich. Malkovich"
-
-#: lib/RT/User_Overlay.pm:226 lib/RT/User_Overlay.pm:240 lib/RT/User_Overlay.pm:249 lib/RT/User_Overlay.pm:258 lib/RT/User_Overlay.pm:267 lib/RT/User_Overlay.pm:281 lib/RT/User_Overlay.pm:291 lib/RT/User_Overlay.pm:462
-msgid "Could not create user"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:662 lib/RT/Ticket_Overlay.pm:1515
-msgid "Could not find or create that user"
-msgstr "Malkovich or Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:723 lib/RT/Ticket_Overlay.pm:1596
-msgid "Could not find that principal"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Groups/Members.html:87 html/User/Groups/Members.html:89 html/User/Groups/Modify.html:81
-msgid "Could not load group"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:682
-#. ($args{'Type'})
-msgid "Could not make that principal a %1 for this queue"
-msgstr "Malkovich Malkovich Malkovich a %1 Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1536
-#. ($self->loc($args{'Type'}))
-msgid "Could not make that principal a %1 for this ticket"
-msgstr "Malkovich Malkovich Malkovich a %1 Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:781
-#. ($args{'Type'})
-msgid "Could not remove that principal as a %1 for this queue"
-msgstr "Malkovich Malkovich Malkovich as a %1 Malkovich"
-
-#: lib/RT/Group_Overlay.pm:977
-msgid "Couldn't add member to group"
-msgstr "Couldn't Malkovich to Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3481 lib/RT/Ticket_Overlay.pm:3537
-#. ($Msg)
-msgid "Couldn't create a transaction: %1"
-msgstr "Couldn't Malkovich a Malkovich: %1"
-
-#: lib/RT/Record.pm:748
-msgid "Couldn't find row"
-msgstr "Couldn't Malkovich"
-
-#: lib/RT/Group_Overlay.pm:951
-msgid "Couldn't find that principal"
-msgstr "Couldn't Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:245
-msgid "Couldn't find that value"
-msgstr "Couldn't Malkovich"
-
-#: lib/RT/CurrentUser.pm:123
-#. ($self->Id)
-msgid "Couldn't load %1 from the users database.\\n"
-msgstr "Couldn't load %1 from the Malkovich.\\n"
-
-#: html/Admin/Groups/GroupRights.html:87 html/Admin/Groups/UserRights.html:74
-#. ($id)
-msgid "Couldn't load group %1"
-msgstr "Couldn't Malkovich %1"
-
-#: lib/RT/Link_Overlay.pm:169 lib/RT/Link_Overlay.pm:178 lib/RT/Link_Overlay.pm:205
-msgid "Couldn't load link"
-msgstr "Couldn't Malkovich"
-
-#: html/Admin/Elements/EditCustomFields:145 html/Admin/Queues/CustomFields.html:35 html/Admin/Queues/People.html:120
-#. ($id)
-msgid "Couldn't load queue"
-msgstr "Couldn't Malkovich"
-
-#: html/Admin/Queues/GroupRights.html:100 html/Admin/Queues/UserRights.html:71
-#. ($id)
-msgid "Couldn't load queue %1"
-msgstr "Couldn't Malkovich %1"
-
-#: NOT FOUND IN SOURCE
-msgid "Couldn't load that user (%1)"
-msgstr "Couldn't Malkovich (%1)"
-
-#: html/SelfService/Display.html:116
-#. ($id)
-msgid "Couldn't load ticket '%1'"
-msgstr "Couldn't Malkovich '%1'"
-
-#: html/Admin/Users/Modify.html:146 html/User/Prefs.html:131
-msgid "Country"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/CreateUserCalled:25 html/Admin/Elements/EditCustomField:62 html/Admin/Elements/EditScrip:110 html/Admin/Groups/Modify.html:55 html/Admin/Queues/Template.html:44 html/Elements/QuickCreate:23 html/Ticket/Create.html:134 html/Ticket/Create.html:195 html/User/Groups/Modify.html:55
-msgid "Create"
-msgstr "Malkovich"
-
-#: etc/initialdata:135
-msgid "Create Tickets"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:74
-msgid "Create a CustomField"
-msgstr "Malkovich a Malkovich"
-
-#: html/Admin/Queues/CustomField.html:47
-#. ($QueueObj->Name())
-msgid "Create a CustomField for queue %1"
-msgstr "Malkovich a Malkovich Malkovich %1"
-
-#: html/Admin/Global/CustomField.html:47
-msgid "Create a CustomField which applies to all queues"
-msgstr "Malkovich a Malkovich Malkovich to Malkovich"
-
-#: html/Admin/Groups/Modify.html:66 html/Admin/Groups/Modify.html:92
-msgid "Create a new group"
-msgstr "Malkovich a Malkovich"
-
-#: html/User/Groups/Modify.html:66 html/User/Groups/Modify.html:91
-msgid "Create a new personal group"
-msgstr "Malkovich a Malkovich Malkovich"
-
-#: html/Ticket/Create.html:24 html/Ticket/Create.html:27 html/Ticket/Create.html:35
-msgid "Create a new ticket"
-msgstr "Malkovich a Malkovich"
-
-#: html/Admin/Users/Modify.html:211 html/Admin/Users/Modify.html:268
-msgid "Create a new user"
-msgstr "Malkovich a Malkovich"
-
-#: html/Admin/Queues/Modify.html:103
-msgid "Create a queue"
-msgstr "Malkovich a Malkovich"
-
-#: html/Admin/Queues/Scrip.html:58
-#. ($QueueObj->Name)
-msgid "Create a scrip for queue %1"
-msgstr "Malkovich a Malkovich %1"
-
-#: html/Admin/Global/Template.html:68 html/Admin/Queues/Template.html:64
-msgid "Create a template"
-msgstr "Malkovich a Malkovich"
-
-#: html/SelfService/Create.html:24
-msgid "Create a ticket"
-msgstr "Malkovich a Malkovich"
-
-#: etc/initialdata:137
-msgid "Create new tickets based on this scrip's template"
-msgstr "Malkovich Malkovich on Malkovich's Malkovich"
-
-#: html/SelfService/Create.html:77
-msgid "Create ticket"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:86
-msgid "Create tickets in this queue"
-msgstr "Malkovich in Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:73
-msgid "Create, delete and modify custom fields"
-msgstr "Malkovich, Malkovich and Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:69
-msgid "Create, delete and modify queues"
-msgstr "Malkovich, Malkovich and Malkovich"
-
-#: lib/RT/System.pm:58
-msgid "Create, delete and modify the members of personal groups"
-msgstr "Malkovich, Malkovich and Malkovich the Malkovich of Malkovich"
-
-#: lib/RT/System.pm:59
-msgid "Create, delete and modify users"
-msgstr "Malkovich, Malkovich and Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:86
-msgid "CreateTicket"
-msgstr "Malkovich"
-
-#: html/Elements/SelectDateType:25 html/Ticket/Elements/ShowDates:27 lib/RT/Ticket_Overlay.pm:1279
-msgid "Created"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:87
-#. ($CustomFieldObj->Name())
-msgid "Created CustomField %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Elements/EditLinks:27
-msgid "Current Links"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/EditScrips:29
-msgid "Current Scrips"
-msgstr "Malkovich"
-
-#: html/Admin/Groups/Members.html:38 html/User/Groups/Members.html:41
-msgid "Current members"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectRights:28
-msgid "Current rights"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Current search criteria"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/People.html:40 html/Ticket/Elements/EditPeople:44
-msgid "Current watchers"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Global/CustomField.html:54
-#. ($CustomField)
-msgid "Custom Field #%1"
-msgstr "Malkovich #%1"
-
-#: html/Admin/Elements/QueueTabs:52 html/Admin/Elements/SystemTabs:39 html/Admin/Global/index.html:49 html/Ticket/Elements/ShowSummary:35
-msgid "Custom Fields"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrip:101
-msgid "Custom action cleanup code"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Elements/EditScrip:93
-msgid "Custom action preparation code"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Elements/EditScrip:85
-msgid "Custom condition"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1693
-#. ($CF->Name , $args{OPERATOR} , $args{VALUE})
-msgid "Custom field %1 %2 %3"
-msgstr "Malkovich %1 %2 %3"
-
-#: lib/RT/Tickets_Overlay.pm:1688
-#. ($CF->Name)
-msgid "Custom field %1 has a value."
-msgstr "Malkovich %1 has a Malkovich."
-
-#: lib/RT/Tickets_Overlay.pm:1685
-#. ($CF->Name)
-msgid "Custom field %1 has no value."
-msgstr "Malkovich %1 has no Malkovich."
-
-#: lib/RT/Ticket_Overlay.pm:3373
-#. ($args{'Field'})
-msgid "Custom field %1 not found"
-msgstr "Malkovich %1 Malkovich"
-
-#: html/Admin/Elements/EditCustomFields:195
-msgid "Custom field deleted"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3523
-msgid "Custom field not found"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:355
-#. ($args{'Content'}, $self->Name)
-msgid "Custom field value %1 could not be found for custom field %2"
-msgstr "Malkovich Malkovich %1 Malkovich be Malkovich Malkovich %2"
-
-#: lib/RT/CustomField_Overlay.pm:255
-msgid "Custom field value could not be deleted"
-msgstr "Malkovich Malkovich Malkovich be Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:361
-msgid "Custom field value could not be found"
-msgstr "Malkovich Malkovich Malkovich be Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:253 lib/RT/CustomField_Overlay.pm:363
-msgid "Custom field value deleted"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:541
-msgid "CustomField"
-msgstr "Malkovich"
-
-#: html/SelfService/Display.html:38 html/Ticket/Create.html:160 html/Ticket/Elements/ShowSummary:54 html/Ticket/Elements/Tabs:94 html/Ticket/ModifyAll.html:43
-msgid "Dates"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:422
-msgid "Dec."
-msgstr "Dec."
-
-#: etc/initialdata:222
-msgid "Default Autoresponse template"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: etc/initialdata:296
-msgid "Default admin comment template"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: etc/initialdata:287
-msgid "Default correspondence template"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: etc/initialdata:253
-msgid "Default transaction template"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:519
-#. ($type, $self->Field, $self->OldValue, $self->NewValue)
-msgid "Default: %1/%2 changed from %3 to %4"
-msgstr "Malkovich: %1/%2 Malkovich %3 to %4"
-
-#: html/User/Delegation.html:24 html/User/Delegation.html:27
-msgid "Delegate rights"
-msgstr "Malkovich"
-
-#: lib/RT/System.pm:62
-msgid "Delegate specific rights which have been granted to you."
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich to you."
-
-#: lib/RT/System.pm:62
-msgid "DelegateRights"
-msgstr "Malkovich"
-
-#: html/User/Elements/Tabs:37
-msgid "Delegation"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrips:53 html/Search/Elements/EditFormat:66 html/Search/Elements/EditSearches:15
-msgid "Delete"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrips:52
-msgid "Delete selected scrips"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:91
-msgid "Delete tickets"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:91
-msgid "DeleteTicket"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:162
-msgid "Deleting this object could break referential integrity"
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:329
-msgid "Deleting this object would break referential integrity"
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:478
-msgid "Deleting this object would violate referential integrity"
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich Malkovich"
-
-#: html/Approvals/Elements/Approve:44
-msgid "Deny"
-msgstr "Deny"
-
-#: html/Elements/EditLinks:113 html/Elements/EditLinks:44 html/Elements/ShowLinks:36 html/Ticket/Create.html:181 html/Ticket/Elements/BulkLinks:34 html/Ticket/Elements/ShowDependencies:31
-msgid "Depended on by"
-msgstr "Malkovich on by"
-
-#: lib/RT/Transaction_Overlay.pm:621
-#. ($value)
-msgid "Dependency by %1 added"
-msgstr "Malkovich by %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:661
-#. ($value)
-msgid "Dependency by %1 deleted"
-msgstr "Malkovich by %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:618
-#. ($value)
-msgid "Dependency on %1 added"
-msgstr "Malkovich on %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:658
-#. ($value)
-msgid "Dependency on %1 deleted"
-msgstr "Malkovich on %1 Malkovich"
-
-#: html/Elements/EditLinks:109 html/Elements/EditLinks:35 html/Elements/SelectLinkType:26 html/Elements/ShowLinks:26 html/Ticket/Create.html:180 html/Ticket/Elements/BulkLinks:30 html/Ticket/Elements/ShowDependencies:24
-msgid "Depends on"
-msgstr "Malkovich on"
-
-#: html/Elements/SelectSortOrder:34 html/Search/Elements/DisplayOptions:57
-msgid "Descending"
-msgstr "Malkovich"
-
-#: html/SelfService/Create.html:72 html/Ticket/Create.html:118
-msgid "Describe the issue below"
-msgstr "Malkovich the Malkovich"
-
-#: html/Admin/Elements/AddCustomFieldValue:35 html/Admin/Elements/EditCustomField:38 html/Admin/Elements/EditScrip:34 html/Admin/Elements/ModifyTemplate:35 html/Admin/Groups/Modify.html:48 html/Admin/Queues/Modify.html:47 html/Elements/SelectGroups:26 html/Search/Elements/EditSearches:8 html/User/Groups/Modify.html:48
-msgid "Description"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/Tabs:86
-msgid "Display"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:70
-msgid "Display Access Control List"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:76
-msgid "Display Scrip templates for this queue"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:79
-msgid "Display Scrips for this queue"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowHistory:34
-msgid "Display mode"
-msgstr "Malkovich"
-
-#: lib/RT/System.pm:53
-msgid "Do anything and everything"
-msgstr "Do Malkovich and Malkovich"
-
-#: html/Elements/Refresh:29
-msgid "Don't refresh this page."
-msgstr "Don't Malkovich Malkovich."
-
-#: NOT FOUND IN SOURCE
-msgid "Don't show search results"
-msgstr "Don't Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowTransactionAttachments:60
-msgid "Download"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Download all the tickets as a tab delimited file"
-msgstr "Malkovich the Malkovich as a Malkovich Malkovich"
-
-#: html/Elements/SelectDateType:31 html/Ticket/Create.html:166 html/Ticket/Elements/EditDates:44 html/Ticket/Elements/ShowDates:43 lib/RT/Ticket_Overlay.pm:1283
-msgid "Due"
-msgstr "Due"
-
-#: NOT FOUND IN SOURCE
-msgid "ERROR: Couldn't load ticket '%1': %2.\\n"
-msgstr "MALKOVICH: Couldn't Malkovich '%1': %2.\\n"
-
-#: html/Admin/Queues/CustomFields.html:45
-#. ($Queue->Name)
-msgid "Edit Custom Fields for %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Search/Bulk.html:141 html/Ticket/ModifyLinks.html:35
-msgid "Edit Links"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/Templates.html:41
-#. ($QueueObj->Name)
-msgid "Edit Templates for queue %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Admin/Global/index.html:45
-msgid "Edit system templates"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/Modify.html:118
-#. ($QueueObj->Name)
-msgid "Editing Configuration for queue %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: NOT FOUND IN SOURCE
-msgid "Editing Configuration for user %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: html/Admin/Elements/EditCustomField:90
-#. ($CustomFieldObj->Name())
-msgid "Editing CustomField %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Admin/Groups/Members.html:31
-#. ($Group->Name)
-msgid "Editing membership for group %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: html/User/Groups/Members.html:128
-#. ($Group->Name)
-msgid "Editing membership for personal group %1"
-msgstr "Malkovich Malkovich Malkovich Malkovich %1"
-
-#: lib/RT/Record.pm:1075 lib/RT/Record.pm:1152
-msgid "Either base or target must be specified"
-msgstr "Malkovich or Malkovich be Malkovich"
-
-#: html/Admin/Users/Modify.html:52 html/Elements/SelectUsers:26 html/Ticket/Elements/AddWatchers:55 html/User/Prefs.html:43
-msgid "Email"
-msgstr "Malkovich"
-
-#: lib/RT/User_Overlay.pm:206
-msgid "Email address in use"
-msgstr "Malkovich in use"
-
-#: NOT FOUND IN SOURCE
-msgid "EmailAddress"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "EmailEncoding"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:50
-msgid "Enabled (Unchecking this box disables this custom field)"
-msgstr "Malkovich (Malkovich Malkovich Malkovich Malkovich Malkovich)"
-
-#: html/Admin/Groups/Modify.html:52 html/User/Groups/Modify.html:52
-msgid "Enabled (Unchecking this box disables this group)"
-msgstr "Malkovich (Malkovich Malkovich Malkovich Malkovich)"
-
-#: html/Admin/Queues/Modify.html:83
-msgid "Enabled (Unchecking this box disables this queue)"
-msgstr "Malkovich (Malkovich Malkovich Malkovich Malkovich)"
-
-#: html/Admin/Elements/EditCustomFields:97
-msgid "Enabled Custom Fields"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/index.html:55
-msgid "Enabled Queues"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:106 html/Admin/Groups/Modify.html:116 html/Admin/Queues/Modify.html:140 html/Admin/Users/Modify.html:308 html/User/Groups/Modify.html:116
-#. (loc_fuzzy($msg))
-msgid "Enabled status %1"
-msgstr "Malkovich %1"
-
-#: lib/RT/CustomField_Overlay.pm:433
-msgid "Enter multiple values"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:430
-msgid "Enter one value"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:142
-msgid "Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces."
-msgstr "Malkovich or URIs to Malkovich to. Malkovich Malkovich Malkovich Malkovich."
-
-#: html/Elements/Login:39 html/SelfService/Error.html:24 html/SelfService/Error.html:25
-msgid "Error"
-msgstr "Error"
-
-#: lib/RT/Queue_Overlay.pm:593
-msgid "Error in parameters to Queue->AddWatcher"
-msgstr "Malkovich in Malkovich to Malkovich->Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Error in parameters to Queue->DelWatcher"
-msgstr "Malkovich in Malkovich to Malkovich->Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1468
-msgid "Error in parameters to Ticket->AddWatcher"
-msgstr "Malkovich in Malkovich to Malkovich->Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Error in parameters to Ticket->DelWatcher"
-msgstr "Malkovich in Malkovich to Malkovich->Malkovich"
-
-#: etc/initialdata:20
-msgid "Everyone"
-msgstr "Malkovich"
-
-#: bin/rt-crontool:190
-msgid "Example:"
-msgstr "Malkovich:"
-
-#: NOT FOUND IN SOURCE
-msgid "ExternalAuthId"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "ExternalContactInfoId"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Users/Modify.html:72
-msgid "Extra info"
-msgstr "Malkovich"
-
-#: lib/RT/User_Overlay.pm:342
-msgid "Failed to find 'Privileged' users pseudogroup."
-msgstr "Malkovich to find 'Malkovich' Malkovich Malkovich."
-
-#: lib/RT/User_Overlay.pm:349
-msgid "Failed to find 'Unprivileged' users pseudogroup"
-msgstr "Malkovich to find 'Malkovich' Malkovich Malkovich"
-
-#: bin/rt-crontool:134
-#. ($modname, $@)
-msgid "Failed to load module %1. (%2)"
-msgstr "Malkovich to Malkovich %1. (%2)"
-
-#: lib/RT/Date.pm:412
-msgid "Feb."
-msgstr "Feb."
-
-#: html/Search/Elements/PickBasics:60 html/Ticket/Create.html:154 html/Ticket/Elements/EditBasics:57 lib/RT/Tickets_Overlay.pm:1153
-msgid "Final Priority"
-msgstr "Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1274
-msgid "FinalPriority"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/People.html:60 html/Ticket/Elements/EditPeople:33
-msgid "Find group whose"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Queues/People.html:56 html/Admin/Users/index.html:45 html/Ticket/Elements/EditPeople:29
-msgid "Find people whose"
-msgstr "Malkovich Malkovich"
-
-#: html/Search/Results.html:72
-msgid "Find tickets"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/Tabs:59
-msgid "First"
-msgstr "Malkovich"
-
-#: docs/design_docs/string-extraction-guide.txt:33 lib/RT/StyleGuide.pod:746
-msgid "Foo Bar Baz"
-msgstr "Malkovich"
-
-#: docs/design_docs/string-extraction-guide.txt:24 lib/RT/StyleGuide.pod:737
-msgid "Foo!"
-msgstr "Foo!"
-
-#: html/Search/Bulk.html:84
-msgid "Force change"
-msgstr "Malkovich"
-
-#: html/Search/Results.html:70
-#. ($ticketcount)
-msgid "Found %quant(%1,ticket)"
-msgstr "Malkovich %quant(%1,Malkovich)"
-
-#: lib/RT/Record.pm:750
-msgid "Found Object"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "FreeformContactInfo"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:37
-msgid "FreeformMultiple"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:36
-msgid "FreeformSingle"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:392
-msgid "Fri."
-msgstr "Fri."
-
-#: html/Ticket/Elements/ShowHistory:40 html/Ticket/Elements/ShowHistory:50
-msgid "Full headers"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:587
-#. ($New->Name)
-msgid "Given to %1"
-msgstr "Malkovich to %1"
-
-#: html/Admin/Elements/Tabs:40 html/Admin/index.html:37
-msgid "Global"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectTemplate:37
-#. (loc($Template->Name))
-msgid "Global template: %1"
-msgstr "Malkovich: %1"
-
-#: html/Tools/Offline.html:69
-msgid "Go"
-msgstr "Go"
-
-#: html/Admin/Elements/EditCustomFields:73 html/Admin/Groups/index.html:39 html/Admin/Queues/People.html:58 html/Admin/Queues/People.html:62 html/Admin/Queues/index.html:43 html/Admin/Users/index.html:48 html/Ticket/Elements/EditPeople:31 html/Ticket/Elements/EditPeople:35 html/index.html:69
-msgid "Go!"
-msgstr "Go!"
-
-#: html/Elements/GotoTicket:24 html/SelfService/Elements/GotoTicket:24
-msgid "Goto ticket"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/AddWatchers:45 html/Ticket/Elements/ShowGroupMembers:33 html/User/Elements/DelegateRights:77
-msgid "Group"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/GroupTabs:44 html/Admin/Elements/QueueTabs:56 html/Admin/Elements/SystemTabs:43 html/Admin/Global/index.html:54
-msgid "Group Rights"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:957
-msgid "Group already has member"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Groups/Modify.html:76
-#. ($create_msg)
-msgid "Group could not be created: %1"
-msgstr "Malkovich be Malkovich: %1"
-
-#: lib/RT/Group_Overlay.pm:497
-msgid "Group created"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:1129
-msgid "Group has no such member"
-msgstr "Malkovich no Malkovich"
-
-#: lib/RT/Group_Overlay.pm:937 lib/RT/Queue_Overlay.pm:669 lib/RT/Queue_Overlay.pm:729 lib/RT/Ticket_Overlay.pm:1522 lib/RT/Ticket_Overlay.pm:1602
-msgid "Group not found"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectNewGroupMembers:34 html/Admin/Elements/Tabs:34 html/Admin/Groups/Members.html:63 html/Admin/Queues/People.html:82 html/Admin/index.html:31 html/User/Groups/Members.html:66
-msgid "Groups"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:963
-msgid "Groups can't be members of their members"
-msgstr "Malkovich can't be Malkovich of Malkovich"
-
-#: lib/RT/Interface/CLI.pm:72 lib/RT/Interface/CLI.pm:72
-msgid "Hello!"
-msgstr "Malkovich!"
-
-#: docs/design_docs/string-extraction-guide.txt:40 lib/RT/StyleGuide.pod:753
-#. ($name)
-msgid "Hello, %1"
-msgstr "Malkovich, %1"
-
-#: html/Ticket/Elements/ShowHistory:29 html/Ticket/Elements/Tabs:89
-msgid "History"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "HomePhone"
-msgstr "Malkovich"
-
-#: html/Elements/Tabs:43
-msgid "Homepage"
-msgstr "Malkovich"
-
-#: lib/RT/Base.pm:86
-#. (6)
-msgid "I have %quant(%1,concrete mixer)."
-msgstr "I have %quant(%1,Malkovich)."
-
-#: html/Search/Elements/PickBasics:104 html/Ticket/Elements/ShowBasics:26 lib/RT/Tickets_Overlay.pm:1080
-msgid "Id"
-msgstr "Id"
-
-#: html/Admin/Users/Modify.html:43 html/User/Prefs.html:38
-msgid "Identity"
-msgstr "Malkovich"
-
-#: etc/initialdata:429
-msgid "If an approval is rejected, reject the original and delete pending approvals"
-msgstr "If a Malkovich is Malkovich, Malkovich the Malkovich and Malkovich Malkovich"
-
-#: bin/rt-crontool:186
-msgid "If this tool were setgid, a hostile local user could use this tool to gain administrative access to RT."
-msgstr "If Malkovich Malkovich, a Malkovich Malkovich Malkovich Malkovich to Malkovich Malkovich Malkovich to RT."
-
-#: html/Admin/Queues/People.html:104 html/Ticket/Modify.html:38 html/Ticket/ModifyAll.html:93 html/Ticket/ModifyPeople.html:37
-msgid "If you've updated anything above, be sure to"
-msgstr "If you've Malkovich Malkovich, be sure to"
-
-#: lib/RT/Record.pm:742
-msgid "Illegal value for %1"
-msgstr "Malkovich Malkovich %1"
-
-#: lib/RT/Record.pm:745
-msgid "Immutable field"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomFields:72
-msgid "Include disabled custom fields in listing."
-msgstr "Malkovich Malkovich Malkovich in Malkovich."
-
-#: html/Admin/Queues/index.html:42
-msgid "Include disabled queues in listing."
-msgstr "Malkovich Malkovich in Malkovich."
-
-#: html/Admin/Users/index.html:46
-msgid "Include disabled users in search."
-msgstr "Malkovich Malkovich in Malkovich."
-
-#: html/Search/Elements/PickBasics:59 lib/RT/Tickets_Overlay.pm:1129
-msgid "Initial Priority"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1273 lib/RT/Ticket_Overlay.pm:1275
-msgid "InitialPriority"
-msgstr "Malkovich"
-
-#: lib/RT/ScripAction_Overlay.pm:97
-msgid "Input error"
-msgstr "Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3797
-msgid "Internal Error"
-msgstr "Malkovich"
-
-#: lib/RT/Record.pm:186
-#. ($id->{error_message})
-msgid "Internal Error: %1"
-msgstr "Malkovich: %1"
-
-#: lib/RT/Group_Overlay.pm:644
-msgid "Invalid Group Type"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Principal_Overlay.pm:127
-msgid "Invalid Right"
-msgstr "Malkovich"
-
-#: lib/RT/Record.pm:747
-msgid "Invalid data"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Invalid owner. Defaulting to 'nobody'."
-msgstr "Malkovich. Malkovich to 'Malkovich'."
-
-#: lib/RT/Scrip_Overlay.pm:133 lib/RT/Template_Overlay.pm:251
-msgid "Invalid queue"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:243 lib/RT/ACE_Overlay.pm:252 lib/RT/ACE_Overlay.pm:258 lib/RT/ACE_Overlay.pm:269 lib/RT/ACE_Overlay.pm:274
-msgid "Invalid right"
-msgstr "Malkovich"
-
-#: lib/RT/Record.pm:161
-#. ($key)
-msgid "Invalid value for %1"
-msgstr "Malkovich Malkovich %1"
-
-#: lib/RT/Ticket_Overlay.pm:3380
-msgid "Invalid value for custom field"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:385
-msgid "Invalid value for status"
-msgstr "Malkovich Malkovich"
-
-#: bin/rt-crontool:187
-msgid "It is incredibly important that nonprivileged users not be allowed to run this tool."
-msgstr "It is Malkovich Malkovich Malkovich Malkovich Malkovich be Malkovich to Malkovich."
-
-#: bin/rt-crontool:188
-msgid "It is suggested that you create a non-privileged unix user with the correct group membership and RT access to run this tool."
-msgstr "It is Malkovich Malkovich a non-Malkovich Malkovich the Malkovich Malkovich and RT Malkovich to Malkovich."
-
-#: bin/rt-crontool:159
-msgid "It takes several arguments:"
-msgstr "It Malkovich Malkovich:"
-
-#: lib/RT/Date.pm:411
-msgid "Jan."
-msgstr "Jan."
-
-#: lib/RT/Group_Overlay.pm:149
-msgid "Join or leave this group"
-msgstr "Join or Malkovich Malkovich"
-
-#: lib/RT/Date.pm:417
-msgid "Jul."
-msgstr "Jul."
-
-#: html/Ticket/Elements/Tabs:100
-msgid "Jumbo"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:416
-msgid "Jun."
-msgstr "Jun."
-
-#: NOT FOUND IN SOURCE
-msgid "Lang"
-msgstr "Lang"
-
-#: html/User/Prefs.html:54
-msgid "Language"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/Tabs:74
-msgid "Last"
-msgstr "Last"
-
-#: html/Ticket/Elements/EditDates:37 html/Ticket/Elements/ShowDates:39
-msgid "Last Contact"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Last Contact</a>"
-msgstr "Malkovich</a>"
-
-#: html/Elements/SelectDateType:28
-msgid "Last Contacted"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Last Notified"
-msgstr "Malkovich"
-
-#: html/Elements/SelectDateType:29
-msgid "Last Updated"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:82
-msgid "Let this user access RT"
-msgstr "Malkovich Malkovich RT"
-
-#: html/Admin/Users/Modify.html:86
-msgid "Let this user be granted rights"
-msgstr "Malkovich be Malkovich"
-
-#: lib/RT/Record.pm:1086
-msgid "Link already exists"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Record.pm:1100
-msgid "Link could not be created"
-msgstr "Malkovich be Malkovich"
-
-#: lib/RT/Record.pm:1106
-#. ($TransString)
-msgid "Link created (%1)"
-msgstr "Malkovich (%1)"
-
-#: lib/RT/Record.pm:1167
-#. ($TransString)
-msgid "Link deleted (%1)"
-msgstr "Malkovich (%1)"
-
-#: lib/RT/Record.pm:1173
-msgid "Link not found"
-msgstr "Malkovich"
-
-#: html/Ticket/ModifyLinks.html:24 html/Ticket/ModifyLinks.html:28
-#. ($Ticket->Id)
-msgid "Link ticket #%1"
-msgstr "Malkovich #%1"
-
-#: html/Ticket/Create.html:174 html/Ticket/Elements/ShowSummary:61 html/Ticket/Elements/Tabs:98 html/Ticket/ModifyAll.html:56
-msgid "Links"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:111 html/User/Prefs.html:104
-msgid "Location"
-msgstr "Malkovich"
-
-#: lib/RT.pm:184
-#. ($RT::LogDir)
-msgid "Log directory %1 not found or couldn't be written.\\n RT can't run."
-msgstr "Malkovich %1 Malkovich or couldn't be Malkovich.\\n RT can't run."
-
-#: html/Elements/Header:69
-#. ("<b>".$session{'CurrentUser'}->Name."</b>")
-msgid "Logged in as %1"
-msgstr "Malkovich in as %1"
-
-#: docs/design_docs/string-extraction-guide.txt:71 html/Elements/Login:35 html/Elements/Login:44 html/Elements/Login:54 lib/RT/StyleGuide.pod:777
-msgid "Login"
-msgstr "Malkovich"
-
-#: html/Elements/Header:66
-msgid "Logout"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:83
-msgid "Make Owner"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:107
-msgid "Make Status"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:115
-msgid "Make date Due"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:117
-msgid "Make date Resolved"
-msgstr "Malkovich Malkovich"
-
-#: html/Search/Bulk.html:111
-msgid "Make date Started"
-msgstr "Malkovich Malkovich"
-
-#: html/Search/Bulk.html:109
-msgid "Make date Starts"
-msgstr "Malkovich Malkovich"
-
-#: html/Search/Bulk.html:113
-msgid "Make date Told"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:103
-msgid "Make priority"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:105
-msgid "Make queue"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:101
-msgid "Make subject"
-msgstr "Malkovich"
-
-#: html/Admin/index.html:32
-msgid "Manage groups and group membership"
-msgstr "Malkovich and Malkovich Malkovich"
-
-#: html/Admin/index.html:38
-msgid "Manage properties and configuration which apply to all queues"
-msgstr "Malkovich Malkovich and Malkovich Malkovich to Malkovich"
-
-#: html/Admin/index.html:35
-msgid "Manage queues and queue-specific properties"
-msgstr "Malkovich and Malkovich-Malkovich Malkovich"
-
-#: html/Admin/index.html:29
-msgid "Manage users and passwords"
-msgstr "Malkovich and Malkovich"
-
-#: lib/RT/Date.pm:413
-msgid "Mar."
-msgstr "Mar."
-
-#: lib/RT/Date.pm:415
-msgid "May."
-msgstr "May."
-
-#: lib/RT/Transaction_Overlay.pm:634
-#. ($value)
-msgid "Member %1 added"
-msgstr "Malkovich %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:674
-#. ($value)
-msgid "Member %1 deleted"
-msgstr "Malkovich %1 Malkovich"
-
-#: lib/RT/Group_Overlay.pm:974
-msgid "Member added"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:1136
-msgid "Member deleted"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:1140
-msgid "Member not deleted"
-msgstr "Malkovich Malkovich"
-
-#: html/Elements/SelectLinkType:25
-msgid "Member of"
-msgstr "Malkovich of"
-
-#: html/Admin/Elements/GroupTabs:41 html/User/Elements/GroupTabs:41
-msgid "Members"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:631
-#. ($value)
-msgid "Membership in %1 added"
-msgstr "Malkovich in %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:671
-#. ($value)
-msgid "Membership in %1 deleted"
-msgstr "Malkovich in %1 Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2813
-msgid "Merge Successful"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2733
-msgid "Merge failed. Couldn't set EffectiveId"
-msgstr "Malkovich. Couldn't Malkovich"
-
-#: html/Elements/EditLinks:104 html/Ticket/Elements/BulkLinks:26
-msgid "Merge into"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:135 html/Ticket/Update.html:83
-msgid "Message"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Message body not shown because it is too large or is not plain text."
-msgstr "Malkovich Malkovich Malkovich it is Malkovich or is Malkovich."
-
-#: lib/RT/Ticket_Overlay.pm:2514
-msgid "Message could not be recorded"
-msgstr "Malkovich Malkovich be Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Message recipients"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2517
-msgid "Message recorded"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Record.pm:749
-msgid "Missing a primary key?: %1"
-msgstr "Malkovich a Malkovich?: %1"
-
-#: html/Admin/Users/Modify.html:166 html/User/Prefs.html:71
-msgid "Mobile"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "MobilePhone"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:71
-msgid "Modify Access Control List"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Global/CustomFields.html:43 html/Admin/Global/index.html:50
-msgid "Modify Custom Fields which apply to all queues"
-msgstr "Malkovich Malkovich Malkovich to Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:74
-msgid "Modify Scrip templates for this queue"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:77
-msgid "Modify Scrips for this queue"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Queues/CustomField.html:44
-#. ($QueueObj->Name())
-msgid "Modify a CustomField for queue %1"
-msgstr "Malkovich a Malkovich Malkovich %1"
-
-#: html/Admin/Global/CustomField.html:52
-msgid "Modify a CustomField which applies to all queues"
-msgstr "Malkovich a Malkovich Malkovich to Malkovich"
-
-#: html/Admin/Queues/Scrip.html:53
-#. ($QueueObj->Name)
-msgid "Modify a scrip for queue %1"
-msgstr "Malkovich a Malkovich %1"
-
-#: html/Admin/Global/Scrip.html:47
-msgid "Modify a scrip which applies to all queues"
-msgstr "Malkovich a Malkovich Malkovich to Malkovich"
-
-#: html/Ticket/ModifyDates.html:24 html/Ticket/ModifyDates.html:28
-#. ($TicketObj->Id)
-msgid "Modify dates for #%1"
-msgstr "Malkovich Malkovich #%1"
-
-#: html/Ticket/ModifyDates.html:34
-#. ($TicketObj->Id)
-msgid "Modify dates for ticket # %1"
-msgstr "Malkovich Malkovich # %1"
-
-#: html/Admin/Global/GroupRights.html:24 html/Admin/Global/GroupRights.html:27 html/Admin/Global/index.html:55
-msgid "Modify global group rights"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Global/GroupRights.html:32
-msgid "Modify global group rights."
-msgstr "Malkovich Malkovich Malkovich."
-
-#: html/Admin/Global/UserRights.html:24 html/Admin/Global/UserRights.html:27 html/Admin/Global/index.html:59
-msgid "Modify global user rights"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Global/UserRights.html:32
-msgid "Modify global user rights."
-msgstr "Malkovich Malkovich."
-
-#: lib/RT/Group_Overlay.pm:146
-msgid "Modify group metadata or delete group"
-msgstr "Malkovich Malkovich or Malkovich"
-
-#: html/Admin/Groups/GroupRights.html:24 html/Admin/Groups/GroupRights.html:28 html/Admin/Groups/GroupRights.html:34
-#. ($GroupObj->Name)
-msgid "Modify group rights for group %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: html/Admin/Queues/GroupRights.html:24 html/Admin/Queues/GroupRights.html:28
-#. ($QueueObj->Name)
-msgid "Modify group rights for queue %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: lib/RT/Group_Overlay.pm:148
-msgid "Modify membership roster for this group"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/System.pm:60
-msgid "Modify one's own RT account"
-msgstr "Malkovich's own RT Malkovich"
-
-#: html/Admin/Queues/People.html:24 html/Admin/Queues/People.html:28
-#. ($QueueObj->Name)
-msgid "Modify people related to queue %1"
-msgstr "Malkovich Malkovich to Malkovich %1"
-
-#: html/Ticket/ModifyPeople.html:24 html/Ticket/ModifyPeople.html:28 html/Ticket/ModifyPeople.html:34
-#. ($Ticket->id)
-#. ($Ticket->Id)
-msgid "Modify people related to ticket #%1"
-msgstr "Malkovich Malkovich to Malkovich #%1"
-
-#: html/Admin/Queues/Scrips.html:45
-#. ($QueueObj->Name)
-msgid "Modify scrips for queue %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Admin/Global/Scrips.html:43 html/Admin/Global/index.html:41
-msgid "Modify scrips which apply to all queues"
-msgstr "Malkovich Malkovich to Malkovich"
-
-#: html/Admin/Global/Template.html:24 html/Admin/Global/Template.html:29 html/Admin/Global/Template.html:80 html/Admin/Queues/Template.html:77
-#. (loc($TemplateObj->Name()))
-#. ($TemplateObj->id)
-msgid "Modify template %1"
-msgstr "Malkovich %1"
-
-#: html/Admin/Global/Templates.html:43
-msgid "Modify templates which apply to all queues"
-msgstr "Malkovich Malkovich Malkovich to Malkovich"
-
-#: html/Admin/Groups/Modify.html:86 html/User/Groups/Modify.html:85
-#. ($Group->Name)
-msgid "Modify the group %1"
-msgstr "Malkovich the Malkovich %1"
-
-#: lib/RT/Queue_Overlay.pm:72
-msgid "Modify the queue watchers"
-msgstr "Malkovich the Malkovich"
-
-#: html/Admin/Users/Modify.html:263
-#. ($UserObj->Name)
-msgid "Modify the user %1"
-msgstr "Malkovich the user %1"
-
-#: html/Ticket/ModifyAll.html:36
-#. ($Ticket->Id)
-msgid "Modify ticket # %1"
-msgstr "Malkovich # %1"
-
-#: html/Ticket/Modify.html:24 html/Ticket/Modify.html:27 html/Ticket/Modify.html:33
-#. ($TicketObj->Id)
-msgid "Modify ticket #%1"
-msgstr "Malkovich #%1"
-
-#: lib/RT/Queue_Overlay.pm:90
-msgid "Modify tickets"
-msgstr "Malkovich"
-
-#: html/Admin/Groups/UserRights.html:24 html/Admin/Groups/UserRights.html:28 html/Admin/Groups/UserRights.html:34
-#. ($GroupObj->Name)
-msgid "Modify user rights for group %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: html/Admin/Queues/UserRights.html:24 html/Admin/Queues/UserRights.html:28
-#. ($QueueObj->Name)
-msgid "Modify user rights for queue %1"
-msgstr "Malkovich Malkovich Malkovich %1"
-
-#: lib/RT/Queue_Overlay.pm:71
-msgid "ModifyACL"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:149
-msgid "ModifyOwnMembership"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:72
-msgid "ModifyQueueWatchers"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:77
-msgid "ModifyScrips"
-msgstr "Malkovich"
-
-#: lib/RT/System.pm:60
-msgid "ModifySelf"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:74
-msgid "ModifyTemplate"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:90
-msgid "ModifyTicket"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:388
-msgid "Mon."
-msgstr "Mon."
-
-#: html/Ticket/Elements/ShowRequestor:40
-#. ($name)
-msgid "More about %1"
-msgstr "Malkovich %1"
-
-#: html/Admin/Elements/EditCustomFields:60
-msgid "Move down"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectSingleOrMultiple:26
-msgid "Multiple"
-msgstr "Malkovich"
-
-#: lib/RT/User_Overlay.pm:197
-msgid "Must specify 'Name' attribute"
-msgstr "Malkovich 'Name' Malkovich"
-
-#: html/SelfService/Elements/MyRequests:48
-#. ($friendly_status)
-msgid "My %1 tickets"
-msgstr "My %1 Malkovich"
-
-#: html/Approvals/index.html:24 html/Approvals/index.html:25
-msgid "My approvals"
-msgstr "My Malkovich"
-
-#: html/Admin/Elements/AddCustomFieldValue:31 html/Admin/Elements/EditCustomField:33 html/Admin/Elements/ModifyTemplate:27 html/Admin/Groups/Modify.html:43 html/Elements/SelectGroups:25 html/Elements/SelectUsers:27 html/User/Groups/Modify.html:43
-msgid "Name"
-msgstr "Name"
-
-#: lib/RT/User_Overlay.pm:204
-msgid "Name in use"
-msgstr "Name in use"
-
-#: html/Ticket/Elements/ShowDates:52
-msgid "Never"
-msgstr "Malkovich"
-
-#: html/Elements/Quicksearch:29
-msgid "New"
-msgstr "New"
-
-#: html/Elements/EditLinks:93
-msgid "New Links"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Users/Modify.html:92 html/User/Prefs.html:87
-msgid "New Password"
-msgstr "Malkovich"
-
-#: etc/initialdata:332
-msgid "New Pending Approval"
-msgstr "Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "New Search"
-msgstr "Malkovich"
-
-#: html/Admin/Global/CustomField.html:40 html/Admin/Global/CustomFields.html:38 html/Admin/Queues/CustomField.html:51 html/Admin/Queues/CustomFields.html:40
-msgid "New custom field"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/GroupTabs:53 html/User/Elements/GroupTabs:51
-msgid "New group"
-msgstr "Malkovich"
-
-#: html/SelfService/Prefs.html:31
-msgid "New password"
-msgstr "Malkovich"
-
-#: lib/RT/User_Overlay.pm:773
-msgid "New password notification sent"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Elements/QueueTabs:69
-msgid "New queue"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectRights:41
-msgid "New rights"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Scrip.html:39 html/Admin/Global/Scrips.html:38 html/Admin/Queues/Scrip.html:42 html/Admin/Queues/Scrips.html:54
-msgid "New scrip"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Template.html:59 html/Admin/Global/Templates.html:38 html/Admin/Queues/Template.html:57 html/Admin/Queues/Templates.html:49
-msgid "New template"
-msgstr "Malkovich"
-
-#: html/SelfService/Elements/Tabs:47
-msgid "New ticket"
-msgstr "Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2700
-msgid "New ticket doesn't exist"
-msgstr "Malkovich doesn't Malkovich"
-
-#: html/Admin/Elements/UserTabs:50
-msgid "New user"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/CreateUserCalled:25
-msgid "New user called"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/People.html:54 html/Ticket/Elements/EditPeople:28
-msgid "New watchers"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "New window setting"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/Elements/Tabs:70
-msgid "Next"
-msgstr "Next"
-
-#: NOT FOUND IN SOURCE
-msgid "NickName"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:62 html/User/Prefs.html:50
-msgid "Nickname"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:89 html/Admin/Elements/EditCustomFields:103
-msgid "No CustomField"
-msgstr "No Malkovich"
-
-#: html/Admin/Groups/GroupRights.html:83 html/Admin/Groups/UserRights.html:70
-msgid "No Group defined"
-msgstr "No Malkovich"
-
-#: lib/RT/Tickets_Overlay_SQL.pm:452
-msgid "No Query"
-msgstr "No Malkovich"
-
-#: html/Admin/Queues/GroupRights.html:96 html/Admin/Queues/UserRights.html:67
-msgid "No Queue defined"
-msgstr "No Malkovich"
-
-#: bin/rt-crontool:52
-msgid "No RT user found. Please consult your RT administrator.\\n"
-msgstr "No RT Malkovich. Malkovich Malkovich RT Malkovich.\\n"
-
-#: html/Admin/Global/Template.html:78 html/Admin/Queues/Template.html:75
-msgid "No Template"
-msgstr "No Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "No Ticket specified. Aborting ticket "
-msgstr "No Malkovich Malkovich. Malkovich "
-
-#: html/Approvals/Elements/Approve:45
-msgid "No action"
-msgstr "No Malkovich"
-
-#: lib/RT/Record.pm:744
-msgid "No column specified"
-msgstr "No Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowRequestor:46
-msgid "No comment entered about this user"
-msgstr "No Malkovich Malkovich Malkovich"
-
-#: lib/RT/Action/Generic.pm:159 lib/RT/Condition/Generic.pm:175 lib/RT/Search/ActiveTicketsInQueue.pm:55 lib/RT/Search/Generic.pm:112
-#. (ref $self)
-msgid "No description for %1"
-msgstr "No Malkovich %1"
-
-#: lib/RT/Users_Overlay.pm:159
-msgid "No group specified"
-msgstr "No Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2475
-msgid "No message attached"
-msgstr "No Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:991
-msgid "No password set"
-msgstr "No Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:296
-msgid "No permission to create queues"
-msgstr "No Malkovich to Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "No permission to create tickets in the queue '%1'"
-msgstr "No Malkovich to Malkovich in the Malkovich '%1'"
-
-#: lib/RT/User_Overlay.pm:157
-msgid "No permission to create users"
-msgstr "No Malkovich to Malkovich"
-
-#: html/SelfService/Display.html:125
-msgid "No permission to display that ticket"
-msgstr "No Malkovich to Malkovich Malkovich"
-
-#: html/SelfService/Update.html:68
-msgid "No permission to view update ticket"
-msgstr "No Malkovich to Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:716 lib/RT/Ticket_Overlay.pm:1581
-msgid "No principal specified"
-msgstr "No Malkovich Malkovich"
-
-#: html/Admin/Queues/People.html:153 html/Admin/Queues/People.html:163
-msgid "No principals selected."
-msgstr "No Malkovich Malkovich."
-
-#: html/Admin/Queues/index.html:34
-msgid "No queues matching search criteria found."
-msgstr "No Malkovich Malkovich Malkovich Malkovich."
-
-#: html/Admin/Elements/SelectRights:81
-msgid "No rights found"
-msgstr "No Malkovich"
-
-#: html/Admin/Elements/SelectRights:32
-msgid "No rights granted."
-msgstr "No Malkovich."
-
-#: html/Search/Bulk.html:162
-msgid "No search to operate on."
-msgstr "No Malkovich to Malkovich on."
-
-#: lib/RT/Transaction_Overlay.pm:455 lib/RT/Transaction_Overlay.pm:493
-msgid "No transaction type specified"
-msgstr "No Malkovich Malkovich Malkovich"
-
-#: html/Admin/Users/index.html:35
-msgid "No users matching search criteria found."
-msgstr "No Malkovich Malkovich Malkovich Malkovich."
-
-#: NOT FOUND IN SOURCE
-msgid "No valid RT user found. RT cvs handler disengaged. Please consult your RT administrator.\\n"
-msgstr "No Malkovich RT Malkovich. RT Malkovich Malkovich. Malkovich Malkovich RT Malkovich.\\n"
-
-#: lib/RT/Record.pm:741
-msgid "No value sent to _Set!\\n"
-msgstr "No Malkovich to _Set!\\n"
-
-#: lib/RT/Record.pm:746
-msgid "Nonexistant field?"
-msgstr "Malkovich Malkovich?"
-
-#: html/Elements/Header:71
-msgid "Not logged in."
-msgstr "Malkovich in."
-
-#: lib/RT/Date.pm:369
-msgid "Not set"
-msgstr "Malkovich"
-
-#: html/NoAuth/Reminder.html:26
-msgid "Not yet implemented."
-msgstr "Malkovich Malkovich."
-
-#: html/Approvals/Elements/Approve:48
-msgid "Notes"
-msgstr "Malkovich"
-
-#: lib/RT/User_Overlay.pm:776
-msgid "Notification could not be sent"
-msgstr "Malkovich Malkovich be sent"
-
-#: etc/initialdata:101
-msgid "Notify AdminCcs"
-msgstr "Malkovich"
-
-#: etc/initialdata:97
-msgid "Notify AdminCcs as Comment"
-msgstr "Malkovich as Malkovich"
-
-#: etc/initialdata:128
-msgid "Notify Other Recipients"
-msgstr "Malkovich Malkovich"
-
-#: etc/initialdata:124
-msgid "Notify Other Recipients as Comment"
-msgstr "Malkovich Malkovich as Malkovich"
-
-#: etc/initialdata:85
-msgid "Notify Owner"
-msgstr "Malkovich"
-
-#: etc/initialdata:81
-msgid "Notify Owner as Comment"
-msgstr "Malkovich as Malkovich"
-
-#: etc/initialdata:376
-msgid "Notify Owner of their rejected ticket"
-msgstr "Malkovich of Malkovich Malkovich"
-
-#: etc/initialdata:365
-msgid "Notify Owner of their ticket has been approved by all approvers"
-msgstr "Malkovich of Malkovich Malkovich Malkovich by Malkovich"
-
-#: etc/initialdata:353
-msgid "Notify Owner of their ticket has been approved by some approver"
-msgstr "Malkovich of Malkovich Malkovich Malkovich by Malkovich"
-
-#: etc/initialdata:334
-msgid "Notify Owners and AdminCcs of new items pending their approval"
-msgstr "Malkovich and Malkovich of Malkovich Malkovich Malkovich"
-
-#: etc/initialdata:77
-msgid "Notify Requestors"
-msgstr "Malkovich Malkovich"
-
-#: etc/initialdata:111
-msgid "Notify Requestors and Ccs"
-msgstr "Malkovich Malkovich and Ccs"
-
-#: etc/initialdata:106
-msgid "Notify Requestors and Ccs as Comment"
-msgstr "Malkovich Malkovich and Ccs as Malkovich"
-
-#: etc/initialdata:120
-msgid "Notify Requestors, Ccs and AdminCcs"
-msgstr "Malkovich Malkovich, Ccs and Malkovich"
-
-#: etc/initialdata:116
-msgid "Notify Requestors, Ccs and AdminCcs as Comment"
-msgstr "Malkovich Malkovich, Ccs and Malkovich as Malkovich"
-
-#: lib/RT/Date.pm:421
-msgid "Nov."
-msgstr "Nov."
-
-#: lib/RT/Record.pm:200
-msgid "Object could not be created"
-msgstr "Malkovich Malkovich be Malkovich"
-
-#: lib/RT/Record.pm:219
-msgid "Object created"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:420
-msgid "Oct."
-msgstr "Oct."
-
-#: html/Elements/SelectDateRelation:34
-msgid "On"
-msgstr "On"
-
-#: etc/initialdata:163
-msgid "On Comment"
-msgstr "On Malkovich"
-
-#: etc/initialdata:156
-msgid "On Correspond"
-msgstr "On Malkovich"
-
-#: etc/initialdata:145
-msgid "On Create"
-msgstr "On Malkovich"
-
-#: etc/initialdata:184
-msgid "On Owner Change"
-msgstr "On Malkovich"
-
-#: etc/initialdata:192
-msgid "On Queue Change"
-msgstr "On Malkovich"
-
-#: etc/initialdata:198
-msgid "On Resolve"
-msgstr "On Malkovich"
-
-#: etc/initialdata:169
-msgid "On Status Change"
-msgstr "On Malkovich"
-
-#: etc/initialdata:150
-msgid "On Transaction"
-msgstr "On Malkovich"
-
-#: html/Approvals/Elements/PendingMyApproval:49
-#. ("<input size='15' value='".( $created_after->Unix >0 && $created_after->ISO)."' name='CreatedAfter'>")
-msgid "Only show approvals for requests created after %1"
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich %1"
-
-#: html/Approvals/Elements/PendingMyApproval:47
-#. ("<input size='15' value='".($created_before->Unix > 0 &&$created_before->ISO)."' name='CreatedBefore'>")
-msgid "Only show approvals for requests created before %1"
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich %1"
-
-#: html/Elements/Quicksearch:30
-msgid "Open"
-msgstr "Open"
-
-#: html/Ticket/Elements/Tabs:137
-msgid "Open it"
-msgstr "Open it"
-
-#: html/SelfService/Elements/Tabs:41
-msgid "Open tickets"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Open tickets (from listing) in a new window"
-msgstr "Malkovich (Malkovich) in a Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Open tickets (from listing) in another window"
-msgstr "Malkovich (Malkovich) in Malkovich"
-
-#: etc/initialdata:140
-msgid "Open tickets on correspondence"
-msgstr "Malkovich on Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Ordering and sorting"
-msgstr "Malkovich and Malkovich"
-
-#: html/Admin/Users/Modify.html:114 html/Elements/SelectUsers:28 html/User/Prefs.html:107
-msgid "Organization"
-msgstr "Malkovich"
-
-#: html/Approvals/Elements/Approve:32
-#. ($approving->Id, $approving->Subject)
-msgid "Originating ticket: #%1"
-msgstr "Malkovich Malkovich: #%1"
-
-#: html/Admin/Queues/Modify.html:68
-msgid "Over time, priority moves toward"
-msgstr "Malkovich, Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:89
-msgid "Own tickets"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:89
-msgid "OwnTicket"
-msgstr "Malkovich"
-
-#: etc/initialdata:38 html/Elements/QuickCreate:13 html/Search/Elements/PickBasics:114 html/SelfService/Elements/MyRequests:29 html/Ticket/Create.html:47 html/Ticket/Elements/EditPeople:42 html/Ticket/Elements/EditPeople:43 html/Ticket/Elements/ShowPeople:26 html/Ticket/Update.html:40 lib/RT/ACE_Overlay.pm:85 lib/RT/Tickets_Overlay.pm:1306
-msgid "Owner"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:575
-#. ($Old->Name , $New->Name)
-msgid "Owner forcibly changed from %1 to %2"
-msgstr "Malkovich Malkovich Malkovich %1 to %2"
-
-#: NOT FOUND IN SOURCE
-msgid "Owner is"
-msgstr "Malkovich is"
-
-#: html/Admin/Users/Modify.html:171 html/User/Prefs.html:75
-msgid "Pager"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "PagerPhone"
-msgstr "Malkovich"
-
-#: html/Elements/EditLinks:117 html/Elements/EditLinks:54 html/Elements/ShowLinks:46 html/Ticket/Create.html:182 html/Ticket/Elements/BulkLinks:38
-msgid "Parents"
-msgstr "Malkovich"
-
-#: html/Elements/Login:52 html/User/Prefs.html:83
-msgid "Password"
-msgstr "Malkovich"
-
-#: html/NoAuth/Reminder.html:24
-msgid "Password Reminder"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:185 lib/RT/User_Overlay.pm:994
-msgid "Password too short"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Users/Modify.html:316 html/User/Prefs.html:209
-#. (loc_fuzzy($msg))
-msgid "Password: %1"
-msgstr "Malkovich: %1"
-
-#: html/Admin/Users/Modify.html:318
-msgid "Passwords do not match."
-msgstr "Malkovich do Malkovich."
-
-#: html/User/Prefs.html:211
-msgid "Passwords do not match. Your password has not been changed"
-msgstr "Malkovich do Malkovich. Malkovich Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowSummary:44 html/Ticket/Elements/Tabs:97 html/Ticket/ModifyAll.html:50
-msgid "People"
-msgstr "Malkovich"
-
-#: etc/initialdata:133
-msgid "Perform a user-defined action"
-msgstr "Malkovich a user-Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:230 lib/RT/ACE_Overlay.pm:236 lib/RT/ACE_Overlay.pm:562 lib/RT/ACE_Overlay.pm:572 lib/RT/ACE_Overlay.pm:582 lib/RT/ACE_Overlay.pm:647 lib/RT/Attribute_Overlay.pm:135 lib/RT/Attribute_Overlay.pm:141 lib/RT/Attribute_Overlay.pm:379 lib/RT/Attribute_Overlay.pm:388 lib/RT/Attribute_Overlay.pm:401 lib/RT/CurrentUser.pm:103 lib/RT/CurrentUser.pm:94 lib/RT/CustomField_Overlay.pm:100 lib/RT/CustomField_Overlay.pm:207 lib/RT/CustomField_Overlay.pm:239 lib/RT/CustomField_Overlay.pm:517 lib/RT/CustomField_Overlay.pm:90 lib/RT/Group_Overlay.pm:1091 lib/RT/Group_Overlay.pm:1095 lib/RT/Group_Overlay.pm:1104 lib/RT/Group_Overlay.pm:1155 lib/RT/Group_Overlay.pm:1159 lib/RT/Group_Overlay.pm:1165 lib/RT/Group_Overlay.pm:426 lib/RT/Group_Overlay.pm:518 lib/RT/Group_Overlay.pm:596 lib/RT/Group_Overlay.pm:604 lib/RT/Group_Overlay.pm:701 lib/RT/Group_Overlay.pm:705 lib/RT/Group_Overlay.pm:711 lib/RT/Group_Overlay.pm:896 lib/RT/Group_Overlay.pm:900 lib/RT/Group_Overlay.pm:913 lib/RT/Queue_Overlay.pm:117 lib/RT/Queue_Overlay.pm:135 lib/RT/Queue_Overlay.pm:578 lib/RT/Queue_Overlay.pm:588 lib/RT/Queue_Overlay.pm:602 lib/RT/Queue_Overlay.pm:740 lib/RT/Queue_Overlay.pm:749 lib/RT/Queue_Overlay.pm:762 lib/RT/Queue_Overlay.pm:975 lib/RT/Scrip_Overlay.pm:125 lib/RT/Scrip_Overlay.pm:136 lib/RT/Scrip_Overlay.pm:201 lib/RT/Scrip_Overlay.pm:473 lib/RT/Template_Overlay.pm:284 lib/RT/Template_Overlay.pm:87 lib/RT/Template_Overlay.pm:93 lib/RT/Ticket_Overlay.pm:1453 lib/RT/Ticket_Overlay.pm:1463 lib/RT/Ticket_Overlay.pm:1477 lib/RT/Ticket_Overlay.pm:1614 lib/RT/Ticket_Overlay.pm:1624 lib/RT/Ticket_Overlay.pm:1638 lib/RT/Ticket_Overlay.pm:1755 lib/RT/Ticket_Overlay.pm:2075 lib/RT/Ticket_Overlay.pm:2213 lib/RT/Ticket_Overlay.pm:2381 lib/RT/Ticket_Overlay.pm:2428 lib/RT/Ticket_Overlay.pm:2582 lib/RT/Ticket_Overlay.pm:2640 lib/RT/Ticket_Overlay.pm:2691 lib/RT/Ticket_Overlay.pm:2706 lib/RT/Ticket_Overlay.pm:2905 lib/RT/Ticket_Overlay.pm:2915 lib/RT/Ticket_Overlay.pm:2920 lib/RT/Ticket_Overlay.pm:3143 lib/RT/Ticket_Overlay.pm:3147 lib/RT/Ticket_Overlay.pm:3350 lib/RT/Ticket_Overlay.pm:3512 lib/RT/Ticket_Overlay.pm:3564 lib/RT/Ticket_Overlay.pm:3791 lib/RT/Transaction_Overlay.pm:443 lib/RT/Transaction_Overlay.pm:450 lib/RT/Transaction_Overlay.pm:479 lib/RT/Transaction_Overlay.pm:486 lib/RT/User_Overlay.pm:1088 lib/RT/User_Overlay.pm:1536 lib/RT/User_Overlay.pm:335 lib/RT/User_Overlay.pm:696 lib/RT/User_Overlay.pm:731 lib/RT/User_Overlay.pm:987
-msgid "Permission Denied"
-msgstr "Malkovich Malkovich"
-
-#: html/User/Elements/Tabs:34
-msgid "Personal Groups"
-msgstr "Malkovich"
-
-#: html/User/Groups/index.html:29 html/User/Groups/index.html:39
-msgid "Personal groups"
-msgstr "Malkovich"
-
-#: html/User/Elements/DelegateRights:36
-msgid "Personal groups:"
-msgstr "Malkovich:"
-
-#: html/Admin/Users/Modify.html:153 html/User/Prefs.html:60
-msgid "Phone numbers"
-msgstr "Malkovich"
-
-#: html/Elements/Header:63 html/Elements/Tabs:55 html/SelfService/Elements/Tabs:50 html/SelfService/Prefs.html:24 html/User/Prefs.html:24 html/User/Prefs.html:27
-msgid "Preferences"
-msgstr "Malkovich"
-
-#: lib/RT/Action/Generic.pm:169
-msgid "Prepare Stubbed"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/Tabs:62
-msgid "Prev"
-msgstr "Prev"
-
-#: lib/RT/ACE_Overlay.pm:132 lib/RT/ACE_Overlay.pm:207 lib/RT/ACE_Overlay.pm:551
-#. ($args{'PrincipalId'})
-msgid "Principal %1 not found."
-msgstr "Malkovich %1 Malkovich."
-
-#: html/Search/Elements/PickBasics:58 html/Ticket/Create.html:153 html/Ticket/Elements/EditBasics:52 html/Ticket/Elements/ShowBasics:50 lib/RT/Tickets_Overlay.pm:1104
-msgid "Priority"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/Modify.html:64
-msgid "Priority starts at"
-msgstr "Malkovich at"
-
-#: etc/initialdata:25
-msgid "Privileged"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:296 html/User/Prefs.html:200
-#. (loc_fuzzy($msg))
-msgid "Privileged status: %1"
-msgstr "Malkovich Malkovich: %1"
-
-#: html/Admin/Users/index.html:61
-msgid "Privileged users"
-msgstr "Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Projects"
-msgstr "Malkovich"
-
-#: etc/initialdata:23 etc/initialdata:29 etc/initialdata:35 etc/initialdata:59
-msgid "Pseudogroup for internal use"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Elements/QuickCreate:10 html/Elements/Quicksearch:28 html/Search/Elements/PickBasics:94 html/SelfService/Create.html:32 html/Ticket/Create.html:37 html/Ticket/Elements/EditBasics:35 html/Ticket/Elements/ShowBasics:54 html/User/Elements/DelegateRights:79 lib/RT/Tickets_Overlay.pm:945
-msgid "Queue"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/CustomField.html:41 html/Admin/Queues/Scrip.html:49 html/Admin/Queues/Scrips.html:47 html/Admin/Queues/Templates.html:43
-#. ($Queue)
-#. ($id)
-msgid "Queue %1 not found"
-msgstr "Malkovich %1 Malkovich"
-
-#: html/Admin/Queues/Modify.html:42
-msgid "Queue Name"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:300
-msgid "Queue already exists"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:309 lib/RT/Queue_Overlay.pm:315
-msgid "Queue could not be created"
-msgstr "Malkovich not be Malkovich"
-
-#: html/Ticket/Create.html:208
-msgid "Queue could not be loaded."
-msgstr "Malkovich be Malkovich."
-
-#: docs/design_docs/string-extraction-guide.txt:83 lib/RT/Queue_Overlay.pm:319 lib/RT/StyleGuide.pod:789
-msgid "Queue created"
-msgstr "Malkovich"
-
-#: html/SelfService/Display.html:72 lib/RT/CustomField_Overlay.pm:97
-msgid "Queue not found"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/Tabs:37 html/Admin/index.html:34
-msgid "Queues"
-msgstr "Malkovich"
-
-#: html/Elements/Quicksearch:24
-msgid "Quick search"
-msgstr "Malkovich"
-
-#: html/Elements/Login:44
-#. ($RT::VERSION)
-msgid "RT %1"
-msgstr "RT %1"
-
-#: docs/design_docs/string-extraction-guide.txt:70 lib/RT/StyleGuide.pod:776
-#. ($RT::VERSION, $RT::rtname)
-msgid "RT %1 for %2"
-msgstr "RT %1 for %2"
-
-#: NOT FOUND IN SOURCE
-msgid "RT %1 from <a href=\"http://bestpractical.com\">Best Practical Solutions, LLC</a>."
-msgstr "RT %1 from <a href=\"http://Malkovich.com\">Malkovich Malkovich, LLC</a>."
-
-#: html/Admin/index.html:24 html/Admin/index.html:25
-msgid "RT Administration"
-msgstr "RT Malkovich"
-
-#: html/Elements/Error:41 html/SelfService/Error.html:40
-msgid "RT Error"
-msgstr "RT Malkovich"
-
-#: html/index.html:50 html/index.html:53
-msgid "RT at a glance"
-msgstr "RT at a Malkovich"
-
-#: html/Elements/PageLayout:85
-#. ($RT::rtname)
-msgid "RT for %1"
-msgstr "RT for %1"
-
-#: NOT FOUND IN SOURCE
-msgid "RT is &copy; Copyright 1996-%1 Jesse Vincent <jesse@bestpractical.com>. It is distributed under <a href=\"http://www.gnu.org/copyleft/gpl.html\">Version 2 of the GNU General Public License.</a>"
-msgstr "RT is &copy; Malkovich 1996-%1 Malkovich <Malkovich@Malkovich.com>. It is Malkovich Malkovich <a href=\"http://www.gnu.org/copyleft/gpl.html\">Malkovich 2 of the Malkovich Malkovich Malkovich.</a>"
-
-#: html/Admin/Users/Modify.html:57 html/User/Prefs.html:47
-msgid "Real Name"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "RealName"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:628
-#. ($value)
-msgid "Reference by %1 added"
-msgstr "Malkovich by %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:668
-#. ($value)
-msgid "Reference by %1 deleted"
-msgstr "Malkovich by %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:625
-#. ($value)
-msgid "Reference to %1 added"
-msgstr "Malkovich to %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:665
-#. ($value)
-msgid "Reference to %1 deleted"
-msgstr "Malkovich to %1 Malkovich"
-
-#: html/Elements/EditLinks:129 html/Elements/EditLinks:81 html/Elements/ShowLinks:70 html/Ticket/Create.html:185 html/Ticket/Elements/BulkLinks:50
-msgid "Referred to by"
-msgstr "Malkovich to by"
-
-#: html/Elements/EditLinks:125 html/Elements/EditLinks:72 html/Elements/SelectLinkType:27 html/Elements/ShowLinks:60 html/Ticket/Create.html:184 html/Ticket/Elements/BulkLinks:46
-msgid "Refers to"
-msgstr "Malkovich to"
-
-#: NOT FOUND IN SOURCE
-msgid "Refine search"
-msgstr "Malkovich"
-
-#: html/Elements/Refresh:35
-#. ($value/60)
-msgid "Refresh this page every %1 minutes."
-msgstr "Malkovich Malkovich %1 Malkovich."
-
-#: html/Search/Bulk.html:95
-msgid "Remove AdminCc"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:91
-msgid "Remove Cc"
-msgstr "Malkovich Cc"
-
-#: html/Search/Bulk.html:87
-msgid "Remove Requestor"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/Elements/ShowTransaction:142 html/Ticket/Elements/Tabs:123
-msgid "Reply"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:87
-msgid "Reply to tickets"
-msgstr "Malkovich to Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:87
-msgid "ReplyToTicket"
-msgstr "Malkovich"
-
-#: etc/initialdata:44 lib/RT/ACE_Overlay.pm:86
-msgid "Requestor"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Requestor email address"
-msgstr "Malkovich Malkovich"
-
-#: html/SelfService/Create.html:40 html/Ticket/Create.html:55 html/Ticket/Elements/EditPeople:47 html/Ticket/Elements/ShowPeople:30
-msgid "Requestors"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/Modify.html:74
-msgid "Requests should be due in"
-msgstr "Malkovich be due in"
-
-#: html/Elements/Submit:61
-msgid "Reset"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:156 html/User/Prefs.html:63
-msgid "Residence"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/Tabs:133
-msgid "Resolve"
-msgstr "Malkovich"
-
-#: html/Ticket/Update.html:119
-#. ($TicketObj->id, $TicketObj->Subject)
-msgid "Resolve ticket #%1 (%2)"
-msgstr "Malkovich #%1 (%2)"
-
-#: etc/initialdata:323 html/Elements/SelectDateType:27 lib/RT/Ticket_Overlay.pm:1282
-msgid "Resolved"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Response to requestors"
-msgstr "Malkovich to Malkovich"
-
-#: html/Elements/ListActions:25 html/Search/Elements/NewListActions:25
-msgid "Results"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Results per page"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Users/Modify.html:99 html/User/Prefs.html:94
-msgid "Retype Password"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:612
-msgid "Right Delegated"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:302
-msgid "Right Granted"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:160
-msgid "Right Loaded"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:677 lib/RT/ACE_Overlay.pm:692
-msgid "Right could not be revoked"
-msgstr "Malkovich be Malkovich"
-
-#: html/User/Delegation.html:63
-msgid "Right not found"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:542 lib/RT/ACE_Overlay.pm:637
-msgid "Right not loaded."
-msgstr "Malkovich Malkovich."
-
-#: lib/RT/ACE_Overlay.pm:688
-msgid "Right revoked"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Rights"
-msgstr "Malkovich"
-
-#: lib/RT/Interface/Web.pm:869
-#. ($object_type)
-msgid "Rights could not be granted for %1"
-msgstr "Malkovich Malkovich be Malkovich %1"
-
-#: lib/RT/Interface/Web.pm:899
-#. ($object_type)
-msgid "Rights could not be revoked for %1"
-msgstr "Malkovich Malkovich be Malkovich %1"
-
-#: html/Admin/Global/GroupRights.html:50 html/Admin/Queues/GroupRights.html:52
-msgid "Roles"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:393
-msgid "Sat."
-msgstr "Sat."
-
-#: html/Admin/Global/Template.html:45 html/Admin/Queues/Modify.html:89 html/Admin/Queues/People.html:104 html/Admin/Users/Modify.html:198 html/SelfService/Prefs.html:36 html/Ticket/Modify.html:38 html/Ticket/ModifyAll.html:93 html/Ticket/ModifyDates.html:38 html/Ticket/ModifyLinks.html:38 html/Ticket/ModifyPeople.html:37
-msgid "Save Changes"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/PreviewScrips:79
-msgid "Save changes"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Scrip.html:48 html/Admin/Queues/Scrip.html:54
-#. ($id)
-#. ($ARGS{'id'})
-msgid "Scrip #%1"
-msgstr "Malkovich #%1"
-
-#: lib/RT/Scrip_Overlay.pm:180
-msgid "Scrip Created"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrips:85
-msgid "Scrip deleted"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/QueueTabs:45 html/Admin/Elements/SystemTabs:32 html/Admin/Global/index.html:40
-msgid "Scrips"
-msgstr "Malkovich"
-
-#: html/Admin/Queues/Scrips.html:33
-msgid "Scrips which apply to all queues"
-msgstr "Malkovich Malkovich to Malkovich"
-
-#: html/Elements/SimpleSearch:26 html/Search/Elements/DisplayOptions:73
-msgid "Search"
-msgstr "Malkovich"
-
-#: html/Approvals/Elements/PendingMyApproval:38
-msgid "Search for approvals"
-msgstr "Malkovich Malkovich"
-
-#: bin/rt-crontool:184
-msgid "Security:"
-msgstr "Malkovich:"
-
-#: lib/RT/Queue_Overlay.pm:68
-msgid "SeeQueue"
-msgstr "Malkovich"
-
-#: html/Admin/Groups/index.html:50
-msgid "Select a group"
-msgstr "Malkovich a Malkovich"
-
-#: html/Admin/Users/index.html:24 html/Admin/Users/index.html:27
-msgid "Select a user"
-msgstr "Malkovich a user"
-
-#: html/Admin/Global/CustomField.html:37 html/Admin/Global/CustomFields.html:35
-msgid "Select custom field"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/GroupTabs:51 html/User/Elements/GroupTabs:49
-msgid "Select group"
-msgstr "Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:427
-msgid "Select multiple values"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:424
-msgid "Select one value"
-msgstr "Malkovich Malkovich"
-
-#: html/Admin/Elements/QueueTabs:66
-msgid "Select queue"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Scrip.html:36 html/Admin/Global/Scrips.html:35 html/Admin/Queues/Scrip.html:39 html/Admin/Queues/Scrips.html:51
-msgid "Select scrip"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Template.html:56 html/Admin/Global/Templates.html:35 html/Admin/Queues/Template.html:54 html/Admin/Queues/Templates.html:46
-msgid "Select template"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/UserTabs:46
-msgid "Select user"
-msgstr "Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:35
-msgid "SelectMultiple"
-msgstr "Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:34
-msgid "SelectSingle"
-msgstr "Malkovich"
-
-#: etc/initialdata:121
-msgid "Send mail to all watchers"
-msgstr "Malkovich to Malkovich"
-
-#: etc/initialdata:117
-msgid "Send mail to all watchers as a \"comment\""
-msgstr "Malkovich to Malkovich as a \"Malkovich\""
-
-#: etc/initialdata:112
-msgid "Send mail to requestors and Ccs"
-msgstr "Malkovich to Malkovich and Ccs"
-
-#: etc/initialdata:107
-msgid "Send mail to requestors and Ccs as a comment"
-msgstr "Malkovich to Malkovich and Ccs as a Malkovich"
-
-#: etc/initialdata:78
-msgid "Sends a message to the requestors"
-msgstr "Malkovich a Malkovich to the Malkovich"
-
-#: etc/initialdata:125 etc/initialdata:129
-msgid "Sends mail to explicitly listed Ccs and Bccs"
-msgstr "Malkovich to Malkovich Malkovich and Bccs"
-
-#: etc/initialdata:102
-msgid "Sends mail to the administrative Ccs"
-msgstr "Malkovich to the Malkovich Malkovich"
-
-#: etc/initialdata:98
-msgid "Sends mail to the administrative Ccs as a comment"
-msgstr "Malkovich to the Malkovich Malkovich as a Malkovich"
-
-#: etc/initialdata:82 etc/initialdata:86
-msgid "Sends mail to the owner"
-msgstr "Malkovich to the Malkovich"
-
-#: lib/RT/Date.pm:419
-msgid "Sep."
-msgstr "Sep."
-
-#: html/Approvals/Elements/PendingMyApproval:43
-msgid "Show approved requests"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/Create.html:143 html/Ticket/Create.html:33
-msgid "Show basics"
-msgstr "Malkovich"
-
-#: html/Approvals/Elements/PendingMyApproval:44
-msgid "Show denied requests"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/Create.html:143 html/Ticket/Create.html:33
-msgid "Show details"
-msgstr "Malkovich"
-
-#: html/Approvals/Elements/PendingMyApproval:42
-msgid "Show pending requests"
-msgstr "Malkovich Malkovich"
-
-#: html/Approvals/Elements/PendingMyApproval:45
-msgid "Show requests awaiting other approvals"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Show ticket private commentary"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Show ticket summaries"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:70
-msgid "ShowACL"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:79
-msgid "ShowScrips"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:76
-msgid "ShowTemplate"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:80
-msgid "ShowTicket"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:81
-msgid "ShowTicketComments"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:84
-msgid "Sign up as a ticket Requestor or ticket or queue Cc"
-msgstr "Sign up as a Malkovich Malkovich or Malkovich or Malkovich Cc"
-
-#: lib/RT/Queue_Overlay.pm:85
-msgid "Sign up as a ticket or queue AdminCc"
-msgstr "Sign up as a Malkovich or Malkovich"
-
-#: html/Admin/Users/Modify.html:188 html/User/Prefs.html:145
-msgid "Signature"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectSingleOrMultiple:25
-msgid "Single"
-msgstr "Malkovich"
-
-#: html/Elements/Header:62
-msgid "Skip Menu"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/AddCustomFieldValue:27
-msgid "Sort"
-msgstr "Sort"
-
-#: NOT FOUND IN SOURCE
-msgid "Sort results by"
-msgstr "Malkovich by"
-
-#: NOT FOUND IN SOURCE
-msgid "Squelched message recipients"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/Admin/Elements/EditScrip:65
-msgid "Stage"
-msgstr "Malkovich"
-
-#: html/Elements/SelectDateType:26 html/Ticket/Elements/EditDates:31 html/Ticket/Elements/ShowDates:35
-msgid "Started"
-msgstr "Malkovich"
-
-#: html/Elements/SelectDateType:30 html/Ticket/Create.html:165 html/Ticket/Elements/EditDates:26 html/Ticket/Elements/ShowDates:31
-msgid "Starts"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:135 html/User/Prefs.html:123
-msgid "State"
-msgstr "Malkovich"
-
-#: html/Search/Elements/PickBasics:77 html/SelfService/Elements/MyRequests:28 html/SelfService/Update.html:30 html/Ticket/Create.html:41 html/Ticket/Elements/EditBasics:31 html/Ticket/Elements/ShowBasics:30 html/Ticket/Update.html:37 lib/RT/Ticket_Overlay.pm:1276 lib/RT/Tickets_Overlay.pm:970
-msgid "Status"
-msgstr "Malkovich"
-
-#: etc/initialdata:309
-msgid "Status Change"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:505
-#. ($self->loc($self->OldValue), $self->loc($self->NewValue))
-msgid "Status changed from %1 to %2"
-msgstr "Malkovich Malkovich %1 to %2"
-
-#: html/Ticket/Elements/Tabs:148
-msgid "Steal"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:94
-msgid "Steal tickets"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:94
-msgid "StealTicket"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:581
-#. ($Old->Name)
-msgid "Stolen from %1 "
-msgstr "Malkovich %1 "
-
-#: html/Elements/QuickCreate:7 html/Elements/SelectAttachmentField:25 html/Search/Bulk.html:133 html/SelfService/Create.html:56 html/SelfService/Elements/MyRequests:27 html/SelfService/Update.html:31 html/Ticket/Create.html:83 html/Ticket/Elements/EditBasics:26 html/Ticket/ModifyAll.html:78 html/Ticket/Update.html:58 lib/RT/Ticket_Overlay.pm:1272 lib/RT/Tickets_Overlay.pm:1049
-msgid "Subject"
-msgstr "Malkovich"
-
-#: docs/design_docs/string-extraction-guide.txt:89 lib/RT/StyleGuide.pod:795 lib/RT/Transaction_Overlay.pm:603
-#. ($self->Data)
-msgid "Subject changed to %1"
-msgstr "Malkovich to %1"
-
-#: html/Elements/Submit:58
-msgid "Submit"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:749
-msgid "Succeeded"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:394
-msgid "Sun."
-msgstr "Sun."
-
-#: lib/RT/System.pm:53
-msgid "SuperUser"
-msgstr "Malkovich"
-
-#: html/User/Elements/DelegateRights:76
-msgid "System"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectRights:81 lib/RT/ACE_Overlay.pm:566 lib/RT/Interface/Web.pm:868 lib/RT/Interface/Web.pm:898
-msgid "System Error"
-msgstr "Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:615
-msgid "System error. Right not delegated."
-msgstr "Malkovich. Malkovich Malkovich."
-
-#: lib/RT/ACE_Overlay.pm:145 lib/RT/ACE_Overlay.pm:222 lib/RT/ACE_Overlay.pm:305 lib/RT/ACE_Overlay.pm:897
-msgid "System error. Right not granted."
-msgstr "Malkovich. Malkovich Malkovich."
-
-#: html/Admin/Global/GroupRights.html:34 html/Admin/Groups/GroupRights.html:36 html/Admin/Queues/GroupRights.html:35
-msgid "System groups"
-msgstr "Malkovich"
-
-#: etc/initialdata:41 etc/initialdata:47 etc/initialdata:53
-msgid "SystemRolegroup for internal use"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/CurrentUser.pm:334
-msgid "TEST_STRING"
-msgstr "TEST_MALKOVICH"
-
-#: html/Elements/MyRequests:27 html/Ticket/Elements/Tabs:144
-msgid "Take"
-msgstr "Take"
-
-#: lib/RT/Queue_Overlay.pm:92
-msgid "Take tickets"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:92
-msgid "TakeTicket"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:566
-msgid "Taken"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditScrip:57 html/Tools/Offline.html:56
-msgid "Template"
-msgstr "Malkovich"
-
-#: html/Admin/Global/Template.html:90 html/Admin/Queues/Template.html:89
-#. ($TemplateObj->Id())
-msgid "Template #%1"
-msgstr "Malkovich #%1"
-
-#: html/Admin/Elements/EditTemplates:88
-msgid "Template deleted"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Scrip_Overlay.pm:156
-msgid "Template not found"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Template_Overlay.pm:348
-msgid "Template parsed"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/QueueTabs:48 html/Admin/Elements/SystemTabs:35 html/Admin/Global/index.html:44
-msgid "Templates"
-msgstr "Malkovich"
-
-#: lib/RT/Record.pm:740
-msgid "That is already the current value"
-msgstr "That is Malkovich the Malkovich"
-
-#: lib/RT/CustomField_Overlay.pm:248
-msgid "That is not a value for this custom field"
-msgstr "That is not a Malkovich Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2086
-msgid "That is the same value"
-msgstr "That is the Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:287 lib/RT/ACE_Overlay.pm:596
-msgid "That principal already has that right"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:674
-#. ($args{'Type'})
-msgid "That principal is already a %1 for this queue"
-msgstr "Malkovich is Malkovich a %1 Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1527
-#. ($self->loc($args{'Type'}))
-msgid "That principal is already a %1 for this ticket"
-msgstr "Malkovich is Malkovich a %1 Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:773
-#. ($args{'Type'})
-msgid "That principal is not a %1 for this queue"
-msgstr "That Malkovich is not a %1 Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2082
-msgid "That queue does not exist"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3152
-msgid "That ticket has unresolved dependencies"
-msgstr "Malkovich Malkovich Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2956
-msgid "That user already owns that ticket"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2928
-msgid "That user does not exist"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:355
-msgid "That user is already privileged"
-msgstr "Malkovich is Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:376
-msgid "That user is already unprivileged"
-msgstr "Malkovich is Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:368
-msgid "That user is now privileged"
-msgstr "Malkovich is Malkovich"
-
-#: lib/RT/User_Overlay.pm:389
-msgid "That user is now unprivileged"
-msgstr "Malkovich is Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:2949
-msgid "That user may not own tickets in that queue"
-msgstr "Malkovich Malkovich Malkovich in Malkovich"
-
-#: lib/RT/Link_Overlay.pm:200
-msgid "That's not a numerical id"
-msgstr "That's not a Malkovich id"
-
-#: html/SelfService/Display.html:31 html/Ticket/Create.html:149 html/Ticket/Elements/ShowSummary:27
-msgid "The Basics"
-msgstr "The Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:87
-msgid "The CC of a ticket"
-msgstr "The CC of a Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:88
-msgid "The administrative CC of a ticket"
-msgstr "The Malkovich CC of a Malkovich"
-
-#: bin/rt-crontool:194
-msgid "The following command will find all active tickets in the queue 'general' and set their priority to 99 if they haven't been touched in 4 hours:"
-msgstr "The Malkovich Malkovich Malkovich Malkovich Malkovich in the Malkovich 'Malkovich' and Malkovich Malkovich to 99 if they haven't Malkovich in 4 Malkovich:"
-
-#: NOT FOUND IN SOURCE
-msgid "The following commands were not proccessed:\\n\\n"
-msgstr "The Malkovich Malkovich Malkovich Malkovich:\\n\\n"
-
-#: lib/RT/Record.pm:743
-msgid "The new value has been set."
-msgstr "The Malkovich Malkovich."
-
-#: lib/RT/ACE_Overlay.pm:85
-msgid "The owner of a ticket"
-msgstr "The Malkovich of a Malkovich"
-
-#: lib/RT/ACE_Overlay.pm:86
-msgid "The requestor of a ticket"
-msgstr "The Malkovich of a Malkovich"
-
-#: html/Admin/Elements/EditUserComments:25
-msgid "These comments aren't generally visible to the user"
-msgstr "Malkovich aren't Malkovich Malkovich to the user"
-
-#: bin/rt-crontool:185
-msgid "This tool allows the user to run arbitrary perl modules from within RT."
-msgstr "Malkovich Malkovich the user to Malkovich Malkovich Malkovich Malkovich RT."
-
-#: lib/RT/Transaction_Overlay.pm:226
-msgid "This transaction appears to have no content"
-msgstr "Malkovich Malkovich to have no Malkovich"
-
-#: html/Ticket/Elements/ShowRequestor:48
-#. ($rows)
-msgid "This user's %1 highest priority tickets"
-msgstr "Malkovich's %1 Malkovich Malkovich"
-
-#: lib/RT/Date.pm:391
-msgid "Thu."
-msgstr "Thu."
-
-#: html/Ticket/ModifyAll.html:24 html/Ticket/ModifyAll.html:28
-#. ($Ticket->Id, $Ticket->Subject)
-msgid "Ticket #%1 Jumbo update: %2"
-msgstr "Malkovich #%1 Malkovich: %2"
-
-#: html/Approvals/Elements/ShowDependency:45
-#. ($link->BaseObj->Id, $link->BaseObj->Subject)
-msgid "Ticket #%1: %2"
-msgstr "Malkovich #%1: %2"
-
-#: lib/RT/Ticket_Overlay.pm:696 lib/RT/Ticket_Overlay.pm:720
-#. ($self->Id, $QueueObj->Name)
-msgid "Ticket %1 created in queue '%2'"
-msgstr "Malkovich %1 Malkovich in Malkovich '%2'"
-
-#: NOT FOUND IN SOURCE
-msgid "Ticket %1 loaded\\n"
-msgstr "Malkovich %1 Malkovich\\n"
-
-#: html/Search/Bulk.html:216
-#. ($Ticket->Id,$_)
-msgid "Ticket %1: %2"
-msgstr "Malkovich %1: %2"
-
-#: html/Ticket/History.html:24 html/Ticket/History.html:27
-#. ($Ticket->Id, $Ticket->Subject)
-msgid "Ticket History # %1 %2"
-msgstr "Malkovich # %1 %2"
-
-#: etc/initialdata:324
-msgid "Ticket Resolved"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Ticket attachment"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1228
-msgid "Ticket content"
-msgstr "Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1274
-msgid "Ticket content type"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:565 lib/RT/Ticket_Overlay.pm:579 lib/RT/Ticket_Overlay.pm:590 lib/RT/Ticket_Overlay.pm:707
-msgid "Ticket could not be created due to an internal error"
-msgstr "Malkovich Malkovich be Malkovich to a Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:497
-msgid "Ticket created"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:502
-msgid "Ticket deleted"
-msgstr "Malkovich"
-
-#: etc/initialdata:310
-msgid "Ticket status changed"
-msgstr "Malkovich Malkovich"
-
-#: html/Elements/Tabs:46
-msgid "Tickets"
-msgstr "Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1452
-#. ($self->loc($args{'TYPE'}), ($args{'BASE'} || $args{'TICKET'}))
-msgid "Tickets %1 %2"
-msgstr "Malkovich %1 %2"
-
-#: lib/RT/Tickets_Overlay.pm:1410
-#. ($self->loc($args{'TYPE'}), ($args{'TARGET'} || $args{'TICKET'}))
-msgid "Tickets %1 by %2"
-msgstr "Malkovich %1 by %2"
-
-#: NOT FOUND IN SOURCE
-msgid "Tickets from %1"
-msgstr "Malkovich %1"
-
-#: html/Approvals/Elements/ShowDependency:26
-msgid "Tickets which depend on this approval:"
-msgstr "Malkovich Malkovich on Malkovich:"
-
-#: html/Search/Elements/PickBasics:70 html/Ticket/Create.html:156 html/Ticket/Elements/EditBasics:47
-msgid "Time Left"
-msgstr "Malkovich"
-
-#: html/Search/Elements/PickBasics:68 html/Ticket/Create.html:155 html/Ticket/Elements/EditBasics:43
-msgid "Time Worked"
-msgstr "Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1201
-msgid "Time left"
-msgstr "Malkovich"
-
-#: html/Elements/Footer:44
-msgid "Time to display"
-msgstr "Time to Malkovich"
-
-#: lib/RT/Tickets_Overlay.pm:1177
-msgid "Time worked"
-msgstr "Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:1277
-msgid "TimeWorked"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "To generate a diff of this commit:"
-msgstr "To Malkovich a diff of Malkovich:"
-
-#: NOT FOUND IN SOURCE
-msgid "To generate a diff of this commit:\\n"
-msgstr "To Malkovich a diff of Malkovich:\\n"
-
-#: lib/RT/Ticket_Overlay.pm:1280
-msgid "Told"
-msgstr "Told"
-
-#: etc/initialdata:252
-msgid "Transaction"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:705
-#. ($self->Data)
-msgid "Transaction %1 purged"
-msgstr "Malkovich %1 Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:136
-msgid "Transaction Created"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:92
-msgid "Transaction->Create couldn't, as you didn't specify a ticket id"
-msgstr "Malkovich->Malkovich couldn't, as you didn't Malkovich a Malkovich id"
-
-#: lib/RT/Transaction_Overlay.pm:760
-msgid "Transactions are immutable"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Date.pm:389
-msgid "Tue."
-msgstr "Tue."
-
-#: html/Admin/Elements/EditCustomField:43 html/Ticket/Elements/AddWatchers:32 html/Ticket/Elements/AddWatchers:43 html/Ticket/Elements/AddWatchers:53 lib/RT/Ticket_Overlay.pm:1278 lib/RT/Tickets_Overlay.pm:1021
-msgid "Type"
-msgstr "Type"
-
-#: lib/RT/ScripCondition_Overlay.pm:103
-msgid "Unimplemented"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:67
-msgid "Unix login"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "UnixUsername"
-msgstr "Malkovich"
-
-#: lib/RT/Attachment_Overlay.pm:233 lib/RT/Attachment_Overlay.pm:265
-#. ($self->ContentEncoding)
-msgid "Unknown ContentEncoding %1"
-msgstr "Malkovich Malkovich %1"
-
-#: html/Elements/SelectResultsPerPage:36
-msgid "Unlimited"
-msgstr "Malkovich"
-
-#: etc/initialdata:32
-msgid "Unprivileged"
-msgstr "Malkovich"
-
-#: lib/RT/Transaction_Overlay.pm:562
-msgid "Untaken"
-msgstr "Malkovich"
-
-#: html/Search/Bulk.html:32
-msgid "Update"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Update ID"
-msgstr "Malkovich ID"
-
-#: html/Search/Bulk.html:127 html/Ticket/ModifyAll.html:65 html/Ticket/Update.html:48
-msgid "Update Type"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Update all these tickets at once"
-msgstr "Malkovich Malkovich at once"
-
-#: NOT FOUND IN SOURCE
-msgid "Update email"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Update name"
-msgstr "Malkovich"
-
-#: lib/RT/Action/CreateTickets.pm:655 lib/RT/Interface/Web.pm:479
-msgid "Update not recorded."
-msgstr "Malkovich Malkovich."
-
-#: html/Search/Bulk.html:78
-msgid "Update selected tickets"
-msgstr "Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "Update signature"
-msgstr "Malkovich Malkovich"
-
-#: html/Ticket/ModifyAll.html:62
-msgid "Update ticket"
-msgstr "Malkovich"
-
-#: html/SelfService/Update.html:24 html/SelfService/Update.html:63
-#. ($Ticket->id)
-msgid "Update ticket #%1"
-msgstr "Malkovich #%1"
-
-#: html/Ticket/Update.html:121
-#. ($TicketObj->id, $TicketObj->Subject)
-msgid "Update ticket #%1 (%2)"
-msgstr "Malkovich #%1 (%2)"
-
-#: lib/RT/Action/CreateTickets.pm:653 lib/RT/Interface/Web.pm:477
-msgid "Update type was neither correspondence nor comment."
-msgstr "Malkovich Malkovich Malkovich Malkovich Malkovich."
-
-#: html/Elements/SelectDateType:32 html/Ticket/Elements/ShowDates:51 lib/RT/Ticket_Overlay.pm:1281
-msgid "Updated"
-msgstr "Malkovich"
-
-#: etc/initialdata:132 etc/initialdata:206
-msgid "User Defined"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "User ID"
-msgstr "User ID"
-
-#: html/Elements/SelectUsers:25
-msgid "User Id"
-msgstr "User Id"
-
-#: html/Admin/Elements/GroupTabs:46 html/Admin/Elements/QueueTabs:59 html/Admin/Elements/SystemTabs:46 html/Admin/Global/index.html:58
-msgid "User Rights"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:252
-#. ($msg)
-msgid "User could not be created: %1"
-msgstr "Malkovich be Malkovich: %1"
-
-#: lib/RT/User_Overlay.pm:296
-msgid "User created"
-msgstr "Malkovich"
-
-#: html/Admin/Global/GroupRights.html:66 html/Admin/Groups/GroupRights.html:53 html/Admin/Queues/GroupRights.html:68
-msgid "User defined groups"
-msgstr "Malkovich Malkovich"
-
-#: lib/RT/User_Overlay.pm:558 lib/RT/User_Overlay.pm:575
-msgid "User loaded"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "User view"
-msgstr "Malkovich"
-
-#: html/Admin/Users/Modify.html:47 html/Elements/Login:51 html/Ticket/Elements/AddWatchers:34
-msgid "Username"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/SelectNewGroupMembers:25 html/Admin/Elements/Tabs:31 html/Admin/Groups/Members.html:54 html/Admin/Queues/People.html:67 html/Admin/index.html:28 html/User/Groups/Members.html:57
-msgid "Users"
-msgstr "Malkovich"
-
-#: html/Admin/Users/index.html:64
-msgid "Users matching search criteria"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: lib/RT/Tickets_Overlay_SQL.pm:494
-msgid "Valid Query"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/EditCustomField:56
-msgid "Values"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:84
-msgid "Watch"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:85
-msgid "WatchAsAdminCc"
-msgstr "Malkovich"
-
-#: html/Admin/Elements/QueueTabs:41
-msgid "Watchers"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "WebEncoding"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:390
-msgid "Wed."
-msgstr "Wed."
-
-#: etc/initialdata:521
-msgid "When a ticket has been approved by all approvers, add correspondence to the original ticket"
-msgstr "When a Malkovich Malkovich by Malkovich, Malkovich Malkovich to the Malkovich"
-
-#: etc/initialdata:485
-msgid "When a ticket has been approved by any approver, add correspondence to the original ticket"
-msgstr "When a Malkovich Malkovich by Malkovich, Malkovich Malkovich to the Malkovich"
-
-#: etc/initialdata:146
-msgid "When a ticket is created"
-msgstr "When a Malkovich is Malkovich"
-
-#: etc/initialdata:418
-msgid "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval"
-msgstr "When a Malkovich is Malkovich, Malkovich the Malkovich and Malkovich of the Malkovich Malkovich Malkovich"
-
-#: etc/initialdata:151
-msgid "When anything happens"
-msgstr "Malkovich Malkovich"
-
-#: etc/initialdata:199
-msgid "Whenever a ticket is resolved"
-msgstr "Malkovich a Malkovich is Malkovich"
-
-#: etc/initialdata:185
-msgid "Whenever a ticket's owner changes"
-msgstr "Malkovich a Malkovich's Malkovich"
-
-#: etc/initialdata:193
-msgid "Whenever a ticket's queue changes"
-msgstr "Malkovich a Malkovich's Malkovich"
-
-#: etc/initialdata:170
-msgid "Whenever a ticket's status changes"
-msgstr "Malkovich a Malkovich's Malkovich"
-
-#: etc/initialdata:207
-msgid "Whenever a user-defined condition occurs"
-msgstr "Malkovich a user-Malkovich Malkovich"
-
-#: etc/initialdata:164
-msgid "Whenever comments come in"
-msgstr "Malkovich Malkovich in"
-
-#: etc/initialdata:157
-msgid "Whenever correspondence comes in"
-msgstr "Malkovich Malkovich Malkovich in"
-
-#: html/Admin/Users/Modify.html:161 html/User/Prefs.html:67
-msgid "Work"
-msgstr "Work"
-
-#: NOT FOUND IN SOURCE
-msgid "WorkPhone"
-msgstr "Malkovich"
-
-#: html/Ticket/Elements/ShowBasics:41 html/Ticket/Update.html:42
-msgid "Worked"
-msgstr "Malkovich"
-
-#: html/autohandler:150
-msgid "XXX CHANGEME You are not an authorized user"
-msgstr "MALKOVICH Malkovich a Malkovich"
-
-#: lib/RT/Ticket_Overlay.pm:3059
-msgid "You already own this ticket"
-msgstr "Malkovich Malkovich Malkovich"
-
-#: html/autohandler:142
-msgid "You are not an authorized user"
-msgstr "Malkovich a Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "You can access it with the Download button on the right."
-msgstr "Malkovich it with the Malkovich on the Malkovich."
-
-#: lib/RT/Ticket_Overlay.pm:2941
-msgid "You can only reassign tickets that you own or that are unowned"
-msgstr "Malkovich Malkovich Malkovich Malkovich or Malkovich Malkovich"
-
-#: docs/design_docs/string-extraction-guide.txt:47 lib/RT/StyleGuide.pod:760
-#. ($num, $queue)
-msgid "You found %1 tickets in queue %2"
-msgstr "Malkovich %1 Malkovich in Malkovich %2"
-
-#: html/NoAuth/Logout.html:30
-msgid "You have been logged out of RT."
-msgstr "Malkovich Malkovich of RT."
-
-#: html/SelfService/Display.html:79
-msgid "You have no permission to create tickets in that queue."
-msgstr "Malkovich no Malkovich to Malkovich in that Malkovich."
-
-#: lib/RT/Ticket_Overlay.pm:2095
-msgid "You may not create requests in that queue."
-msgstr "Malkovich Malkovich Malkovich in Malkovich."
-
-#: html/NoAuth/Logout.html:34
-msgid "You're welcome to login again"
-msgstr "You're Malkovich to Malkovich"
-
-#: etc/initialdata:502
-msgid "Your request has been approved by %1. Other approvals may still be pending."
-msgstr "Malkovich Malkovich Malkovich by %1. Malkovich Malkovich be Malkovich."
-
-#: etc/initialdata:540
-msgid "Your request has been approved."
-msgstr "Malkovich Malkovich Malkovich."
-
-#: etc/initialdata:445
-msgid "Your request was rejected."
-msgstr "Malkovich Malkovich."
-
-#: html/autohandler:177
-msgid "Your username or password is incorrect"
-msgstr "Malkovich or Malkovich is Malkovich"
-
-#: html/Admin/Users/Modify.html:141 html/User/Prefs.html:127
-msgid "Zip"
-msgstr "Zip"
-
-#: html/User/Elements/DelegateRights:58
-#. ($right->PrincipalObj->Object->SelfDescription)
-msgid "as granted to %1"
-msgstr "as Malkovich to %1"
-
-#: html/SelfService/Closed.html:27
-msgid "closed"
-msgstr "Malkovich"
-
-#: html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectMatch:33
-msgid "contains"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "content"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "content-type"
-msgstr "Malkovich-type"
-
-#: html/Admin/Queues/Modify.html:76 lib/RT/Date.pm:319
-msgid "days"
-msgstr "days"
-
-#: lib/RT/Queue_Overlay.pm:64
-msgid "deleted"
-msgstr "Malkovich"
-
-#: html/Search/Elements/PickBasics:33
-msgid "does not match"
-msgstr "Malkovich"
-
-#: html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectMatch:34
-msgid "doesn't contain"
-msgstr "doesn't Malkovich"
-
-#: html/Elements/SelectEqualityOperator:37
-msgid "equal to"
-msgstr "Malkovich to"
-
-#: NOT FOUND IN SOURCE
-msgid "filename"
-msgstr "Malkovich"
-
-#: html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectEqualityOperator:37
-msgid "greater than"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:196
-#. ($self->Name)
-msgid "group '%1'"
-msgstr "Malkovich '%1'"
-
-#: lib/RT/Date.pm:315
-msgid "hours"
-msgstr "Malkovich"
-
-#: html/Elements/SelectBoolean:31 html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectMatch:35 html/Search/Elements/PickBasics:49 html/Search/Elements/PickBasics:80 html/Search/Elements/PickBasics:97 html/Search/Elements/PickCFs:37
-msgid "is"
-msgstr "is"
-
-#: html/Elements/SelectBoolean:35 html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectMatch:36 html/Search/Elements/PickBasics:50 html/Search/Elements/PickBasics:81 html/Search/Elements/PickBasics:98 html/Search/Elements/PickCFs:38
-msgid "isn't"
-msgstr "isn't"
-
-#: html/Elements/SelectCustomFieldOperator:37 html/Elements/SelectEqualityOperator:37
-msgid "less than"
-msgstr "Malkovich"
-
-#: html/Search/Elements/PickBasics:32
-msgid "matches"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:311
-msgid "min"
-msgstr "min"
-
-#: html/Ticket/Update.html:42
-msgid "minutes"
-msgstr "Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "modifications\\n\\n"
-msgstr "Malkovich\\n\\n"
-
-#: lib/RT/Date.pm:327
-msgid "months"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:59
-msgid "new"
-msgstr "new"
-
-#: html/Admin/Elements/EditCustomFields:42
-msgid "no name"
-msgstr "no name"
-
-#: html/Admin/Elements/EditScrips:42
-msgid "no value"
-msgstr "no Malkovich"
-
-#: html/Admin/Elements/EditQueueWatchers:26 html/Ticket/Elements/EditWatchers:27
-msgid "none"
-msgstr "none"
-
-#: html/Elements/SelectEqualityOperator:37
-msgid "not equal to"
-msgstr "Malkovich to"
-
-#: html/SelfService/Elements/MyRequests:61 lib/RT/Queue_Overlay.pm:60
-msgid "open"
-msgstr "open"
-
-#: lib/RT/Group_Overlay.pm:201
-#. ($self->Name, $user->Name)
-msgid "personal group '%1' for user '%2'"
-msgstr "Malkovich '%1' Malkovich '%2'"
-
-#: lib/RT/Group_Overlay.pm:209
-#. ($queue->Name, $self->Type)
-msgid "queue %1 %2"
-msgstr "Malkovich %1 %2"
-
-#: lib/RT/Queue_Overlay.pm:63
-msgid "rejected"
-msgstr "Malkovich"
-
-#: lib/RT/Queue_Overlay.pm:62
-msgid "resolved"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:307
-msgid "sec"
-msgstr "sec"
-
-#: lib/RT/Queue_Overlay.pm:61
-msgid "stalled"
-msgstr "Malkovich"
-
-#: lib/RT/Group_Overlay.pm:204
-#. ($self->Type)
-msgid "system %1"
-msgstr "Malkovich %1"
-
-#: lib/RT/Group_Overlay.pm:215
-#. ($self->Type)
-msgid "system group '%1'"
-msgstr "Malkovich '%1'"
-
-#: html/Elements/Error:42 html/SelfService/Error.html:41
-msgid "the calling component did not specify why"
-msgstr "the Malkovich Malkovich Malkovich Malkovich"
-
-#: NOT FOUND IN SOURCE
-msgid "ticket #%1"
-msgstr "Malkovich #%1"
-
-#: lib/RT/Group_Overlay.pm:212
-#. ($self->Instance, $self->Type)
-msgid "ticket #%1 %2"
-msgstr "Malkovich #%1 %2"
-
-#: lib/RT/Group_Overlay.pm:218
-#. ($self->Id)
-msgid "undescribed group %1"
-msgstr "Malkovich Malkovich %1"
-
-#: lib/RT/Group_Overlay.pm:193
-#. ($user->Object->Name)
-msgid "user %1"
-msgstr "user %1"
-
-#: lib/RT/Date.pm:323
-msgid "weeks"
-msgstr "Malkovich"
-
-#: lib/RT/Date.pm:331
-msgid "years"
-msgstr "Malkovich"
-
diff --git a/rt/lib/RT/Interface/CLI.pm b/rt/lib/RT/Interface/CLI.pm
index 533150415..ec0e877b4 100644
--- a/rt/lib/RT/Interface/CLI.pm
+++ b/rt/lib/RT/Interface/CLI.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
use strict;
use RT;
@@ -57,7 +33,7 @@ BEGIN {
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
- $VERSION = do { my @r = (q$Revision: 1.1.1.7 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker
+ $VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker
@ISA = qw(Exporter);
diff --git a/rt/lib/RT/Interface/Email.pm b/rt/lib/RT/Interface/Email.pm
index 14ae2a058..7eec0502f 100755
--- a/rt/lib/RT/Interface/Email.pm
+++ b/rt/lib/RT/Interface/Email.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,70 +14,50 @@
# 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:
+# 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.
#
-# (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 }}}
+# END LICENSE BLOCK
package RT::Interface::Email;
use strict;
use Mail::Address;
use MIME::Entity;
use RT::EmailParser;
-use File::Temp;
-use UNIVERSAL::require;
+
BEGIN {
use Exporter ();
- use vars qw ( @ISA @EXPORT_OK);
-
+ use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+
# set the version for version checking
- our $VERSION = 2.0;
-
- @ISA = qw(Exporter);
-
+ $VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker
+
+ @ISA = qw(Exporter);
+
# your exported package globals go here,
# as well as any optionally exported functions
- @EXPORT_OK = qw(
- &CreateUser
- &GetMessageContent
- &CheckForLoops
- &CheckForSuspiciousSender
- &CheckForAutoGenerated
- &CheckForBounce
- &MailError
- &ParseCcAddressesFromHead
- &ParseSenderAddressFromHead
- &ParseErrorsToAddressFromHead
- &ParseAddressFromHeader
- &Gateway);
+ @EXPORT_OK = qw(
+ &CreateUser
+ &GetMessageContent
+ &CheckForLoops
+ &CheckForSuspiciousSender
+ &CheckForAutoGenerated
+ &MailError
+ &ParseCcAddressesFromHead
+ &ParseSenderAddressFromHead
+ &ParseErrorsToAddressFromHead
+ &ParseAddressFromHeader
+ &Gateway);
}
=head1 NAME
- RT::Interface::Email - helper functions for parsing email sent to RT
+ RT::Interface::CLI - helper functions for creating a commandline RT interface
=head1 SYNOPSIS
@@ -106,18 +80,19 @@ ok(require RT::Interface::Email);
=cut
-# {{{ sub CheckForLoops
-sub CheckForLoops {
- my $head = shift;
+# {{{ sub CheckForLoops
+sub CheckForLoops {
+ my $head = shift;
+
#If this instance of RT sent it our, we don't want to take it in
my $RTLoop = $head->get("X-RT-Loop-Prevention") || "";
- chomp($RTLoop); #remove that newline
- if ( $RTLoop eq "$RT::rtname" ) {
- return (1);
+ chomp ($RTLoop); #remove that newline
+ if ($RTLoop eq "$RT::rtname") {
+ return (1);
}
-
+
# TODO: We might not trap the case where RT instance A sends a mail
# to RT instance B which sends a mail to ...
return (undef);
@@ -131,24 +106,23 @@ sub CheckForSuspiciousSender {
my $head = shift;
#if it's from a postmaster or mailer daemon, it's likely a bounce.
-
+
#TODO: better algorithms needed here - there is no standards for
#bounces, so it's very difficult to separate them from anything
#else. At the other hand, the Return-To address is only ment to be
#used as an error channel, we might want to put up a separate
#Return-To address which is treated differently.
-
+
#TODO: search through the whole email and find the right Ticket ID.
- my ( $From, $junk ) = ParseSenderAddressFromHead($head);
-
- if ( ( $From =~ /^mailer-daemon\@/i )
- or ( $From =~ /^postmaster\@/i ) )
- {
- return (1);
-
+ my ($From, $junk) = ParseSenderAddressFromHead($head);
+
+ if (($From =~ /^mailer-daemon/i) or
+ ($From =~ /^postmaster/i)){
+ return (1);
+
}
-
+
return (undef);
}
@@ -158,126 +132,57 @@ sub CheckForSuspiciousSender {
# {{{ sub CheckForAutoGenerated
sub CheckForAutoGenerated {
my $head = shift;
-
- my $Precedence = $head->get("Precedence") || "";
- if ( $Precedence =~ /^(bulk|junk)/i ) {
- return (1);
- }
-
- # First Class mailer uses this as a clue.
- my $FCJunk = $head->get("X-FC-Machinegenerated") || "";
- if ( $FCJunk =~ /^true/i ) {
- return (1);
+
+ my $Precedence = $head->get("Precedence") || "" ;
+ if ($Precedence =~ /^(bulk|junk)/i) {
+ return (1);
}
-
- return (0);
-}
-
-# }}}
-
-# {{{ sub CheckForBounce
-sub CheckForBounce {
- my $head = shift;
-
- my $ReturnPath = $head->get("Return-path") || "";
- return ( $ReturnPath =~ /<>/ );
-}
-
-# }}}
-
-# {{{ IsRTAddress
-
-=head2 IsRTAddress ADDRESS
-
-Takes a single parameter, an email address.
-Returns true if that address matches the $RTAddressRegexp.
-Returns false, otherwise.
-
-=cut
-
-sub IsRTAddress {
- my $address = shift || '';
-
- # Example: the following rule would tell RT not to Cc
- # "tickets@noc.example.com"
- if ( defined($RT::RTAddressRegexp)
- && $address =~ /$RT::RTAddressRegexp/i )
- {
- return (1);
- } else {
- return (undef);
+ else {
+ return (0);
}
}
# }}}
-# {{{ CullRTAddresses
-
-=head2 CullRTAddresses ARRAY
-
-Takes a single argument, an array of email addresses.
-Returns the same array with any IsRTAddress()es weeded out.
-=cut
-
-sub CullRTAddresses {
- return grep !IsRTAddress($_), @_;
-}
-
-# }}}
-
-# {{{ sub MailError
+# {{{ sub MailError
sub MailError {
- my %args = (
- To => $RT::OwnerEmail,
- Bcc => undef,
- From => $RT::CorrespondAddress,
- Subject => 'There has been an error',
- Explanation => 'Unexplained error',
- MIMEObj => undef,
- Attach => undef,
- LogLevel => 'crit',
- @_
- );
-
- $RT::Logger->log(
- level => $args{'LogLevel'},
- message => $args{'Explanation'}
- );
- # the colons are necessary to make ->build include non-standard headers
- my $entity = MIME::Entity->build(
- Type => "multipart/mixed",
- From => $args{'From'},
- Bcc => $args{'Bcc'},
- To => $args{'To'},
- Subject => $args{'Subject'},
- 'Precedence:' => 'bulk',
- 'X-RT-Loop-Prevention:' => $RT::rtname,
- 'In-Reply-To:' => $args{'MIMEObj'} ? $args{'MIMEObj'}->head->get('Message-Id') : undef
- );
-
- $entity->attach( Data => $args{'Explanation'} . "\n" );
-
+ my %args = (To => $RT::OwnerEmail,
+ Bcc => undef,
+ From => $RT::CorrespondAddress,
+ Subject => 'There has been an error',
+ Explanation => 'Unexplained error',
+ MIMEObj => undef,
+ LogLevel => 'crit',
+ @_);
+
+
+ $RT::Logger->log(level => $args{'LogLevel'},
+ message => $args{'Explanation'}
+ );
+ my $entity = MIME::Entity->build( Type =>"multipart/mixed",
+ From => $args{'From'},
+ Bcc => $args{'Bcc'},
+ To => $args{'To'},
+ Subject => $args{'Subject'},
+ 'X-RT-Loop-Prevention' => $RT::rtname,
+ );
+
+ $entity->attach( Data => $args{'Explanation'}."\n");
+
my $mimeobj = $args{'MIMEObj'};
if ($mimeobj) {
$mimeobj->sync_headers();
$entity->add_part($mimeobj);
}
-
- if ( $args{'Attach'} ) {
- $entity->attach( Data => $args{'Attach'}, Type => 'message/rfc822' );
-
- }
-
- if ( $RT::MailCommand eq 'sendmailpipe' ) {
- open( MAIL,
- "|$RT::SendmailPath $RT::SendmailBounceArguments $RT::SendmailArguments"
- )
- || return (0);
+
+ if ($RT::MailCommand eq 'sendmailpipe') {
+ open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
print MAIL $entity->as_string;
close(MAIL);
- } else {
- $entity->send( $RT::MailCommand, $RT::MailParams );
+ }
+ else {
+ $entity->send($RT::MailCommand, $RT::MailParams);
}
}
@@ -286,38 +191,43 @@ sub MailError {
# {{{ Create User
sub CreateUser {
- my ( $Username, $Address, $Name, $ErrorsTo, $entity ) = @_;
+ my ($Username, $Address, $Name, $ErrorsTo, $entity) = @_;
my $NewUser = RT::User->new($RT::SystemUser);
- my ( $Val, $Message ) = $NewUser->Create(
- Name => ( $Username || $Address ),
- EmailAddress => $Address,
- RealName => $Name,
- Password => undef,
- Privileged => 0,
- Comments => 'Autocreated on ticket submission'
- );
-
+ # This data is tainted by some Very Broken mailers.
+ # (Sometimes they send raw ISO 8859-1 data here. fear that.
+ require Encode;
+ $Username = Encode::encode(utf8 => $Username, Encode::FB_PERLQQ()) if defined $Username;
+ $Name = Encode::encode(utf8 => $Name, Encode::FB_PERLQQ()) if defined $Name;
+
+ my ($Val, $Message) =
+ $NewUser->Create(Name => ($Username || $Address),
+ EmailAddress => $Address,
+ RealName => $Name,
+ Password => undef,
+ Privileged => 0,
+ Comments => 'Autocreated on ticket submission'
+ );
+
unless ($Val) {
-
+
# Deal with the race condition of two account creations at once
+ #
if ($Username) {
$NewUser->LoadByName($Username);
}
-
- unless ( $NewUser->Id ) {
+
+ unless ($NewUser->Id) {
$NewUser->LoadByEmail($Address);
}
-
- unless ( $NewUser->Id ) {
- MailError(
- To => $ErrorsTo,
- Subject => "User could not be created",
- Explanation =>
- "User creation failed in mailgateway: $Message",
- MIMEObj => $entity,
- LogLevel => 'crit'
- );
+
+ unless ($NewUser->Id) {
+ MailError( To => $ErrorsTo,
+ Subject => "User could not be created",
+ Explanation => "User creation failed in mailgateway: $Message",
+ MIMEObj => $entity,
+ LogLevel => 'crit'
+ );
}
}
@@ -325,25 +235,20 @@ sub CreateUser {
my $CurrentUser = RT::CurrentUser->new();
$CurrentUser->LoadByEmail($Address);
- unless ( $CurrentUser->id ) {
- $RT::Logger->warning(
- "Couldn't load user '$Address'." . "giving up" );
- MailError(
- To => $ErrorsTo,
- Subject => "User could not be loaded",
- Explanation =>
- "User '$Address' could not be loaded in the mail gateway",
- MIMEObj => $entity,
- LogLevel => 'crit'
- );
+ unless ($CurrentUser->id) {
+ $RT::Logger->warning("Couldn't load user '$Address'.". "giving up");
+ MailError( To => $ErrorsTo,
+ Subject => "User could not be loaded",
+ Explanation => "User '$Address' could not be loaded in the mail gateway",
+ MIMEObj => $entity,
+ LogLevel => 'crit'
+ );
}
return $CurrentUser;
}
-
-# }}}
-
-# {{{ ParseCcAddressesFromHead
+# }}}
+# {{{ ParseCcAddressesFromHead
=head2 ParseCcAddressesFromHead HASHREF
@@ -353,34 +258,32 @@ headers b<except> the current Queue\'s email addresses, the CurrentUser\'s
email address and anything that the configuration sub RT::IsRTAddress matches.
=cut
-
+
sub ParseCcAddressesFromHead {
- my %args = (
- Head => undef,
- QueueObj => undef,
- CurrentUser => undef,
- @_
- );
-
+ my %args = ( Head => undef,
+ QueueObj => undef,
+ CurrentUser => undef,
+ @_ );
+
my (@Addresses);
-
- my @ToObjs = Mail::Address->parse( $args{'Head'}->get('To') );
- my @CcObjs = Mail::Address->parse( $args{'Head'}->get('Cc') );
-
- foreach my $AddrObj ( @ToObjs, @CcObjs ) {
- my $Address = $AddrObj->address;
- $Address = $args{'CurrentUser'}
- ->UserObj->CanonicalizeEmailAddress($Address);
- next if ( $args{'CurrentUser'}->EmailAddress =~ /^\Q$Address\E$/i );
- next if ( $args{'QueueObj'}->CorrespondAddress =~ /^\Q$Address\E$/i );
- next if ( $args{'QueueObj'}->CommentAddress =~ /^\Q$Address\E$/i );
- next if ( RT::EmailParser->IsRTAddress($Address) );
-
- push( @Addresses, $Address );
+
+ my @ToObjs = Mail::Address->parse($args{'Head'}->get('To'));
+ my @CcObjs = Mail::Address->parse($args{'Head'}->get('Cc'));
+
+ foreach my $AddrObj (@ToObjs, @CcObjs) {
+ my $Address = $AddrObj->address;
+ $Address = $args{'CurrentUser'}->UserObj->CanonicalizeEmailAddress($Address);
+ next if ($args{'CurrentUser'}->EmailAddress =~ /^$Address$/i);
+ next if ($args{'QueueObj'}->CorrespondAddress =~ /^$Address$/i);
+ next if ($args{'QueueObj'}->CommentAddress =~ /^$Address$/i);
+ next if (RT::EmailParser::IsRTAddress(undef, $Address));
+
+ push (@Addresses, $Address);
}
return (@Addresses);
}
+
# }}}
# {{{ ParseSenderAdddressFromHead
@@ -394,16 +297,11 @@ of the From (evaluated in order of Reply-To:, From:, Sender)
sub ParseSenderAddressFromHead {
my $head = shift;
-
#Figure out who's sending this message.
- foreach my $header ('Reply-To', 'From', 'Sender') {
- my $From = $head->get($header);
- my ($addr, $name) = ParseAddressFromHeader($From);
- # only return if the address is not empty
- return ($addr, $name) if $addr;
- }
-
- return (undef, undef);
+ my $From = $head->get('Reply-To') ||
+ $head->get('From') ||
+ $head->get('Sender');
+ return (ParseAddressFromHeader($From));
}
# }}}
@@ -412,29 +310,24 @@ sub ParseSenderAddressFromHead {
=head2 ParseErrorsToAddressFromHead
Takes a MIME::Header object. Return a single value : user@host
-of the From (evaluated in order of Return-path:,Errors-To:,Reply-To:,
-From:, Sender)
+of the From (evaluated in order of Errors-To:,Reply-To:, From:, Sender)
=cut
sub ParseErrorsToAddressFromHead {
my $head = shift;
-
#Figure out who's sending this message.
- foreach my $header ( 'Errors-To', 'Reply-To', 'From', 'Sender' ) {
-
- # If there's a header of that name
- my $headerobj = $head->get($header);
- if ($headerobj) {
- my ( $addr, $name ) = ParseAddressFromHeader($headerobj);
-
- # If it's got actual useful content...
- return ($addr) if ($addr);
- }
+ foreach my $header ('Errors-To' , 'Reply-To', 'From', 'Sender' ) {
+ # If there's a header of that name
+ my $headerobj = $head->get($header);
+ if ($headerobj) {
+ my ($addr, $name ) = ParseAddressFromHeader($headerobj);
+ # If it's got actual useful content...
+ return ($addr) if ($addr);
+ }
}
}
-
# }}}
# {{{ ParseAddressFromHeader
@@ -445,547 +338,311 @@ Takes an address from $head->get('Line') and returns a tuple: user@host, friendl
=cut
-sub ParseAddressFromHeader {
- my $Addr = shift;
- # Some broken mailers send: ""Vincent, Jesse"" <jesse@fsck.com>. Hate
- $Addr =~ s/\"\"(.*?)\"\"/\"$1\"/g;
+sub ParseAddressFromHeader{
+ my $Addr = shift;
+
my @Addresses = Mail::Address->parse($Addr);
+
+ my $AddrObj = $Addresses[0];
- my ($AddrObj) = grep ref $_, @Addresses;
- unless ( $AddrObj ) {
- return ( undef, undef );
+ unless (ref($AddrObj)) {
+ return(undef,undef);
}
-
- my $Name = ( $AddrObj->phrase || $AddrObj->comment || $AddrObj->address );
-
+
+ my $Name = ($AddrObj->phrase || $AddrObj->comment || $AddrObj->address);
+
#Lets take the from and load a user object.
my $Address = $AddrObj->address;
- return ( $Address, $Name );
+ return ($Address, $Name);
}
-
# }}}
-# {{{ sub ParseTicketId
-sub ParseTicketId {
- my $Subject = shift;
- my $id;
-
- my $test_name = $RT::EmailSubjectTagRegex || qr/\Q$RT::rtname\E/i;
-
- if ( $Subject =~ s/\[$test_name\s+\#(\d+)\s*\]//i ) {
- my $id = $1;
- $RT::Logger->debug("Found a ticket ID. It's $id");
- return ($id);
- } else {
- return (undef);
- }
-}
-
-# }}}
-
-=head2 Gateway ARGSREF
-
-
-Takes parameters:
-
- action
- queue
- message
+=head2 Gateway
This performs all the "guts" of the mail rt-mailgate program, and is
designed to be called from the web interface with a message, user
object, and so on.
-Can also take an optional 'ticket' parameter; this ticket id overrides
-any ticket id found in the subject.
-
-Returns:
-
- An array of:
-
- (status code, message, optional ticket object)
-
- status code is a numeric value.
-
- for temporary failures, the status code should be -75
-
- for permanent failures which are handled by RT, the status code
- should be 0
-
- for succces, the status code should be 1
-
-
-
=cut
sub Gateway {
- my $argsref = shift;
- my %args = (
- action => 'correspond',
- queue => '1',
- ticket => undef,
- message => undef,
- %$argsref
- );
-
- my $SystemTicket;
- my $Right;
+ my %args = ( message => undef,
+ queue => 1,
+ action => 'correspond',
+ ticket => undef,
+ @_ );
# Validate the action
- my ( $status, @actions ) = IsCorrectAction( $args{'action'} );
- unless ($status) {
- return (
- -75,
- "Invalid 'action' parameter "
- . $actions[0]
- . " for queue "
- . $args{'queue'},
- undef
- );
+ unless ( $args{'action'} =~ /^(comment|correspond|action)$/ ) {
+
+ # Can't safely loc this. What object do we loc around?
+ return ( 0, "Invalid 'action' parameter", undef );
}
my $parser = RT::EmailParser->new();
- $parser->SmartParseMIMEEntityFromScalar( Message => $args{'message'} );
- my $Message = $parser->Entity();
-
- unless ($Message) {
- MailError(
- To => $RT::OwnerEmail,
- Subject => "RT Bounce: Unparseable message",
- Explanation => "RT couldn't process the message below",
- Attach => $args{'message'}
- );
-
- return ( 0,
- "Failed to parse this message. Something is likely badly wrong with the message"
- );
- }
+ $parser->ParseMIMEEntityFromScalar( $args{'message'} );
+ my $Message = $parser->Entity();
my $head = $Message->head;
+ my ( $CurrentUser, $AuthStat, $status, $error );
+
my $ErrorsTo = ParseErrorsToAddressFromHead($head);
- my $MessageId = $head->get('Message-ID')
- || "<no-message-id-" . time . rand(2000) . "\@.$RT::Organization>";
+ my $MessageId = $head->get('Message-Id')
+ || "<no-message-id-" . time . rand(2000) . "\@.$RT::Organization>";
#Pull apart the subject line
my $Subject = $head->get('Subject') || '';
chomp $Subject;
-
- # {{{ Lets check for mail loops of various sorts.
- my ($should_store_machine_generated_message, $IsALoop, $result);
- ( $should_store_machine_generated_message, $ErrorsTo, $result, $IsALoop ) =
- _HandleMachineGeneratedMail(
- Message => $Message,
- ErrorsTo => $ErrorsTo,
- Subject => $Subject,
- MessageId => $MessageId
- );
-
- # Do not pass loop messages to MailPlugins, to make sure the loop
- # is broken, unless $RT::StoreLoops is set.
- if ($IsALoop && !$should_store_machine_generated_message) {
- return ( 0, $result, undef );
- }
- $args{'ticket'} ||= ParseTicketId($Subject);
- $SystemTicket = RT::Ticket->new($RT::SystemUser);
- $SystemTicket->Load( $args{'ticket'} ) if ( $args{'ticket'} ) ;
- if ( $SystemTicket->id ) {
- $Right = 'ReplyToTicket';
- } else {
- $Right = 'CreateTicket';
+ $args{'ticket'} ||= $parser->ParseTicketId($Subject);
+
+ my $SystemTicket;
+ if ($args{'ticket'} ) {
+ $SystemTicket = RT::Ticket->new($RT::SystemUser);
+ $SystemTicket->Load($args{'ticket'});
}
#Set up a queue object
my $SystemQueueObj = RT::Queue->new($RT::SystemUser);
$SystemQueueObj->Load( $args{'queue'} );
+
# We can safely have no queue of we have a known-good ticket
- unless ( $SystemTicket->id || $SystemQueueObj->id ) {
- return ( -75, "RT couldn't find the queue: " . $args{'queue'}, undef );
+ unless ( $args{'ticket'} || $SystemQueueObj->id ) {
+ MailError(
+ To => $RT::OwnerEmail,
+ Subject => "RT Bounce: $Subject",
+ Explanation => "RT couldn't find the queue: " . $args{'queue'},
+ MIMEObj => $Message );
+ return ( 0, "RT couldn't find the queue: " . $args{'queue'}, undef );
}
- # Authentication Level ($AuthStat)
- # -1 - Get out. this user has been explicitly declined
+ # Authentication Level
+ # -1 - Get out. this user has been explicitly declined
# 0 - User may not do anything (Not used at the moment)
# 1 - Normal user
# 2 - User is allowed to specify status updates etc. a la enhanced-mailgate
- my ( $CurrentUser, $AuthStat, $error );
-
- # Initalize AuthStat so comparisons work correctly
- $AuthStat = -9999999;
-
- push @RT::MailPlugins, "Auth::MailFrom" unless @RT::MailPlugins;
-
- # if plugin returns AuthStat -2 we skip action
- # NOTE: this is experimental API and it would be changed
- my %skip_action = ();
+ push @RT::MailPlugins, "Auth::MailFrom" unless @RT::MailPlugins;
# Since this needs loading, no matter what
- foreach (@RT::MailPlugins) {
- my ($Code, $NewAuthStat);
+
+ for (@RT::MailPlugins) {
+ my $Code;
+ my $NewAuthStat;
if ( ref($_) eq "CODE" ) {
$Code = $_;
- } else {
- my $Class = $_;
- $Class = "RT::Interface::Email::" . $Class
- unless $Class =~ /^RT::Interface::Email::/;
- $Class->require or
- do { $RT::Logger->error("Couldn't load $Class: $@"); next };
-
+ }
+ else {
+ $_ = "RT::Interface::Email::$_" unless /^RT::Interface::Email::/;
+ eval "require $_;";
+ if ($@) {
+ die ("Couldn't load module $_: $@");
+ next;
+ }
no strict 'refs';
- unless ( defined( $Code = *{ $Class . "::GetCurrentUser" }{CODE} ) ) {
- $RT::Logger->crit( "No 'GetCurrentUser' function found in '$Class' module");
+ if ( !defined( $Code = *{ $_ . "::GetCurrentUser" }{CODE} ) ) {
+ die ("No GetCurrentUser code found in $_ module");
next;
}
}
- foreach my $action (@actions) {
- ( $CurrentUser, $NewAuthStat ) = $Code->(
- Message => $Message,
- RawMessageRef => \$args{'message'},
- CurrentUser => $CurrentUser,
- AuthLevel => $AuthStat,
- Action => $action,
- Ticket => $SystemTicket,
- Queue => $SystemQueueObj
- );
-
-# You get the highest level of authentication you were assigned, unless you get the magic -1
-# If a module returns a "-1" then we discard the ticket, so.
- $AuthStat = $NewAuthStat
- if ( $NewAuthStat > $AuthStat or $NewAuthStat == -1 or $NewAuthStat == -2 );
-
- last if $AuthStat == -1;
- $skip_action{$action}++ if $AuthStat == -2;
- }
-
- # strip actions we should skip
- @actions = grep !$skip_action{$_}, @actions if $AuthStat == -2;
- last unless @actions;
+ ( $CurrentUser, $NewAuthStat ) = $Code->( Message => $Message,
+ CurrentUser => $CurrentUser,
+ AuthLevel => $AuthStat,
+ Action => $args{'action'},
+ Ticket => $SystemTicket,
+ Queue => $SystemQueueObj );
+ # You get the highest level of authentication you were assigned.
last if $AuthStat == -1;
+ $AuthStat = $NewAuthStat if $NewAuthStat > $AuthStat;
}
+
# {{{ If authentication fails and no new user was created, get out.
- if ( !$CurrentUser || !$CurrentUser->id || $AuthStat == -1 ) {
+ if ( !$CurrentUser or !$CurrentUser->Id or $AuthStat == -1 ) {
# If the plugins refused to create one, they lose.
- unless ( $AuthStat == -1 ) {
- _NoAuthorizedUserFound(
- Right => $Right,
- Message => $Message,
- Requestor => $ErrorsTo,
- Queue => $args{'queue'}
- );
-
- }
- return ( 0, "Could not load a valid user", undef );
- }
-
- # If we got a user, but they don't have the right to say things
- if ( $AuthStat == 0 ) {
MailError(
- To => $ErrorsTo,
- Subject => "Permission Denied",
- Explanation =>
- "You do not have permission to communicate with RT",
- MIMEObj => $Message
- );
- return (
- 0,
- "$ErrorsTo tried to submit a message to "
- . $args{'Queue'}
- . " without permission.",
- undef
- );
- }
+ Subject => "Could not load a valid user",
+ Explanation => <<EOT,
+RT could not load a valid user, and RT's configuration does not allow
+for the creation of a new user for your email.
+Your RT administrator needs to grant 'Everyone' the right 'CreateTicket'
+for this queue.
- unless ($should_store_machine_generated_message) {
- return ( 0, $result, undef );
+EOT
+ MIMEObj => $Message,
+ LogLevel => 'error' )
+ unless $AuthStat == -1;
+ return ( 0, "Could not load a valid user", undef );
}
-
- # if plugin's updated SystemTicket then update arguments
- $args{'ticket'} = $SystemTicket->Id if $SystemTicket && $SystemTicket->Id;
- my $Ticket = RT::Ticket->new($CurrentUser);
+ # }}}
- if ( !$args{'ticket'} && grep /^(comment|correspond)$/, @actions )
- {
+ # {{{ Lets check for mail loops of various sorts.
+ my $IsAutoGenerated = CheckForAutoGenerated($head);
- my @Cc;
- my @Requestors = ( $CurrentUser->id );
+ my $IsSuspiciousSender = CheckForSuspiciousSender($head);
- if ($RT::ParseNewMessageForTicketCcs) {
- @Cc = ParseCcAddressesFromHead(
- Head => $head,
- CurrentUser => $CurrentUser,
- QueueObj => $SystemQueueObj
- );
- }
+ my $IsALoop = CheckForLoops($head);
- my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
- Queue => $SystemQueueObj->Id,
- Subject => $Subject,
- Requestor => \@Requestors,
- Cc => \@Cc,
- MIMEObj => $Message
- );
- if ( $id == 0 ) {
- MailError(
- To => $ErrorsTo,
- Subject => "Ticket creation failed: $Subject",
- Explanation => $ErrStr,
- MIMEObj => $Message
- );
- return ( 0, "Ticket creation failed: $ErrStr", $Ticket );
- }
+ my $SquelchReplies = 0;
- # strip comments&corresponds from the actions we don't need
- # to record them if we've created the ticket just now
- @actions = grep !/^(comment|correspond)$/, @actions;
- $args{'ticket'} = $id;
+ #If the message is autogenerated, we need to know, so we can not
+ # send mail to the sender
+ if ( $IsSuspiciousSender || $IsAutoGenerated || $IsALoop ) {
+ $SquelchReplies = 1;
+ $ErrorsTo = $RT::OwnerEmail;
+ }
- } elsif ( $args{'ticket'} ) {
+ # }}}
- $Ticket->Load( $args{'ticket'} );
- unless ( $Ticket->Id ) {
- my $error = "Could not find a ticket with id " . $args{'ticket'};
- MailError(
- To => $ErrorsTo,
- Subject => "Message not recorded: $Subject",
- Explanation => $error,
- MIMEObj => $Message
- );
-
- return ( 0, $error );
- }
- $args{'ticket'} = $Ticket->id;
- } else {
- return ( 1, "Success", $Ticket );
+ # {{{ Drop it if it's disallowed
+ if ( $AuthStat == 0 ) {
+ MailError(
+ To => $ErrorsTo,
+ Subject => "Permission Denied",
+ Explanation => "You do not have permission to communicate with RT",
+ MIMEObj => $Message );
}
# }}}
- foreach my $action (@actions) {
-
- # If the action is comment, add a comment.
- if ( $action =~ /^(?:comment|correspond)$/i ) {
- my $method = ucfirst lc $action;
- my ( $status, $msg ) = $Ticket->$method( MIMEObj => $Message );
- unless ($status) {
-
- #Warn the sender that we couldn't actually submit the comment.
- MailError(
- To => $ErrorsTo,
- Subject => "Message not recorded: $Subject",
- Explanation => $msg,
- MIMEObj => $Message
- );
- return ( 0, "Message not recorded: $msg", $Ticket );
- }
- } elsif ($RT::UnsafeEmailCommands) {
- my ( $status, $msg ) = _RunUnsafeAction(
- Action => $action,
- ErrorsTo => $ErrorsTo,
- Message => $Message,
- Ticket => $Ticket,
- CurrentUser => $CurrentUser,
- );
- return ($status, $msg, $Ticket) unless $status == 1;
- }
- }
- return ( 1, "Success", $Ticket );
-}
+ # {{{ Warn someone if it's a loop
-sub _RunUnsafeAction {
- my %args = (
- Action => undef,
- ErrorsTo => undef,
- Message => undef,
- Ticket => undef,
- CurrentUser => undef,
- @_
- );
-
- if ( $args{'Action'} =~ /^take$/i ) {
- my ( $status, $msg ) = $args{'Ticket'}->SetOwner( $args{'CurrentUser'}->id );
- unless ($status) {
- MailError(
- To => $args{'ErrorsTo'},
- Subject => "Ticket not taken",
- Explanation => $msg,
- MIMEObj => $args{'Message'}
- );
- return ( 0, "Ticket not taken" );
- }
- } elsif ( $args{'Action'} =~ /^resolve$/i ) {
- my ( $status, $msg ) = $args{'Ticket'}->SetStatus('resolved');
- unless ($status) {
+ # Warn someone if it's a loop, before we drop it on the ground
+ if ($IsALoop) {
+ $RT::Logger->crit("RT Recieved mail ($MessageId) from itself.");
- #Warn the sender that we couldn't actually submit the comment.
- MailError(
- To => $args{'ErrorsTo'},
- Subject => "Ticket not resolved",
- Explanation => $msg,
- MIMEObj => $args{'Message'}
- );
- return ( 0, "Ticket not resolved" );
+ #Should we mail it to RTOwner?
+ if ($RT::LoopsToRTOwner) {
+ MailError( To => $RT::OwnerEmail,
+ Subject => "RT Bounce: $Subject",
+ Explanation => "RT thinks this message may be a bounce",
+ MIMEObj => $Message );
+
+ #Do we actually want to store it?
+ return ( 0, "Message Bounced", undef ) unless ($RT::StoreLoops);
}
- } else {
- return ( 0, "Not supported unsafe action $args{'Action'}", $args{'Ticket'} );
}
- return ( 1, "Success" );
-}
-
-=head2 _NoAuthorizedUserFound
-Emails the RT Owner and the requestor when the auth plugins return "No auth user found"
-
-=cut
-
-sub _NoAuthorizedUserFound {
- my %args = (
- Right => undef,
- Message => undef,
- Requestor => undef,
- Queue => undef,
- @_
- );
-
- # Notify the RT Admin of the failure.
- MailError(
- To => $RT::OwnerEmail,
- Subject => "Could not load a valid user",
- Explanation => <<EOT,
-RT could not load a valid user, and RT's configuration does not allow
-for the creation of a new user for this email (@{[$args{Requestor}]}).
+ # }}}
-You might need to grant 'Everyone' the right '@{[$args{Right}]}' for the
-queue @{[$args{'Queue'}]}.
+ # {{{ Squelch replies if necessary
+ # Don't let the user stuff the RT-Squelch-Replies-To header.
+ if ( $head->get('RT-Squelch-Replies-To') ) {
+ $head->add( 'RT-Relocated-Squelch-Replies-To',
+ $head->get('RT-Squelch-Replies-To') );
+ $head->delete('RT-Squelch-Replies-To');
+ }
-EOT
- MIMEObj => $args{'Message'},
- LogLevel => 'error'
- );
-
- # Also notify the requestor that his request has been dropped.
- if ($args{'Requestor'} ne $RT::OwnerEmail) {
- MailError(
- To => $args{'Requestor'},
- Subject => "Could not load a valid user",
- Explanation => <<EOT,
-RT could not load a valid user, and RT's configuration does not allow
-for the creation of a new user for your email.
+ if ($SquelchReplies) {
+ ## TODO: This is a hack. It should be some other way to
+ ## indicate that the transaction should be "silent".
-EOT
- MIMEObj => $args{'Message'},
- LogLevel => 'error'
- );
+ my ( $Sender, $junk ) = ParseSenderAddressFromHead($head);
+ $head->add( 'RT-Squelch-Replies-To', $Sender );
}
-}
-=head2 _HandleMachineGeneratedMail
-
-Takes named params:
- Message
- ErrorsTo
- Subject
+ # }}}
-Checks the message to see if it's a bounce, if it looks like a loop, if it's autogenerated, etc.
-Returns a triple of ("Should we continue (boolean)", "New value for $ErrorsTo", "Status message",
-"This message appears to be a loop (boolean)" );
+ my $Ticket = RT::Ticket->new($CurrentUser);
-=cut
+ # {{{ If we don't have a ticket Id, we're creating a new ticket
+ if ( !$args{'ticket'} ) {
-sub _HandleMachineGeneratedMail {
- my %args = ( Message => undef, ErrorsTo => undef, Subject => undef, MessageId => undef, @_ );
- my $head = $args{'Message'}->head;
- my $ErrorsTo = $args{'ErrorsTo'};
+ # {{{ Create a new ticket
- my $IsBounce = CheckForBounce($head);
+ my @Cc;
+ my @Requestors = ( $CurrentUser->id );
- my $IsAutoGenerated = CheckForAutoGenerated($head);
+ if ($RT::ParseNewMessageForTicketCcs) {
+ @Cc = ParseCcAddressesFromHead( Head => $head,
+ CurrentUser => $CurrentUser,
+ QueueObj => $SystemQueueObj );
+ }
- my $IsSuspiciousSender = CheckForSuspiciousSender($head);
+ my ( $id, $Transaction, $ErrStr ) = $Ticket->Create(
+ Queue => $SystemQueueObj->Id,
+ Subject => $Subject,
+ Requestor => \@Requestors,
+ Cc => \@Cc,
+ MIMEObj => $Message );
+ if ( $id == 0 ) {
+ MailError( To => $ErrorsTo,
+ Subject => "Ticket creation failed",
+ Explanation => $ErrStr,
+ MIMEObj => $Message );
+ $RT::Logger->error("Create failed: $id / $Transaction / $ErrStr ");
+ return ( 0, "Ticket creation failed", $Ticket );
+ }
- my $IsALoop = CheckForLoops($head);
+ # }}}
+ }
- my $SquelchReplies = 0;
+ # }}}
- #If the message is autogenerated, we need to know, so we can not
- # send mail to the sender
- if ( $IsBounce || $IsSuspiciousSender || $IsAutoGenerated || $IsALoop ) {
- $SquelchReplies = 1;
- $ErrorsTo = $RT::OwnerEmail;
- }
+ # If the action is comment, add a comment.
+ elsif ( $args{'action'} =~ /^(comment|correspond)$/i ) {
+ $Ticket->Load($args{'ticket'});
+ unless ( $Ticket->Id ) {
+ my $message = "Could not find a ticket with id ".$args{'ticket'};
+ MailError( To => $ErrorsTo,
+ Subject => "Message not recorded",
+ Explanation => $message,
+ MIMEObj => $Message );
- # Warn someone if it's a loop, before we drop it on the ground
- if ($IsALoop) {
- $RT::Logger->crit("RT Received mail (".$args{MessageId}.") from itself.");
+ return ( 0, $message);
+ }
- #Should we mail it to RTOwner?
- if ($RT::LoopsToRTOwner) {
- MailError(
- To => $RT::OwnerEmail,
- Subject => "RT Bounce: ".$args{'Subject'},
- Explanation => "RT thinks this message may be a bounce",
- MIMEObj => $args{Message}
- );
+ my ( $status, $msg );
+ if ( $args{'action'} =~ /^correspond$/ ) {
+ ( $status, $msg ) = $Ticket->Correspond( MIMEObj => $Message );
}
+ else {
+ ( $status, $msg ) = $Ticket->Comment( MIMEObj => $Message );
+ }
+ unless ($status) {
- #Do we actually want to store it?
- return ( 0, $ErrorsTo, "Message Bounced", $IsALoop ) unless ($RT::StoreLoops);
+ #Warn the sender that we couldn't actually submit the comment.
+ MailError( To => $ErrorsTo,
+ Subject => "Message not recorded",
+ Explanation => $msg,
+ MIMEObj => $Message );
+ return ( 0, "Message not recorded", $Ticket );
+ }
}
- # Squelch replies if necessary
- # Don't let the user stuff the RT-Squelch-Replies-To header.
- if ( $head->get('RT-Squelch-Replies-To') ) {
- $head->add(
- 'RT-Relocated-Squelch-Replies-To',
- $head->get('RT-Squelch-Replies-To')
- );
- $head->delete('RT-Squelch-Replies-To');
- }
+ else {
- if ($SquelchReplies) {
+ #Return mail to the sender with an error
+ MailError( To => $ErrorsTo,
+ Subject => "RT Configuration error",
+ Explanation => "'"
+ . $args{'action'}
+ . "' not a recognized action."
+ . " Your RT administrator has misconfigured "
+ . "the mail aliases which invoke RT",
+ MIMEObj => $Message );
+ $RT::Logger->crit( $args{'action'} . " type unknown for $MessageId" );
+ return ( 0, "Configuration error: " . $args{'action'} . " not a recognized action", $Ticket );
- # Squelch replies to the sender, and also leave a clue to
- # allow us to squelch ALL outbound messages. This way we
- # can punt the logic of "what to do when we get a bounce"
- # to the scrip. We might want to notify nobody. Or just
- # the RT Owner. Or maybe all Privileged watchers.
- my ( $Sender, $junk ) = ParseSenderAddressFromHead($head);
- $head->add( 'RT-Squelch-Replies-To', $Sender );
- $head->add( 'RT-DetectedAutoGenerated', 'true' );
}
- return ( 1, $ErrorsTo, "Handled machine detection", $IsALoop );
-}
-
-=head2 IsCorrectAction
-Returns a list of valid actions we've found for this message
-=cut
-
-sub IsCorrectAction {
- my $action = shift;
- my @actions = grep $_, split /-/, $action;
- return ( 0, '(no value)' ) unless @actions;
- foreach (@actions) {
- return ( 0, $_ ) unless /^(?:comment|correspond|take|resolve)$/;
- }
- return ( 1, @actions );
+return ( 1, "Success", $Ticket );
}
eval "require RT::Interface::Email_Vendor";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Interface/Email_Vendor.pm} );
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/Email_Vendor.pm});
eval "require RT::Interface::Email_Local";
-die $@ if ( $@ && $@ !~ qr{^Can't locate RT/Interface/Email_Local.pm} );
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/Email_Local.pm});
1;
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm
index 4e5fca151..5097f54a4 100644
--- a/rt/lib/RT/Interface/Web.pm
+++ b/rt/lib/RT/Interface/Web.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
## Portions Copyright 2000 Tobias Brox <tobix@fsck.com>
## This is a library of static subs to be used by the Mason web
@@ -64,176 +40,106 @@ use_ok(RT::Interface::Web);
=cut
-use strict;
-use warnings;
-
package RT::Interface::Web;
-use HTTP::Date;
-use RT::SavedSearches;
-use URI;
-
-# {{{ EscapeUTF8
-
-=head2 EscapeUTF8 SCALARREF
-
-does a css-busting but minimalist escaping of whatever html you're passing in.
-
-=cut
-
-sub EscapeUTF8 {
- my $ref = shift;
- return unless defined $$ref;
- my $val = $$ref;
- use bytes;
- $val =~ s/&/&#38;/g;
- $val =~ s/</&lt;/g;
- $val =~ s/>/&gt;/g;
- $val =~ s/\(/&#40;/g;
- $val =~ s/\)/&#41;/g;
- $val =~ s/"/&#34;/g;
- $val =~ s/'/&#39;/g;
- $$ref = $val;
- Encode::_utf8_on($$ref);
-
-
-}
-
-# }}}
-
-# {{{ EscapeURI
-
-=head2 EscapeURI SCALARREF
+use strict;
-Escapes URI component according to RFC2396
-=cut
-use Encode qw();
-sub EscapeURI {
- my $ref = shift;
- $$ref = Encode::encode_utf8( $$ref );
- $$ref =~ s/([^a-zA-Z0-9_.!~*'()-])/uc sprintf("%%%02X", ord($1))/eg;
- Encode::_utf8_on( $$ref );
-}
-# }}}
-# {{{ WebCanonicalizeInfo
+# {{{ sub NewApacheHandler
-=head2 WebCanonicalizeInfo();
+=head2 NewApacheHandler
-Different web servers set different environmental varibles. This
-function must return something suitable for REMOTE_USER. By default,
-just downcase $ENV{'REMOTE_USER'}
+ Takes extra options to pass to HTML::Mason::ApacheHandler->new
+ Returns a new Mason::ApacheHandler object
=cut
-sub WebCanonicalizeInfo {
- my $user;
-
- if ( defined $ENV{'REMOTE_USER'} ) {
- $user = lc ( $ENV{'REMOTE_USER'} ) if( length($ENV{'REMOTE_USER'}) );
- }
+sub NewApacheHandler {
+ require HTML::Mason::ApacheHandler;
+ my $ah = new HTML::Mason::ApacheHandler(
+
+ comp_root => [
+ [ local => $RT::MasonLocalComponentRoot ],
+ [ standard => $RT::MasonComponentRoot ]
+ ],
+ args_method => "CGI",
+ default_escape_flags => 'h',
+ allow_globals => [qw(%session)],
+ data_dir => "$RT::MasonDataDir",
+ @_
+ );
- return $user;
+ $ah->interp->set_escape( h => \&RT::Interface::Web::EscapeUTF8 );
+
+ return ($ah);
}
# }}}
-# {{{ WebExternalAutoInfo
+# {{{ sub NewCGIHandler
-=head2 WebExternalAutoInfo($user);
+=head2 NewCGIHandler
-Returns a hash of user attributes, used when WebExternalAuto is set.
+ Returns a new Mason::CGIHandler object
=cut
-sub WebExternalAutoInfo {
- my $user = shift;
+sub NewCGIHandler {
+ my %args = (
+ @_
+ );
- my %user_info;
+ my $handler = HTML::Mason::CGIHandler->new(
+ comp_root => [
+ [ local => $RT::MasonLocalComponentRoot ],
+ [ standard => $RT::MasonComponentRoot ]
+ ],
+ data_dir => "$RT::MasonDataDir",
+ default_escape_flags => 'h',
+ allow_globals => [qw(%session)]
+ );
+
- # default to making Privileged users, even if they specify
- # some other default Attributes
- if (!$RT::AutoCreate ||
- ( ref($RT::AutoCreate) && not exists $RT::AutoCreate->{Privileged})) {
- $user_info{'Privileged'} = 1;
- }
+ $handler->interp->set_escape( h => \&RT::Interface::Web::EscapeUTF8 );
- if ($^O !~ /^(?:riscos|MacOS|MSWin32|dos|os2)$/) {
- # Populate fields with information from Unix /etc/passwd
- my ($comments, $realname) = (getpwnam($user))[5, 6];
- $user_info{'Comments'} = $comments if defined $comments;
- $user_info{'RealName'} = $realname if defined $realname;
- }
- elsif ($^O eq 'MSWin32' and eval 'use Net::AdminMisc; 1') {
- # Populate fields with information from NT domain controller
- }
+ return ($handler);
- # and return the wad of stuff
- return {%user_info};
}
-
# }}}
+# {{{ EscapeUTF8
-=head2 Redirect URL
+=head2 EscapeUTF8 SCALARREF
-This routine ells the current user's browser to redirect to URL.
-Additionally, it unties the user's currently active session, helping to avoid
-A bug in Apache::Session 1.81 and earlier which clobbers sessions if we try to use
-a cached DBI statement handle twice at the same time.
+does a css-busting but minimalist escaping of whatever html you're passing in.
=cut
+sub EscapeUTF8 {
+ my $ref = shift;
+ my $val = $$ref;
+ use bytes;
+ $val =~ s/&/&#38;/g;
+ $val =~ s/</&lt;/g;
+ $val =~ s/>/&gt;/g;
+ $val =~ s/\(/&#40;/g;
+ $val =~ s/\)/&#41;/g;
+ $val =~ s/"/&#34;/g;
+ $val =~ s/'/&#39;/g;
+ $$ref = $val;
+ Encode::_utf8_on($$ref);
-sub Redirect {
- my $redir_to = shift;
- untie $HTML::Mason::Commands::session;
- my $uri = URI->new($redir_to);
- my $server_uri = URI->new($RT::WebURL);
-
- # If the user is coming in via a non-canonical
- # hostname, don't redirect them to the canonical host,
- # it will just upset them (and invalidate their credentials)
- if ($uri->host eq $server_uri->host &&
- $uri->port eq $server_uri->port) {
- $uri->host($ENV{'HTTP_HOST'});
- $uri->port($ENV{'SERVER_PORT'});
- }
-
- $HTML::Mason::Commands::m->redirect($uri->canonical);
- $HTML::Mason::Commands::m->abort;
}
-
-=head2 StaticFileHeaders
-
-Send the browser a few headers to try to get it to (somewhat agressively)
-cache RT's static Javascript and CSS files.
-
-This routine could really use _accurate_ heuristics. (XXX TODO)
-
-=cut
-
-sub StaticFileHeaders {
- # make cache public
- $HTML::Mason::Commands::r->headers_out->{'Cache-Control'} = 'max-age=259200, public';
-
- # Expire things in a month.
- $HTML::Mason::Commands::r->headers_out->{'Expires'} = HTTP::Date::time2str( time() + 2592000 );
-
- # if we set 'Last-Modified' then browser request a comp using 'If-Modified-Since'
- # request, but we don't handle it and generate full reply again
- # Last modified at server start time
- #$HTML::Mason::Commands::r->headers_out->{'Last-Modified'} = HTTP::Date::time2str($^T);
-
-}
+# }}}
package HTML::Mason::Commands;
+use strict;
use vars qw/$r $m %session/;
@@ -254,13 +160,10 @@ sub loc {
UNIVERSAL::can($session{'CurrentUser'}, 'loc')){
return($session{'CurrentUser'}->loc(@_));
}
- elsif ( my $u = eval { RT::CurrentUser->new($RT::SystemUser->Id) } ) {
+ else {
+ my $u = RT::CurrentUser->new($RT::SystemUser);
return ($u->loc(@_));
}
- else {
- # pathetic case -- SystemUser is gone.
- return $_[0];
- }
}
# }}}
@@ -286,7 +189,7 @@ sub loc_fuzzy {
return($session{'CurrentUser'}->loc_fuzzy($msg));
}
else {
- my $u = RT::CurrentUser->new($RT::SystemUser->Id);
+ my $u = RT::CurrentUser->new($RT::SystemUser);
return ($u->loc_fuzzy($msg));
}
}
@@ -341,30 +244,23 @@ sub CreateTicket {
my $starts = new RT::Date( $session{'CurrentUser'} );
$starts->Set( Format => 'unknown', Value => $ARGS{'Starts'} );
+ my @Requestors = split ( /\s*,\s*/, $ARGS{'Requestors'} );
+ my @Cc = split ( /\s*,\s*/, $ARGS{'Cc'} );
+ my @AdminCc = split ( /\s*,\s*/, $ARGS{'AdminCc'} );
+
my $MIMEObj = MakeMIMEEntity(
Subject => $ARGS{'Subject'},
From => $ARGS{'From'},
Cc => $ARGS{'Cc'},
Body => $ARGS{'Content'},
- Type => $ARGS{'ContentType'},
);
- if ( $ARGS{'Attachments'} ) {
- my $rv = $MIMEObj->make_multipart;
- $RT::Logger->error("Couldn't make multipart message")
- if !$rv || $rv !~ /^(?:DONE|ALREADY)$/;
-
- foreach ( values %{$ARGS{'Attachments'}} ) {
- unless ( $_ ) {
- $RT::Logger->error("Couldn't add empty attachemnt");
- next;
- }
- $MIMEObj->add_part($_);
- }
+ if ($ARGS{'Attachments'}) {
+ $MIMEObj->make_multipart;
+ $MIMEObj->add_part($_) foreach values %{$ARGS{'Attachments'}};
}
my %create_args = (
- Type => $ARGS{'Type'} || 'ticket',
Queue => $ARGS{'Queue'},
Owner => $ARGS{'Owner'},
InitialPriority => $ARGS{'InitialPriority'},
@@ -372,106 +268,45 @@ sub CreateTicket {
TimeLeft => $ARGS{'TimeLeft'},
TimeEstimated => $ARGS{'TimeEstimated'},
TimeWorked => $ARGS{'TimeWorked'},
+ Requestor => \@Requestors,
+ Cc => \@Cc,
+ AdminCc => \@AdminCc,
Subject => $ARGS{'Subject'},
Status => $ARGS{'Status'},
Due => $due->ISO,
Starts => $starts->ISO,
MIMEObj => $MIMEObj
);
-
- my @temp_squelch;
- foreach my $type (qw(Requestors Cc AdminCc)) {
- my @tmp = map { $_->format } grep { $_->address} Mail::Address->parse( $ARGS{ $type } );
-
- $create_args{ $type } = [
- grep $_, map {
- my $user = RT::User->new( $RT::SystemUser );
- $user->LoadOrCreateByEmail( $_ );
- # convert to ids to avoid work later
- $user->id;
- } @tmp
- ];
- $RT::Logger->debug(
- "$type got ".join(',',@{$create_args{ $type }}) );
-
- }
- # XXX: workaround for name conflict :(
- $create_args{'Requestor'} = delete $create_args{'Requestors'};
-
- foreach my $arg (keys %ARGS) {
- next if $arg =~ /-(?:Magic|Category)$/;
-
- if ($arg =~ /^Object-RT::Transaction--CustomField-/) {
- $create_args{$arg} = $ARGS{$arg};
- }
- # Object-RT::Ticket--CustomField-3-Values
- elsif ($arg =~ /^Object-RT::Ticket--CustomField-(\d+)(.*?)$/) {
- my $cfid = $1;
- my $cf = RT::CustomField->new( $session{'CurrentUser'});
- $cf->Load($cfid);
-
- if ( $cf->Type eq 'Freeform' && ! $cf->SingleValue) {
- $ARGS{$arg} =~ s/\r\n/\n/g;
- $ARGS{$arg} = [split('\n', $ARGS{$arg})];
- }
-
- if ( $cf->Type =~ /text/i) { # Catch both Text and Wikitext
- $ARGS{$arg} =~ s/\r//g;
- }
-
- if ( $arg =~ /-Upload$/ ) {
- $create_args{"CustomField-".$cfid} = _UploadedFile($arg);
- }
- else {
- $create_args{"CustomField-".$cfid} = $ARGS{"$arg"};
- }
+ foreach my $arg (%ARGS) {
+ if ($arg =~ /^CustomField-(\d+)(.*?)$/) {
+ next if ($arg =~ /-Magic$/);
+ $create_args{"CustomField-".$1} = $ARGS{"$arg"};
}
}
-
-
- # XXX TODO This code should be about six lines. and badly needs refactoring.
-
- # {{{ turn new link lists into arrays, and pass in the proper arguments
- my (@dependson, @dependedonby, @parents, @children, @refersto, @referredtoby);
-
- foreach my $luri ( split ( / /, $ARGS{"new-DependsOn"} ) ) {
- $luri =~ s/\s*$//; # Strip trailing whitespace
- push @dependson, $luri;
- }
- $create_args{'DependsOn'} = \@dependson;
-
- foreach my $luri ( split ( / /, $ARGS{"DependsOn-new"} ) ) {
- push @dependedonby, $luri;
- }
- $create_args{'DependedOnBy'} = \@dependedonby;
-
- foreach my $luri ( split ( / /, $ARGS{"new-MemberOf"} ) ) {
- $luri =~ s/\s*$//; # Strip trailing whitespace
- push @parents, $luri;
+ my ( $id, $Trans, $ErrMsg ) = $Ticket->Create(%create_args);
+ unless ( $id && $Trans ) {
+ Abort($ErrMsg);
}
- $create_args{'Parents'} = \@parents;
+ my @linktypes = qw( DependsOn MemberOf RefersTo );
- foreach my $luri ( split ( / /, $ARGS{"MemberOf-new"} ) ) {
- push @children, $luri;
- }
- $create_args{'Children'} = \@children;
+ foreach my $linktype (@linktypes) {
+ foreach my $luri ( split ( / /, $ARGS{"new-$linktype"} ) ) {
+ $luri =~ s/\s*$//; # Strip trailing whitespace
+ my ( $val, $msg ) = $Ticket->AddLink(
+ Target => $luri,
+ Type => $linktype
+ );
+ push ( @Actions, $msg ) unless ($val);
+ }
- foreach my $luri ( split ( / /, $ARGS{"new-RefersTo"} ) ) {
- $luri =~ s/\s*$//; # Strip trailing whitespace
- push @refersto, $luri;
- }
- $create_args{'RefersTo'} = \@refersto;
+ foreach my $luri ( split ( / /, $ARGS{"$linktype-new"} ) ) {
+ my ( $val, $msg ) = $Ticket->AddLink(
+ Base => $luri,
+ Type => $linktype
+ );
- foreach my $luri ( split ( / /, $ARGS{"RefersTo-new"} ) ) {
- push @referredtoby, $luri;
- }
- $create_args{'ReferredToBy'} = \@referredtoby;
- # }}}
-
-
- my ( $id, $Trans, $ErrMsg ) = $Ticket->Create(%create_args);
- unless ( $id ) {
- Abort($ErrMsg);
+ push ( @Actions, $msg ) unless ($val);
+ }
}
push ( @Actions, split("\n", $ErrMsg) );
@@ -530,10 +365,7 @@ sub ProcessUpdateMessage {
);
#Make the update content have no 'weird' newlines in it
- if ( $args{ARGSRef}->{'UpdateTimeWorked'}
- || $args{ARGSRef}->{'UpdateContent'}
- || $args{ARGSRef}->{'UpdateAttachments'} )
- {
+ if ( $args{ARGSRef}->{'UpdateContent'} ) {
if (
$args{ARGSRef}->{'UpdateSubject'} eq $args{'TicketObj'}->Subject() )
@@ -542,77 +374,43 @@ sub ProcessUpdateMessage {
}
my $Message = MakeMIMEEntity(
- Subject => $args{ARGSRef}->{'UpdateSubject'},
- Body => $args{ARGSRef}->{'UpdateContent'},
- Type => $args{ARGSRef}->{'UpdateContentType'},
+ Subject => $args{ARGSRef}->{'UpdateSubject'},
+ Body => $args{ARGSRef}->{'UpdateContent'},
);
- $Message->head->add( 'Message-ID' =>
- "<rt-"
- . $RT::VERSION . "-"
- . $$ . "-"
- . CORE::time() . "-"
- . int(rand(2000)) . "."
- . $args{'TicketObj'}->id . "-"
- . "0" . "-" # Scrip
- . "0" . "@" # Email sent
- . $RT::Organization
- . ">" );
- my $old_txn = RT::Transaction->new( $session{'CurrentUser'} );
- if ( $args{ARGSRef}->{'QuoteTransaction'} ) {
- $old_txn->Load( $args{ARGSRef}->{'QuoteTransaction'} );
- }
- else {
- $old_txn = $args{TicketObj}->Transactions->First();
+ if ($args{ARGSRef}->{'UpdateAttachments'}) {
+ $Message->make_multipart;
+ $Message->add_part($_) foreach values %{$args{ARGSRef}->{'UpdateAttachments'}};
}
- if ( $old_txn->Message && $old_txn->Message->First ) {
- my @in_reply_to = split(/\s+/m, $old_txn->Message->First->GetHeader('In-Reply-To') || '');
- my @references = split(/\s+/m, $old_txn->Message->First->GetHeader('References') || '' );
- my @msgid = split(/\s+/m,$old_txn->Message->First->GetHeader('Message-ID') || '');
- my @rtmsgid = split(/\s+/m,$old_txn->Message->First->GetHeader('RT-Message-ID') || '');
-
- $Message->head->replace( 'In-Reply-To', join (' ', @rtmsgid ? @rtmsgid : @msgid));
- $Message->head->replace( 'References', join(' ', @references, @msgid, @rtmsgid));
+ ## TODO: Implement public comments
+ if ( $args{ARGSRef}->{'UpdateType'} =~ /^(private|public)$/ ) {
+ my ( $Transaction, $Description ) = $args{TicketObj}->Comment(
+ CcMessageTo => $args{ARGSRef}->{'UpdateCc'},
+ BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
+ MIMEObj => $Message,
+ TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
+ );
+ push ( @{ $args{Actions} }, $Description );
+ }
+ elsif ( $args{ARGSRef}->{'UpdateType'} eq 'response' ) {
+ my ( $Transaction, $Description ) = $args{TicketObj}->Correspond(
+ CcMessageTo => $args{ARGSRef}->{'UpdateCc'},
+ BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
+ MIMEObj => $Message,
+ TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
+ );
+ push ( @{ $args{Actions} }, $Description );
+ }
+ else {
+ push ( @{ $args{'Actions'} },
+ loc("Update type was neither correspondence nor comment.").
+ " ".
+ loc("Update not recorded.")
+ );
}
-
- if ( $args{ARGSRef}->{'UpdateAttachments'} ) {
- $Message->make_multipart;
- $Message->add_part($_)
- foreach values %{ $args{ARGSRef}->{'UpdateAttachments'} };
- }
-
- ## TODO: Implement public comments
- if ( $args{ARGSRef}->{'UpdateType'} =~ /^(private|public)$/ ) {
- my ( $Transaction, $Description, $Object ) = $args{TicketObj}->Comment(
- CcMessageTo => $args{ARGSRef}->{'UpdateCc'},
- BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
- MIMEObj => $Message,
- TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
- );
- push( @{ $args{Actions} }, $Description );
- $Object->UpdateCustomFields( ARGSRef => $args{ARGSRef} ) if $Object;
- }
- elsif ( $args{ARGSRef}->{'UpdateType'} eq 'response' ) {
- my ( $Transaction, $Description, $Object ) =
- $args{TicketObj}->Correspond(
- CcMessageTo => $args{ARGSRef}->{'UpdateCc'},
- BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
- MIMEObj => $Message,
- TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
- );
- push( @{ $args{Actions} }, $Description );
- $Object->UpdateCustomFields( ARGSRef => $args{ARGSRef} ) if $Object;
- }
- else {
- push(
- @{ $args{'Actions'} },
- loc("Update type was neither correspondence nor comment.") . " "
- . loc("Update not recorded.")
- );
}
}
-}
# }}}
@@ -622,8 +420,6 @@ sub ProcessUpdateMessage {
Takes a paramhash Subject, Body and AttachmentFieldName.
-Also takes Form, Cc and Type as optional paramhash keys.
-
Returns a MIME::Entity.
=cut
@@ -637,14 +433,12 @@ sub MakeMIMEEntity {
Cc => undef,
Body => undef,
AttachmentFieldName => undef,
- Type => undef,
-# map Encode::encode_utf8($_), @_,
- @_,
+ map Encode::encode_utf8($_), @_,
);
#Make the update content have no 'weird' newlines in it
- $args{'Body'} =~ s/\r\n/\n/gs if $args{'Body'};
+ $args{'Body'} =~ s/\r\n/\n/gs;
my $Message;
{
# MIME::Head is not happy in utf-8 domain. This only happens
@@ -655,8 +449,6 @@ sub MakeMIMEEntity {
Subject => $args{'Subject'} || "",
From => $args{'From'},
Cc => $args{'Cc'},
- Type => $args{'Type'} || 'text/plain',
- 'Charset:' => 'utf8',
Data => [ $args{'Body'} ]
);
}
@@ -671,14 +463,7 @@ sub MakeMIMEEntity {
#foreach my $filehandle (@filenames) {
- my ( $fh, $temp_file );
- for ( 1 .. 10 ) {
- # on NFS and NTFS, it is possible that tempfile() conflicts
- # with other processes, causing a race condition. we try to
- # accommodate this by pausing and retrying.
- last if ($fh, $temp_file) = eval { tempfile( UNLINK => 1) };
- sleep 1;
- }
+ my ( $fh, $temp_file ) = tempfile();
binmode $fh; #thank you, windows
my ($buffer);
@@ -696,7 +481,7 @@ sub MakeMIMEEntity {
$Message->attach(
Path => $temp_file,
- Filename => Encode::decode_utf8($filename),
+ Filename => $filename,
Type => $uploadinfo->{'Content-Type'},
);
close($fh);
@@ -809,13 +594,13 @@ sub ProcessSearchQuery {
# }}}
# {{{ Limit requestor email
- if ( $args{ARGS}->{'ValueOfWatcherRole'} ne '' ) {
- $session{'tickets'}->LimitWatcher(
- TYPE => $args{ARGS}->{'WatcherRole'},
- VALUE => $args{ARGS}->{'ValueOfWatcherRole'},
- OPERATOR => $args{ARGS}->{'WatcherRoleOp'},
+ if ( $args{ARGS}->{'ValueOfRequestor'} ne '' ) {
+ my $alias = $session{'tickets'}->LimitRequestor(
+ VALUE => $args{ARGS}->{'ValueOfRequestor'},
+ OPERATOR => $args{ARGS}->{'RequestorOp'},
);
+
}
# }}}
@@ -960,6 +745,19 @@ sub ParseDateToISO {
# }}}
+# {{{ sub Config
+# TODO: This might eventually read the cookies, user configuration
+# information from the DB, queue configuration information from the
+# DB, etc.
+
+sub Config {
+ my $args = shift;
+ my $key = shift;
+ return $args->{$key} || $RT::WebOptions{$key};
+}
+
+# }}}
+
# {{{ sub ProcessACLChanges
sub ProcessACLChanges {
@@ -982,13 +780,17 @@ sub ProcessACLChanges {
my $obj;
- if ($object_type eq 'RT::System') {
- $obj = $RT::System;
- } elsif ($RT::ACE::OBJECT_TYPES{$object_type}) {
- $obj = $object_type->new($session{'CurrentUser'});
+ if ($object_type eq 'RT::Queue') {
+ $obj = RT::Queue->new($session{'CurrentUser'});
+ $obj->Load($object_id);
+ } elsif ($object_type eq 'RT::Group') {
+ $obj = RT::Group->new($session{'CurrentUser'});
$obj->Load($object_id);
+
+ } elsif ($object_type eq 'RT::System') {
+ $obj = $RT::System;
} else {
- push (@results, loc("System Error"). ': '.
+ push (@results, loc("System Error").
loc("Rights could not be granted for [_1]", $object_type));
next;
}
@@ -1011,13 +813,17 @@ sub ProcessACLChanges {
next unless ($right);
my $obj;
- if ($object_type eq 'RT::System') {
- $obj = $RT::System;
- } elsif ($RT::ACE::OBJECT_TYPES{$object_type}) {
- $obj = $object_type->new($session{'CurrentUser'});
+ if ($object_type eq 'RT::Queue') {
+ $obj = RT::Queue->new($session{'CurrentUser'});
+ $obj->Load($object_id);
+ } elsif ($object_type eq 'RT::Group') {
+ $obj = RT::Group->new($session{'CurrentUser'});
$obj->Load($object_id);
+
+ } elsif ($object_type eq 'RT::System') {
+ $obj = $RT::System;
} else {
- push (@results, loc("System Error"). ': '.
+ push (@results, loc("System Error").
loc("Rights could not be revoked for [_1]", $object_type));
next;
}
@@ -1053,12 +859,52 @@ sub UpdateRecordObject {
@_
);
- my $Object = $args{'Object'};
- my @results = $Object->Update(AttributesRef => $args{'AttributesRef'},
- ARGSRef => $args{'ARGSRef'},
- AttributePrefix => $args{'AttributePrefix'}
- );
+ my (@results);
+
+ my $object = $args{'Object'};
+ my $attributes = $args{'AttributesRef'};
+ my $ARGSRef = $args{'ARGSRef'};
+ foreach my $attribute (@$attributes) {
+ my $value;
+ if ( defined $ARGSRef->{$attribute} ) {
+ $value = $ARGSRef->{$attribute};
+ }
+ elsif (
+ defined( $args{'AttributePrefix'} )
+ && defined(
+ $ARGSRef->{ $args{'AttributePrefix'} . "-" . $attribute }
+ )
+ ) {
+ $value = $ARGSRef->{ $args{'AttributePrefix'} . "-" . $attribute };
+
+ } else {
+ next;
+ }
+ $value =~ s/\r\n/\n/gs;
+
+ if ($value ne $object->$attribute()){
+
+ my $method = "Set$attribute";
+ my ( $code, $msg ) = $object->$method($value);
+
+ push @results, loc($attribute) . ': ' . loc_fuzzy($msg);
+=for loc
+ "[_1] could not be set to [_2].", # loc
+ "That is already the current value", # loc
+ "No value sent to _Set!\n", # loc
+ "Illegal value for [_1]", # loc
+ "The new value has been set.", # loc
+ "No column specified", # loc
+ "Immutable field", # loc
+ "Nonexistant field?", # loc
+ "Invalid data", # loc
+ "Couldn't find row", # loc
+ "Missing a primary key?: [_1]", # loc
+ "Found Object", # loc
+=cut
+ };
+ }
return (@results);
}
@@ -1107,17 +953,6 @@ sub ProcessCustomFieldUpdates {
my ( $err, $msg ) = $Object->DeleteValue($id);
push ( @results, $msg );
}
-
- my $vals = $Object->Values();
- while (my $cfv = $vals->Next()) {
- if (my $so = $ARGSRef->{ 'CustomField-' . $Object->Id . '-SortOrder' . $cfv->Id }) {
- if ($cfv->SortOrder != $so) {
- my ( $err, $msg ) = $cfv->SetSortOrder($so);
- push ( @results, $msg );
- }
- }
- }
-
return (@results);
}
@@ -1150,12 +985,10 @@ sub ProcessTicketBasics {
TimeEstimated
TimeWorked
TimeLeft
- Type
Status
Queue
);
-
if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) {
my $tempqueue = RT::Queue->new($RT::SystemUser);
$tempqueue->Load( $ARGSRef->{'Queue'} );
@@ -1164,11 +997,6 @@ sub ProcessTicketBasics {
}
}
-
- # Status isn't a field that can be set to a null value.
- # RT core complains if you try
- delete $ARGSRef->{'Status'} unless ($ARGSRef->{'Status'});
-
my @results = UpdateRecordObject(
AttributesRef => \@attribs,
Object => $TicketObj,
@@ -1197,205 +1025,142 @@ sub ProcessTicketBasics {
# }}}
-sub ProcessTicketCustomFieldUpdates {
- my %args = @_;
- $args{'Object'} = delete $args{'TicketObj'};
- my $ARGSRef = { %{ $args{'ARGSRef'} } };
+# {{{ Sub ProcessTicketCustomFieldUpdates
- # Build up a list of objects that we want to work with
- my %custom_fields_to_mod;
- foreach my $arg ( keys %$ARGSRef ) {
- if ( $arg =~ /^Ticket-(\d+-.*)/) {
- $ARGSRef->{"Object-RT::Ticket-$1"} = delete $ARGSRef->{$arg};
- }
- elsif ( $arg =~ /^CustomField-(\d+-.*)/) {
- $ARGSRef->{"Object-RT::Ticket--$1"} = delete $ARGSRef->{$arg};
- }
- }
+sub ProcessTicketCustomFieldUpdates {
+ my %args = (
+ ARGSRef => undef,
+ @_
+ );
- return ProcessObjectCustomFieldUpdates(%args, ARGSRef => $ARGSRef);
-}
+ my @results;
-sub ProcessObjectCustomFieldUpdates {
- my %args = @_;
my $ARGSRef = $args{'ARGSRef'};
- my @results;
- # Build up a list of objects that we want to work with
+ # Build up a list of tickets that we want to work with
+ my %tickets_to_mod;
my %custom_fields_to_mod;
- foreach my $arg ( keys %$ARGSRef ) {
- # format: Object-<object class>-<object id>-CustomField-<CF id>-<commands>
- next unless $arg =~ /^Object-([\w:]+)-(\d*)-CustomField-(\d+)-(.*)$/;
-
- # For each of those objects, find out what custom fields we want to work with.
- $custom_fields_to_mod{ $1 }{ $2 || 0 }{ $3 }{ $4 } = $ARGSRef->{ $arg };
- }
-
- # For each of those objects
- foreach my $class ( keys %custom_fields_to_mod ) {
- foreach my $id ( keys %{$custom_fields_to_mod{$class}} ) {
- my $Object = $args{'Object'};
- $Object = $class->new( $session{'CurrentUser'} )
- unless $Object && ref $Object eq $class;
-
- $Object->Load( $id ) unless ($Object->id || 0) == $id;
- unless ( $Object->id ) {
- $RT::Logger->warning("Couldn't load object $class #$id");
- next;
- }
+ foreach my $arg ( keys %{$ARGSRef} ) {
+ if ( $arg =~ /^Ticket-(\d+)-CustomField-(\d+)-/ ) {
- foreach my $cf ( keys %{ $custom_fields_to_mod{ $class }{ $id } } ) {
- my $CustomFieldObj = RT::CustomField->new( $session{'CurrentUser'} );
- $CustomFieldObj->LoadById( $cf );
- unless ( $CustomFieldObj->id ) {
- $RT::Logger->warning("Couldn't load custom field #$id");
- next;
- }
- push @results, _ProcessObjectCustomFieldUpdates(
- Prefix => "Object-$class-$id-CustomField-$cf-",
- Object => $Object,
- CustomField => $CustomFieldObj,
- ARGS => $custom_fields_to_mod{$class}{$id}{$cf},
- );
- }
+ # For each of those tickets, find out what custom fields we want to work with.
+ $custom_fields_to_mod{$1}{$2} = 1;
}
}
- return @results;
-}
-
-sub _ProcessObjectCustomFieldUpdates {
- my %args = @_;
- my $cf = $args{'CustomField'};
- my $cf_type = $cf->Type;
-
- my @results;
- foreach my $arg ( keys %{ $args{'ARGS'} } ) {
-
- next if $arg =~ /Category$/;
- # since http won't pass in a form element with a null value, we need
- # to fake it
- if ( $arg eq 'Values-Magic' ) {
- # We don't care about the magic, if there's really a values element;
- next if $args{'ARGS'}->{'Value'} || $args{'ARGS'}->{'Values'};
+ # For each of those tickets
+ foreach my $tick ( keys %custom_fields_to_mod ) {
+ my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
+ $Ticket->Load($tick);
- # "Empty" values does not mean anything for Image and Binary fields
- next if $cf_type =~ /^(?:Image|Binary)$/;
+ # For each custom field
+ foreach my $cf ( keys %{ $custom_fields_to_mod{$tick} } ) {
- $arg = 'Values';
- $args{'ARGS'}->{'Values'} = undef;
- }
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ $CustomFieldObj->LoadById($cf);
- my @values = ();
- if ( ref $args{'ARGS'}->{ $arg } eq 'ARRAY' ) {
- @values = @{ $args{'ARGS'}->{$arg} };
- } elsif ( $cf_type =~ /text/i ) { # Both Text and Wikitext
- @values = ($args{'ARGS'}->{$arg});
- } elsif ( defined( $args{'ARGS'}->{ $arg } ) ) {
- @values = split /\n/, $args{'ARGS'}->{ $arg };
- }
-
- if ( ( $cf_type eq 'Freeform' && !$cf->SingleValue ) || $cf_type =~ /text/i ) {
- s/\r//g foreach @values;
- }
- @values = grep defined && $_ ne '', @values;
+ foreach my $arg ( keys %{$ARGSRef} ) {
+ # since http won't pass in a form element with a null value, we need
+ # to fake it
+ if ($arg =~ /^(.*?)-Values-Magic$/ ) {
+ # We don't care about the magic, if there's really a values element;
+ next if (exists $ARGSRef->{$1.'-Values'}) ;
- if ( $arg eq 'AddValue' || $arg eq 'Value' ) {
- foreach my $value (@values) {
- my ( $val, $msg ) = $args{'Object'}->AddCustomFieldValue(
- Field => $cf->id,
- Value => $value
- );
- push ( @results, $msg );
- }
- }
- elsif ( $arg eq 'Upload' ) {
- my $value_hash = _UploadedFile( $args{'Prefix'} . $arg ) or next;
- my ( $val, $msg ) = $args{'Object'}->AddCustomFieldValue(
- %$value_hash,
- Field => $cf,
- );
- push ( @results, $msg );
- }
- elsif ( $arg eq 'DeleteValues' ) {
- foreach my $value ( @values ) {
- my ( $val, $msg ) = $args{'Object'}->DeleteCustomFieldValue(
- Field => $cf,
- Value => $value,
- );
- push ( @results, $msg );
- }
- }
- elsif ( $arg eq 'DeleteValueIds' ) {
- foreach my $value ( @values ) {
- my ( $val, $msg ) = $args{'Object'}->DeleteCustomFieldValue(
- Field => $cf,
- ValueId => $value,
- );
- push ( @results, $msg );
- }
- }
- elsif ( $arg eq 'Values' && !$cf->Repeated ) {
- my $cf_values = $args{'Object'}->CustomFieldValues( $cf->id );
-
- my %values_hash;
- foreach my $value ( @values ) {
- # build up a hash of values that the new set has
- $values_hash{$value} = 1;
- next if $cf_values->HasEntry( $value );
-
- my ( $val, $msg ) = $args{'Object'}->AddCustomFieldValue(
- Field => $cf,
- Value => $value
- );
- push ( @results, $msg );
- }
-
- $cf_values->RedoSearch;
- while ( my $cf_value = $cf_values->Next ) {
- next if $values_hash{ $cf_value->Content };
-
- my ( $val, $msg ) = $args{'Object'}->DeleteCustomFieldValue(
- Field => $cf,
- Value => $cf_value->Content
- );
- push ( @results, $msg);
- }
- }
- elsif ( $arg eq 'Values' ) {
- my $cf_values = $args{'Object'}->CustomFieldValues( $cf->id );
-
- # keep everything up to the point of difference, delete the rest
- my $delete_flag;
- foreach my $old_cf (@{$cf_values->ItemsArrayRef}) {
- if (!$delete_flag and @values and $old_cf->Content eq $values[0]) {
- shift @values;
- next;
+ $arg = $1."-Values";
+ $ARGSRef->{$1."-Values"} = undef;
+
+ }
+ next unless ( $arg =~ /^Ticket-$tick-CustomField-$cf-/ );
+ my @values =
+ ( ref( $ARGSRef->{$arg} ) eq 'ARRAY' )
+ ? @{ $ARGSRef->{$arg} }
+ : ( $ARGSRef->{$arg} );
+ if ( ( $arg =~ /-AddValue$/ ) || ( $arg =~ /-Value$/ ) ) {
+ foreach my $value (@values) {
+ next unless ($value);
+ my ( $val, $msg ) = $Ticket->AddCustomFieldValue(
+ Field => $cf,
+ Value => $value
+ );
+ push ( @results, $msg );
+ }
+ }
+ elsif ( $arg =~ /-DeleteValues$/ ) {
+ foreach my $value (@values) {
+ next unless ($value);
+ my ( $val, $msg ) = $Ticket->DeleteCustomFieldValue(
+ Field => $cf,
+ Value => $value
+ );
+ push ( @results, $msg );
+ }
+ }
+ elsif ( $arg =~ /-Values$/ and $CustomFieldObj->Type !~ /Entry/) {
+ my $cf_values = $Ticket->CustomFieldValues($cf);
+
+ my %values_hash;
+ foreach my $value (@values) {
+ next unless ($value);
+
+ # build up a hash of values that the new set has
+ $values_hash{$value} = 1;
+
+ unless ( $cf_values->HasEntry($value) ) {
+ my ( $val, $msg ) = $Ticket->AddCustomFieldValue(
+ Field => $cf,
+ Value => $value
+ );
+ push ( @results, $msg );
+ }
+
+ }
+ while ( my $cf_value = $cf_values->Next ) {
+ unless ( $values_hash{ $cf_value->Content } == 1 ) {
+ my ( $val, $msg ) = $Ticket->DeleteCustomFieldValue(
+ Field => $cf,
+ Value => $cf_value->Content
+ );
+ push ( @results, $msg);
+
+ }
+
+ }
+ }
+ elsif ( $arg =~ /-Values$/ ) {
+ my $cf_values = $Ticket->CustomFieldValues($cf);
+
+ # keep everything up to the point of difference, delete the rest
+ my $delete_flag;
+ foreach my $old_cf (@{$cf_values->ItemsArrayRef}) {
+ if (!$delete_flag and @values and $old_cf->Content eq $values[0]) {
+ shift @values;
+ next;
+ }
+
+ $delete_flag ||= 1;
+ $old_cf->Delete;
+ }
+
+ # now add/replace extra things, if any
+ foreach my $value (@values) {
+ my ( $val, $msg ) = $Ticket->AddCustomFieldValue(
+ Field => $cf,
+ Value => $value
+ );
+ push ( @results, $msg );
+ }
+ }
+ else {
+ push ( @results, "User asked for an unknown update type for custom field " . $cf->Name . " for ticket " . $Ticket->id );
}
-
- $delete_flag ||= 1;
- $old_cf->Delete;
- }
-
- # now add/replace extra things, if any
- foreach my $value ( @values ) {
- my ( $val, $msg ) = $args{'Object'}->AddCustomFieldValue(
- Field => $cf,
- Value => $value
- );
- push ( @results, $msg );
}
}
- else {
- push ( @results,
- loc("User asked for an unknown update type for custom field [_1] for [_2] object #[_3]",
- $cf->Name, ref $args{'Object'}, $args{'Object'}->id )
- );
- }
+ return (@results);
}
- return @results;
}
+# }}}
+
# {{{ sub ProcessTicketWatchers
=head2 ProcessTicketWatchers ( TicketObj => $Ticket, ARGSRef => \%ARGS );
@@ -1415,30 +1180,27 @@ sub ProcessTicketWatchers {
my $Ticket = $args{'TicketObj'};
my $ARGSRef = $args{'ARGSRef'};
- # Munge watchers
+ # {{{ Munge watchers
foreach my $key ( keys %$ARGSRef ) {
- # Delete deletable watchers
- if ( ( $key =~ /^Ticket-DeleteWatcher-Type-(.*)-Principal-(\d+)$/ ) )
- {
- my ( $code, $msg ) = $Ticket->DeleteWatcher(
- PrincipalId => $2,
- Type => $1
- );
+ # {{{ Delete deletable watchers
+ if ( ( $key =~ /^Ticket-DelWatcher-Type-(.*)-Principal-(\d+)$/ ) ) {
+ my ( $code, $msg ) =
+ $Ticket->DeleteWatcher(PrincipalId => $2,
+ Type => $1);
push @results, $msg;
}
# Delete watchers in the simple style demanded by the bulk manipulator
elsif ( $key =~ /^Delete(Requestor|Cc|AdminCc)$/ ) {
- my ( $code, $msg ) = $Ticket->DeleteWatcher(
- Email => $ARGSRef->{$key},
- Type => $1
- );
+ my ( $code, $msg ) = $Ticket->DeleteWatcher( Type => $ARGSRef->{$key}, PrincipalId => $1 );
push @results, $msg;
}
- # Add new wathchers by email address
+ # }}}
+
+ # Add new wathchers by email address
elsif ( ( $ARGSRef->{$key} =~ /^(AdminCc|Cc|Requestor)$/ )
and ( $key =~ /^WatcherTypeEmail(\d*)$/ ) )
{
@@ -1461,21 +1223,18 @@ sub ProcessTicketWatchers {
}
# Add new watchers by owner
- elsif ( $key =~ /^Ticket-AddWatcher-Principal-(\d*)$/ ) {
- my $principal_id = $1;
- my $form = $ARGSRef->{$key};
- foreach my $value ( ref($form) ? @{$form} : ($form) ) {
- next unless $value =~ /^(?:AdminCc|Cc|Requestor)$/i;
+ elsif ( ( $ARGSRef->{$key} =~ /^(AdminCc|Cc|Requestor)$/ )
+ and ( $key =~ /^Ticket-AddWatcher-Principal-(\d*)$/ ) ) {
- my ( $code, $msg ) = $Ticket->AddWatcher(
- Type => $value,
- PrincipalId => $principal_id
- );
- push @results, $msg;
- }
+ #They're in this order because otherwise $1 gets clobbered :/
+ my ( $code, $msg ) =
+ $Ticket->AddWatcher( Type => $ARGSRef->{$key}, PrincipalId => $1 );
+ push @results, $msg;
}
-
}
+
+ # }}}
+
return (@results);
}
@@ -1517,7 +1276,7 @@ sub ProcessTicketDates {
my $DateObj = RT::Date->new( $session{'CurrentUser'} );
#If it's something other than just whitespace
- if ( $ARGSRef->{ $field . '_Date' } && ($ARGSRef->{ $field . '_Date' } ne '') ) {
+ if ( $ARGSRef->{ $field . '_Date' } ne '' ) {
$DateObj->Set(
Format => 'unknown',
Value => $ARGSRef->{ $field . '_Date' }
@@ -1555,30 +1314,6 @@ sub ProcessTicketLinks {
my $Ticket = $args{'TicketObj'};
my $ARGSRef = $args{'ARGSRef'};
-
- my (@results) = ProcessRecordLinks(RecordObj => $Ticket,
- ARGSRef => $ARGSRef);
-
- #Merge if we need to
- if ( $ARGSRef->{ $Ticket->Id . "-MergeInto" } ) {
- my ( $val, $msg ) =
- $Ticket->MergeInto( $ARGSRef->{ $Ticket->Id . "-MergeInto" } );
- push @results, $msg;
- }
-
- return (@results);
-}
-
-# }}}
-
-sub ProcessRecordLinks {
- my %args = ( RecordObj => undef,
- ARGSRef => undef,
- @_ );
-
- my $Record = $args{'RecordObj'};
- my $ARGSRef = $args{'ARGSRef'};
-
my (@results);
# Delete links that are gone gone gone.
@@ -1590,7 +1325,7 @@ sub ProcessRecordLinks {
push @results,
"Trying to delete: Base: $base Target: $target Type $type";
- my ( $val, $msg ) = $Record->DeleteLink( Base => $base,
+ my ( $val, $msg ) = $Ticket->DeleteLink( Base => $base,
Type => $type,
Target => $target );
@@ -1603,18 +1338,18 @@ sub ProcessRecordLinks {
my @linktypes = qw( DependsOn MemberOf RefersTo );
foreach my $linktype (@linktypes) {
- if ( $ARGSRef->{ $Record->Id . "-$linktype" } ) {
- for my $luri ( split ( / /, $ARGSRef->{ $Record->Id . "-$linktype" } ) ) {
+ if ( $ARGSRef->{ $Ticket->Id . "-$linktype" } ) {
+ for my $luri ( split ( / /, $ARGSRef->{ $Ticket->Id . "-$linktype" } ) ) {
$luri =~ s/\s*$//; # Strip trailing whitespace
- my ( $val, $msg ) = $Record->AddLink( Target => $luri,
+ my ( $val, $msg ) = $Ticket->AddLink( Target => $luri,
Type => $linktype );
push @results, $msg;
}
}
- if ( $ARGSRef->{ "$linktype-" . $Record->Id } ) {
+ if ( $ARGSRef->{ "$linktype-" . $Ticket->Id } ) {
- for my $luri ( split ( / /, $ARGSRef->{ "$linktype-" . $Record->Id } ) ) {
- my ( $val, $msg ) = $Record->AddLink( Base => $luri,
+ for my $luri ( split ( / /, $ARGSRef->{ "$linktype-" . $Ticket->Id } ) ) {
+ my ( $val, $msg ) = $Ticket->AddLink( Base => $luri,
Type => $linktype );
push @results, $msg;
@@ -1622,68 +1357,18 @@ sub ProcessRecordLinks {
}
}
- return (@results);
-}
-
-
-=head2 _UploadedFile ( $arg );
-
-Takes a CGI parameter name; if a file is uploaded under that name,
-return a hash reference suitable for AddCustomFieldValue's use:
-C<( Value => $filename, LargeContent => $content, ContentType => $type )>.
-
-Returns C<undef> if no files were uploaded in the C<$arg> field.
-
-=cut
-
-sub _UploadedFile {
- my $arg = shift;
- my $cgi_object = $m->cgi_object;
- my $fh = $cgi_object->upload($arg) or return undef;
- my $upload_info = $cgi_object->uploadInfo($fh);
-
- my $filename = "$fh";
- $filename =~ s#^.*[\\/]##;
- binmode($fh);
-
- return {
- Value => $filename,
- LargeContent => do { local $/; scalar <$fh> },
- ContentType => $upload_info->{'Content-Type'},
- };
-}
-
-=head2 _load_container_object ( $type, $id );
-
-Instantiate container object for saving searches.
-
-=cut
-
-sub _load_container_object {
- my ($obj_type, $obj_id) = @_;
- return RT::SavedSearch->new($session{'CurrentUser'})->_load_privacy_object($obj_type, $obj_id);
-}
-
-=head2 _parse_saved_search ( $arg );
-
-Given a serialization string for saved search, and returns the
-container object and the search id.
-
-=cut
-
-sub _parse_saved_search {
- my $spec = shift;
- return unless $spec;
- if ($spec !~ /^(.*?)-(\d+)-SavedSearch-(\d+)$/ ) {
- return;
+ #Merge if we need to
+ if ( $ARGSRef->{ $Ticket->Id . "-MergeInto" } ) {
+ my ( $val, $msg ) =
+ $Ticket->MergeInto( $ARGSRef->{ $Ticket->Id . "-MergeInto" } );
+ push @results, $msg;
}
- my $obj_type = $1;
- my $obj_id = $2;
- my $search_id = $3;
- return (_load_container_object ($obj_type, $obj_id), $search_id);
+ return (@results);
}
+# }}}
+
eval "require RT::Interface::Web_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/Web_Vendor.pm});
eval "require RT::Interface::Web_Local";
diff --git a/rt/lib/RT/Interface/Web_Vendor.pm b/rt/lib/RT/Interface/Web_Vendor.pm
new file mode 100644
index 000000000..1999096a7
--- /dev/null
+++ b/rt/lib/RT/Interface/Web_Vendor.pm
@@ -0,0 +1,201 @@
+# Copyright (c) 2004 Ivan Kohler <ivan-rt@420.am>
+# Copyright (c) 2008 Freeside Internet Services, Inc.
+#
+# 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.
+
+=head1 NAME
+
+RT::Interface::Web_Vendor
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+Freeside vendor overlay for RT::Interface::Web.
+
+=begin testing
+
+use_ok(RT::Interface::Web_Vendor);
+
+=end testing
+
+=cut
+
+#package RT::Interface::Web;
+#use strict;
+
+package HTML::Mason::Commands;
+use strict;
+
+=head2 ProcessTicketCustomers
+
+=cut
+
+sub ProcessTicketCustomers {
+ my %args = (
+ TicketObj => undef,
+ ARGSRef => undef,
+ Debug => 0,
+ @_
+ );
+ my @results = ();
+
+ my $Ticket = $args{'TicketObj'};
+ my $ARGSRef = $args{'ARGSRef'};
+ my $Debug = $args{'Debug'};
+ my $me = 'ProcessTicketCustomers';
+
+ ### false laziness w/RT::Interface::Web::ProcessTicketLinks
+ # Delete links that are gone gone gone.
+ foreach my $arg ( keys %$ARGSRef ) {
+ if ( $arg =~ /DeleteLink-(.*?)-(DependsOn|MemberOf|RefersTo)-(.*)$/ ) {
+ my $base = $1;
+ my $type = $2;
+ my $target = $3;
+
+ push @results,
+ "Trying to delete: Base: $base Target: $target Type $type";
+ my ( $val, $msg ) = $Ticket->DeleteLink( Base => $base,
+ Type => $type,
+ Target => $target );
+
+ push @results, $msg;
+
+ }
+
+ }
+ ###
+
+ ###
+ #find new customers
+ ###
+
+ my @custnums = map { /^Ticket-AddCustomer-(\d+)$/; $1 }
+ grep { /^Ticket-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
+ keys %$ARGSRef;
+
+ #my @delete_custnums =
+ # map { /^Ticket-AddCustomer-(\d+)$/; $1 }
+ # grep { /^Ticket-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
+ # keys %$ARGSRef;
+
+ ###
+ #figure out if we're going to auto-link requestors, and find them if so
+ ###
+
+ my $num_cur_cust = $Ticket->Customers->Count;
+ my $num_new_cust = scalar(@custnums);
+ warn "$me: $num_cur_cust current customers / $num_new_cust new customers\n"
+ if $Debug;
+
+ #if we're linking the first ticket to one customer
+ my $link_requestors = ( $num_cur_cust == 0 && $num_new_cust == 1 );
+ warn "$me: adding a single customer to a previously customerless".
+ " ticket, so linking customers to requestor too\n"
+ if $Debug && $link_requestors;
+
+ my @Requestors = ();
+ if ( $link_requestors ) {
+
+ #find any requestors without customers
+ @Requestors =
+ grep { ! $_->Customers->Count }
+ @{ $Ticket->Requestors->UserMembersObj->ItemsArrayRef };
+
+ warn "$me: found ". scalar(@Requestors). " requestors without".
+ " customers; linking them\n"
+ if $Debug;
+
+ }
+
+ ###
+ #link ticket (and requestors) to customers
+ ###
+
+ foreach my $custnum ( @custnums ) {
+
+ my @link = ( 'Type' => 'MemberOf',
+ 'Target' => "freeside://freeside/cust_main/$custnum",
+ );
+
+ my( $val, $msg ) = $Ticket->AddLink(@link);
+ push @results, $msg;
+
+ #add customer links to requestors
+ foreach my $Requestor ( @Requestors ) {
+ my( $val, $msg ) = $Requestor->AddLink(@link);
+ push @results, $msg;
+ warn "$me: linking requestor to custnum $custnum: $msg\n"
+ if $Debug > 1;
+ }
+
+ }
+
+ return @results;
+
+}
+
+#false laziness w/above... eventually it should go away in favor of this
+sub ProcessObjectCustomers {
+ my %args = (
+ Object => undef,
+ ARGSRef => undef,
+ @_
+ );
+ my @results = ();
+
+ my $Object = $args{'Object'};
+ my $ARGSRef = $args{'ARGSRef'};
+
+ ### false laziness w/RT::Interface::Web::ProcessTicketLinks
+ # Delete links that are gone gone gone.
+ foreach my $arg ( keys %$ARGSRef ) {
+ if ( $arg =~ /DeleteLink-(.*?)-(DependsOn|MemberOf|RefersTo)-(.*)$/ ) {
+ my $base = $1;
+ my $type = $2;
+ my $target = $3;
+
+ push @results,
+ "Trying to delete: Base: $base Target: $target Type $type";
+ my ( $val, $msg ) = $Object->DeleteLink( Base => $base,
+ Type => $type,
+ Target => $target );
+
+ push @results, $msg;
+
+ }
+
+ }
+ ###
+
+ #my @delete_custnums =
+ # map { /^Object-AddCustomer-(\d+)$/; $1 }
+ # grep { /^Object-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
+ # keys %$ARGSRef;
+
+ my @custnums = map { /^Object-AddCustomer-(\d+)$/; $1 }
+ grep { /^Object-AddCustomer-(\d+)$/ && $ARGSRef->{$_} }
+ keys %$ARGSRef;
+
+ foreach my $custnum ( @custnums ) {
+ my( $val, $msg ) =
+ $Object->AddLink( 'Type' => 'MemberOf',
+ 'Target' => "freeside://freeside/cust_main/$custnum",
+ );
+ push @results, $msg;
+ }
+
+ return @results;
+
+}
+
+1;
+
diff --git a/rt/lib/RT/Link.pm b/rt/lib/RT/Link.pm
index 8737b504e..962c378a8 100644
--- a/rt/lib/RT/Link.pm
+++ b/rt/lib/RT/Link.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -122,7 +98,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -131,14 +107,14 @@ Returns the current value of id.
=cut
-=head2 Base
+=item Base
Returns the current value of Base.
(In the database, Base is stored as varchar(240).)
-=head2 SetBase VALUE
+=item SetBase VALUE
Set Base to VALUE.
@@ -149,14 +125,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Target
+=item Target
Returns the current value of Target.
(In the database, Target is stored as varchar(240).)
-=head2 SetTarget VALUE
+=item SetTarget VALUE
Set Target to VALUE.
@@ -167,14 +143,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Type
+=item Type
Returns the current value of Type.
(In the database, Type is stored as varchar(20).)
-=head2 SetType VALUE
+=item SetType VALUE
Set Type to VALUE.
@@ -185,14 +161,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 LocalTarget
+=item LocalTarget
Returns the current value of LocalTarget.
(In the database, LocalTarget is stored as int(11).)
-=head2 SetLocalTarget VALUE
+=item SetLocalTarget VALUE
Set LocalTarget to VALUE.
@@ -203,14 +179,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 LocalBase
+=item LocalBase
Returns the current value of LocalBase.
(In the database, LocalBase is stored as int(11).)
-=head2 SetLocalBase VALUE
+=item SetLocalBase VALUE
Set LocalBase to VALUE.
@@ -221,7 +197,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -230,7 +206,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -239,7 +215,7 @@ Returns the current value of LastUpdated.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -248,7 +224,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -258,29 +234,29 @@ Returns the current value of Created.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Base =>
- {read => 1, write => 1, sql_type => 12, length => 240, is_blob => 0, is_numeric => 0, type => 'varchar(240)', default => ''},
+ {read => 1, write => 1, type => 'varchar(240)', default => ''},
Target =>
- {read => 1, write => 1, sql_type => 12, length => 240, is_blob => 0, is_numeric => 0, type => 'varchar(240)', default => ''},
+ {read => 1, write => 1, type => 'varchar(240)', default => ''},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 20, is_blob => 0, is_numeric => 0, type => 'varchar(20)', default => ''},
+ {read => 1, write => 1, type => 'varchar(20)', default => ''},
LocalTarget =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
LocalBase =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -312,7 +288,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Links.pm b/rt/lib/RT/Links.pm
index 47d78fc3a..7a1773af9 100644
--- a/rt/lib/RT/Links.pm
+++ b/rt/lib/RT/Links.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Link item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Queue.pm b/rt/lib/RT/Queue.pm
index 42fa04c11..b362c9f0d 100755
--- a/rt/lib/RT/Queue.pm
+++ b/rt/lib/RT/Queue.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -131,7 +107,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -140,14 +116,14 @@ Returns the current value of id.
=cut
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -158,14 +134,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -176,14 +152,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 CorrespondAddress
+=item CorrespondAddress
Returns the current value of CorrespondAddress.
(In the database, CorrespondAddress is stored as varchar(120).)
-=head2 SetCorrespondAddress VALUE
+=item SetCorrespondAddress VALUE
Set CorrespondAddress to VALUE.
@@ -194,14 +170,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 CommentAddress
+=item CommentAddress
Returns the current value of CommentAddress.
(In the database, CommentAddress is stored as varchar(120).)
-=head2 SetCommentAddress VALUE
+=item SetCommentAddress VALUE
Set CommentAddress to VALUE.
@@ -212,14 +188,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 InitialPriority
+=item InitialPriority
Returns the current value of InitialPriority.
(In the database, InitialPriority is stored as int(11).)
-=head2 SetInitialPriority VALUE
+=item SetInitialPriority VALUE
Set InitialPriority to VALUE.
@@ -230,14 +206,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 FinalPriority
+=item FinalPriority
Returns the current value of FinalPriority.
(In the database, FinalPriority is stored as int(11).)
-=head2 SetFinalPriority VALUE
+=item SetFinalPriority VALUE
Set FinalPriority to VALUE.
@@ -248,14 +224,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 DefaultDueIn
+=item DefaultDueIn
Returns the current value of DefaultDueIn.
(In the database, DefaultDueIn is stored as int(11).)
-=head2 SetDefaultDueIn VALUE
+=item SetDefaultDueIn VALUE
Set DefaultDueIn to VALUE.
@@ -266,7 +242,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -275,7 +251,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -284,7 +260,7 @@ Returns the current value of Created.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -293,7 +269,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -302,14 +278,14 @@ Returns the current value of LastUpdated.
=cut
-=head2 Disabled
+=item Disabled
Returns the current value of Disabled.
(In the database, Disabled is stored as smallint(6).)
-=head2 SetDisabled VALUE
+=item SetDisabled VALUE
Set Disabled to VALUE.
@@ -321,35 +297,35 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
CorrespondAddress =>
- {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
CommentAddress =>
- {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
InitialPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
FinalPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
DefaultDueIn =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
Disabled =>
- {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
+ {read => 1, write => 1, type => 'smallint(6)', default => '0'},
}
};
@@ -381,7 +357,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Queues.pm b/rt/lib/RT/Queues.pm
index ccf1e4208..60aec9086 100755
--- a/rt/lib/RT/Queues.pm
+++ b/rt/lib/RT/Queues.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Queue item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm
index 262bd208a..b32ef5553 100755
--- a/rt/lib/RT/Record.pm
+++ b/rt/lib/RT/Record.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -74,6 +74,7 @@ our @ISA;
use base qw(RT::Base);
use RT::Date;
+use RT::I18N;
use RT::User;
use RT::Attributes;
use DBIx::SearchBuilder::Record::Cachable;
@@ -862,6 +863,7 @@ sub _DecodeLOB {
elsif ( $ContentEncoding && $ContentEncoding ne 'none' ) {
return ( $self->loc( "Unknown ContentEncoding [_1]", $ContentEncoding ) );
}
+
if ( RT::I18N::IsTextualContentType($ContentType) ) {
$Content = Encode::decode_utf8($Content) unless Encode::is_utf8($Content);
}
@@ -1231,8 +1233,37 @@ sub DependsOn {
# }}}
+# {{{ Customers
+
+=head2 Customers
+
+ This returns an RT::Links object which references all the customers that this object is a member of.
+
+=cut
+
+sub Customers {
+ my( $self, %opt ) = @_;
+ my $Debug = $opt{'Debug'};
+
+ unless ( $self->{'Customers'} ) {
+ $self->{'Customers'} = $self->MemberOf->Clone;
+ $self->{'Customers'}->Limit(
+ FIELD => 'Target',
+ OPERATOR => 'STARTSWITH',
+ VALUE => 'freeside://freeside/cust_main/',
+ );
+ }
+
+ warn "->Customers method called on $self; returning ".
+ ref($self->{'Customers'}). ' object'
+ if $Debug;
+
+ return $self->{'Customers'};
+}
+
+# }}}
# {{{ sub _Links
diff --git a/rt/lib/RT/Scrip.pm b/rt/lib/RT/Scrip.pm
index 11b8d9455..a69dde04e 100755
--- a/rt/lib/RT/Scrip.pm
+++ b/rt/lib/RT/Scrip.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -89,7 +65,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -144,7 +120,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -153,14 +129,14 @@ Returns the current value of id.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -171,14 +147,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ScripCondition
+=item ScripCondition
Returns the current value of ScripCondition.
(In the database, ScripCondition is stored as int(11).)
-=head2 SetScripCondition VALUE
+=item SetScripCondition VALUE
Set ScripCondition to VALUE.
@@ -189,7 +165,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ScripConditionObj
+=item ScripConditionObj
Returns the ScripCondition Object which has the id returned by ScripCondition
@@ -203,14 +179,14 @@ sub ScripConditionObj {
return($ScripCondition);
}
-=head2 ScripAction
+=item ScripAction
Returns the current value of ScripAction.
(In the database, ScripAction is stored as int(11).)
-=head2 SetScripAction VALUE
+=item SetScripAction VALUE
Set ScripAction to VALUE.
@@ -221,7 +197,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ScripActionObj
+=item ScripActionObj
Returns the ScripAction Object which has the id returned by ScripAction
@@ -235,14 +211,14 @@ sub ScripActionObj {
return($ScripAction);
}
-=head2 ConditionRules
+=item ConditionRules
Returns the current value of ConditionRules.
(In the database, ConditionRules is stored as text.)
-=head2 SetConditionRules VALUE
+=item SetConditionRules VALUE
Set ConditionRules to VALUE.
@@ -253,14 +229,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ActionRules
+=item ActionRules
Returns the current value of ActionRules.
(In the database, ActionRules is stored as text.)
-=head2 SetActionRules VALUE
+=item SetActionRules VALUE
Set ActionRules to VALUE.
@@ -271,14 +247,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 CustomIsApplicableCode
+=item CustomIsApplicableCode
Returns the current value of CustomIsApplicableCode.
(In the database, CustomIsApplicableCode is stored as text.)
-=head2 SetCustomIsApplicableCode VALUE
+=item SetCustomIsApplicableCode VALUE
Set CustomIsApplicableCode to VALUE.
@@ -289,14 +265,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 CustomPrepareCode
+=item CustomPrepareCode
Returns the current value of CustomPrepareCode.
(In the database, CustomPrepareCode is stored as text.)
-=head2 SetCustomPrepareCode VALUE
+=item SetCustomPrepareCode VALUE
Set CustomPrepareCode to VALUE.
@@ -307,14 +283,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 CustomCommitCode
+=item CustomCommitCode
Returns the current value of CustomCommitCode.
(In the database, CustomCommitCode is stored as text.)
-=head2 SetCustomCommitCode VALUE
+=item SetCustomCommitCode VALUE
Set CustomCommitCode to VALUE.
@@ -325,14 +301,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Stage
+=item Stage
Returns the current value of Stage.
(In the database, Stage is stored as varchar(32).)
-=head2 SetStage VALUE
+=item SetStage VALUE
Set Stage to VALUE.
@@ -343,14 +319,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Queue
+=item Queue
Returns the current value of Queue.
(In the database, Queue is stored as int(11).)
-=head2 SetQueue VALUE
+=item SetQueue VALUE
Set Queue to VALUE.
@@ -361,7 +337,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 QueueObj
+=item QueueObj
Returns the Queue Object which has the id returned by Queue
@@ -375,14 +351,14 @@ sub QueueObj {
return($Queue);
}
-=head2 Template
+=item Template
Returns the current value of Template.
(In the database, Template is stored as int(11).)
-=head2 SetTemplate VALUE
+=item SetTemplate VALUE
Set Template to VALUE.
@@ -393,7 +369,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 TemplateObj
+=item TemplateObj
Returns the Template Object which has the id returned by Template
@@ -407,7 +383,7 @@ sub TemplateObj {
return($Template);
}
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -416,7 +392,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -425,7 +401,7 @@ Returns the current value of Created.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -434,7 +410,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -444,41 +420,41 @@ Returns the current value of LastUpdated.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
ScripCondition =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
ScripAction =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
ConditionRules =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
ActionRules =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
CustomIsApplicableCode =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
CustomPrepareCode =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
CustomCommitCode =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
Stage =>
- {read => 1, write => 1, sql_type => 12, length => 32, is_blob => 0, is_numeric => 0, type => 'varchar(32)', default => ''},
+ {read => 1, write => 1, type => 'varchar(32)', default => ''},
Queue =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Template =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -510,7 +486,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/ScripAction.pm b/rt/lib/RT/ScripAction.pm
index daa74f3d6..26824df5d 100755
--- a/rt/lib/RT/ScripAction.pm
+++ b/rt/lib/RT/ScripAction.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -119,7 +95,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -128,14 +104,14 @@ Returns the current value of id.
=cut
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -146,14 +122,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -164,14 +140,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ExecModule
+=item ExecModule
Returns the current value of ExecModule.
(In the database, ExecModule is stored as varchar(60).)
-=head2 SetExecModule VALUE
+=item SetExecModule VALUE
Set ExecModule to VALUE.
@@ -182,14 +158,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Argument
+=item Argument
Returns the current value of Argument.
(In the database, Argument is stored as varchar(255).)
-=head2 SetArgument VALUE
+=item SetArgument VALUE
Set Argument to VALUE.
@@ -200,7 +176,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -209,7 +185,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -218,7 +194,7 @@ Returns the current value of Created.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -227,7 +203,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -237,27 +213,27 @@ Returns the current value of LastUpdated.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
ExecModule =>
- {read => 1, write => 1, sql_type => 12, length => 60, is_blob => 0, is_numeric => 0, type => 'varchar(60)', default => ''},
+ {read => 1, write => 1, type => 'varchar(60)', default => ''},
Argument =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -289,7 +265,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/ScripActions.pm b/rt/lib/RT/ScripActions.pm
index b186fb857..614ff374f 100755
--- a/rt/lib/RT/ScripActions.pm
+++ b/rt/lib/RT/ScripActions.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::ScripAction item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/ScripCondition.pm b/rt/lib/RT/ScripCondition.pm
index 3303398d3..fe0aa2d5a 100755
--- a/rt/lib/RT/ScripCondition.pm
+++ b/rt/lib/RT/ScripCondition.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -122,7 +98,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -131,14 +107,14 @@ Returns the current value of id.
=cut
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -149,14 +125,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -167,14 +143,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ExecModule
+=item ExecModule
Returns the current value of ExecModule.
(In the database, ExecModule is stored as varchar(60).)
-=head2 SetExecModule VALUE
+=item SetExecModule VALUE
Set ExecModule to VALUE.
@@ -185,14 +161,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Argument
+=item Argument
Returns the current value of Argument.
(In the database, Argument is stored as varchar(255).)
-=head2 SetArgument VALUE
+=item SetArgument VALUE
Set Argument to VALUE.
@@ -203,14 +179,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ApplicableTransTypes
+=item ApplicableTransTypes
Returns the current value of ApplicableTransTypes.
(In the database, ApplicableTransTypes is stored as varchar(60).)
-=head2 SetApplicableTransTypes VALUE
+=item SetApplicableTransTypes VALUE
Set ApplicableTransTypes to VALUE.
@@ -221,7 +197,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -230,7 +206,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -239,7 +215,7 @@ Returns the current value of Created.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -248,7 +224,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -258,29 +234,29 @@ Returns the current value of LastUpdated.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
ExecModule =>
- {read => 1, write => 1, sql_type => 12, length => 60, is_blob => 0, is_numeric => 0, type => 'varchar(60)', default => ''},
+ {read => 1, write => 1, type => 'varchar(60)', default => ''},
Argument =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
ApplicableTransTypes =>
- {read => 1, write => 1, sql_type => 12, length => 60, is_blob => 0, is_numeric => 0, type => 'varchar(60)', default => ''},
+ {read => 1, write => 1, type => 'varchar(60)', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -312,7 +288,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/ScripConditions.pm b/rt/lib/RT/ScripConditions.pm
index 623ba10c3..34f788d9c 100755
--- a/rt/lib/RT/ScripConditions.pm
+++ b/rt/lib/RT/ScripConditions.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::ScripCondition item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Scrips.pm b/rt/lib/RT/Scrips.pm
index 684012f10..a39443136 100755
--- a/rt/lib/RT/Scrips.pm
+++ b/rt/lib/RT/Scrips.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Scrip item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/SearchBuilder.pm b/rt/lib/RT/SearchBuilder.pm
index 62ae13e70..aa915d433 100644
--- a/rt/lib/RT/SearchBuilder.pm
+++ b/rt/lib/RT/SearchBuilder.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -69,7 +69,7 @@ ok (require RT::SearchBuilder);
package RT::SearchBuilder;
use RT::Base;
-use DBIx::SearchBuilder "1.40";
+use DBIx::SearchBuilder "1.50";
use strict;
use vars qw(@ISA);
diff --git a/rt/lib/RT/Template.pm b/rt/lib/RT/Template.pm
index a46eef117..f73ea3ed6 100755
--- a/rt/lib/RT/Template.pm
+++ b/rt/lib/RT/Template.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -86,7 +62,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -129,7 +105,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -138,14 +114,14 @@ Returns the current value of id.
=cut
-=head2 Queue
+=item Queue
Returns the current value of Queue.
(In the database, Queue is stored as int(11).)
-=head2 SetQueue VALUE
+=item SetQueue VALUE
Set Queue to VALUE.
@@ -156,7 +132,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 QueueObj
+=item QueueObj
Returns the Queue Object which has the id returned by Queue
@@ -170,14 +146,14 @@ sub QueueObj {
return($Queue);
}
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -188,14 +164,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Description
+=item Description
Returns the current value of Description.
(In the database, Description is stored as varchar(255).)
-=head2 SetDescription VALUE
+=item SetDescription VALUE
Set Description to VALUE.
@@ -206,14 +182,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Type
+=item Type
Returns the current value of Type.
(In the database, Type is stored as varchar(16).)
-=head2 SetType VALUE
+=item SetType VALUE
Set Type to VALUE.
@@ -224,14 +200,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Language
+=item Language
Returns the current value of Language.
(In the database, Language is stored as varchar(16).)
-=head2 SetLanguage VALUE
+=item SetLanguage VALUE
Set Language to VALUE.
@@ -242,14 +218,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 TranslationOf
+=item TranslationOf
Returns the current value of TranslationOf.
(In the database, TranslationOf is stored as int(11).)
-=head2 SetTranslationOf VALUE
+=item SetTranslationOf VALUE
Set TranslationOf to VALUE.
@@ -260,14 +236,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Content
+=item Content
Returns the current value of Content.
(In the database, Content is stored as blob.)
-=head2 SetContent VALUE
+=item SetContent VALUE
Set Content to VALUE.
@@ -278,7 +254,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -287,7 +263,7 @@ Returns the current value of LastUpdated.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -296,7 +272,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -305,7 +281,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -315,33 +291,33 @@ Returns the current value of Created.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Queue =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Description =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
Language =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
TranslationOf =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Content =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
+ {read => 1, write => 1, type => 'blob', default => ''},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -373,7 +349,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Templates.pm b/rt/lib/RT/Templates.pm
index 9a2acbdc6..37db84086 100755
--- a/rt/lib/RT/Templates.pm
+++ b/rt/lib/RT/Templates.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Template item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Ticket.pm b/rt/lib/RT/Ticket.pm
index 81bbbd004..2f075a20c 100755
--- a/rt/lib/RT/Ticket.pm
+++ b/rt/lib/RT/Ticket.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -86,7 +62,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -168,7 +144,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -177,14 +153,14 @@ Returns the current value of id.
=cut
-=head2 EffectiveId
+=item EffectiveId
Returns the current value of EffectiveId.
(In the database, EffectiveId is stored as int(11).)
-=head2 SetEffectiveId VALUE
+=item SetEffectiveId VALUE
Set EffectiveId to VALUE.
@@ -195,14 +171,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Queue
+=item Queue
Returns the current value of Queue.
(In the database, Queue is stored as int(11).)
-=head2 SetQueue VALUE
+=item SetQueue VALUE
Set Queue to VALUE.
@@ -213,7 +189,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 QueueObj
+=item QueueObj
Returns the Queue Object which has the id returned by Queue
@@ -227,14 +203,14 @@ sub QueueObj {
return($Queue);
}
-=head2 Type
+=item Type
Returns the current value of Type.
(In the database, Type is stored as varchar(16).)
-=head2 SetType VALUE
+=item SetType VALUE
Set Type to VALUE.
@@ -245,14 +221,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 IssueStatement
+=item IssueStatement
Returns the current value of IssueStatement.
(In the database, IssueStatement is stored as int(11).)
-=head2 SetIssueStatement VALUE
+=item SetIssueStatement VALUE
Set IssueStatement to VALUE.
@@ -263,14 +239,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Resolution
+=item Resolution
Returns the current value of Resolution.
(In the database, Resolution is stored as int(11).)
-=head2 SetResolution VALUE
+=item SetResolution VALUE
Set Resolution to VALUE.
@@ -281,14 +257,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Owner
+=item Owner
Returns the current value of Owner.
(In the database, Owner is stored as int(11).)
-=head2 SetOwner VALUE
+=item SetOwner VALUE
Set Owner to VALUE.
@@ -299,14 +275,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Subject
+=item Subject
Returns the current value of Subject.
(In the database, Subject is stored as varchar(200).)
-=head2 SetSubject VALUE
+=item SetSubject VALUE
Set Subject to VALUE.
@@ -317,14 +293,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 InitialPriority
+=item InitialPriority
Returns the current value of InitialPriority.
(In the database, InitialPriority is stored as int(11).)
-=head2 SetInitialPriority VALUE
+=item SetInitialPriority VALUE
Set InitialPriority to VALUE.
@@ -335,14 +311,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 FinalPriority
+=item FinalPriority
Returns the current value of FinalPriority.
(In the database, FinalPriority is stored as int(11).)
-=head2 SetFinalPriority VALUE
+=item SetFinalPriority VALUE
Set FinalPriority to VALUE.
@@ -353,14 +329,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Priority
+=item Priority
Returns the current value of Priority.
(In the database, Priority is stored as int(11).)
-=head2 SetPriority VALUE
+=item SetPriority VALUE
Set Priority to VALUE.
@@ -371,14 +347,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 TimeEstimated
+=item TimeEstimated
Returns the current value of TimeEstimated.
(In the database, TimeEstimated is stored as int(11).)
-=head2 SetTimeEstimated VALUE
+=item SetTimeEstimated VALUE
Set TimeEstimated to VALUE.
@@ -389,14 +365,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 TimeWorked
+=item TimeWorked
Returns the current value of TimeWorked.
(In the database, TimeWorked is stored as int(11).)
-=head2 SetTimeWorked VALUE
+=item SetTimeWorked VALUE
Set TimeWorked to VALUE.
@@ -407,14 +383,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Status
+=item Status
Returns the current value of Status.
(In the database, Status is stored as varchar(10).)
-=head2 SetStatus VALUE
+=item SetStatus VALUE
Set Status to VALUE.
@@ -425,14 +401,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 TimeLeft
+=item TimeLeft
Returns the current value of TimeLeft.
(In the database, TimeLeft is stored as int(11).)
-=head2 SetTimeLeft VALUE
+=item SetTimeLeft VALUE
Set TimeLeft to VALUE.
@@ -443,14 +419,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Told
+=item Told
Returns the current value of Told.
(In the database, Told is stored as datetime.)
-=head2 SetTold VALUE
+=item SetTold VALUE
Set Told to VALUE.
@@ -461,14 +437,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Starts
+=item Starts
Returns the current value of Starts.
(In the database, Starts is stored as datetime.)
-=head2 SetStarts VALUE
+=item SetStarts VALUE
Set Starts to VALUE.
@@ -479,14 +455,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Started
+=item Started
Returns the current value of Started.
(In the database, Started is stored as datetime.)
-=head2 SetStarted VALUE
+=item SetStarted VALUE
Set Started to VALUE.
@@ -497,14 +473,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Due
+=item Due
Returns the current value of Due.
(In the database, Due is stored as datetime.)
-=head2 SetDue VALUE
+=item SetDue VALUE
Set Due to VALUE.
@@ -515,14 +491,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Resolved
+=item Resolved
Returns the current value of Resolved.
(In the database, Resolved is stored as datetime.)
-=head2 SetResolved VALUE
+=item SetResolved VALUE
Set Resolved to VALUE.
@@ -533,7 +509,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -542,7 +518,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -551,7 +527,7 @@ Returns the current value of LastUpdated.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -560,7 +536,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -569,14 +545,14 @@ Returns the current value of Created.
=cut
-=head2 Disabled
+=item Disabled
Returns the current value of Disabled.
(In the database, Disabled is stored as smallint(6).)
-=head2 SetDisabled VALUE
+=item SetDisabled VALUE
Set Disabled to VALUE.
@@ -588,59 +564,59 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
EffectiveId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Queue =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
IssueStatement =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Resolution =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Owner =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Subject =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => '[no subject]'},
+ {read => 1, write => 1, type => 'varchar(200)', default => '[no subject]'},
InitialPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
FinalPriority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Priority =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
TimeEstimated =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
TimeWorked =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Status =>
- {read => 1, write => 1, sql_type => 12, length => 10, is_blob => 0, is_numeric => 0, type => 'varchar(10)', default => ''},
+ {read => 1, write => 1, type => 'varchar(10)', default => ''},
TimeLeft =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Told =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, type => 'datetime', default => ''},
Starts =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, type => 'datetime', default => ''},
Started =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, type => 'datetime', default => ''},
Due =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, type => 'datetime', default => ''},
Resolved =>
- {read => 1, write => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, write => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
Disabled =>
- {read => 1, write => 1, sql_type => 5, length => 6, is_blob => 0, is_numeric => 1, type => 'smallint(6)', default => '0'},
+ {read => 1, write => 1, type => 'smallint(6)', default => '0'},
}
};
@@ -672,7 +648,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/TicketCustomFieldValue.pm b/rt/lib/RT/TicketCustomFieldValue.pm
deleted file mode 100644
index 717647266..000000000
--- a/rt/lib/RT/TicketCustomFieldValue.pm
+++ /dev/null
@@ -1,308 +0,0 @@
-# {{{ BEGIN BPS TAGGED BLOCK
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2004 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., 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
-# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
-# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
-#
-# !! DO NOT EDIT THIS FILE !!
-#
-
-use strict;
-
-
-=head1 NAME
-
-RT::TicketCustomFieldValue
-
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=head1 METHODS
-
-=cut
-
-package RT::TicketCustomFieldValue;
-use RT::Record;
-use RT::CustomField;
-use RT::Ticket;
-
-
-use vars qw( @ISA );
-@ISA= qw( RT::Record );
-
-sub _Init {
- my $self = shift;
-
- $self->Table('TicketCustomFieldValues');
- $self->SUPER::_Init(@_);
-}
-
-
-
-
-
-=head2 Create PARAMHASH
-
-Create takes a hash of values and creates a row in the database:
-
- int(11) 'Ticket'.
- int(11) 'CustomField'.
- varchar(255) 'Content'.
-
-=cut
-
-
-
-
-sub Create {
- my $self = shift;
- my %args = (
- Ticket => '0',
- CustomField => '0',
- Content => '',
-
- @_);
- $self->SUPER::Create(
- Ticket => $args{'Ticket'},
- CustomField => $args{'CustomField'},
- Content => $args{'Content'},
-);
-
-}
-
-
-
-=head2 id
-
-Returns the current value of id.
-(In the database, id is stored as int(11).)
-
-
-=cut
-
-
-=head2 Ticket
-
-Returns the current value of Ticket.
-(In the database, Ticket is stored as int(11).)
-
-
-
-=head2 SetTicket VALUE
-
-
-Set Ticket to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Ticket will be stored as a int(11).)
-
-
-=cut
-
-
-=head2 TicketObj
-
-Returns the Ticket Object which has the id returned by Ticket
-
-
-=cut
-
-sub TicketObj {
- my $self = shift;
- my $Ticket = RT::Ticket->new($self->CurrentUser);
- $Ticket->Load($self->__Value('Ticket'));
- return($Ticket);
-}
-
-=head2 CustomField
-
-Returns the current value of CustomField.
-(In the database, CustomField is stored as int(11).)
-
-
-
-=head2 SetCustomField VALUE
-
-
-Set CustomField to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, CustomField will be stored as a int(11).)
-
-
-=cut
-
-
-=head2 CustomFieldObj
-
-Returns the CustomField Object which has the id returned by CustomField
-
-
-=cut
-
-sub CustomFieldObj {
- my $self = shift;
- my $CustomField = RT::CustomField->new($self->CurrentUser);
- $CustomField->Load($self->__Value('CustomField'));
- return($CustomField);
-}
-
-=head2 Content
-
-Returns the current value of Content.
-(In the database, Content is stored as varchar(255).)
-
-
-
-=head2 SetContent VALUE
-
-
-Set Content to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Content will be stored as a varchar(255).)
-
-
-=cut
-
-
-=head2 Creator
-
-Returns the current value of Creator.
-(In the database, Creator is stored as int(11).)
-
-
-=cut
-
-
-=head2 Created
-
-Returns the current value of Created.
-(In the database, Created is stored as datetime.)
-
-
-=cut
-
-
-=head2 LastUpdatedBy
-
-Returns the current value of LastUpdatedBy.
-(In the database, LastUpdatedBy is stored as int(11).)
-
-
-=cut
-
-
-=head2 LastUpdated
-
-Returns the current value of LastUpdated.
-(In the database, LastUpdated is stored as datetime.)
-
-
-=cut
-
-
-
-sub _CoreAccessible {
- {
-
- id =>
- {read => 1, type => 'int(11)', default => ''},
- Ticket =>
- {read => 1, write => 1, type => 'int(11)', default => '0'},
- CustomField =>
- {read => 1, write => 1, type => 'int(11)', default => '0'},
- Content =>
- {read => 1, write => 1, type => 'varchar(255)', default => ''},
- Creator =>
- {read => 1, auto => 1, type => 'int(11)', default => '0'},
- Created =>
- {read => 1, auto => 1, type => 'datetime', default => ''},
- LastUpdatedBy =>
- {read => 1, auto => 1, type => 'int(11)', default => '0'},
- LastUpdated =>
- {read => 1, auto => 1, type => 'datetime', default => ''},
-
- }
-};
-
-
- eval "require RT::TicketCustomFieldValue_Overlay";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Overlay.pm}) {
- die $@;
- };
-
- eval "require RT::TicketCustomFieldValue_Vendor";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Vendor.pm}) {
- die $@;
- };
-
- eval "require RT::TicketCustomFieldValue_Local";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValue_Local.pm}) {
- die $@;
- };
-
-
-
-
-=head1 SEE ALSO
-
-This class allows "overlay" methods to be placed
-into the following files _Overlay is for a System overlay by the original author,
-_Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
-
-These overlay files can contain new subs or subs to replace existing subs in this module.
-
-If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-
- no warnings qw(redefine);
-
-so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-
-RT::TicketCustomFieldValue_Overlay, RT::TicketCustomFieldValue_Vendor, RT::TicketCustomFieldValue_Local
-
-=cut
-
-
-1;
diff --git a/rt/lib/RT/TicketCustomFieldValue_Overlay.pm b/rt/lib/RT/TicketCustomFieldValue_Overlay.pm
deleted file mode 100644
index 270c5939a..000000000
--- a/rt/lib/RT/TicketCustomFieldValue_Overlay.pm
+++ /dev/null
@@ -1,74 +0,0 @@
-# {{{ BEGIN BPS TAGGED BLOCK
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2004 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., 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
-use strict;
-no warnings qw(redefine);
-
-
-
-=head2 LoadByTicketContentAndCustomField { Ticket => TICKET, CustomField => CUSTOMFIELD, Content => CONTENT }
-
-Loads a custom field value by Ticket, Content and which CustomField it's tied to
-
-=cut
-
-
-sub LoadByTicketContentAndCustomField {
- my $self = shift;
- my %args = ( Ticket => undef,
- CustomField => undef,
- Content => undef,
- @_
- );
-
-
- $self->LoadByCols( Content => $args{'Content'},
- CustomField => $args{'CustomField'},
- Ticket => $args{'Ticket'});
-
-
-}
-
-1;
diff --git a/rt/lib/RT/TicketCustomFieldValues.pm b/rt/lib/RT/TicketCustomFieldValues.pm
deleted file mode 100644
index 2174afef3..000000000
--- a/rt/lib/RT/TicketCustomFieldValues.pm
+++ /dev/null
@@ -1,137 +0,0 @@
-# {{{ BEGIN BPS TAGGED BLOCK
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2004 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., 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
-# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
-# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
-#
-# !! DO NOT EDIT THIS FILE !!
-#
-
-use strict;
-
-
-=head1 NAME
-
- RT::TicketCustomFieldValues -- Class Description
-
-=head1 SYNOPSIS
-
- use RT::TicketCustomFieldValues
-
-=head1 DESCRIPTION
-
-
-=head1 METHODS
-
-=cut
-
-package RT::TicketCustomFieldValues;
-
-use RT::SearchBuilder;
-use RT::TicketCustomFieldValue;
-
-use vars qw( @ISA );
-@ISA= qw(RT::SearchBuilder);
-
-
-sub _Init {
- my $self = shift;
- $self->{'table'} = 'TicketCustomFieldValues';
- $self->{'primary_key'} = 'id';
-
-
- return ( $self->SUPER::_Init(@_) );
-}
-
-
-=head2 NewItem
-
-Returns an empty new RT::TicketCustomFieldValue item
-
-=cut
-
-sub NewItem {
- my $self = shift;
- return(RT::TicketCustomFieldValue->new($self->CurrentUser));
-}
-
- eval "require RT::TicketCustomFieldValues_Overlay";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValues_Overlay.pm}) {
- die $@;
- };
-
- eval "require RT::TicketCustomFieldValues_Vendor";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValues_Vendor.pm}) {
- die $@;
- };
-
- eval "require RT::TicketCustomFieldValues_Local";
- if ($@ && $@ !~ qr{^Can't locate RT/TicketCustomFieldValues_Local.pm}) {
- die $@;
- };
-
-
-
-
-=head1 SEE ALSO
-
-This class allows "overlay" methods to be placed
-into the following files _Overlay is for a System overlay by the original author,
-_Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customizations.
-
-These overlay files can contain new subs or subs to replace existing subs in this module.
-
-If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-
- no warnings qw(redefine);
-
-so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-
-RT::TicketCustomFieldValues_Overlay, RT::TicketCustomFieldValues_Vendor, RT::TicketCustomFieldValues_Local
-
-=cut
-
-
-1;
diff --git a/rt/lib/RT/TicketCustomFieldValues_Overlay.pm b/rt/lib/RT/TicketCustomFieldValues_Overlay.pm
deleted file mode 100644
index 8cbaca574..000000000
--- a/rt/lib/RT/TicketCustomFieldValues_Overlay.pm
+++ /dev/null
@@ -1,108 +0,0 @@
-# {{{ BEGIN BPS TAGGED BLOCK
-#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2004 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., 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
-use strict;
-no warnings qw(redefine);
-
-# {{{ sub LimitToCustomField
-
-=head2 LimitToCustomField FIELD
-
-Limits the returned set to values for the custom field with Id FIELD
-
-=cut
-
-sub LimitToCustomField {
- my $self = shift;
- my $cf = shift;
- return ($self->Limit( FIELD => 'CustomField',
- VALUE => $cf,
- OPERATOR => '='));
-
-}
-
-# }}}
-
-# {{{ sub LimitToTicket
-
-=head2 LimitToTicket TICKETID
-
-Limits the returned set to values for the ticket with Id TICKETID
-
-=cut
-
-sub LimitToTicket {
- my $self = shift;
- my $ticket = shift;
- return ($self->Limit( FIELD => 'Ticket',
- VALUE => $ticket,
- OPERATOR => '='));
-
-}
-
-# }}}
-
-
-=sub HasEntry VALUE
-
-Returns true if this CustomFieldValues collection has an entry with content that eq VALUE
-
-=cut
-
-
-sub HasEntry {
- my $self = shift;
- my $value = shift;
-
- #TODO: this could cache and optimize a fair bit.
- foreach my $item (@{$self->ItemsArrayRef}) {
- return(1) if ($item->Content eq $value);
- }
- return undef;
-
-}
-
-1;
-
diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm
index 90f83a8a8..dad94375f 100644
--- a/rt/lib/RT/Ticket_Overlay.pm
+++ b/rt/lib/RT/Ticket_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -716,6 +716,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 ) {
@@ -1341,43 +1403,52 @@ sub AddWatcher {
@_
);
- return ( 0, "No principal specified" )
- unless $args{'Email'} or $args{'PrincipalId'};
-
- if ( !$args{'PrincipalId'} and $args{'Email'} ) {
- my $user = RT::User->new( $self->CurrentUser );
- $user->LoadByEmail( $args{'Email'} );
- if ( $user->id ) {
- $args{'PrincipalId'} = $user->PrincipalId;
- delete $args{'Email'};
- }
- }
+ # XXX, FIXME, BUG: if only email is provided then we only check
+ # for ModifyTicket right, but must try to get PrincipalId and
+ # check Watch* rights too if user exist
# {{{ Check ACLS
- # ModifyTicket allow you to add any watcher
- return $self->_AddWatcher(%args)
- if $self->CurrentUserHasRight('ModifyTicket');
-
#If the watcher we're trying to add is for the current user
- if ( $self->CurrentUser->PrincipalId == ($args{'PrincipalId'} || 0) ) {
- # If it's an AdminCc and they have 'WatchAsAdminCc'
+ if ( $self->CurrentUser->PrincipalId == ($args{'PrincipalId'} || 0)
+ or lc( $self->CurrentUser->UserObj->EmailAddress )
+ eq lc( RT::User->CanonicalizeEmailAddress( $args{'Email'} ) || '' ) )
+ {
+ # If it's an AdminCc and they don't have
+ # 'WatchAsAdminCc' or 'ModifyTicket', bail
if ( $args{'Type'} eq 'AdminCc' ) {
- return $self->_AddWatcher( %args )
- if $self->CurrentUserHasRight('WatchAsAdminCc');
+ unless ( $self->CurrentUserHasRight('ModifyTicket')
+ or $self->CurrentUserHasRight('WatchAsAdminCc') ) {
+ return ( 0, $self->loc('Permission Denied'))
+ }
}
- # If it's a Requestor or Cc and they have 'Watch'
- elsif ( $args{'Type'} eq 'Cc' || $args{'Type'} eq 'Requestor' ) {
- return $self->_AddWatcher( %args )
- if $self->CurrentUserHasRight('Watch');
+ # If it's a Requestor or Cc and they don't have
+ # 'Watch' or 'ModifyTicket', bail
+ elsif ( ( $args{'Type'} eq 'Cc' ) or ( $args{'Type'} eq 'Requestor' ) ) {
+
+ unless ( $self->CurrentUserHasRight('ModifyTicket')
+ or $self->CurrentUserHasRight('Watch') ) {
+ return ( 0, $self->loc('Permission Denied'))
+ }
}
else {
- $RT::Logger->warning( "AddWatcher got passed a bogus type" );
+ $RT::Logger->warning( "$self -> AddWatcher got passed a bogus type");
return ( 0, $self->loc('Error in parameters to Ticket->AddWatcher') );
}
}
- return ( 0, $self->loc("Permission Denied") );
+ # If the watcher isn't the current user
+ # and the current user doesn't have 'ModifyTicket'
+ # bail
+ else {
+ unless ( $self->CurrentUserHasRight('ModifyTicket') ) {
+ return ( 0, $self->loc("Permission Denied") );
+ }
+ }
+
+ # }}}
+
+ return ( $self->_AddWatcher(%args) );
}
#This contains the meat of AddWatcher. but can be called from a routine like
@@ -1740,6 +1811,25 @@ sub Requestors {
# }}}
+# {{{ sub _Requestors
+
+=head2 _Requestors
+
+Private non-ACLed variant of Reqeustors so that we can look them up for the
+purposes of customer auto-association during create.
+
+=cut
+
+sub _Requestors {
+ my $self = shift;
+
+ my $group = RT::Group->new($RT::SystemUser);
+ $group->LoadTicketRoleGroup(Type => 'Requestor', Ticket => $self->Id);
+ return ($group);
+}
+
+# }}}
+
# {{{ sub Cc
=head2 Cc
@@ -2418,7 +2508,7 @@ sub _RecordNote {
unless ( ($args{'MIMEObj'}->head->get('Message-ID') || '')
=~ /<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@\Q$RT::Organization>/ )
{
- $args{'MIMEObj'}->head->replace( 'RT-Message-ID',
+ $args{'MIMEObj'}->head->set( 'RT-Message-ID',
"<rt-"
. $RT::VERSION . "-"
. $$ . "-"
@@ -2464,7 +2554,13 @@ sub _Links {
unless ( $self->{"$field$type"} ) {
$self->{"$field$type"} = new RT::Links( $self->CurrentUser );
- if ( $self->CurrentUserHasRight('ShowTicket') ) {
+
+ #not sure what this ACL was supposed to do... but returning the
+ # bare (unlimited) RT::Links certainly seems wrong, it causes the
+ # $Ticket->Customers method during creation to return results for every
+ # ticket...
+ #if ( $self->CurrentUserHasRight('ShowTicket') ) {
+
# Maybe this ticket is a merged ticket
my $Tickets = new RT::Tickets( $self->CurrentUser );
# at least to myself
@@ -2481,7 +2577,7 @@ sub _Links {
$self->{"$field$type"}->Limit( FIELD => 'Type',
VALUE => $type )
if ($type);
- }
+ #}
}
return ( $self->{"$field$type"} );
}
@@ -3773,21 +3869,18 @@ See L<RT::Record>
sub CustomFieldValues {
my $self = shift;
my $field = shift;
-
- return $self->SUPER::CustomFieldValues( $field )
- if !$field || $field =~ /^\d+$/;
-
- my $cf = RT::CustomField->new( $self->CurrentUser );
- $cf->LoadByNameAndQueue( Name => $field, Queue => $self->Queue );
- unless ( $cf->id ) {
- $cf->LoadByNameAndQueue( Name => $field, Queue => 0 );
+ if ( $field and $field !~ /^\d+$/ ) {
+ my $cf = RT::CustomField->new( $self->CurrentUser );
+ $cf->LoadByNameAndQueue( Name => $field, Queue => $self->Queue );
+ unless ( $cf->id ) {
+ $cf->LoadByNameAndQueue( Name => $field, Queue => 0 );
+ }
+ unless ( $cf->id ) {
+ # If we didn't find a valid cfid, give up.
+ return RT::CustomFieldValues->new($self->CurrentUser);
+ }
}
-
- # If we didn't find a valid cfid, give up.
- return RT::ObjectCustomFieldValues->new( $self->CurrentUser )
- unless $cf->id;
-
- return $self->SUPER::CustomFieldValues( $cf->id );
+ return $self->SUPER::CustomFieldValues($field);
}
# }}}
diff --git a/rt/lib/RT/Tickets.pm b/rt/lib/RT/Tickets.pm
index 2d98b1ed5..b6b349144 100755
--- a/rt/lib/RT/Tickets.pm
+++ b/rt/lib/RT/Tickets.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Ticket item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Transaction.pm b/rt/lib/RT/Transaction.pm
index 7757b6a0a..ca491a6c7 100755
--- a/rt/lib/RT/Transaction.pm
+++ b/rt/lib/RT/Transaction.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.
-#
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -69,6 +45,7 @@ RT::Transaction
package RT::Transaction;
use RT::Record;
+use RT::Ticket;
use vars qw( @ISA );
@@ -85,21 +62,18 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
- varchar(64) 'ObjectType'.
- int(11) 'ObjectId'.
+ int(11) 'EffectiveTicket'.
+ int(11) 'Ticket'.
int(11) 'TimeTaken'.
varchar(20) 'Type'.
varchar(40) 'Field'.
varchar(255) 'OldValue'.
varchar(255) 'NewValue'.
- varchar(255) 'ReferenceType'.
- int(11) 'OldReference'.
- int(11) 'NewReference'.
- varchar(255) 'Data'.
+ varchar(100) 'Data'.
=cut
@@ -109,30 +83,24 @@ Create takes a hash of values and creates a row in the database:
sub Create {
my $self = shift;
my %args = (
- ObjectType => '',
- ObjectId => '0',
+ EffectiveTicket => '0',
+ Ticket => '0',
TimeTaken => '0',
Type => '',
Field => '',
OldValue => '',
NewValue => '',
- ReferenceType => '',
- OldReference => '',
- NewReference => '',
Data => '',
@_);
$self->SUPER::Create(
- ObjectType => $args{'ObjectType'},
- ObjectId => $args{'ObjectId'},
+ EffectiveTicket => $args{'EffectiveTicket'},
+ Ticket => $args{'Ticket'},
TimeTaken => $args{'TimeTaken'},
Type => $args{'Type'},
Field => $args{'Field'},
OldValue => $args{'OldValue'},
NewValue => $args{'NewValue'},
- ReferenceType => $args{'ReferenceType'},
- OldReference => $args{'OldReference'},
- NewReference => $args{'NewReference'},
Data => $args{'Data'},
);
@@ -140,7 +108,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -149,50 +117,64 @@ Returns the current value of id.
=cut
-=head2 ObjectType
+=item EffectiveTicket
-Returns the current value of ObjectType.
-(In the database, ObjectType is stored as varchar(64).)
+Returns the current value of EffectiveTicket.
+(In the database, EffectiveTicket is stored as int(11).)
-=head2 SetObjectType VALUE
+=item SetEffectiveTicket VALUE
-Set ObjectType to VALUE.
+Set EffectiveTicket to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ObjectType will be stored as a varchar(64).)
+(In the database, EffectiveTicket will be stored as a int(11).)
=cut
-=head2 ObjectId
+=item Ticket
-Returns the current value of ObjectId.
-(In the database, ObjectId is stored as int(11).)
+Returns the current value of Ticket.
+(In the database, Ticket is stored as int(11).)
-=head2 SetObjectId VALUE
+=item SetTicket VALUE
-Set ObjectId to VALUE.
+Set Ticket to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ObjectId will be stored as a int(11).)
+(In the database, Ticket will be stored as a int(11).)
+
+
+=cut
+
+
+=item TicketObj
+
+Returns the Ticket Object which has the id returned by Ticket
=cut
+sub TicketObj {
+ my $self = shift;
+ my $Ticket = RT::Ticket->new($self->CurrentUser);
+ $Ticket->Load($self->__Value('Ticket'));
+ return($Ticket);
+}
-=head2 TimeTaken
+=item TimeTaken
Returns the current value of TimeTaken.
(In the database, TimeTaken is stored as int(11).)
-=head2 SetTimeTaken VALUE
+=item SetTimeTaken VALUE
Set TimeTaken to VALUE.
@@ -203,14 +185,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Type
+=item Type
Returns the current value of Type.
(In the database, Type is stored as varchar(20).)
-=head2 SetType VALUE
+=item SetType VALUE
Set Type to VALUE.
@@ -221,14 +203,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Field
+=item Field
Returns the current value of Field.
(In the database, Field is stored as varchar(40).)
-=head2 SetField VALUE
+=item SetField VALUE
Set Field to VALUE.
@@ -239,14 +221,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 OldValue
+=item OldValue
Returns the current value of OldValue.
(In the database, OldValue is stored as varchar(255).)
-=head2 SetOldValue VALUE
+=item SetOldValue VALUE
Set OldValue to VALUE.
@@ -257,14 +239,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 NewValue
+=item NewValue
Returns the current value of NewValue.
(In the database, NewValue is stored as varchar(255).)
-=head2 SetNewValue VALUE
+=item SetNewValue VALUE
Set NewValue to VALUE.
@@ -275,79 +257,25 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ReferenceType
-
-Returns the current value of ReferenceType.
-(In the database, ReferenceType is stored as varchar(255).)
-
-
-
-=head2 SetReferenceType VALUE
-
-
-Set ReferenceType to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ReferenceType will be stored as a varchar(255).)
-
-
-=cut
-
-
-=head2 OldReference
-
-Returns the current value of OldReference.
-(In the database, OldReference is stored as int(11).)
-
-
-
-=head2 SetOldReference VALUE
-
-
-Set OldReference to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, OldReference will be stored as a int(11).)
-
-
-=cut
-
-
-=head2 NewReference
-
-Returns the current value of NewReference.
-(In the database, NewReference is stored as int(11).)
-
-
-
-=head2 SetNewReference VALUE
-
-
-Set NewReference to VALUE.
-Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, NewReference will be stored as a int(11).)
-
-
-=cut
-
-
-=head2 Data
+=item Data
Returns the current value of Data.
-(In the database, Data is stored as varchar(255).)
+(In the database, Data is stored as varchar(100).)
-=head2 SetData VALUE
+=item SetData VALUE
Set Data to VALUE.
Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, Data will be stored as a varchar(255).)
+(In the database, Data will be stored as a varchar(100).)
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -356,7 +284,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -366,37 +294,31 @@ Returns the current value of Created.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
- ObjectType =>
- {read => 1, write => 1, sql_type => 12, length => 64, is_blob => 0, is_numeric => 0, type => 'varchar(64)', default => ''},
- ObjectId =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, type => 'int(11)', default => ''},
+ EffectiveTicket =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Ticket =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
TimeTaken =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
Type =>
- {read => 1, write => 1, sql_type => 12, length => 20, is_blob => 0, is_numeric => 0, type => 'varchar(20)', default => ''},
+ {read => 1, write => 1, type => 'varchar(20)', default => ''},
Field =>
- {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
+ {read => 1, write => 1, type => 'varchar(40)', default => ''},
OldValue =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
NewValue =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
- ReferenceType =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
- OldReference =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
- NewReference =>
- {read => 1, write => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
Data =>
- {read => 1, write => 1, sql_type => 12, length => 255, is_blob => 0, is_numeric => 0, type => 'varchar(255)', default => ''},
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -428,7 +350,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Transaction_Overlay.pm b/rt/lib/RT/Transaction_Overlay.pm
index 5716d6643..dd1887e33 100644
--- a/rt/lib/RT/Transaction_Overlay.pm
+++ b/rt/lib/RT/Transaction_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -276,7 +276,7 @@ textual part (as defined in RT::I18N::IsTextualContentType). Otherwise,
returns undef.
Takes a paramhash. If the $args{'Quote'} parameter is set, wraps this message
-at $args{'Wrap'}. $args{'Wrap'} defaults to 70.
+at $args{'Wrap'}. $args{'Wrap'} defaults to $RT::MessageBoxWidth - 2 or 70.
If $args{'Type'} is set to C<text/html>, plain texts are upgraded to HTML.
Otherwise, HTML texts are downgraded to plain text. If $args{'Type'} is
@@ -290,6 +290,7 @@ sub Content {
Type => $PreferredContentType,
Quote => 0,
Wrap => 70,
+ Wrap => ( $RT::MessageBoxWidth || 72 ) - 2,
@_
);
@@ -335,7 +336,7 @@ sub Content {
$max = length if ( length > $max );
}
- if ( $max > 76 ) {
+ if ( $max > $args{'Wrap'}+6 ) { # 76 ) {
require Text::Wrapper;
my $wrapper = new Text::Wrapper(
columns => $args{'Wrap'},
diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm
index 447ab1abc..23a475ac6 100755
--- a/rt/lib/RT/Transactions.pm
+++ b/rt/lib/RT/Transactions.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::Transaction item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/URI/freeside.pm b/rt/lib/RT/URI/freeside.pm
new file mode 100644
index 000000000..d73dbacad
--- /dev/null
+++ b/rt/lib/RT/URI/freeside.pm
@@ -0,0 +1,285 @@
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 2004 Kristian Hoffmann <khoff@fire2wire.com>
+# Based on the original RT::URI::base and RT::URI::fsck_com_rt.
+#
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+#
+# (Except where explictly superceded by other copyright notices)
+#
+# 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.
+#
+# 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.
+#
+#
+# END LICENSE BLOCK
+package RT::URI::freeside;
+
+use RT::URI::base;
+use strict;
+use vars qw(@ISA $IntegrationType $URL);
+@ISA = qw/RT::URI::base/;
+
+
+=head1 NAME
+
+RT::URI::freeside
+
+=head1 DESCRIPTION
+
+URI handler for Freeside URIs. See http://www.freeside.biz/ for more
+information on Freeside.
+
+
+=head1 Public subroutines
+
+=over 4
+
+=item FreesideGetConfig CONFKEY
+
+Subroutine that returns the freeside's configuration value(s) for CONFKEY
+as a scalar or list.
+
+=cut
+
+sub FreesideGetConfig { return undef; }
+
+
+=item FreesideURL
+
+Returns the URL for freeside's web interface.
+
+=cut
+
+sub FreesideURL { return $URL; }
+
+
+=item FreesideVersion
+
+Returns a string describing the freeside version being used.
+
+=cut
+
+sub FreesideVersion { return undef; }
+
+
+=item smart_search
+
+A wrapper for the FS::cust_main::smart_search subroutine.
+
+=cut
+
+sub smart_search { return undef; }
+
+
+=item small_custview
+
+A wrapper for the FS::CGI::small_custview subroutine.
+
+=cut
+
+sub small_custview { return 'Freeside integration error!</A>'; }
+
+
+=back
+
+=head1 Private methods
+
+=over 4
+
+=item _FreesideGetRecord
+
+Method returns a hashref of the freeside record referenced in the URI.
+Must be called after ParseURI.
+
+=cut
+
+sub _FreesideGetRecord { return undef; }
+
+
+=item _FreesideURIPrefix
+
+Method that returns the URI prefix for freeside URIs.
+
+=cut
+
+sub _FreesideURIPrefix {
+
+ my $self = shift;
+ return($self->Scheme . '://freeside');
+
+}
+
+=item _FreesideURILabel
+
+Method that returns a short string describing the customer referenced
+in the URI.
+
+=cut
+
+sub _FreesideURILabel {
+
+ my $self = shift;
+
+ $RT::Logger->debug("Called _FreesideURILabel()");
+
+ return unless (exists($self->{'fstable'}) and
+ exists($self->{'fspkey'}));
+
+ my $label;
+ my ($table, $pkey) = ($self->{'fstable'}, $self->{'fspkey'});
+
+ if ($table ne 'cust_main') {
+ warn "FS::${table} not currently supported";
+ return;
+ }
+
+ my $rec = $self->_FreesideGetRecord();
+
+ if (ref($rec) eq 'HASH' and $table eq 'cust_main') {
+ my $name = $rec->{'last'} . ', ' . $rec->{'first'};
+ $name = $rec->{'company'} . " ($name)" if $rec->{'company'};
+ $label = "$pkey: $name";
+ } else {
+ $label = "$pkey: $table";
+ }
+
+ if ($label and !$@) {
+ return($label);
+ } else {
+ return;
+ }
+
+}
+
+=item _FreesideURILabelLong
+
+Method that returns a longer string describing the customer referenced
+in the URI.
+
+=cut
+
+sub _FreesideURILabelLong {
+
+ my $self = shift;
+
+ return $self->_FreesideURILabel();
+
+}
+
+=back
+
+=head1 Public methods
+
+=over 4
+
+=cut
+
+sub ParseURI {
+ my $self = shift;
+ my $uri = shift;
+ my ($table, $pkey);
+
+ my $uriprefix = $self->_FreesideURIPrefix;
+ if ($uri =~ /^$uriprefix\/(\w+)\/(\d+)$/) {
+ $table = $1;
+ $pkey = $2;
+ $self->{'scheme'} = $self->Scheme;
+ } else {
+ return(undef);
+ }
+
+ $self->{'uri'} = "${uriprefix}/${table}/${pkey}";
+ $self->{'fstable'} = $table;
+ $self->{'fspkey'} = $pkey;
+
+
+ my $url = $self->FreesideURL();
+
+ if ($url ne '') {
+ $self->{'href'} = "${url}/view/${table}.cgi?${pkey}";
+ } else {
+ $self->{'href'} = $self->{'uri'};
+ }
+
+ $self->{'uri'};
+
+}
+
+sub Scheme {
+ my $self = shift;
+ return('freeside');
+
+}
+
+sub HREF {
+ my $self = shift;
+ return($self->{'href'} || $self->{'uri'});
+}
+
+sub IsLocal {
+ my $self = shift;
+ return undef;
+}
+
+=item AsString
+
+Return a "pretty" string representing the URI object.
+
+This is meant to be used like this:
+
+ % $re = $uri->Resolver;
+ <A HREF="<% $re->HREF %>"><% $re->AsString %></A>
+
+=cut
+
+sub AsString {
+ my $self = shift;
+ my $prettystring;
+ if ($prettystring = $self->_FreesideURILabel) {
+ return $prettystring;
+ } else {
+ return $self->URI;
+ }
+}
+
+=item AsStringLong
+
+Return a longer (HTML) string representing the URI object.
+
+=cut
+
+sub AsStringLong {
+ my $self = shift;
+ my $prettystring;
+ if ($prettystring = $self->_FreesideURILabelLong || $self->_FreesideURILabel){
+ return $prettystring;
+ } else {
+ return $self->URI;
+ }
+}
+
+$IntegrationType ||= 'Internal';
+eval "require RT::URI::freeside::${RT::URI::freeside::IntegrationType}";
+warn $@ if $@;
+if ($@ &&
+ $@ !~ qr(^Can't locate RT/URI/freeside/${RT::URI::freeside::IntegrationType}.pm)) {
+ die $@;
+};
+
+=back
+
+=cut
+
+1;
diff --git a/rt/lib/RT/URI/freeside/Internal.pm b/rt/lib/RT/URI/freeside/Internal.pm
new file mode 100644
index 000000000..bd7c42ccf
--- /dev/null
+++ b/rt/lib/RT/URI/freeside/Internal.pm
@@ -0,0 +1,145 @@
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 2004 Kristian Hoffmann <khoff@fire2wire.com>
+# Based on the original RT::URI::base and RT::URI::fsck_com_rt.
+#
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+#
+# (Except where explictly superceded by other copyright notices)
+#
+# 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.
+#
+# 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.
+#
+#
+# END LICENSE BLOCK
+#
+use strict;
+no warnings qw(redefine);
+
+#use vars qw($conf);
+
+use FS;
+use FS::UID qw(dbh);
+use FS::CGI qw(popurl);
+use FS::UI::Web::small_custview qw(small_custview);
+use FS::Conf;
+use FS::Record qw(qsearchs qsearch dbdef);
+use FS::cust_main;
+use FS::cust_svc;
+
+=head1 NAME
+
+RT::URI::freeside::Internal
+
+=head1 DESCRIPTION
+
+Overlay for the RT::URI::freeside URI handler implementing the Internal integration type.
+
+See L<RT::URI::freeside> for public/private interface documentation.
+
+=cut
+
+
+
+sub _FreesideGetRecord {
+
+ my $self = shift;
+ my ($table, $pkey) = ($self->{'fstable'}, $self->{'fspkey'});
+
+ $RT::Logger->debug("Called _FreesideGetRecord()");
+
+ #eval "use FS::$table;";
+
+ my $dbdef = dbdef;
+ unless ($dbdef) {
+ $RT::Logger->error("Using Internal freeside integration type, ".
+ "but it doesn't look like we're running under ".
+ "freeside's Mason handler.");
+ return;
+ }
+
+ my $pkeyfield = $dbdef->table($table)->primary_key;
+ unless ($pkeyfield) {
+ $RT::Logger->error("No primary key for freeside table '$table'");
+ return;
+ }
+
+ my $fsrec = qsearchs($table, { $pkeyfield => $pkey });
+ unless ($fsrec) {
+ $RT::Logger->error("Record with '$pkeyfield' == '$pkey' does " .
+ "not exist in table $table");
+ return;
+ }
+
+ return { $fsrec->hash, '_object' => $fsrec };
+
+}
+
+sub FreesideVersion {
+
+ return $FS::VERSION;
+
+}
+
+sub FreesideGetConfig {
+
+ #$conf = new FS::Conf unless ref($conf);
+ my $conf = new FS::Conf;
+
+ return scalar($conf->config(@_));
+
+}
+
+sub smart_search { #Subroutine
+
+ return map { { $_->hash } } &FS::cust_main::smart_search(@_);
+
+}
+
+sub email_search { #Subroutine
+
+ return map { { $_->hash } } &FS::cust_main::email_search(@_);
+
+}
+
+sub small_custview {
+
+ return &FS::UI::Web::small_custview::small_custview(@_);
+
+}
+
+sub _FreesideURILabelLong {
+
+ my $self = shift;
+
+ my $table = $self->{'fstable'};
+
+ if ( $table eq 'cust_main' ) {
+
+ my $rec = $self->_FreesideGetRecord();
+ return small_custview( $rec->{'_object'},
+ scalar(FS::Conf->new->config('countrydefault')),
+ 1 #nobalance
+ );
+
+ } else {
+
+ return $self->_FreesideURILabel();
+
+ }
+
+}
+
+1;
diff --git a/rt/lib/RT/URI/freeside/XMLRPC.pm b/rt/lib/RT/URI/freeside/XMLRPC.pm
new file mode 100644
index 000000000..916c20d7b
--- /dev/null
+++ b/rt/lib/RT/URI/freeside/XMLRPC.pm
@@ -0,0 +1,122 @@
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 2004 Kristian Hoffmann <khoff@fire2wire.com>
+# Based on the original RT::URI::base and RT::URI::fsck_com_rt.
+#
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
+#
+# (Except where explictly superceded by other copyright notices)
+#
+# 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.
+#
+# 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.
+#
+#
+# END LICENSE BLOCK
+
+use strict;
+no warnings qw(redefine);
+
+use vars qw($XMLRPC_URL $_FS_VERSION);
+
+use Frontier::Client;
+
+=head1 NAME
+
+RT::URI::freeside::XMLRPC
+
+=head1 DESCRIPTION
+
+Overlay for the RT::URI::freeside URI handler implementing the XMLRPC integration type.
+
+See L<RT::URI::freeside> for public/private interface documentation.
+
+=cut
+
+
+sub _XMLRPCRequest { #Subroutine
+
+ my $method = shift;
+ my @args = @_;
+
+ my $result;
+ eval {
+ my $server = new Frontier::Client ( url => $XMLRPC_URL );
+ $result = $server->call($method, @args);
+ };
+
+ if (not $@ and ref($result) eq 'ARRAY') {
+ return (scalar(@$result) == 1) ? @$result[0] : @$result;
+ } else {
+ $RT::Logger->debug("Freeside XMLRPC: " . $result || $@);
+ return ();
+ }
+
+}
+
+sub _FreesideGetRecord {
+
+ my $self = shift;
+ my ($table, $pkey) = ($self->{'fstable'}, $self->{'fspkey'});
+ my $record;
+
+ $RT::Logger->debug("Called XMLRPC::_FreesideGetRecord()");
+
+ #FIXME: Need a better way to get primary keys.
+ # Maybe create a method for it and cache them like version?
+ my %table_pkeys = (
+ cust_main => 'custnum',
+ );
+
+ my $method = 'Record.qsearchs';
+ my @args = ($table, { $table_pkeys{$table} => $pkey });
+ my ($record) = &_XMLRPCRequest($method, @args);
+
+ return $record;
+
+}
+
+
+sub FreesideGetConfig {
+
+ return _XMLRPCRequest('Conf.config', @_);
+
+}
+
+
+sub FreesideVersion {
+
+ return $_FS_VERSION if ($_FS_VERSION =~ /^\d+\.\d+\.\d+/);
+
+ $RT::Logger->debug("Requesting freeside version...");
+ ($_FS_VERSION) = &_XMLRPCRequest('version');
+ $RT::Logger->debug("Cached freeside version: ${_FS_VERSION}");
+
+ return $_FS_VERSION;
+
+}
+
+sub smart_search { #Subroutine
+
+ return _XMLRPCRequest('cust_main.smart_search', @_);
+
+}
+
+sub small_custview {
+
+ return _XMLRPCRequest('Web.UI.small_custview.small_custview', @_);
+
+}
+
+1;
diff --git a/rt/lib/RT/User.pm b/rt/lib/RT/User.pm
index 5c5eb7f2a..cbc10f5b4 100755
--- a/rt/lib/RT/User.pm
+++ b/rt/lib/RT/User.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -85,7 +61,7 @@ sub _Init {
-=head2 Create PARAMHASH
+=item Create PARAMHASH
Create takes a hash of values and creates a row in the database:
@@ -194,7 +170,7 @@ sub Create {
-=head2 id
+=item id
Returns the current value of id.
(In the database, id is stored as int(11).)
@@ -203,14 +179,14 @@ Returns the current value of id.
=cut
-=head2 Name
+=item Name
Returns the current value of Name.
(In the database, Name is stored as varchar(200).)
-=head2 SetName VALUE
+=item SetName VALUE
Set Name to VALUE.
@@ -221,14 +197,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Password
+=item Password
Returns the current value of Password.
(In the database, Password is stored as varchar(40).)
-=head2 SetPassword VALUE
+=item SetPassword VALUE
Set Password to VALUE.
@@ -239,14 +215,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Comments
+=item Comments
Returns the current value of Comments.
(In the database, Comments is stored as blob.)
-=head2 SetComments VALUE
+=item SetComments VALUE
Set Comments to VALUE.
@@ -257,14 +233,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Signature
+=item Signature
Returns the current value of Signature.
(In the database, Signature is stored as blob.)
-=head2 SetSignature VALUE
+=item SetSignature VALUE
Set Signature to VALUE.
@@ -275,14 +251,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 EmailAddress
+=item EmailAddress
Returns the current value of EmailAddress.
(In the database, EmailAddress is stored as varchar(120).)
-=head2 SetEmailAddress VALUE
+=item SetEmailAddress VALUE
Set EmailAddress to VALUE.
@@ -293,14 +269,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 FreeformContactInfo
+=item FreeformContactInfo
Returns the current value of FreeformContactInfo.
(In the database, FreeformContactInfo is stored as blob.)
-=head2 SetFreeformContactInfo VALUE
+=item SetFreeformContactInfo VALUE
Set FreeformContactInfo to VALUE.
@@ -311,14 +287,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Organization
+=item Organization
Returns the current value of Organization.
(In the database, Organization is stored as varchar(200).)
-=head2 SetOrganization VALUE
+=item SetOrganization VALUE
Set Organization to VALUE.
@@ -329,14 +305,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 RealName
+=item RealName
Returns the current value of RealName.
(In the database, RealName is stored as varchar(120).)
-=head2 SetRealName VALUE
+=item SetRealName VALUE
Set RealName to VALUE.
@@ -347,14 +323,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 NickName
+=item NickName
Returns the current value of NickName.
(In the database, NickName is stored as varchar(16).)
-=head2 SetNickName VALUE
+=item SetNickName VALUE
Set NickName to VALUE.
@@ -365,14 +341,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Lang
+=item Lang
Returns the current value of Lang.
(In the database, Lang is stored as varchar(16).)
-=head2 SetLang VALUE
+=item SetLang VALUE
Set Lang to VALUE.
@@ -383,14 +359,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 EmailEncoding
+=item EmailEncoding
Returns the current value of EmailEncoding.
(In the database, EmailEncoding is stored as varchar(16).)
-=head2 SetEmailEncoding VALUE
+=item SetEmailEncoding VALUE
Set EmailEncoding to VALUE.
@@ -401,14 +377,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 WebEncoding
+=item WebEncoding
Returns the current value of WebEncoding.
(In the database, WebEncoding is stored as varchar(16).)
-=head2 SetWebEncoding VALUE
+=item SetWebEncoding VALUE
Set WebEncoding to VALUE.
@@ -419,14 +395,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ExternalContactInfoId
+=item ExternalContactInfoId
Returns the current value of ExternalContactInfoId.
(In the database, ExternalContactInfoId is stored as varchar(100).)
-=head2 SetExternalContactInfoId VALUE
+=item SetExternalContactInfoId VALUE
Set ExternalContactInfoId to VALUE.
@@ -437,14 +413,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ContactInfoSystem
+=item ContactInfoSystem
Returns the current value of ContactInfoSystem.
(In the database, ContactInfoSystem is stored as varchar(30).)
-=head2 SetContactInfoSystem VALUE
+=item SetContactInfoSystem VALUE
Set ContactInfoSystem to VALUE.
@@ -455,14 +431,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 ExternalAuthId
+=item ExternalAuthId
Returns the current value of ExternalAuthId.
(In the database, ExternalAuthId is stored as varchar(100).)
-=head2 SetExternalAuthId VALUE
+=item SetExternalAuthId VALUE
Set ExternalAuthId to VALUE.
@@ -473,14 +449,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 AuthSystem
+=item AuthSystem
Returns the current value of AuthSystem.
(In the database, AuthSystem is stored as varchar(30).)
-=head2 SetAuthSystem VALUE
+=item SetAuthSystem VALUE
Set AuthSystem to VALUE.
@@ -491,14 +467,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Gecos
+=item Gecos
Returns the current value of Gecos.
(In the database, Gecos is stored as varchar(16).)
-=head2 SetGecos VALUE
+=item SetGecos VALUE
Set Gecos to VALUE.
@@ -509,14 +485,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 HomePhone
+=item HomePhone
Returns the current value of HomePhone.
(In the database, HomePhone is stored as varchar(30).)
-=head2 SetHomePhone VALUE
+=item SetHomePhone VALUE
Set HomePhone to VALUE.
@@ -527,14 +503,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 WorkPhone
+=item WorkPhone
Returns the current value of WorkPhone.
(In the database, WorkPhone is stored as varchar(30).)
-=head2 SetWorkPhone VALUE
+=item SetWorkPhone VALUE
Set WorkPhone to VALUE.
@@ -545,14 +521,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 MobilePhone
+=item MobilePhone
Returns the current value of MobilePhone.
(In the database, MobilePhone is stored as varchar(30).)
-=head2 SetMobilePhone VALUE
+=item SetMobilePhone VALUE
Set MobilePhone to VALUE.
@@ -563,14 +539,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 PagerPhone
+=item PagerPhone
Returns the current value of PagerPhone.
(In the database, PagerPhone is stored as varchar(30).)
-=head2 SetPagerPhone VALUE
+=item SetPagerPhone VALUE
Set PagerPhone to VALUE.
@@ -581,14 +557,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Address1
+=item Address1
Returns the current value of Address1.
(In the database, Address1 is stored as varchar(200).)
-=head2 SetAddress1 VALUE
+=item SetAddress1 VALUE
Set Address1 to VALUE.
@@ -599,14 +575,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Address2
+=item Address2
Returns the current value of Address2.
(In the database, Address2 is stored as varchar(200).)
-=head2 SetAddress2 VALUE
+=item SetAddress2 VALUE
Set Address2 to VALUE.
@@ -617,14 +593,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 City
+=item City
Returns the current value of City.
(In the database, City is stored as varchar(100).)
-=head2 SetCity VALUE
+=item SetCity VALUE
Set City to VALUE.
@@ -635,14 +611,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 State
+=item State
Returns the current value of State.
(In the database, State is stored as varchar(100).)
-=head2 SetState VALUE
+=item SetState VALUE
Set State to VALUE.
@@ -653,14 +629,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Zip
+=item Zip
Returns the current value of Zip.
(In the database, Zip is stored as varchar(16).)
-=head2 SetZip VALUE
+=item SetZip VALUE
Set Zip to VALUE.
@@ -671,14 +647,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Country
+=item Country
Returns the current value of Country.
(In the database, Country is stored as varchar(50).)
-=head2 SetCountry VALUE
+=item SetCountry VALUE
Set Country to VALUE.
@@ -689,14 +665,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Timezone
+=item Timezone
Returns the current value of Timezone.
(In the database, Timezone is stored as varchar(50).)
-=head2 SetTimezone VALUE
+=item SetTimezone VALUE
Set Timezone to VALUE.
@@ -707,14 +683,14 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 PGPKey
+=item PGPKey
Returns the current value of PGPKey.
(In the database, PGPKey is stored as text.)
-=head2 SetPGPKey VALUE
+=item SetPGPKey VALUE
Set PGPKey to VALUE.
@@ -725,7 +701,7 @@ Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
=cut
-=head2 Creator
+=item Creator
Returns the current value of Creator.
(In the database, Creator is stored as int(11).)
@@ -734,7 +710,7 @@ Returns the current value of Creator.
=cut
-=head2 Created
+=item Created
Returns the current value of Created.
(In the database, Created is stored as datetime.)
@@ -743,7 +719,7 @@ Returns the current value of Created.
=cut
-=head2 LastUpdatedBy
+=item LastUpdatedBy
Returns the current value of LastUpdatedBy.
(In the database, LastUpdatedBy is stored as int(11).)
@@ -752,7 +728,7 @@ Returns the current value of LastUpdatedBy.
=cut
-=head2 LastUpdated
+=item LastUpdated
Returns the current value of LastUpdated.
(In the database, LastUpdated is stored as datetime.)
@@ -762,77 +738,77 @@ Returns the current value of LastUpdated.
-sub _CoreAccessible {
+sub _ClassAccessible {
{
id =>
- {read => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => ''},
+ {read => 1, type => 'int(11)', default => ''},
Name =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Password =>
- {read => 1, write => 1, sql_type => 12, length => 40, is_blob => 0, is_numeric => 0, type => 'varchar(40)', default => ''},
+ {read => 1, write => 1, type => 'varchar(40)', default => ''},
Comments =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
+ {read => 1, write => 1, type => 'blob', default => ''},
Signature =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
+ {read => 1, write => 1, type => 'blob', default => ''},
EmailAddress =>
- {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
FreeformContactInfo =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'blob', default => ''},
+ {read => 1, write => 1, type => 'blob', default => ''},
Organization =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
RealName =>
- {read => 1, write => 1, sql_type => 12, length => 120, is_blob => 0, is_numeric => 0, type => 'varchar(120)', default => ''},
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
NickName =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
Lang =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
EmailEncoding =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
WebEncoding =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
ExternalContactInfoId =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
ContactInfoSystem =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
ExternalAuthId =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
AuthSystem =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
Gecos =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
HomePhone =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
WorkPhone =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
MobilePhone =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
PagerPhone =>
- {read => 1, write => 1, sql_type => 12, length => 30, is_blob => 0, is_numeric => 0, type => 'varchar(30)', default => ''},
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
Address1 =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
Address2 =>
- {read => 1, write => 1, sql_type => 12, length => 200, is_blob => 0, is_numeric => 0, type => 'varchar(200)', default => ''},
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
City =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
State =>
- {read => 1, write => 1, sql_type => 12, length => 100, is_blob => 0, is_numeric => 0, type => 'varchar(100)', default => ''},
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
Zip =>
- {read => 1, write => 1, sql_type => 12, length => 16, is_blob => 0, is_numeric => 0, type => 'varchar(16)', default => ''},
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
Country =>
- {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
+ {read => 1, write => 1, type => 'varchar(50)', default => ''},
Timezone =>
- {read => 1, write => 1, sql_type => 12, length => 50, is_blob => 0, is_numeric => 0, type => 'varchar(50)', default => ''},
+ {read => 1, write => 1, type => 'varchar(50)', default => ''},
PGPKey =>
- {read => 1, write => 1, sql_type => -4, length => 0, is_blob => 1, is_numeric => 0, type => 'text', default => ''},
+ {read => 1, write => 1, type => 'text', default => ''},
Creator =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
- {read => 1, auto => 1, sql_type => 4, length => 11, is_blob => 0, is_numeric => 1, type => 'int(11)', default => '0'},
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
- {read => 1, auto => 1, sql_type => 11, length => 0, is_blob => 0, is_numeric => 0, type => 'datetime', default => ''},
+ {read => 1, auto => 1, type => 'datetime', default => ''},
}
};
@@ -864,7 +840,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/User_Overlay.pm b/rt/lib/RT/User_Overlay.pm
index fd83630d5..8f4df467d 100644
--- a/rt/lib/RT/User_Overlay.pm
+++ b/rt/lib/RT/User_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -1308,6 +1308,267 @@ sub OwnGroups {
# }}}
+# {{{ Links
+
+#much false laziness w/Ticket_Overlay.pm
+
+# A helper table for links mapping to make it easier
+# to build and parse links between tickets
+
+use vars '%LINKDIRMAP';
+
+%LINKDIRMAP = (
+ MemberOf => { Base => 'MemberOf',
+ Target => 'HasMember', },
+ RefersTo => { Base => 'RefersTo',
+ Target => 'ReferredToBy', },
+ DependsOn => { Base => 'DependsOn',
+ Target => 'DependedOnBy', },
+ MergedInto => { Base => 'MergedInto',
+ Target => 'MergedInto', },
+
+);
+
+sub LINKDIRMAP { return \%LINKDIRMAP }
+
+#sub _Links {
+# my $self = shift;
+#
+# #TODO: Field isn't the right thing here. but I ahave no idea what mnemonic ---
+# #tobias meant by $f
+# my $field = shift;
+# my $type = shift || "";
+#
+# unless ( $self->{"$field$type"} ) {
+# $self->{"$field$type"} = new RT::Links( $self->CurrentUser );
+# if ( $self->CurrentUserHasRight('ShowTicket') ) {
+# # Maybe this ticket is a merged ticket
+# my $Tickets = new RT::Tickets( $self->CurrentUser );
+# # at least to myself
+# $self->{"$field$type"}->Limit( FIELD => $field,
+# VALUE => $self->URI,
+# ENTRYAGGREGATOR => 'OR' );
+# $Tickets->Limit( FIELD => 'EffectiveId',
+# VALUE => $self->EffectiveId );
+# while (my $Ticket = $Tickets->Next) {
+# $self->{"$field$type"}->Limit( FIELD => $field,
+# VALUE => $Ticket->URI,
+# ENTRYAGGREGATOR => 'OR' );
+# }
+# $self->{"$field$type"}->Limit( FIELD => 'Type',
+# VALUE => $type )
+# if ($type);
+# }
+# }
+# return ( $self->{"$field$type"} );
+#}
+
+=head2 DeleteLink
+
+Delete a link. takes a paramhash of Base, Target and Type.
+Either Base or Target must be null. The null value will
+be replaced with this ticket\'s id
+
+=cut
+
+sub DeleteLink {
+ my $self = shift;
+ my %args = (
+ Base => undef,
+ Target => undef,
+ Type => undef,
+ @_
+ );
+
+ unless ( $args{'Target'} || $args{'Base'} ) {
+ $RT::Logger->error("Base or Target must be specified\n");
+ return ( 0, $self->loc('Either base or target must be specified') );
+ }
+
+ #check acls
+ my $right = 0;
+ $right++ if $self->CurrentUserHasRight('ModifyUser');
+ if ( !$right && $RT::StrictLinkACL ) {
+ return ( 0, $self->loc("Permission Denied") );
+ }
+
+# # If the other URI is an RT::Ticket, we want to make sure the user
+# # can modify it too...
+# my ($status, $msg, $other_ticket) = $self->__GetTicketFromURI( URI => $args{'Target'} || $args{'Base'} );
+# return (0, $msg) unless $status;
+# if ( !$other_ticket || $other_ticket->CurrentUserHasRight('ModifyTicket') ) {
+# $right++;
+# }
+# if ( ( !$RT::StrictLinkACL && $right == 0 ) ||
+# ( $RT::StrictLinkACL && $right < 2 ) )
+# {
+# return ( 0, $self->loc("Permission Denied") );
+# }
+
+ my ($val, $Msg) = $self->SUPER::_DeleteLink(%args);
+
+ if ( !$val ) {
+ $RT::Logger->debug("Couldn't find that link\n");
+ return ( 0, $Msg );
+ }
+
+ my ($direction, $remote_link);
+
+ if ( $args{'Base'} ) {
+ $remote_link = $args{'Base'};
+ $direction = 'Target';
+ }
+ elsif ( $args{'Target'} ) {
+ $remote_link = $args{'Target'};
+ $direction='Base';
+ }
+
+ if ( $args{'Silent'} ) {
+ return ( $val, $Msg );
+ }
+ else {
+ my $remote_uri = RT::URI->new( $self->CurrentUser );
+ $remote_uri->FromURI( $remote_link );
+
+ my ( $Trans, $Msg, $TransObj ) = $self->_NewTransaction(
+ Type => 'DeleteLink',
+ Field => $LINKDIRMAP{$args{'Type'}}->{$direction},
+ OldValue => $remote_uri->URI || $remote_link,
+ TimeTaken => 0
+ );
+
+ if ( $remote_uri->IsLocal ) {
+
+ my $OtherObj = $remote_uri->Object;
+ my ( $val, $Msg ) = $OtherObj->_NewTransaction(Type => 'DeleteLink',
+ Field => $direction eq 'Target' ? $LINKDIRMAP{$args{'Type'}}->{Base}
+ : $LINKDIRMAP{$args{'Type'}}->{Target},
+ OldValue => $self->URI,
+ ActivateScrips => ! $RT::LinkTransactionsRun1Scrip,
+ TimeTaken => 0 );
+ }
+
+ return ( $Trans, $Msg );
+ }
+}
+
+sub AddLink {
+ my $self = shift;
+ my %args = ( Target => '',
+ Base => '',
+ Type => '',
+ Silent => undef,
+ @_ );
+
+ unless ( $args{'Target'} || $args{'Base'} ) {
+ $RT::Logger->error("Base or Target must be specified\n");
+ return ( 0, $self->loc('Either base or target must be specified') );
+ }
+
+ my $right = 0;
+ $right++ if $self->CurrentUserHasRight('ModifyUser');
+ if ( !$right && $RT::StrictLinkACL ) {
+ return ( 0, $self->loc("Permission Denied") );
+ }
+
+# # If the other URI is an RT::Ticket, we want to make sure the user
+# # can modify it too...
+# my ($status, $msg, $other_ticket) = $self->__GetTicketFromURI( URI => $args{'Target'} || $args{'Base'} );
+# return (0, $msg) unless $status;
+# if ( !$other_ticket || $other_ticket->CurrentUserHasRight('ModifyTicket') ) {
+# $right++;
+# }
+# if ( ( !$RT::StrictLinkACL && $right == 0 ) ||
+# ( $RT::StrictLinkACL && $right < 2 ) )
+# {
+# return ( 0, $self->loc("Permission Denied") );
+# }
+
+ return $self->_AddLink(%args);
+}
+
+#sub __GetTicketFromURI {
+# my $self = shift;
+# my %args = ( URI => '', @_ );
+#
+# # If the other URI is an RT::Ticket, we want to make sure the user
+# # can modify it too...
+# my $uri_obj = RT::URI->new( $self->CurrentUser );
+# $uri_obj->FromURI( $args{'URI'} );
+#
+# unless ( $uri_obj->Resolver && $uri_obj->Scheme ) {
+# my $msg = $self->loc( "Couldn't resolve '[_1]' into a URI.", $args{'URI'} );
+# $RT::Logger->warning( "$msg\n" );
+# return( 0, $msg );
+# }
+# my $obj = $uri_obj->Resolver->Object;
+# unless ( UNIVERSAL::isa($obj, 'RT::Ticket') && $obj->id ) {
+# return (1, 'Found not a ticket', undef);
+# }
+# return (1, 'Found ticket', $obj);
+#}
+
+=head2 _AddLink
+
+Private non-acled variant of AddLink so that links can be added during create.
+
+=cut
+
+sub _AddLink {
+ my $self = shift;
+ my %args = ( Target => '',
+ Base => '',
+ Type => '',
+ Silent => undef,
+ @_ );
+
+ my ($val, $msg, $exist) = $self->SUPER::_AddLink(%args);
+ return ($val, $msg) if !$val || $exist;
+
+ my ($direction, $remote_link);
+ if ( $args{'Target'} ) {
+ $remote_link = $args{'Target'};
+ $direction = 'Base';
+ } elsif ( $args{'Base'} ) {
+ $remote_link = $args{'Base'};
+ $direction = 'Target';
+ }
+
+ # Don't write the transaction if we're doing this on create
+ if ( $args{'Silent'} ) {
+ return ( $val, $msg );
+ }
+ else {
+ my $remote_uri = RT::URI->new( $self->CurrentUser );
+ $remote_uri->FromURI( $remote_link );
+
+ #Write the transaction
+ my ( $Trans, $Msg, $TransObj ) =
+ $self->_NewTransaction(Type => 'AddLink',
+ Field => $LINKDIRMAP{$args{'Type'}}->{$direction},
+ NewValue => $remote_uri->URI || $remote_link,
+ TimeTaken => 0 );
+
+ if ( $remote_uri->IsLocal ) {
+
+ my $OtherObj = $remote_uri->Object;
+ my ( $val, $Msg ) = $OtherObj->_NewTransaction(Type => 'AddLink',
+ Field => $direction eq 'Target' ? $LINKDIRMAP{$args{'Type'}}->{Base}
+ : $LINKDIRMAP{$args{'Type'}}->{Target},
+ NewValue => $self->URI,
+ ActivateScrips => ! $RT::LinkTransactionsRun1Scrip,
+ TimeTaken => 0 );
+ }
+ return ( $val, $Msg );
+ }
+
+}
+
+
+
+# }}}
+
+
# {{{ sub Rights testing
=head1 Rights testing
diff --git a/rt/lib/RT/Users.pm b/rt/lib/RT/Users.pm
index 8d574849d..d58f69653 100755
--- a/rt/lib/RT/Users.pm
+++ b/rt/lib/RT/Users.pm
@@ -1,14 +1,8 @@
-# BEGIN BPS TAGGED BLOCK {{{
+# BEGIN LICENSE BLOCK
#
-# COPYRIGHT:
-#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
-# <jesse@bestpractical.com>
+# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
#
-# (Except where explicitly superseded by other copyright notices)
-#
-#
-# LICENSE:
+# (Except where explictly superceded by other copyright notices)
#
# 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
@@ -20,31 +14,13 @@
# 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.)
+# 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.
#
-# 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 }}}
+# END LICENSE BLOCK
# Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>)
# WARNING: THIS FILE IS AUTOGENERATED. ALL CHANGES TO THIS FILE WILL BE LOST.
#
@@ -88,7 +64,7 @@ sub _Init {
}
-=head2 NewItem
+=item NewItem
Returns an empty new RT::User item
@@ -125,7 +101,7 @@ _Vendor is for 3rd-party vendor add-ons, while _Local is for site-local customiz
These overlay files can contain new subs or subs to replace existing subs in this module.
-Each of these files should begin with the line
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
no warnings qw(redefine);
diff --git a/rt/lib/RT/Users_Overlay.pm b/rt/lib/RT/Users_Overlay.pm
index 96621e388..809fa6707 100644
--- a/rt/lib/RT/Users_Overlay.pm
+++ b/rt/lib/RT/Users_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -440,6 +440,7 @@ sub WhoHaveRight {
$from_group->WhoHaveGroupRight( %args );
#XXX: DIRTY HACK
+ use DBIx::SearchBuilder 1.50; #no version on ::Union :(
use DBIx::SearchBuilder::Union;
my $union = new DBIx::SearchBuilder::Union;
$union->add( $_ ) foreach @from_role;
diff --git a/rt/lib/RTx/Statistics.pm b/rt/lib/RTx/Statistics.pm
new file mode 100755
index 000000000..8b9d6e4f0
--- /dev/null
+++ b/rt/lib/RTx/Statistics.pm
@@ -0,0 +1,239 @@
+package Statistics;
+
+use vars qw(
+$MultiQueueStatus $MultiQueueDateFormat @MultiQueueQueueList $MultiQueueMaxRows $MultiQueueWeekends $MultiQueueLabelDateFormat
+$PerDayStatus $PerDayDateFormat $PerDayQueue $PerDayMaxRows $PerDayWeekends $PerDayLabelDateFormat $PerDayPeriod
+$DayOfWeekQueue
+@OpenStalledQueueList $OpenStalledWeekends
+$TimeToResolveDateFormat $TimeToResolveQueue $TimeToResolveMaxRows $TimeToResolveWeekends $TimeToResolveLabelDateFormat
+$TimeToResolveGraphQueue
+@years @months %monthsMaxDay
+$secsPerDay
+$RestrictAccess
+$GraphWidth $GraphHeight
+);
+
+use Time::Local;
+
+# I couldn't figure out a way to override these in RT_SiteConfig, which would be
+# preferable.
+
+# Width and Height of all graphics
+$GraphWidth=500;
+$GraphHeight=400;
+
+# Initial settings for the CallsMultiQueue stat page
+$MultiQueueStatus = "resolved";
+$MultiQueueDateFormat = "%a %b %d %Y"; # format for dates on Multi Queue report, see "man strftime" for options
+@MultiQueueQueueList = ("General"); # list of queues to start Multi Queue per day reports
+$MultiQueueMaxRows = 10;
+$MultiQueueWeekends = 1;
+$MultiQueueLabelDateFormat = "%a";
+
+# Initial settings for the CallsQueueDay stat page
+$PerDayStatus = "resolved";
+$PerDayDateFormat = "%a %b %d %Y";
+$PerDayQueue = "General";
+$PerDayMaxRows = 10;
+$PerDayWeekends = 1;
+$PerDayLabelDateFormat = "%a";
+$PerDayPeriod = 10;
+
+# Initial settings for the DayOfWeek stat page
+$DayOfWeekQueue = "General";
+
+# Initial settings for the OpenStalled stat page
+@OpenStalledQueueList = ("General");
+$OpenStalledWeekends = 1;
+
+# Initial settings for the TimeToResolve stat page
+$TimeToResolveDateFormat = "%a %b %d";
+$TimeToResolveQueue = "General";
+$TimeToResolveMaxRows = 10;
+$TimeToResolveWeekends = 1;
+$TimeToResolveLabelDateFormat = "%a";
+
+# Initial settings for the TimeToResolve Graph page
+$TimeToResolveGraphQueue = "General";
+
+$secsPerDay = 86400;
+
+# List of years and months to populate drop down lists
+@years =('2010', '2009', '2008', '2007', '2006', '2005', '2004', '2003' ,'2003' ,'2002');
+@months=qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/;
+%monthsMaxDay = (
+ 0 => 31, # January
+ 1 => 29, # February, allow for leap year
+ 2 => 31, # March
+ 3 => 30, # April
+ 4 => 31, # May
+ 5 => 30, # June
+ 6 => 31, # July
+ 7 => 31, # August
+ 8 => 30, # September
+ 9 => 31, # October
+ 10=> 30, # November
+ 11=> 31 # December
+ );
+
+# Set to one to prevent users without the ShowConfigTab right from seeing Statistics
+$RestrictAccess = 0;
+
+# Variables to control debugging
+my $debugging=0; # set to 1 to enable debugging
+my $debugtext="";
+
+=head2 FormatDate
+
+Returns a string representing the specified date formatted by the specified string
+
+=cut
+sub FormatDate {
+ my $fmt = shift;
+ my $self = shift;
+ return POSIX::strftime($fmt, localtime($self->Unix));
+}
+
+
+=head2 RTDateSetToLocalMidnight
+
+Sets the date to midnight (at the beginning of the day) local time
+Returns the unixtime at midnight.
+
+=cut
+sub RTDateSetToLocalMidnight {
+ my $self = shift;
+
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($self->Unix);
+ $self->Unix(timelocal (0,0,0,$mday,$mon,$year,$wday,$yday));
+
+ return ($self->Unix);
+}
+
+=head2 RTDateIsWeekend
+
+Returns 1 if the date is on saturday or sunday
+
+=cut
+sub RTDateIsWeekend {
+ my $self = shift;
+
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($self->Unix);
+ return 1 if (($wday==6) || ($wday==0));
+ 0;
+}
+
+=head2 RTDateGetDateWeekday
+
+Returns the localized name of the day specified by date
+
+=cut
+sub RTDateGetDateWeekday {
+ my $self = shift;
+
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = localtime($self->Unix);
+ return $self->GetWeekday($wday);
+}
+
+=head2 RTDateSubDay
+
+Subtracts 24 hours from the current time
+
+=cut
+
+sub RTDateSubDay {
+ my $self = shift;
+ $self->AddSeconds(0 - $DAY);
+}
+
+=head2 RTDateSubDays $DAYS
+
+Subtracts 24 hours * $DAYS from the current time
+
+=cut
+
+sub RTDateSubDays {
+ my $self = shift;
+ my $days = shift;
+ $self->AddSeconds(0 - ($days * $DAY));
+}
+
+=head2 DebugInit
+
+Creates a text area on the page if debugging is on.
+
+=cut
+
+sub DebugInit {
+ if($debugging) {
+ my $m = shift;
+ $m->print("<TEXTAREA NAME=debugarea COLS=120 ROWS=50>$debugtext</TEXTAREA>\n");
+ }
+}
+
+=head2 DebugLog $logmsg
+
+Adds a message to the debug area
+
+=cut
+
+sub DebugLog {
+ if($debugging) {
+ my $line = shift;
+ $debugtext .= $line;
+ $RT::Logger->debug($line);
+ }
+}
+
+=head2 DebugClear
+
+Clears the current debug string, otherwise it builds from page to page
+
+=cut
+
+sub DebugClear {
+ if($debugging) {
+ $debugtext = undef;
+ }
+}
+
+=head2 DurationAsString
+
+Returns a string representing the specified duration
+
+=cut
+
+sub DurationAsString {
+ my $Duration = shift;
+ my $MINUTE = 60;
+ my $HOUR = $MINUTE*60;
+ my $DAY = $HOUR * 24;
+ my $WEEK = $DAY * 7;
+ my $days = int($Duration / $DAY);
+ $Duration = $Duration % $DAY;
+ my $hours = int($Duration / $HOUR);
+ $hours = sprintf("%02d", $hours);
+ $Duration = $Duration % $HOUR;
+ my $minutes = int($Duration/$MINUTE);
+ $minutes = sprintf("%02d", $minutes);
+ $Duration = $Duration % $MINUTE;
+ my $secs = sprintf("%02d", $Duration);
+
+ if(!$days) {
+ $days = "00";
+ }
+ if(!$hours) {
+ $hours = "00";
+ }
+ if(!$minutes) {
+ $minutes = "00";
+ }
+ if(!$secs) {
+ $secs = "00";
+ }
+ return "$days days $hours:$minutes:$secs";
+}
+
+1;
+
+
diff --git a/rt/lib/RTx/WebCronTool.pm b/rt/lib/RTx/WebCronTool.pm
new file mode 100644
index 000000000..5f086a279
--- /dev/null
+++ b/rt/lib/RTx/WebCronTool.pm
@@ -0,0 +1,41 @@
+package RTx::WebCronTool;
+$RTx::WebCronTool::VERSION = "0.01";
+
+1;
+
+__END__
+
+=head1 NAME
+
+RTx::WebCronTool - Web interface to rt-crontool
+
+=head1 VERSION
+
+This document describes version 0.01 of RTx::WebCronTool, released
+July 11, 2004.
+
+=head1 DESCRIPTION
+
+This RT extension provides a web interface for the built-in F<rt-crontool>
+utility, allowing scheduled processes to be launched remotely.
+
+After installation, log in as superuser, and click on the "Web CronTool" menu
+on the bottom of the navigation pane.
+
+To use it, simply submit the modules and arguments. All progress, error messages
+and debug information will then be displayed online.
+
+=head1 AUTHORS
+
+Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>
+
+=head1 COPYRIGHT
+
+Copyright 2004 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.
+
+This program is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+
+See L<http://www.perl.com/perl/misc/Artistic.html>
+
+=cut
diff --git a/rt/lib/t/00smoke.t.in b/rt/lib/t/00smoke.t.in
deleted file mode 100644
index 288dd4aae..000000000
--- a/rt/lib/t/00smoke.t.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#!@PERL@
-
-use Test::More qw(no_plan);
-
-use lib "@RT_LIB_PATH@";
-use RT;
-ok(RT::LoadConfig);
-ok(RT::Init, "Basic initialization and DB connectivity");
-
-use File::Find;
-File::Find::find({wanted => \&wanted}, 'lib/');
-sub wanted { /^*\.pm\z/s && ok(require $_, "Requiring '$_'"); }
-
-
diff --git a/rt/lib/t/01harness.t.in b/rt/lib/t/01harness.t.in
deleted file mode 100644
index d132330c2..000000000
--- a/rt/lib/t/01harness.t.in
+++ /dev/null
@@ -1,12 +0,0 @@
-#!@PERL@
-
-use Test::More qw(no_plan);
-
-use lib "@RT_LIB_PATH@";
-use RT;
-ok(RT::LoadConfig);
-ok(RT::Init, "Basic initialization and DB connectivity");
-
-my $test = shift @ARGV;
-require $test;
-
diff --git a/rt/lib/t/02regression.t b/rt/lib/t/02regression.t
index 4504cc76a..4cc131815 100644
--- a/rt/lib/t/02regression.t
+++ b/rt/lib/t/02regression.t
@@ -34,11 +34,14 @@ is($q2->CommentAddress, 'comment@a');
use File::Find;
-File::Find::find({wanted => \&wanted_autogen}, 'lib/t/autogen');
+File::Find::find({wanted => \&wanted_autogen,
+ preprocess => sub {return sort @_}}, 'lib/t/autogen');
sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
-File::Find::find({wanted => \&wanted_regression}, 'lib/t/regression');
+File::Find::find({wanted => \&wanted_regression,
+ preprocess => sub {return sort @_}}, 'lib/t/regression');
sub wanted_regression { /^*\.t\z/s && require $_; }
require "/opt/rt3/lib/t/03web.pl";
require "/opt/rt3/lib/t/04_send_email.pl";
+require "/opt/rt3/lib/t/05cronsupport.pl";
diff --git a/rt/lib/t/02regression.t.in b/rt/lib/t/02regression.t.in
deleted file mode 100644
index c2e3277a9..000000000
--- a/rt/lib/t/02regression.t.in
+++ /dev/null
@@ -1,47 +0,0 @@
-#!@PERL@
-
-use Test::More qw(no_plan);
-
-use lib "@RT_LIB_PATH@";
-use RT;
-ok(RT::LoadConfig);
-ok(RT::Init, "Basic initialization and DB connectivity");
-
-# Create a new queue
-use_ok(RT::Queue);
-my $q = RT::Queue->new($RT::SystemUser);
-
-$q->Load('regression');
-if ($q->id != 0) {
- die "Regression tests not starting with a clean DB. Bailing";
-}
-
-my ($id, $msg) = $q->Create( Name => 'Regression',
- Description => 'A regression test queue',
- CorrespondAddress => 'correspond@a',
- CommentAddress => 'comment@a');
-
-isnt($id, 0, "Queue was created sucessfully - $msg");
-
-my $q2 = RT::Queue->new($RT::SystemUser);
-
-ok($q2->Load($id));
-is($q2->id, $id, "Sucessfully loaded the queue again");
-is($q2->Name, 'Regression');
-is($q2->Description, 'A regression test queue');
-is($q2->CorrespondAddress, 'correspond@a');
-is($q2->CommentAddress, 'comment@a');
-
-
-use File::Find;
-File::Find::find({wanted => \&wanted_autogen,
- preprocess => sub {return sort @_}}, 'lib/t/autogen');
-sub wanted_autogen { /^autogen.*\.t\z/s && require $_; }
-
-File::Find::find({wanted => \&wanted_regression,
- preprocess => sub {return sort @_}}, 'lib/t/regression');
-sub wanted_regression { /^*\.t\z/s && require $_; }
-
-require "@RT_LIB_PATH@/t/03web.pl";
-require "@RT_LIB_PATH@/t/04_send_email.pl";
-require "@RT_LIB_PATH@/t/05cronsupport.pl";
diff --git a/rt/lib/t/03web.pl b/rt/lib/t/03web.pl
index 94ad3e97e..597ad109e 100644
--- a/rt/lib/t/03web.pl
+++ b/rt/lib/t/03web.pl
@@ -67,7 +67,83 @@ ok( $agent->{'content'} =~ qr{$string} , "Found the content");
# }}}
+# {{{ Query Builder tests
+
+my $response = $agent->get($url."Search/Build.html");
+ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
+
+# Parsing TicketSQL
+#
+# Adding items
+
+# set the first value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "aaa");
+$agent->submit();
+
+# set the next value
+ok($agent->form_name('BuildQuery'));
+$agent->field("AttachmentField", "Subject");
+$agent->field("AttachmentOp", "LIKE");
+$agent->field("ValueOfAttachment", "bbb");
+$agent->submit();
+
+ok($agent->form_name('BuildQuery'));
+
+# get the query
+my $query = $agent->current_form->find_input("Query")->value;
+# strip whitespace from ends
+$query =~ s/^\s*//g;
+$query =~ s/\s*$//g;
+
+# collapse other whitespace
+$query =~ s/\s+/ /g;
+
+is ($query, "Subject LIKE 'aaa' AND Subject LIKE 'bbb'");
+
+# - new items go one level down
+# - add items at currently selected level
+# - if nothing is selected, add at end, one level down
+#
+# move left
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move left if you're at the top level
+#
+# move right
+# - error if nothing selected
+# - same item should be selected after move
+# - can always move right (no max depth...should there be?)
+#
+# move up
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move up if you're first in the list
+#
+# move down
+# - error if nothing selected
+# - same item should be selected after move
+# - can't move down if you're last in the list
+#
+# toggle
+# - error if nothing selected
+# - change all aggregators in the grouping
+# - don't change any others
+#
+# delete
+# - error if nothing selected
+# - delete currently selected item
+# - delete all children of a grouping
+# - if delete leaves a node with no children, delete that, too
+# - what should be selected?
+#
+# Clear
+# - clears entire query
+# - clears it from the session, too
+# }}}
use File::Find;
find ( \&wanted , 'html/');
@@ -83,7 +159,7 @@ sub test_get {
$file =~ s#^html/##;
ok ($agent->get("$url/$file", "GET $url/$file"));
is ($agent->{'status'}, 200, "Loaded $file");
- ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
+# ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for $file");
ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
diff --git a/rt/lib/t/03web.pl.in b/rt/lib/t/03web.pl.in
deleted file mode 100644
index 25c26e711..000000000
--- a/rt/lib/t/03web.pl.in
+++ /dev/null
@@ -1,170 +0,0 @@
-#!@PERL@
-
-use strict;
-use WWW::Mechanize;
-use HTTP::Request::Common;
-use HTTP::Cookies;
-use LWP;
-use Encode;
-
-my $cookie_jar = HTTP::Cookies->new;
-my $agent = WWW::Mechanize->new();
-
-# give the agent a place to stash the cookies
-
-$agent->cookie_jar($cookie_jar);
-
-
-# get the top page
-my $url = "http://localhost".$RT::WebPath."/";
-$agent->get($url);
-
-is ($agent->{'status'}, 200, "Loaded a page");
-
-
-# {{{ test a login
-
-# follow the link marked "Login"
-
-ok($agent->{form}->find_input('user'));
-
-ok($agent->{form}->find_input('pass'));
-ok ($agent->{'content'} =~ /username:/i);
-$agent->field( 'user' => 'root' );
-$agent->field( 'pass' => 'password' );
-# the field isn't named, so we have to click link 0
-$agent->click(0);
-is($agent->{'status'}, 200, "Fetched the page ok");
-ok( $agent->{'content'} =~ /Logout/i, "Found a logout link");
-
-
-
-$agent->get($url."Ticket/Create.html?Queue=1");
-is ($agent->{'status'}, 200, "Loaded Create.html");
-$agent->form(3);
-# Start with a string containing characters in latin1
-my $string = "I18N Web Testing æøå";
-Encode::from_to($string, 'iso-8859-1', 'utf8');
-$agent->field('Subject' => "Foo");
-$agent->field('Content' => $string);
-ok($agent->submit(), "Created new ticket with $string");
-
-ok( $agent->{'content'} =~ qr{$string} , "Found the content");
-
-$agent->get($url."Ticket/Create.html?Queue=1");
-is ($agent->{'status'}, 200, "Loaded Create.html");
-$agent->form(3);
-# Start with a string containing characters in latin1
-my $string = "I18N Web Testing æøå";
-Encode::from_to($string, 'iso-8859-1', 'utf8');
-$agent->field('Subject' => $string);
-$agent->field('Content' => "BAR");
-ok($agent->submit(), "Created new ticket with $string");
-
-ok( $agent->{'content'} =~ qr{$string} , "Found the content");
-
-
-
-# }}}
-
-# {{{ Query Builder tests
-
-my $response = $agent->get($url."Search/Build.html");
-ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
-
-# Parsing TicketSQL
-#
-# Adding items
-
-# set the first value
-ok($agent->form_name('BuildQuery'));
-$agent->field("AttachmentField", "Subject");
-$agent->field("AttachmentOp", "LIKE");
-$agent->field("ValueOfAttachment", "aaa");
-$agent->submit();
-
-# set the next value
-ok($agent->form_name('BuildQuery'));
-$agent->field("AttachmentField", "Subject");
-$agent->field("AttachmentOp", "LIKE");
-$agent->field("ValueOfAttachment", "bbb");
-$agent->submit();
-
-ok($agent->form_name('BuildQuery'));
-
-# get the query
-my $query = $agent->current_form->find_input("Query")->value;
-# strip whitespace from ends
-$query =~ s/^\s*//g;
-$query =~ s/\s*$//g;
-
-# collapse other whitespace
-$query =~ s/\s+/ /g;
-
-is ($query, "Subject LIKE 'aaa' AND Subject LIKE 'bbb'");
-
-# - new items go one level down
-# - add items at currently selected level
-# - if nothing is selected, add at end, one level down
-#
-# move left
-# - error if nothing selected
-# - same item should be selected after move
-# - can't move left if you're at the top level
-#
-# move right
-# - error if nothing selected
-# - same item should be selected after move
-# - can always move right (no max depth...should there be?)
-#
-# move up
-# - error if nothing selected
-# - same item should be selected after move
-# - can't move up if you're first in the list
-#
-# move down
-# - error if nothing selected
-# - same item should be selected after move
-# - can't move down if you're last in the list
-#
-# toggle
-# - error if nothing selected
-# - change all aggregators in the grouping
-# - don't change any others
-#
-# delete
-# - error if nothing selected
-# - delete currently selected item
-# - delete all children of a grouping
-# - if delete leaves a node with no children, delete that, too
-# - what should be selected?
-#
-# Clear
-# - clears entire query
-# - clears it from the session, too
-
-# }}}
-
-use File::Find;
-find ( \&wanted , 'html/');
-
-sub wanted {
- -f && /\.html$/ && $_ !~ /Logout.html$/ && test_get($File::Find::name);
-}
-
-sub test_get {
- my $file = shift;
-
-
- $file =~ s#^html/##;
- ok ($agent->get("$url/$file", "GET $url/$file"));
- is ($agent->{'status'}, 200, "Loaded $file");
-# ok( $agent->{'content'} =~ /Logout/i, "Found a logout link on $file ");
- ok( $agent->{'content'} !~ /Not logged in/i, "Still logged in for $file");
- ok( $agent->{'content'} !~ /System error/i, "Didn't get a Mason compilation error on $file");
-
-}
-
-# }}}
-
-1;
diff --git a/rt/lib/t/04_send_email.pl b/rt/lib/t/04_send_email.pl
index c384eedfa..973d9d2e2 100644
--- a/rt/lib/t/04_send_email.pl
+++ b/rt/lib/t/04_send_email.pl
@@ -476,6 +476,31 @@ sub crashes_redef_sendmessage {
# }}}
+# {{{ test a multi-line RT-Send-CC header
+
+my $content = `cat /opt/rt3/lib/t/data/rt-send-cc` || die "couldn't find new content";
+
+$parser->ParseMIMEEntityFromScalar($content);
+
+
+
+my %args = (message => $content, queue => 1, action => 'correspond');
+ RT::Interface::Email::Gateway(\%args);
+my $tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+my $tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+
+my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc');
+ok ($cc =~ /test1/, "Found test 1");
+ok ($cc =~ /test2/, "Found test 2");
+ok ($cc =~ /test3/, "Found test 3");
+ok ($cc =~ /test4/, "Found test 4");
+ok ($cc =~ /test5/, "Found test 5");
+
+# }}}
+
# Don't taint the environment
$everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
1;
diff --git a/rt/lib/t/04_send_email.pl.in b/rt/lib/t/04_send_email.pl.in
deleted file mode 100644
index 39ab0d271..000000000
--- a/rt/lib/t/04_send_email.pl.in
+++ /dev/null
@@ -1,506 +0,0 @@
-#!@PERL@ -w
-
-use strict;
-use RT::EmailParser;
-use RT::Tickets;
-use RT::Action::SendEmail;
-
-my @_outgoing_messages;
-my @scrips_fired;
-
-#We're not testing acls here.
-my $everyone = RT::Group->new($RT::SystemUser);
-$everyone->LoadSystemInternalGroup('Everyone');
-$everyone->PrincipalObj->GrantRight(Right =>'SuperUser');
-
-
-is (__PACKAGE__, 'main', "We're operating in the main package");
-
-
-{
-no warnings qw/redefine/;
-sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
-
- main::_fired_scrip($self->ScripObj);
- main::ok(ref($MIME) eq 'MIME::Entity', "hey, look. it's a mime entity");
-}
-
-}
-
-# instrument SendEmail to pass us what it's about to send.
-# create a regular ticket
-
-my $parser = RT::EmailParser->new();
-
-
-# Let's test to make sure a multipart/report is processed correctly
-my $content = `cat @RT_LIB_PATH@/t/data/multipart-report` || die "couldn't find new content";
-# be as much like the mail gateway as possible.
-use RT::Interface::Email;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /The original message was received/, "It's the bounce");
-
-
-# make sure it fires scrips.
-is ($#scrips_fired, 1, "Fired 2 scrips on ticket creation");
-
-undef @scrips_fired;
-
-
-
-
-$parser->ParseMIMEEntityFromScalar('From: root@localhost
-To: rt@example.com
-Subject: This is a test of new ticket creation as an unknown user
-
-Blah!
-Foob!');
-
-
-use Data::Dumper;
-
-my $ticket = RT::Ticket->new($RT::SystemUser);
-my ($id, $tid, $msg ) = $ticket->Create(Requestor => ['root@localhost'], Queue => 'general', Subject => 'I18NTest', MIMEObj => $parser->Entity);
-ok ($id,$msg);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-ok ($tick->Subject eq 'I18NTest', "failed to create the new ticket from an unprivileged account");
-
-# make sure it fires scrips.
-is ($#scrips_fired, 1, "Fired 2 scrips on ticket creation");
-# make sure it sends an autoreply
-# make sure it sends a notification to adminccs
-
-
-# we need to swap out SendMessage to test the new things we care about;
-&utf8_redef_sendmessage;
-
-# create an iso 8859-1 ticket
-@scrips_fired = ();
-
-my $content = `cat @RT_LIB_PATH@/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
-
-
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-use RT::Interface::Email;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /H\x{e5}vard/, "It's signed by havard. yay");
-
-
-# make sure it fires scrips.
-is ($#scrips_fired, 1, "Fired 2 scrips on ticket creation");
-# make sure it sends an autoreply
-
-
-# make sure it sends a notification to adminccs
-
-# If we correspond, does it do the right thing to the outbound messages?
-
-$parser->ParseMIMEEntityFromScalar($content);
-my ($id, $msg) = $tick->Comment(MIMEObj => $parser->Entity);
-ok ($id, $msg);
-
-$parser->ParseMIMEEntityFromScalar($content);
-($id, $msg) = $tick->Correspond(MIMEObj => $parser->Entity);
-ok ($id, $msg);
-
-
-
-
-
-# we need to swap out SendMessage to test the new things we care about;
-&iso8859_redef_sendmessage;
-$RT::EmailOutputEncoding = 'iso-8859-1';
-# create an iso 8859-1 ticket
-@scrips_fired = ();
-
-my $content = `cat @RT_LIB_PATH@/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
-# be as much like the mail gateway as possible.
-use RT::Interface::Email;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /H\x{e5}vard/, "It's signed by havard. yay");
-
-
-# make sure it fires scrips.
-is ($#scrips_fired, 1, "Fired 2 scrips on ticket creation");
-# make sure it sends an autoreply
-
-
-# make sure it sends a notification to adminccs
-
-
-# If we correspond, does it do the right thing to the outbound messages?
-
-$parser->ParseMIMEEntityFromScalar($content);
-my ($id, $msg) = $tick->Comment(MIMEObj => $parser->Entity);
-ok ($id, $msg);
-
-$parser->ParseMIMEEntityFromScalar($content);
-($id, $msg) = $tick->Correspond(MIMEObj => $parser->Entity);
-ok ($id, $msg);
-
-
-sub _fired_scrip {
- my $scrip = shift;
- push @scrips_fired, $scrip;
-}
-
-sub utf8_redef_sendmessage {
- no warnings qw/redefine/;
- eval '
- sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
-
- my $scrip = $self->ScripObj->id;
- ok(1, $self->ScripObj->ConditionObj->Name . " ".$self->ScripObj->ActionObj->Name);
- main::_fired_scrip($self->ScripObj);
- $MIME->make_singlepart;
- main::ok( ref($MIME) eq \'MIME::Entity\',
- "hey, look. it\'s a mime entity" );
- main::ok( ref( $MIME->head ) eq \'MIME::Head\',
- "its mime header is a mime header. yay" );
- main::ok( $MIME->head->get(\'Content-Type\') =~ /utf-8/,
- "Its content type is utf-8" );
- my $message_as_string = $MIME->bodyhandle->as_string();
- use Encode;
- $message_as_string = Encode::decode_utf8($message_as_string);
- main::ok(
- $message_as_string =~ /H\x{e5}vard/,
-"The message\'s content contains havard\'s name. this will fail if it\'s not utf8 out");
-
- }';
-}
-
-sub iso8859_redef_sendmessage {
- no warnings qw/redefine/;
- eval '
- sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
-
- my $scrip = $self->ScripObj->id;
- ok(1, $self->ScripObj->ConditionObj->Name . " ".$self->ScripObj->ActionObj->Name);
- main::_fired_scrip($self->ScripObj);
- $MIME->make_singlepart;
- main::ok( ref($MIME) eq \'MIME::Entity\',
- "hey, look. it\'s a mime entity" );
- main::ok( ref( $MIME->head ) eq \'MIME::Head\',
- "its mime header is a mime header. yay" );
- main::ok( $MIME->head->get(\'Content-Type\') =~ /iso-8859-1/,
- "Its content type is iso-8859-1 - " . $MIME->head->get("Content-Type") );
- my $message_as_string = $MIME->bodyhandle->as_string();
- use Encode;
- $message_as_string = Encode::decode("iso-8859-1",$message_as_string);
- main::ok(
- $message_as_string =~ /H\x{e5}vard/, "The message\'s content contains havard\'s name. this will fail if it\'s not utf8 out");
-
- }';
-}
-
-# {{{ test a multipart alternative containing a text-html part with an umlaut
-
-my $content = `cat @RT_LIB_PATH@/t/data/multipart-alternative-with-umlaut` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&umlauts_redef_sendmessage;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /causes Error/, "We recorded the content right as text-plain");
-is ($tick->Transactions->First->Attachments->Count , 3 , "Has three attachments, presumably a text-plain, a text-html and a multipart alternative");
-
-sub umlauts_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage { }';
-}
-
-# }}}
-
-# {{{ test a text-html message with an umlaut
-
-my $content = `cat @RT_LIB_PATH@/t/data/text-html-with-umlaut` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&text_html_umlauts_redef_sendmessage;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Attachments->First->Content =~ /causes Error/, "We recorded the content as containing 'causes error'");
-ok ($tick->Transactions->First->Attachments->First->ContentType =~ /text\/html/, "We recorded the content as text/html");
-ok ($tick->Transactions->First->Attachments->Count ==1 , "Has one attachment, presumably a text-html and a multipart alternative");
-
-sub text_html_umlauts_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
- use Data::Dumper;
- return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
- ok (is $MIME->parts, 2, "generated correspondence mime entityis composed of three parts");
- is ($MIME->head->mime_type , "multipart/mixed", "The first part is a multipart mixed". $MIME->head->mime_type);
- is ($MIME->parts(0)->head->mime_type , "text/plain", "The second part is a plain");
- is ($MIME->parts(1)->head->mime_type , "text/html", "The third part is an html ");
- }';
-}
-
-# }}}
-
-# {{{ test a text-html message with russian characters
-
-my $content = `cat @RT_LIB_PATH@/t/data/text-html-in-russian` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&text_html_russian_redef_sendmessage;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Attachments->First->ContentType =~ /text\/html/, "We recorded the content right as text-html");
-ok ($tick->Transactions->First->Attachments->Count ==1 , "Has one attachment, presumably a text-html and a multipart alternative");
-
-sub text_html_russian_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
- use Data::Dumper;
- return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
- ok (is $MIME->parts, 2, "generated correspondence mime entityis composed of three parts");
- is ($MIME->head->mime_type , "multipart/mixed", "The first part is a multipart mixed". $MIME->head->mime_type);
- is ($MIME->parts(0)->head->mime_type , "text/plain", "The second part is a plain");
- is ($MIME->parts(1)->head->mime_type , "text/html", "The third part is an html ");
- my $content_1251;
- $content_1251 = $MIME->parts(1)->bodyhandle->as_string();
- ok ($content_1251 =~ qr{Ó÷eáíûé Öeíòp "ÊÀÄÐÛ ÄÅËÎÂÎÃÎ ÌÈÐÀ" ïpèãëaøaeò ía òpeíèíã:},
-"Content matches drugim in codepage 1251" );
- }';
-}
-
-# }}}
-
-# {{{ test a message containing a russian subject and NO content type
-
-unshift (@RT::EmailInputEncodings, 'koi8-r');
-$RT::EmailOutputEncoding = 'koi8-r';
-my $content = `cat @RT_LIB_PATH@/t/data/russian-subject-no-content-type` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&text_plain_russian_redef_sendmessage;
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Attachments->First->ContentType =~ /text\/plain/, "We recorded the content type right");
-ok ($tick->Transactions->First->Attachments->Count ==1 , "Has one attachment, presumably a text-plain");
-is ($tick->Subject, "\x{442}\x{435}\x{441}\x{442} \x{442}\x{435}\x{441}\x{442}", "Recorded the subject right");
-sub text_plain_russian_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
- return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
- is ($MIME->head->mime_type , "text/plain", "The only part is text/plain ");
- my $subject = $MIME->head->get("subject");
- chomp($subject);
- #is( $subject , /^=\?KOI8-R\?B\?W2V4YW1wbGUuY39tICM3XSDUxdPUINTF09Q=\?=/ , "The $subject is encoded correctly");
- };
- ';
-}
-
-shift @RT::EmailInputEncodings;
-$RT::EmailOutputEncoding = 'utf-8';
-# }}}
-
-
-# {{{ test a message containing a nested RFC 822 message
-
-my $content = `cat @RT_LIB_PATH@/t/data/nested-rfc-822` || die "couldn't find new content";
-ok ($content, "Loaded nested-rfc-822 to test");
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&text_plain_nested_redef_sendmessage;
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-is ($tick->Subject, "[Jonas Liljegren] Re: [Para] Niv\x{e5}er?");
-ok ($tick->Transactions->First->Attachments->First->ContentType =~ /multipart\/mixed/, "We recorded the content type right");
-is ($tick->Transactions->First->Attachments->Count , 5 , "Has one attachment, presumably a text-plain and a message RFC 822 and another plain");
-sub text_plain_nested_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage {
- my $self = shift;
- my $MIME = shift;
- return (1) unless ($self->ScripObj->ScripActionObj->Name eq "Notify AdminCcs" );
- is ($MIME->head->mime_type , "multipart/mixed", "It is a mixed multipart");
- my $subject = $MIME->head->get("subject");
- $subject = MIME::Base64::decode_base64( $subject);
- chomp($subject);
- # TODO, why does this test fail
- #ok($subject =~ qr{Niv\x{e5}er}, "The subject matches the word - $subject");
- 1;
- }';
-}
-
-# }}}
-
-
-# {{{ test a multipart alternative containing a uuencoded mesage generated by lotus notes
-
-my $content = `cat @RT_LIB_PATH@/t/data/notes-uuencoded` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&notes_redef_sendmessage;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /from Lotus Notes/, "We recorded the content right");
-is ($tick->Transactions->First->Attachments->Count , 3 , "Has three attachments");
-
-sub notes_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage { }';
-}
-
-# }}}
-
-# {{{ test a multipart that crashes the file-based mime-parser works
-
-my $content = `cat @RT_LIB_PATH@/t/data/crashes-file-based-parser` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-# be as much like the mail gateway as possible.
-&crashes_redef_sendmessage;
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-ok ($tick->Transactions->First->Content =~ /FYI/, "We recorded the content right");
-is ($tick->Transactions->First->Attachments->Count , 5 , "Has three attachments");
-
-sub crashes_redef_sendmessage {
- no warnings qw/redefine/;
- eval 'sub RT::Action::SendEmail::SendMessage { }';
-}
-
-
-
-# }}}
-
-# {{{ test a multi-line RT-Send-CC header
-
-my $content = `cat @RT_LIB_PATH@/t/data/rt-send-cc` || die "couldn't find new content";
-
-$parser->ParseMIMEEntityFromScalar($content);
-
-
-
-my %args = (message => $content, queue => 1, action => 'correspond');
- RT::Interface::Email::Gateway(\%args);
-my $tickets = RT::Tickets->new($RT::SystemUser);
-$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
-$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
-my $tick = $tickets->First();
-ok ($tick->Id, "found ticket ".$tick->Id);
-
-my $cc = $tick->Transactions->First->Attachments->First->GetHeader('RT-Send-Cc');
-ok ($cc =~ /test1/, "Found test 1");
-ok ($cc =~ /test2/, "Found test 2");
-ok ($cc =~ /test3/, "Found test 3");
-ok ($cc =~ /test4/, "Found test 4");
-ok ($cc =~ /test5/, "Found test 5");
-
-# }}}
-
-# Don't taint the environment
-$everyone->PrincipalObj->RevokeRight(Right =>'SuperUser');
-1;
diff --git a/rt/lib/t/05cronsupport.pl.in b/rt/lib/t/05cronsupport.pl.in
deleted file mode 100644
index a6b3d7451..000000000
--- a/rt/lib/t/05cronsupport.pl.in
+++ /dev/null
@@ -1,84 +0,0 @@
-#!@PERL@ -w
-
-use strict;
-
-### Set up some testing data. Test the testing data because why not?
-
-# Create a user with rights, a queue, and some tickets.
-my $user_obj = RT::User->new($RT::SystemUser);
-my ($ret, $msg) = $user_obj->LoadOrCreateByEmail('tara@example.com');
-ok($ret, 'record test user creation');
-$user_obj->SetName('tara');
-$user_obj->PrincipalObj->GrantRight(Right => 'SuperUser');
-my $CurrentUser = RT::CurrentUser->new('tara');
-
-# Create our template, which will be used for tests of RT::Action::Record*.
-
-my $template_content = 'RT-Send-Cc: tla@example.com
-RT-Send-Bcc: jesse@example.com
-
-This is a content string with no content.';
-
-my $template_obj = RT::Template->new($CurrentUser);
-$template_obj->Create(Queue => '0',
- Name => 'recordtest',
- Description => 'testing Record actions',
- Content => $template_content,
- );
-
-# Create a queue and some tickets.
-
-my $queue_obj = RT::Queue->new($CurrentUser);
-($ret, $msg) = $queue_obj->Create(Name => 'recordtest', Description => 'queue for Action::Record testing');
-ok($ret, 'record test queue creation');
-
-my $ticket1 = RT::Ticket->new($CurrentUser);
-my ($id, $tobj, $msg2) = $ticket1->Create(Queue => $queue_obj,
- Requestor => ['tara@example.com'],
- Subject => 'bork bork bork',
- Priority => 22,
- );
-ok($id, 'record test ticket creation 1');
-my $ticket2 = RT::Ticket->new($CurrentUser);
-($id, $tobj, $msg2) = $ticket2->Create(Queue => $queue_obj,
- Requestor => ['root@localhost'],
- Subject => 'hurdy gurdy'
- );
-ok($id, 'record test ticket creation 2');
-
-
-### OK. Have data, will travel.
-
-# First test the search.
-
-ok(require RT::Search::FromSQL, "Search::FromSQL loaded");
-my $ticketsqlstr = "Requestor.EmailAddress = '" . $CurrentUser->EmailAddress .
- "' AND Priority > '20'";
-my $search = RT::Search::FromSQL->new(Argument => $ticketsqlstr, TicketsObj => RT::Tickets->new($CurrentUser),
- );
-is(ref($search), 'RT::Search::FromSQL', "search created");
-ok($search->Prepare(), "fromsql search run");
-my $counter = 0;
-while(my $t = $search->TicketsObj->Next() ) {
- is($t->Id(), $ticket1->Id(), "fromsql search results 1");
- $counter++;
-}
-is ($counter, 1, "fromsql search results 2");
-
-# Right. Now test the actions.
-
-ok(require RT::Action::RecordComment);
-ok(require RT::Action::RecordCorrespondence);
-
-my ($comment_act, $correspond_act);
-ok($comment_act = RT::Action::RecordComment->new(TicketObj => $ticket1, TemplateObj => $template_obj, CurrentUser => $CurrentUser), "RecordComment created");
-ok($correspond_act = RT::Action::RecordCorrespondence->new(TicketObj => $ticket2, TemplateObj => $template_obj, CurrentUser => $CurrentUser), "RecordCorrespondence created");
-ok($comment_act->Prepare(), "Comment prepared");
-ok($correspond_act->Prepare(), "Correspond prepared");
-ok($comment_act->Commit(), "Comment committed");
-ok($correspond_act->Commit(), "Correspondence committed");
-
-# Now test for loop suppression.
-my ($trans, $desc, $transaction) = $ticket2->Comment(MIMEObj => $template_obj->MIMEObj);
-my $bogus_action = RT::Action::RecordComment->new(TicketObj => $ticket1, TemplateObj => $template_obj, TransactionObj => $transaction, CurrentUser => $CurrentUser);
-ok(!$bogus_action->Prepare(), "Comment aborted to prevent loop");
diff --git a/rt/lib/t/regression/00placeholder b/rt/lib/t/regression/00placeholder
deleted file mode 100644
index 0afc6045c..000000000
--- a/rt/lib/t/regression/00placeholder
+++ /dev/null
@@ -1 +0,0 @@
-1;
diff --git a/rt/sbin/rt-setup-database b/rt/sbin/rt-setup-database
deleted file mode 100644
index 49af151e7..000000000
--- a/rt/sbin/rt-setup-database
+++ /dev/null
@@ -1,707 +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;
-use vars qw($PROMPT $VERSION $Handle $Nobody $SystemUser $item);
-use vars
- qw(@Groups @Users @ACL @Queues @ScripActions @ScripConditions @Templates @CustomFields @Scrips @Attributes);
-
-use lib "/opt/rt3/local/lib";
-use lib "/opt/rt3/lib";
-
-#This drags in RT's config.pm
-# We do it in a begin block because RT::Handle needs to know the type to do its
-# inheritance
-use RT;
-use Carp;
-use RT::User;
-use RT::CurrentUser;
-use RT::Template;
-use RT::ScripAction;
-use RT::ACE;
-use RT::Group;
-use RT::User;
-use RT::Queue;
-use RT::ScripCondition;
-use RT::CustomField;
-use RT::Scrip;
-
-RT::LoadConfig();
-use Term::ReadKey;
-use Getopt::Long;
-
-my %args;
-
-GetOptions(
- \%args,
- 'prompt-for-dba-password', 'force', 'debug',
- 'action=s', 'dba=s', 'dba-password=s', 'datafile=s',
- 'datadir=s'
-);
-
-unless ( $args{'action'} ) {
- help();
- exit(-1);
-}
-
-$| = 1; #unbuffer that output.
-
-require RT::Handle;
-my $Handle = RT::Handle->new($RT::DatabaseType);
-$Handle->BuildDSN;
-my $dbh;
-
-if ( $args{'prompt-for-dba-password'} ) {
- $args{'dba-password'} = get_dba_password();
- chomp( $args{'dba-password'} );
-}
-
-if ( $args{'action'} eq 'init' ) {
- $dbh = DBI->connect( get_system_dsn(), $args{'dba'}, $args{'dba-password'} )
- || die "Failed to connect to " . get_system_dsn() . " as $args{'dba'}: $DBI::errstr";
- print "Now creating a database for RT.\n";
- if ( $RT::DatabaseType ne 'Oracle' || $args{'dba'} ne $RT::DatabaseUser ) {
- create_db();
- } else {
- print "...skipped as ".$args{'dba'} ." is not " . $RT::DatabaseUser . " or we're working with Oracle.\n";
- }
-
- if ( $RT::DatabaseType eq "mysql" ) {
- # Check which version we're running
- my ($version) = $dbh->selectrow_hashref("show variables like 'version'")->{Value} =~ /^(\d\.\d+)/;
- print "*** Warning: RT is unsupported on MySQL versions before 4.0.x\n" if $version < 4;
-
- # MySQL must have InnoDB support
- my $innodb = $dbh->selectrow_hashref("show variables like 'have_innodb'")->{Value};
- if ( $innodb eq "NO" ) {
- die "RT requires that MySQL be compiled with InnoDB table support.\n".
- "See http://dev.mysql.com/doc/mysql/en/InnoDB.html\n";
- } elsif ( $innodb eq "DISABLED" ) {
- die "RT requires that MySQL InnoDB table support be enabled.\n".
- ($version < 4
- ? "Add 'innodb_data_file_path=ibdata1:10M:autoextend' to the [mysqld] section of my.cnf\n"
- : "Remove the 'skip-innodb' line from your my.cnf file, restart MySQL, and try again.\n");
- }
- }
-
- # SQLite can't deal with the disconnect/reconnect
- unless ( $RT::DatabaseType eq 'SQLite' ) {
-
- $dbh->disconnect;
-
- if ( $RT::DatabaseType eq "Oracle" ) {
- $RT::DatabasePassword = $RT::DatabasePassword; #Warning avidance
- $dbh = DBI->connect( $Handle->DSN, ${RT::DatabaseUser}, ${RT::DatabasePassword} ) || die $DBI::errstr;
- } else {
- $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} ) || die $DBI::errstr;
- }
- }
- print "Now populating database schema.\n";
- insert_schema();
- print "Now inserting database ACLs\n";
- insert_acl() unless $RT::DatabaseType eq 'Oracle';
- print "Now inserting RT core system objects\n";
- insert_initial_data();
- print "Now inserting RT data\n";
- insert_data( $RT::EtcPath . "/initialdata" );
-}
-elsif ( $args{'action'} eq 'drop' ) {
- unless ( $dbh =
- DBI->connect( get_system_dsn(), $args{'dba'}, $args{'dba-password'} ) )
- {
- warn $DBI::errstr;
- warn "Database doesn't appear to exist. Aborting database drop.";
- exit;
- }
- drop_db();
-}
-elsif ( $args{'action'} eq 'insert' ) {
- insert_data( $args{'datafile'} || ($args{'datadir'}."/content") );
-}
-elsif ( $args{'action'} eq 'acl' ) {
- $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} )
- || die "Failed to connect to " . get_system_dsn() . " as $args{'dba'}: $DBI::errstr";
- insert_acl($args{'datadir'});
-}
-elsif ( $args{'action'} eq 'schema' ) {
- $dbh = DBI->connect( $Handle->DSN, $args{'dba'}, $args{'dba-password'} )
- || die "Failed to connect to " . get_system_dsn() . " as $args{'dba'}: $DBI::errstr";
- insert_schema($args{'datadir'});
-}
-else {
- print STDERR "$0 called with an invalid --action parameter\n";
- exit(-1);
-}
-
-# {{{ sub insert_schema
-sub insert_schema {
- my $base_path = (shift || $RT::EtcPath);
- my (@schema);
- print "Creating database schema.\n";
-
- my $schema_file = $base_path . "/schema." . $RT::DatabaseType;
- if ( -f $schema_file ) {
- open( SCHEMA, "<$schema_file" ) or die "Can't open $schema_file: $!";
- my @lines = <SCHEMA>;
-
- my $local_schema_file = $RT::LocalEtcPath . "/schema." . $RT::DatabaseType;
- if (-f $local_schema_file) {
- open( SCHEMA_LOCAL, "<$local_schema_file" )
- or die "Can't open $local_schema_file: $!";
- push @lines, ';;', <SCHEMA_LOCAL>;
- }
-
- my $statement = "";
- foreach my $line (@lines) {
- $line =~ s/\#.*//g;
- $line =~ s/--.*//g;
- $statement .= $line;
- if ( $line =~ /;(\s*)$/ ) {
- $statement =~ s/;(\s*)$//g;
- push @schema, $statement;
- $statement = "";
- }
- }
-
- local $SIG{__WARN__} = sub {};
- my $is_local = 0; # local/etc/schema needs to be nonfatal.
- $dbh->begin_work or die $dbh->errstr;
- foreach my $statement (@schema) {
- if ( $statement =~ /^\s*;$/ ) { $is_local = 1; next; }
-
- print STDERR "SQL: $statement\n" if defined $args{'debug'};
- my $sth = $dbh->prepare($statement) or die $dbh->errstr;
- unless ( $sth->execute or $is_local ) {
- die "Problem with statement:\n $statement\n" . $sth->errstr;
- }
- }
- $dbh->commit or die $dbh->errstr;
- }
- else {
- die "Couldn't find schema file for " . $RT::DatabaseType . "\n";
- }
- print "Done setting up database schema.\n";
-}
-
-# }}}
-
-# {{{ sub drop_db
-sub drop_db {
- if ( $RT::DatabaseType eq 'Oracle' ) {
- print <<END;
-
-To delete the tables and sequences of the RT Oracle database by running
- \@etc/drop.Oracle
-through SQLPlus.
-
-END
- return;
- }
- unless ( $args{'force'} ) {
- print <<END;
-
-About to drop $RT::DatabaseType database $RT::DatabaseName on $RT::DatabaseHost.
-WARNING: This will erase all data in $RT::DatabaseName.
-
-END
- exit unless _yesno();
-
- }
-
- print "Dropping $RT::DatabaseType database $RT::DatabaseName.\n";
-
- if ( $RT::DatabaseType eq 'SQLite' ) {
- unlink $RT::DatabaseName or warn $!;
- return;
- }
- $dbh->do("Drop DATABASE $RT::DatabaseName") or warn $DBI::errstr;
-}
-
-# }}}
-
-# {{{ sub create_db
-sub create_db {
- print "Creating $RT::DatabaseType database $RT::DatabaseName.\n";
- if ( $RT::DatabaseType eq 'SQLite' ) {
- return;
- }
- elsif ( $RT::DatabaseType eq 'Pg' ) {
- $dbh->do("CREATE DATABASE $RT::DatabaseName WITH ENCODING='UNICODE'");
- if ( $DBI::errstr ) {
- $dbh->do("CREATE DATABASE $RT::DatabaseName") || die $DBI::errstr;
- }
- }
- elsif ( $RT::DatabaseType eq 'Oracle' ) {
- insert_acl();
- }
- elsif ( $RT::DatabaseType eq 'Informix' ) {
- $ENV{DB_LOCALE} = 'en_us.utf8';
- $dbh->do("CREATE DATABASE $RT::DatabaseName WITH BUFFERED LOG");
- }
- else {
- $dbh->do("CREATE DATABASE $RT::DatabaseName") or die $DBI::errstr;
- }
-}
-
-# }}}
-
-sub get_dba_password {
- print "In order to create or update your RT database,";
- print "this script needs to connect to your "
- . $RT::DatabaseType
- . " instance on "
- . $RT::DatabaseHost . " as "
- . $args{'dba'} . ".\n";
- print "Please specify that user's database password below. If the user has no database\n";
- print "password, just press return.\n\n";
- print "Password: ";
- ReadMode('noecho');
- my $password = ReadLine(0);
- ReadMode('normal');
- print "\n";
- return ($password);
-}
-
-# {{{ sub _yesno
-sub _yesno {
- print "Proceed [y/N]:";
- my $x = scalar(<STDIN>);
- $x =~ /^y/i;
-}
-
-# }}}
-
-# {{{ insert_acls
-sub insert_acl {
- my $base_path = (shift || $RT::EtcPath);
-
- if ( $RT::DatabaseType =~ /^oracle$/i ) {
- do $base_path . "/acl.Oracle"
- || die "Couldn't find ACLS for Oracle\n" . $@;
- }
- elsif ( $RT::DatabaseType =~ /^pg$/i ) {
- do $base_path . "/acl.Pg" || die "Couldn't find ACLS for Pg\n" . $@;
- }
- elsif ( $RT::DatabaseType =~ /^mysql$/i ) {
- do $base_path . "/acl.mysql"
- || die "Couldn't find ACLS for mysql in $base_path\n" . $@;
- }
- elsif ( $RT::DatabaseType =~ /^Sybase$/i ) {
- do $base_path . "/acl.Sybase"
- || die "Couldn't find ACLS for Sybase in $base_path\n" . $@;
- }
- elsif ( $RT::DatabaseType =~ /^informix$/i ) {
- do $base_path . "/acl.Informix"
- || die "Couldn't find ACLS for Informix in $base_path\n" . $@;
- }
- elsif ( $RT::DatabaseType =~ /^SQLite$/i ) {
- return;
- }
- else {
- die "Unknown RT database type";
- }
-
- my @acl = acl($dbh);
- foreach my $statement (@acl) {
- print STDERR $statement if $args{'debug'};
- my $sth = $dbh->prepare($statement) or die $dbh->errstr;
- unless ( $sth->execute ) {
- die "Problem with statement:\n $statement\n" . $sth->errstr;
- }
- }
- print "Done setting up database ACLs.\n";
-}
-
-# }}}
-
-=head2 get_system_dsn
-
-Returns a dsn suitable for database creates and drops
-and user creates and drops
-
-=cut
-
-sub get_system_dsn {
-
- my $dsn = $Handle->DSN;
-
- #with mysql, you want to connect sans database to funge things
- if ( $RT::DatabaseType eq 'mysql' ) {
- $dsn =~ s/dbname=$RT::DatabaseName//;
-
- # with postgres, you want to connect to database1
- }
- elsif ( $RT::DatabaseType eq 'Pg' ) {
- $dsn =~ s/dbname=$RT::DatabaseName/dbname=template1/;
- }
- elsif ( $RT::DatabaseType eq 'Informix' ) {
- # with Informix, you want to connect sans database:
- $dsn =~ s/Informix:$RT::DatabaseName/Informix:/;
- }
- return $dsn;
-}
-
-sub insert_initial_data {
-
- RT::InitLogging();
-
- #connect to the db, for actual RT work
- require RT::Handle;
- $RT::Handle = RT::Handle->new();
- $RT::Handle->Connect();
-
- #Put together a current user object so we can create a User object
- my $CurrentUser = new RT::CurrentUser();
-
- print "Checking for existing system user...";
- my $test_user = RT::User->new($CurrentUser);
- $test_user->Load('RT_System');
- if ( $test_user->id ) {
- print "found!\n\nYou appear to have a functional RT database.\n"
- . "Exiting, so as not to clobber your existing data.\n";
- exit(-1);
-
- }
- else {
- print "not found. This appears to be a new installation.\n";
- }
-
- print "Creating system user...";
- my $RT_System = new RT::User($CurrentUser);
-
- my ( $val, $msg ) = $RT_System->_BootstrapCreate(
- Name => 'RT_System',
- RealName => 'The RT System itself',
- Comments =>
-'Do not delete or modify this user. It is integral to RT\'s internal database structures',
- Creator => '1',
- LastUpdatedBy => '1',
- );
-
- unless ( $val ) {
- print "$msg\n";
- exit(-1);
- }
- print "done.\n";
- $RT::Handle->Disconnect() unless $RT::DatabaseType eq 'SQLite';
-
-}
-
-# load some sort of data into the database
-
-sub insert_data {
- my $datafile = shift;
-
- #Connect to the database and get RT::SystemUser and RT::Nobody loaded
- RT::Init;
-
- my $CurrentUser = RT::CurrentUser->new();
- $CurrentUser->LoadByName('RT_System');
-
- if ( $datafile eq $RT::EtcPath . "/initialdata" ) {
-
- print "Creating Superuser ACL...";
-
- my $superuser_ace = RT::ACE->new($CurrentUser);
- $superuser_ace->_BootstrapCreate(
- PrincipalId => ACLEquivGroupId( $CurrentUser->Id ),
- PrincipalType => 'Group',
- RightName => 'SuperUser',
- ObjectType => 'RT::System',
- ObjectId => '1' );
-
- print "done.\n";
- }
-
- # Slurp in stuff to insert from the datafile. Possible things to go in here:-
- # @groups, @users, @acl, @queues, @ScripActions, @ScripConditions, @templates
-
- require $datafile
- || die "Couldn't find initial data for import\n" . $@;
-
- if ( @Groups ) {
- print "Creating groups...";
- foreach $item (@Groups) {
- my $new_entry = RT::Group->new($CurrentUser);
- my ( $return, $msg ) = $new_entry->_Create(%$item);
- print "(Error: $msg)" unless $return;
- print $return. ".";
- }
- print "done.\n";
- }
- if ( @Users ) {
- print "Creating users...";
- foreach $item (@Users) {
- my $new_entry = new RT::User($CurrentUser);
- my ( $return, $msg ) = $new_entry->Create(%$item);
- print "(Error: $msg)" unless $return;
- print $return. ".";
- }
- print "done.\n";
- }
- if ( @Queues ) {
- print "Creating queues...";
- for $item (@Queues) {
- my $new_entry = new RT::Queue($CurrentUser);
- my ( $return, $msg ) = $new_entry->Create(%$item);
- print "(Error: $msg)" unless $return;
- print $return. ".";
- }
- print "done.\n";
- }
- if ( @ACL ) {
- print "Creating ACL...";
- for my $item (@ACL) {
-
- my ($princ, $object);
-
- # Global rights or Queue rights?
- if ( $item->{'Queue'} ) {
- $object = RT::Queue->new($CurrentUser);
- $object->Load( $item->{'Queue'} );
- } else {
- $object = $RT::System;
- }
-
- # Group rights or user rights?
- if ( $item->{'GroupDomain'} ) {
- $princ = RT::Group->new($CurrentUser);
- if ( $item->{'GroupDomain'} eq 'UserDefined' ) {
- $princ->LoadUserDefinedGroup( $item->{'GroupId'} );
- } elsif ( $item->{'GroupDomain'} eq 'SystemInternal' ) {
- $princ->LoadSystemInternalGroup( $item->{'GroupType'} );
- } elsif ( $item->{'GroupDomain'} eq 'RT::System-Role' ) {
- $princ->LoadSystemRoleGroup( $item->{'GroupType'} );
- } elsif ( $item->{'GroupDomain'} eq 'RT::Queue-Role' &&
- $item->{'Queue'} )
- {
- $princ->LoadQueueRoleGroup( Type => $item->{'GroupType'},
- Queue => $object->id);
- } else {
- $princ->Load( $item->{'GroupId'} );
- }
- } else {
- $princ = RT::User->new($CurrentUser);
- $princ->Load( $item->{'UserId'} );
- }
-
- # Grant it
- my ( $return, $msg ) = $princ->PrincipalObj->GrantRight(
- Right => $item->{'Right'},
- Object => $object );
-
- if ( $return ) {
- print $return. ".";
- }
- else {
- print $msg . ".";
-
- }
-
- }
- print "done.\n";
- }
- if ( @CustomFields ) {
- print "Creating custom fields...";
- for $item (@CustomFields) {
- my $new_entry = new RT::CustomField($CurrentUser);
- my $values = $item->{'Values'};
- delete $item->{'Values'};
- my ( $return, $msg ) = $new_entry->Create(%$item);
- unless( $return ) {
- print "(Error: $msg)\n";
- next;
- }
-
- foreach my $value ( @{$values} ) {
- my ( $eval, $emsg ) = $new_entry->AddValue(%$value);
- print "(Error: $emsg)\n" unless $eval;
- }
-
- if ( $item->{LookupType} && !exists $item->{'Queue'} ) { # enable by default
- my $ocf = RT::ObjectCustomField->new($CurrentUser);
- $ocf->Create( CustomField => $new_entry->Id );
- }
-
- print "(Error: $msg)\n" unless $return;
- print $return. ".";
- }
-
- print "done.\n";
- }
-
- if ( @ScripActions ) {
- print "Creating ScripActions...";
-
- for $item (@ScripActions) {
- my $new_entry = RT::ScripAction->new($CurrentUser);
- my ($return,$msg) = $new_entry->Create(%$item);
- unless ($return) {
- print "(Error: $msg)\n";
- next;
- }
- print $return. ".";
- }
-
- print "done.\n";
- }
-
- if ( @ScripConditions ) {
- print "Creating ScripConditions...";
-
- for $item (@ScripConditions) {
- my $new_entry = RT::ScripCondition->new($CurrentUser);
- my ($return,$msg) = $new_entry->Create(%$item);
- unless ($return) {
- print "(Error: $msg)\n";
- next;
- }
- print $return. ".";
- }
-
- print "done.\n";
- }
-
- if ( @Templates ) {
- print "Creating templates...";
-
- for $item (@Templates) {
- my $new_entry = new RT::Template($CurrentUser);
- my $return = $new_entry->Create(%$item);
- print $return. ".";
- }
- print "done.\n";
- }
- if ( @Scrips ) {
- print "Creating scrips...";
-
- for $item (@Scrips) {
- my $new_entry = new RT::Scrip($CurrentUser);
- my ( $return, $msg ) = $new_entry->Create(%$item);
- if ( $return ) {
- print $return. ".";
- }
- else {
- print "(Error: $msg)\n";
- }
- }
- print "done.\n";
- }
- if ( @Attributes ) {
- print "Creating predefined searches...";
- my $sys = RT::System->new($CurrentUser);
-
- for $item (@Attributes) {
- my $obj = delete $item->{Object}; # XXX: make this something loadable
- $obj ||= $sys;
- my ( $return, $msg ) = $obj->AddAttribute (%$item);
- if ( $return ) {
- print $return. ".";
- }
- else {
- print "(Error: $msg)\n";
- }
- }
- print "done.\n";
- }
- $RT::Handle->Disconnect() unless $RT::DatabaseType eq 'SQLite';
- print "Done setting up database content.\n";
-}
-
-=head2 ACLEquivGroupId
-
-Given a userid, return that user's acl equivalence group
-
-=cut
-
-sub ACLEquivGroupId {
- my $username = shift;
- my $user = RT::User->new($RT::SystemUser);
- $user->Load($username);
- my $equiv_group = RT::Group->new($RT::SystemUser);
- $equiv_group->LoadACLEquivalenceGroup($user);
- return ( $equiv_group->Id );
-}
-
-sub help {
-
- print <<EOF;
-
-$0: Set up RT's database
-
---action init Initialize the database
- drop Drop the database.
- This will ERASE ALL YOUR DATA
- insert Insert data into RT's database.
- By default, will use RT's installation data.
- To use a local or supplementary datafile, specify it
- using the '--datafile' option below.
-
- acl Initialize only the database ACLs
- To use a local or supplementary datafile, specify it
- using the '--datadir' option below.
-
- schema Initialize only the database schema
- To use a local or supplementary datafile, specify it
- using the '--datadir' option below.
-
---datafile /path/to/datafile
---datadir /path/to/ Used to specify a path to find the local
- database schema and acls to be installed.
-
-
---dba dba's username
---dba-password dba's password
---prompt-for-dba-password Ask for the database administrator's password interactively
-
-
-EOF
-
-}
-
-1;
diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in
index f134f5b84..cf607e286 100644
--- a/rt/sbin/rt-setup-database.in
+++ b/rt/sbin/rt-setup-database.in
@@ -3,7 +3,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -25,7 +25,7 @@
# 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.
+# http://www.gnu.org/copyleft/gpl.html.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -160,6 +160,9 @@ elsif ( $args{'action'} eq 'drop' ) {
}
drop_db();
}
+elsif ( $args{'action'} eq 'insert_initial' ) {
+ insert_initial_data();
+}
elsif ( $args{'action'} eq 'insert' ) {
insert_data( $args{'datafile'} || ($args{'datadir'}."/content") );
}
@@ -677,7 +680,9 @@ $0: Set up RT's database
--action init Initialize the database
drop Drop the database.
This will ERASE ALL YOUR DATA
- insert Insert data into RT's database.
+ insert_initial
+ Insert RT's core system objects
+ insert Insert data into RT's database.
By default, will use RT's installation data.
To use a local or supplementary datafile, specify it
using the '--datafile' option below.
diff --git a/rt/sbin/rt-test-dependencies b/rt/sbin/rt-test-dependencies
deleted file mode 100644
index fb14f8459..000000000
--- a/rt/sbin/rt-test-dependencies
+++ /dev/null
@@ -1,481 +0,0 @@
-#!/usr/bin/perl
-# 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 }}}
-#
-# This is just a basic script that checks to make sure that all
-# the modules needed by RT before you can install it.
-#
-
-use strict;
-no warnings qw(numeric redefine);
-use Getopt::Long;
-my %args;
-my %deps;
-GetOptions(
- \%args, 'v|verbose',
- 'install', 'with-MYSQL',
- 'with-POSTGRESQL|with-pg|with-pgsql', 'with-SQLITE',
- 'with-ORACLE', 'with-FASTCGI',
- 'with-SPEEDYCGI', 'with-MODPERL1',
- 'with-MODPERL2', 'with-DEV',
- 'with-STANDALONE',
- 'download=s',
- 'repository=s'
-);
-
-unless (keys %args) {
- help();
- exit(0);
-}
-# Set up defaults
-my %default = (
- 'with-MASON' => 1,
- 'with-CORE' => 1,
- 'with-CLI' => 1,
- 'with-MAILGATE' => 1,
- 'with-DEV' => 0,
- 'with-STANDALONE' => 0,
-);
-$args{$_} = $default{$_} foreach grep !exists $args{$_}, keys %default;
-
-
-{
- my $section;
- my %always_show_sections = (
- perl => 1,
- users => 1,
- );
-
- sub section {
- my $s = shift;
- $section = $s;
- print "$s:\n";
- }
-
- my $any_missing = 0;
- sub found {
- my $msg = shift;
- my $test = shift;
- my $extra = shift;
-
- $any_missing = 1 unless $test;
- if ($args{'v'} or not $test or $always_show_sections{$section}) {
- print "\t$msg...";
- print $test ? "found" : "MISSING";
- print "\n";
- }
-
- print "\t\t$extra\n" if defined $extra;
- }
-
- sub conclude {
- if ($any_missing) {
- print "\nSOMETHING WAS MISSING!\n";
- exit 1;
- } else {
- print "\nEverything was found.\n";
- }
- }
-}
-
-sub help {
-
- print <<'.';
-
-By default, testdeps determine whether you have
-installed all the perl modules RT needs to run.
-
- --install Install missing modules
-
-The following switches will tell the tool to check for specific dependencies
-
- --with-mysql Database interface for MySQL
- --with-postgresql Database interface for PostgreSQL
- --with-sqlite Database interface and driver for SQLite (unsupported)
- --with-oracle Database interface for oracle (unsupported)
-
- --with-standalone Libraries needed to support the standalone simple pure perl server
- --with-fastcgi Libraries needed to support the fastcgi handler
- --with-speedycgi Libraries needed to support the speedycgi handler
- --with-modperl1 Libraries needed to support the modperl 1 handler
- --with-modperl2 Libraries needed to support the modperl 2 handler
-
- --with-dev Tools needed for RT development
-
-You can also specify -v or --verbose to list the status of all dependencies,
-rather than just the missing ones.
-
-The "RT_FIX_DEPS_CMD" environment variable, if set, will be used
-instead of the standard CPAN shell by --install to install any
-required modules. It will be called with the module name, or, if
-"RT_FIX_DEPS_CMD" contains a "%s", will replace the "%s" with the
-module name before calling the program.
-.
-}
-
-
-sub text_to_hash {
- my %hash;
- for my $line ( split /\n/, $_[0] ) {
- my($key, $value) = $line =~ /(\S+)\s*(\S*)/;
- $value ||= '';
- $hash{$key} = $value;
- }
-
- return %hash;
-}
-
-$deps{'CORE'} = [ text_to_hash( << '.') ];
-Digest::base
-Digest::MD5 2.27
-DBI 1.37
-Class::ReturnValue 0.40
-Date::Format
-DBIx::SearchBuilder 1.53
-Text::Template
-File::Spec 0.8
-HTML::Entities
-HTML::Scrubber 0.08
-Log::Dispatch 2.0
-Locale::Maketext 1.06
-Locale::Maketext::Lexicon 0.32
-Locale::Maketext::Fuzzy
-MIME::Entity 5.108
-Mail::Mailer 1.57
-Net::SMTP
-Text::Wrapper
-Time::ParseDate
-Time::HiRes
-File::Temp
-Text::Autoformat
-Text::Quoted 2.02
-Tree::Simple 1.04
-Regexp::Common
-Scalar::Util
-Module::Versions::Report 1.03
-Cache::Simple::TimedExpiry
-UNIVERSAL::require
-Calendar::Simple
-CSS::Squish 0.06
-Devel::StackTrace 1.19
-.
-
-$deps{'MASON'} = [ text_to_hash( << '.') ];
-HTML::Mason 1.23
-Errno
-Digest::MD5 2.27
-CGI::Cookie 1.20
-Storable 2.08
-Apache::Session 1.53
-XML::RSS 1.05
-GD
-GD::Graph
-GD::Text
-Text::WikiFormat 0.76
-CSS::Squish 0.06
-.
-
-$deps{'STANDALONE'} = [ text_to_hash( << '.') ];
-HTTP::Server::Simple 0.07
-HTTP::Server::Simple::Mason 0.09
-.
-
-$deps{'MAILGATE'} = [ text_to_hash( << '.') ];
-HTML::TreeBuilder
-HTML::FormatText
-Getopt::Long
-LWP::UserAgent
-Pod::Usage
-.
-
-$deps{'CLI'} = [ text_to_hash( << '.') ];
-Getopt::Long 2.24
-LWP
-HTTP::Request::Common
-Text::ParseWords
-Term::ReadLine
-Term::ReadKey
-.
-
-$deps{'DEV'} = [ text_to_hash( << '.') ];
-Test::Inline
-Apache::Test
-HTML::Form
-HTML::TokeParser
-WWW::Mechanize
-Test::WWW::Mechanize 1.04
-Module::Refresh 0.03
-Test::Expect 0.30
-XML::Simple
-File::Find
-.
-
-$deps{'FASTCGI'} = [ text_to_hash( << '.') ];
-CGI 2.92
-FCGI
-CGI::Fast
-.
-
-$deps{'SPEEDYCGI'} = [ text_to_hash( << '.') ];
-CGI 2.92
-CGI::SpeedyCGI
-.
-
-
-$deps{'MODPERL1'} = [ text_to_hash( << '.') ];
-CGI 2.92
-Apache::Request
-Apache::DBI 0.92
-.
-
-$deps{'MODPERL2'} = [ text_to_hash( << '.') ];
-CGI 3.10
-Apache::DBI
-HTML::Mason 1.31
-.
-
-$deps{'MYSQL'} = [ text_to_hash( << '.') ];
-DBD::mysql 2.1018
-.
-$deps{'ORACLE'} = [ text_to_hash( << '.') ];
-DBD::Oracle
-.
-$deps{'POSTGRESQL'} = [ text_to_hash( << '.') ];
-DBD::Pg 1.43
-.
-
-$deps{'SQLITE'} = [ text_to_hash( << '.') ];
-DBD::SQLite 1.00
-.
-
-if ($args{'download'}) {
-
- download_mods();
-}
-
-
-check_perl_version();
-
-check_users();
-
-
-foreach my $type (sort grep $args{$_}, keys %args) {
- next unless ($type =~ /^with-(.*?)$/);
-
- $type = $1;
- section("$type dependencies");
-
- my @missing;
- my @deps = @{ $deps{$type} };
- while (@deps) {
- my $module = shift @deps;
- my $version = shift @deps;
- my $ret = test_dep($module, $version);
-
- push @missing, $module, $version unless $ret;
- }
- if ( $args{'install'} ) {
- while( @missing ) {
- resolve_dep(shift @missing, shift @missing);
- }
- }
-}
-
-conclude();
-
-sub test_dep {
- my $module = shift;
- my $version = shift;
-
- eval "use $module $version ()";
- if ($@) {
- my $error = $@;
- $error =~ s/\n(.*)$//s;
- undef $error unless $error =~ /this is only/;
- found("$module $version", 0, $error);
-
- return undef;
- } else {
- my $msg = "$module";
- $msg .= " >=$version" if $version;
- found($msg, 1);
- return 1;
- }
-}
-
-sub resolve_dep {
- my $module = shift;
- my $version = shift;
-
- print "\nInstall module $module\n";
-
- my $ext = $ENV{'RT_FIX_DEPS_CMD'};
- unless( $ext ) {
- my $configured = 1;
- {
- local @INC = @INC;
- if ( $ENV{'HOME'} ) {
- unshift @INC, "$ENV{'HOME'}/.cpan";
- }
- $configured = eval { require CPAN::MyConfig } || eval { require CPAN::Config };
- }
- unless ( $configured ) {
- print <<END;
-You didn't configure CPAN shell yet.
-Please run `/usr/bin/perl -MCPAN -e shell` tool and configure it.
-END
- exit(1);
- }
- my $rv = eval { require CPAN; CPAN::Shell->install($module) };
- return $rv unless $@;
-
- print <<END;
-Failed to load module CPAN.
-
--------- Error ---------
-$@
-------------------------
-
-When we tried to start installing RT's perl dependencies,
-we were unable to load the CPAN client. This module is usually distributed
-with Perl. This usually indicates that your vendor has shipped an unconfigured
-or incorrectly configured CPAN client.
-The error above may (or may not) give you a hint about what went wrong
-
-You have several choices about how to install dependencies in
-this situatation:
-
-1) use a different tool to install dependencies by running setting the following
- shell environment variable and rerunning this tool:
- RT_FIX_DEPS_CMD='/usr/bin/perl -MCPAN -e"install %s"'
-2) Attempt to configure CPAN by running:
- `/usr/bin/perl -MCPAN -e shell` program from shell.
- If this fails, you may have to manually upgrade CPAN (see below)
-3) Try to update the CPAN client. Download it from:
- http://search.cpan.org/dist/CPAN and try again
-4) Install each dependency manually by downloading them one by one from
- http://search.cpan.org
-
-END
- exit(1);
- }
-
- if( $ext =~ /\%s/) {
- $ext =~ s/\%s/$module/g; # sprintf( $ext, $module );
- } else {
- $ext .= " $module";
- }
- print "\t\tcommand: '$ext'\n";
- return scalar `$ext 1>&2`;
-}
-
-sub download_mods {
- my %modules;
- use CPAN;
-
- foreach my $key (keys %deps) {
- my @deps = (@{$deps{$key}});
- while (@deps) {
- my $mod = shift @deps;
- my $ver = shift @deps;
- next if ($mod =~ /^(DBD-|Apache-Request)/);
- $modules{$mod} = $ver;
- }
- }
- my @mods = keys %modules;
- CPAN::get();
- my $moddir = $args{'download'};
- foreach my $mod (@mods) {
- $CPAN::Config->{'build_dir'} = $moddir;
- CPAN::get($mod);
- }
-
- opendir(DIR, $moddir);
- while ( my $dir = readdir(DIR)) {
- print "Dir is $dir\n";
- next if ( $dir =~ /^\.\.?$/);
-
- # Skip things we've previously tagged
- my $out = `svn ls $args{'repository'}/tags/$dir`;
- next if ($out);
-
- if ($dir =~ /^(.*)-(.*?)$/) {
- `svn_load_dirs -no_user_input -t tags/$dir -v $args{'repository'} dists/$1 $moddir/$dir`;
- `rm -rf $moddir/$dir`;
-
- }
-
- }
- closedir(DIR);
- exit;
-}
-
-sub check_perl_version {
- section("perl");
- eval {require 5.008003};
- if ($@) {
- found("5.8.3", 0,"RT is known to be non-functional on versions of perl older than 5.8.3. Please upgrade to 5.8.3 or newer.");
- exit(1);
- } else {
- found( ">=5.8.3($])", 1);
- }
-}
-
-sub check_users {
- section("users");
- found("rt group (www)", defined getgrnam("www"));
- found("bin owner (root)", defined getpwnam("root"));
- found("libs owner (root)", defined getpwnam("root"));
- found("libs group (bin)", defined getgrnam("bin"));
- found("web owner (www)", defined getpwnam("www"));
- found("web group (www)", defined getgrnam("www"));
-}
-
-
-
-1;