summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
Diffstat (limited to 'rt')
-rw-r--r--rt/ChangeLog16016
-rw-r--r--rt/Makefile517
-rwxr-xr-xrt/README402
-rwxr-xr-xrt/TODO9
-rw-r--r--rt/bin/initacls.Oracle26
-rwxr-xr-xrt/bin/initacls.Pg28
-rwxr-xr-xrt/bin/initacls.mysql20
-rwxr-xr-xrt/bin/mason_handler.fcgi255
-rwxr-xr-xrt/bin/mason_handler.scgi218
-rwxr-xr-xrt/bin/rt1391
-rwxr-xr-xrt/bin/rt-mailgate842
-rw-r--r--rt/bin/rtadmin1040
-rwxr-xr-xrt/bin/webmux.pl248
-rw-r--r--rt/docs/design_docs/acls228
-rw-r--r--rt/docs/design_docs/basic-definitions.txt54
-rw-r--r--rt/docs/design_docs/cli_spec361
-rw-r--r--rt/docs/design_docs/evil_plans9
-rw-r--r--rt/docs/design_docs/local_hacking32
-rwxr-xr-xrt/docs/rt.gifbin8811 -> 0 bytes
-rw-r--r--rt/etc/acl.Oracle19
-rwxr-xr-xrt/etc/acl.Pg96
-rwxr-xr-xrt/etc/acl.mysql12
-rwxr-xr-xrt/etc/config.pm473
-rw-r--r--rt/etc/schema.Oracle287
-rwxr-xr-xrt/etc/schema.Pg747
-rwxr-xr-xrt/etc/schema.mysql429
-rw-r--r--rt/etc/schema.pm349
-rw-r--r--rt/lib/MANIFEST57
-rw-r--r--rt/lib/MANIFEST.SKIP1
-rw-r--r--rt/lib/Makefile.PL49
-rw-r--r--rt/lib/RT.pm191
-rwxr-xr-xrt/lib/RT/ACE.pm806
-rwxr-xr-xrt/lib/RT/ACL.pm329
-rwxr-xr-xrt/lib/RT/Action/Autoreply.pm40
-rwxr-xr-xrt/lib/RT/Action/Generic.pm56
-rwxr-xr-xrt/lib/RT/Action/Notify.pm83
-rwxr-xr-xrt/lib/RT/Action/NotifyAsComment.pm34
-rw-r--r--rt/lib/RT/Action/OpenDependent.pm55
-rw-r--r--rt/lib/RT/Action/ResolveMembers.pm35
-rwxr-xr-xrt/lib/RT/Action/SendEmail.pm699
-rwxr-xr-xrt/lib/RT/Action/SendPasswordEmail.pm170
-rw-r--r--rt/lib/RT/Action/StallDependent.pm68
-rwxr-xr-xrt/lib/RT/Attachment.pm601
-rwxr-xr-xrt/lib/RT/Attachments.pm136
-rw-r--r--rt/lib/RT/Condition/AnyTransaction.pm34
-rwxr-xr-xrt/lib/RT/Condition/Generic.pm55
-rw-r--r--rt/lib/RT/Condition/NewDependency.pm0
-rw-r--r--rt/lib/RT/Condition/StatusChange.pm35
-rwxr-xr-xrt/lib/RT/CurrentUser.pm166
-rw-r--r--rt/lib/RT/Date.pm335
-rwxr-xr-xrt/lib/RT/EasySearch.pm115
-rwxr-xr-xrt/lib/RT/Group.pm430
-rwxr-xr-xrt/lib/RT/GroupMember.pm231
-rwxr-xr-xrt/lib/RT/GroupMembers.pm124
-rwxr-xr-xrt/lib/RT/Groups.pm135
-rw-r--r--rt/lib/RT/Handle.pm62
-rw-r--r--rt/lib/RT/Interface/CLI.pm112
-rwxr-xr-xrt/lib/RT/Interface/Email.pm683
-rw-r--r--rt/lib/RT/Interface/Web.pm1124
-rw-r--r--rt/lib/RT/Keyword.pm446
-rw-r--r--rt/lib/RT/KeywordSelect.pm452
-rw-r--r--rt/lib/RT/KeywordSelects.pm143
-rw-r--r--rt/lib/RT/Keywords.pm106
-rw-r--r--rt/lib/RT/Link.pm487
-rw-r--r--rt/lib/RT/Links.pm153
-rw-r--r--rt/lib/RT/ObjectKeyword.pm192
-rw-r--r--rt/lib/RT/ObjectKeywords.pm234
-rwxr-xr-xrt/lib/RT/Queue.pm961
-rwxr-xr-xrt/lib/RT/Queues.pm162
-rwxr-xr-xrt/lib/RT/Record.pm400
-rwxr-xr-xrt/lib/RT/Scrip.pm654
-rwxr-xr-xrt/lib/RT/ScripAction.pm385
-rwxr-xr-xrt/lib/RT/ScripActions.pm137
-rwxr-xr-xrt/lib/RT/ScripCondition.pm366
-rwxr-xr-xrt/lib/RT/ScripConditions.pm142
-rwxr-xr-xrt/lib/RT/Scrips.pm162
-rwxr-xr-xrt/lib/RT/Template.pm512
-rwxr-xr-xrt/lib/RT/Templates.pm143
-rw-r--r--rt/lib/RT/TestHarness.pm14
-rwxr-xr-xrt/lib/RT/Ticket.pm3026
-rwxr-xr-xrt/lib/RT/Tickets.pm1806
-rwxr-xr-xrt/lib/RT/Transaction.pm895
-rwxr-xr-xrt/lib/RT/Transactions.pm129
-rwxr-xr-xrt/lib/RT/User.pm1696
-rwxr-xr-xrt/lib/RT/Users.pm298
-rwxr-xr-xrt/lib/RT/Watcher.pm313
-rwxr-xr-xrt/lib/RT/Watchers.pm226
-rw-r--r--rt/lib/test.pl52
-rw-r--r--rt/tools/cpan2rpm299
-rw-r--r--rt/tools/initdb216
-rwxr-xr-xrt/tools/insertdata618
-rw-r--r--rt/tools/testdeps115
-rwxr-xr-xrt/webrt/Admin/Elements/CreateQueueCalled3
-rwxr-xr-xrt/webrt/Admin/Elements/CreateUserCalled3
-rwxr-xr-xrt/webrt/Admin/Elements/EditUserComments9
-rwxr-xr-xrt/webrt/Admin/Elements/GrantQueueRightsTo30
-rwxr-xr-xrt/webrt/Admin/Elements/GroupTabs18
-rwxr-xr-xrt/webrt/Admin/Elements/Header5
-rw-r--r--rt/webrt/Admin/Elements/ListGlobalKeywordSelects15
-rwxr-xr-xrt/webrt/Admin/Elements/ListGlobalScrips10
-rw-r--r--rt/webrt/Admin/Elements/ModifyKeyword95
-rw-r--r--rt/webrt/Admin/Elements/ModifyKeywordSelect120
-rwxr-xr-xrt/webrt/Admin/Elements/ModifyQueue56
-rwxr-xr-xrt/webrt/Admin/Elements/ModifyTemplate78
-rwxr-xr-xrt/webrt/Admin/Elements/ModifyUser77
-rw-r--r--rt/webrt/Admin/Elements/QueueRightsForUser17
-rwxr-xr-xrt/webrt/Admin/Elements/QueueTabs36
-rw-r--r--rt/webrt/Admin/Elements/SelectKeywordSelect22
-rw-r--r--rt/webrt/Admin/Elements/SelectModifyGroup10
-rw-r--r--rt/webrt/Admin/Elements/SelectModifyKeyword13
-rw-r--r--rt/webrt/Admin/Elements/SelectModifyKeywordSelect13
-rwxr-xr-xrt/webrt/Admin/Elements/SelectModifyQueue10
-rwxr-xr-xrt/webrt/Admin/Elements/SelectModifyUser26
-rwxr-xr-xrt/webrt/Admin/Elements/SelectQueueRights29
-rw-r--r--rt/webrt/Admin/Elements/SelectRights58
-rwxr-xr-xrt/webrt/Admin/Elements/SelectScrip25
-rw-r--r--rt/webrt/Admin/Elements/SelectScripAction25
-rw-r--r--rt/webrt/Admin/Elements/SelectScripCondition25
-rw-r--r--rt/webrt/Admin/Elements/SelectSingleOrMultiple20
-rwxr-xr-xrt/webrt/Admin/Elements/SelectTemplate37
-rw-r--r--rt/webrt/Admin/Elements/SelectUsers17
-rwxr-xr-xrt/webrt/Admin/Elements/SystemTabs31
-rwxr-xr-xrt/webrt/Admin/Elements/Tabs31
-rwxr-xr-xrt/webrt/Admin/Elements/UserTabs21
-rwxr-xr-xrt/webrt/Admin/Global/GroupRights.html78
-rw-r--r--rt/webrt/Admin/Global/Keywords.html97
-rwxr-xr-xrt/webrt/Admin/Global/Scrips.html95
-rwxr-xr-xrt/webrt/Admin/Global/Template.html66
-rwxr-xr-xrt/webrt/Admin/Global/Templates.html24
-rwxr-xr-xrt/webrt/Admin/Global/UserRights.html42
-rwxr-xr-xrt/webrt/Admin/Global/index.html2
-rw-r--r--rt/webrt/Admin/Groups/Members.html76
-rw-r--r--rt/webrt/Admin/Groups/Modify.html83
-rw-r--r--rt/webrt/Admin/Groups/Rights.html1
-rw-r--r--rt/webrt/Admin/Groups/index.html33
-rw-r--r--rt/webrt/Admin/KeywordSelects/Modify.html17
-rw-r--r--rt/webrt/Admin/KeywordSelects/index.html137
-rw-r--r--rt/webrt/Admin/Keywords/Modify.html96
-rw-r--r--rt/webrt/Admin/Keywords/index.html110
-rwxr-xr-xrt/webrt/Admin/Queues/Create.html13
-rwxr-xr-xrt/webrt/Admin/Queues/GroupRights.html103
-rw-r--r--rt/webrt/Admin/Queues/Keywords.html114
-rwxr-xr-xrt/webrt/Admin/Queues/Modify.html137
-rwxr-xr-xrt/webrt/Admin/Queues/People.html161
-rwxr-xr-xrt/webrt/Admin/Queues/Scrips.html111
-rwxr-xr-xrt/webrt/Admin/Queues/Template.html68
-rwxr-xr-xrt/webrt/Admin/Queues/Templates.html24
-rwxr-xr-xrt/webrt/Admin/Queues/UserRights.html72
-rwxr-xr-xrt/webrt/Admin/Queues/index.html52
-rwxr-xr-xrt/webrt/Admin/Users/Modify.html259
-rwxr-xr-xrt/webrt/Admin/Users/Prefs.html97
-rw-r--r--rt/webrt/Admin/Users/Rights.html1
-rwxr-xr-xrt/webrt/Admin/Users/index.html71
-rwxr-xr-xrt/webrt/Admin/index.html4
-rwxr-xr-xrt/webrt/Elements/Checkbox17
-rw-r--r--rt/webrt/Elements/CreateTicket1
-rw-r--r--rt/webrt/Elements/CustomHomepageHeader0
-rwxr-xr-xrt/webrt/Elements/Error23
-rwxr-xr-xrt/webrt/Elements/Footer10
-rw-r--r--rt/webrt/Elements/GotoTicket1
-rwxr-xr-xrt/webrt/Elements/Header61
-rwxr-xr-xrt/webrt/Elements/ListActions14
-rwxr-xr-xrt/webrt/Elements/Login69
-rw-r--r--rt/webrt/Elements/MessageBox30
-rw-r--r--rt/webrt/Elements/MyRequests45
-rw-r--r--rt/webrt/Elements/MyTickets43
-rw-r--r--rt/webrt/Elements/Quicksearch41
-rw-r--r--rt/webrt/Elements/Refresh22
-rwxr-xr-xrt/webrt/Elements/Section11
-rwxr-xr-xrt/webrt/Elements/SelectBoolean24
-rwxr-xr-xrt/webrt/Elements/SelectDate25
-rwxr-xr-xrt/webrt/Elements/SelectDateRelation14
-rwxr-xr-xrt/webrt/Elements/SelectDateType12
-rwxr-xr-xrt/webrt/Elements/SelectEqualityOperator18
-rw-r--r--rt/webrt/Elements/SelectKeyword38
-rw-r--r--rt/webrt/Elements/SelectKeywordOptions18
-rw-r--r--rt/webrt/Elements/SelectLinkType16
-rw-r--r--rt/webrt/Elements/SelectMatch31
-rwxr-xr-xrt/webrt/Elements/SelectNewTicketQueue9
-rwxr-xr-xrt/webrt/Elements/SelectOwner22
-rwxr-xr-xrt/webrt/Elements/SelectQueue38
-rw-r--r--rt/webrt/Elements/SelectResultsPerPage22
-rw-r--r--rt/webrt/Elements/SelectSortOrder18
-rwxr-xr-xrt/webrt/Elements/SelectStatus17
-rw-r--r--rt/webrt/Elements/SelectTicketSortBy15
-rwxr-xr-xrt/webrt/Elements/SelectUsers8
-rw-r--r--rt/webrt/Elements/SelectWatcherType26
-rwxr-xr-xrt/webrt/Elements/ShadedBox5
-rwxr-xr-xrt/webrt/Elements/Submit44
-rwxr-xr-xrt/webrt/Elements/Tabs133
-rwxr-xr-xrt/webrt/Elements/TitleBoxEnd10
-rwxr-xr-xrt/webrt/Elements/TitleBoxStart20
-rw-r--r--rt/webrt/Elements/ViewUser29
-rwxr-xr-xrt/webrt/Elements/dayMenu19
-rwxr-xr-xrt/webrt/Elements/monthMenu37
-rwxr-xr-xrt/webrt/Elements/yearMenu24
-rwxr-xr-xrt/webrt/NoAuth/Logout.html22
-rwxr-xr-xrt/webrt/NoAuth/Reminder.html3
-rw-r--r--rt/webrt/NoAuth/images/rt.jpgbin917 -> 0 bytes
-rw-r--r--rt/webrt/NoAuth/images/spacer.gifbin43 -> 0 bytes
-rwxr-xr-xrt/webrt/NoAuth/webrt.css102
-rwxr-xr-xrt/webrt/Search/Bulk.html186
-rwxr-xr-xrt/webrt/Search/Listing.html134
-rwxr-xr-xrt/webrt/Search/PickRestriction112
-rwxr-xr-xrt/webrt/Search/RestrictSearch.html3
-rw-r--r--rt/webrt/Search/TicketCell28
-rw-r--r--rt/webrt/SelfService/Attachment/dhandler27
-rw-r--r--rt/webrt/SelfService/Closed.html4
-rwxr-xr-xrt/webrt/SelfService/Create.html63
-rwxr-xr-xrt/webrt/SelfService/Display.html190
-rwxr-xr-xrt/webrt/SelfService/Elements/GotoTicket1
-rwxr-xr-xrt/webrt/SelfService/Elements/Header55
-rw-r--r--rt/webrt/SelfService/Elements/MyRequests41
-rw-r--r--rt/webrt/SelfService/Elements/Tabs49
-rwxr-xr-xrt/webrt/SelfService/Error.html22
-rwxr-xr-xrt/webrt/SelfService/Prefs.html51
-rwxr-xr-xrt/webrt/SelfService/Update.html40
-rw-r--r--rt/webrt/SelfService/index.html3
-rw-r--r--rt/webrt/Ticket/Attachment/dhandler27
-rwxr-xr-xrt/webrt/Ticket/Create.html199
-rwxr-xr-xrt/webrt/Ticket/Display.html152
-rwxr-xr-xrt/webrt/Ticket/Elements/AddWatchers54
-rwxr-xr-xrt/webrt/Ticket/Elements/EditBasics62
-rwxr-xr-xrt/webrt/Ticket/Elements/EditDates46
-rw-r--r--rt/webrt/Ticket/Elements/EditKeywordSelects45
-rwxr-xr-xrt/webrt/Ticket/Elements/EditLinks109
-rwxr-xr-xrt/webrt/Ticket/Elements/EditPeople37
-rwxr-xr-xrt/webrt/Ticket/Elements/EditWatchers46
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowBasics29
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowDates54
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowDependencies18
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowHistory43
-rw-r--r--rt/webrt/Ticket/Elements/ShowKeywordSelects26
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowLinks61
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowMemberOf12
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowMembers22
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowPeople12
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowReferences27
-rw-r--r--rt/webrt/Ticket/Elements/ShowRequestor35
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowSummary61
-rwxr-xr-xrt/webrt/Ticket/Elements/ShowTransaction162
-rwxr-xr-xrt/webrt/Ticket/Elements/Tabs126
-rwxr-xr-xrt/webrt/Ticket/Elements/ToolBar3
-rwxr-xr-xrt/webrt/Ticket/History.html30
-rwxr-xr-xrt/webrt/Ticket/Modify.html39
-rwxr-xr-xrt/webrt/Ticket/ModifyAll.html124
-rwxr-xr-xrt/webrt/Ticket/ModifyDates.html26
-rwxr-xr-xrt/webrt/Ticket/ModifyLinks.html31
-rwxr-xr-xrt/webrt/Ticket/ModifyPeople.html38
-rwxr-xr-xrt/webrt/Ticket/Update.html110
-rwxr-xr-xrt/webrt/User/Prefs.html53
-rwxr-xr-xrt/webrt/autohandler73
-rw-r--r--rt/webrt/index.html25
253 files changed, 9307 insertions, 45254 deletions
diff --git a/rt/ChangeLog b/rt/ChangeLog
deleted file mode 100644
index 549a5cac7..000000000
--- a/rt/ChangeLog
+++ /dev/null
@@ -1,16016 +0,0 @@
-2002-07-19 22:47 jesse
-
- * README:
-
- Fixed the readme about fastcgi
-
-2002-07-19 22:42 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.14
-
-2002-07-19 01:22 jesse
-
- * Makefile, bin/rt, webrt/Search/Bulk.html:
-
- RT-Ticket: 1547
-
- Bumping the version to 2.0.14-pre4
- Fixing a typo that pdh caught in Tickets/Bulk.html
-
-2002-07-13 00:22 jesse
-
- * Makefile:
-
- Bumped to 2.0.14-pre3
-
-2002-07-13 00:19 jesse
-
- * bin/webmux.pl:
-
- modperl handler now speaks Mason 1.11 properly.
-
-2002-07-13 00:00 jesse
-
- * etc/config.pm:
-
- Shifted some config defaults to make things easier for newbie users
-
-2002-07-12 13:31 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Now we properly strip long pathnames from attachments uploaded from windows boxes.
-
-2002-07-11 01:41 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Fixing a typo in the mason 11 handler
-
-2002-07-10 14:41 jesse
-
- * Makefile:
-
- Bumping the version to 2.0.14-pre2
-
-2002-07-10 14:36 jesse
-
- * lib/RT/User.pm:
-
- [no log message]
-
-2002-07-10 14:35 jesse
-
- * lib/RT/: Queue.pm, Ticket.pm:
-
- RT-Ticket: 1418
- RT-Status: resolved
-
- minor perldoc cleanups from pdh@snapgear
-
-2002-07-10 14:32 jesse
-
- * bin/rt-mailgate, lib/RT/Action/SendEmail.pm:
-
- RT-Ticket: 1425
- RT-Status: resolved
- RT-Milestone: 2.0.x
- RT-Subsystem: Mail Sending
-
- Fixes to create more proper message ids.
-
-2002-07-10 14:28 jesse
-
- * lib/RT/Ticket.pm:
-
- RT-Ticket: 1431
- RT-Status: resolved
-
- Importing tickets now lets you set the "Resolved" date
-
-2002-07-10 14:17 jesse
-
- * lib/RT/Tickets.pm:
-
- RT-Ticket: 1434
- RT-Status: resolved
- RT-Subsystem: Core
- RT-Milestone: 2.0.x
-
- RT is now smarter about letting you do "or" searches on single-value
- keyword selections. Thanks to sam hartman.
-
-2002-07-10 14:15 jesse
-
- * webrt/Ticket/: Display.html, ModifyAll.html:
-
- RT-Ticket: 1433
- RT-Status: resolved
- RT-Milestone: 2.0.x
- RT-Subsystem: HTML::Mason frontend
- RT-Severity: Nice to have
- RT-Broken In: 2.0.13
- RT-Broken In: 2.0.12
- RT-Broken In: 2.0.11
- RT-Broken In: 2.0.10
- RT-Broken In: 2.0.0
- RT-Broken In: 2.0.1
- RT-Broken In: 2.0.2
- RT-Broken In: 2.0.3
- RT-Broken In: 2.0.4
- RT-Broken In: 2.0.5
- RT-Broken In: 2.0.6
- RT-Broken In: 2.0.7
- RT-Broken In: 2.0.8
- RT-Broken In: 2.0.9
-
- Some signatures weren't setting off the "don't record comments if the update
- is only a signature" code. Fixed.
-
-2002-07-10 13:59 jesse
-
- * lib/RT/Transaction.pm:
-
- RT-Ticket: 1501
- RT-Status: resolved
-
- Fixing docs in Transaction.pm's Message method
-
-2002-07-10 13:19 jesse
-
- * bin/rt:
-
- RT-Ticket: 1528
- RT-Milestone: 2.0.x
- RT-Subsystem: CLI
- RT-Severity: Normal
- RT-Status: resolved
-
- Fixed docs for cli to say that --limit-status=dead isn't a valid option
-
-2002-06-26 15:22 jesse
-
- * lib/RT/Interface/Web.pm:
-
- support for mason 1.1
-
-2002-06-26 15:19 jesse
-
- * Makefile, bin/mason_handler.fcgi, bin/webmux.pl,
- webrt/Admin/Queues/GroupRights.html,
- webrt/Admin/Queues/UserRights.html, webrt/Elements/ListActions,
- webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ToolBar:
-
- Adding support for mason 1.10
-
-2002-06-26 15:15 jesse
-
- * lib/RT/Action/Notify.pm:
-
- Fixed notify cc behavior
-
-2002-06-26 15:13 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- Fixed pseudo-list syntax in To: lines
-
-2002-06-26 15:09 jesse
-
- * webrt/Search/Bulk.html:
-
- Added support for bulk comment/reply
-
-2002-05-03 02:07 jesse
-
- * lib/RT/Ticket.pm:
-
- RT-Ticket: 1369
- RT-Status: resolved
-
- When a ticket has another merged into it, it now has its "LastUpdated" date
- updated
-
-2002-05-03 01:58 jesse
-
- * lib/RT/Ticket.pm:
-
- RT-Ticket: 1412
- RT-status: resolved
-
- Fixed a docs bug in Ticket->Import which didn't make it clear that Import
- took an "Id" parameter and "Create" didn't.
-
-2002-05-03 01:54 jesse
-
- * webrt/autohandler:
-
- rt-ticket: 1410
- rt-status: resolved
-
- Applied a patch from rich lafferty which prevented NoAuth from not
- requiring authentication on some fastcgi setups.
-
- A similar bug bit SelfService.
-
- This commit fixes that one too.
-
-2002-05-03 01:51 jesse
-
- * Makefile:
-
- RT-Ticket: 1272
- rt-status: resolved
-
- Applied a patch from Ilya Martynov which allows make insert to work
- in a scenario where DESTDIR is being set to something funny This may be necessary when installing into AFS
-
-2002-05-03 01:36 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- RT-Ticket: 1367
- RT-Status: resolved
-
- Added a check which only sets precedence to bulk if it's not already set,
- say by a template.
-
-2002-05-03 01:30 jesse
-
- * lib/RT/Interface/Email.pm:
-
- RT-Ticket: 1370
- RT-Status: resolved
-
- From: Jason Edgecombe <jedgecombe@carolina.rr.com>
- To: rt-devel@lists.fsck.com
- Subject: [rt-devel] An oversite in Interface/Email.pm
-
- Hi,
-
- I found an problem in Interface/Email.pm when I was modifying
- enhanced mailgate. I have attached a diff of the modifications.
-
- In the function MailError, it assumes MIMIEOBJ is defined. I added a
- simple "if" test to only run $MIMEOBJ->sync_headers if $MIMEOBJ is defined.
-
-2002-05-03 01:24 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- RT-Ticket: 1348
- RT-Status: resolved
-
- Fixed a bug in mail sending that improperly quoted the usernames of users
- who had " in their names
-
-2002-04-29 00:39 jesse
-
- * lib/RT.pm:
-
- Fixed a tiny typo
-
-2002-04-28 23:46 jesse
-
- * lib/RT.pm:
-
- Fixed up the rt log messages.
-
-2002-04-21 02:14 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Fixed a couple bugs in setting owners that were only revealed by the poor data
- validation on rt.cpan.org
-
-2002-04-21 02:06 jesse
-
- * lib/RT/Ticket.pm:
-
- Fixed a couple bugs in setting owners that were only revealed by the poor data
- validation on rt.cpan.org
-
-2002-04-19 00:32 jesse
-
- * Makefile:
-
- Adding a new Makefile target to ease packaging.
-
-2002-04-18 12:47 jesse
-
- * lib/RT/GroupMember.pm:
-
- RT-Ticket: 1385
- RT-Broken-In: 2.0.0
- RT-Broken-In: 2.0.1
- RT-Broken-In: 2.0.2
- RT-Broken-In: 2.0.3
- RT-Broken-In: 2.0.4
- RT-Broken-In: 2.0.5
- RT-Broken-In: 2.0.6
- RT-Broken-In: 2.0.7
- RT-Broken-In: 2.0.8
- RT-Broken-In: 2.0.9
- RT-Broken-In: 2.0.10
- RT-Broken-In: 2.0.11
- RT-Broken-In: 2.0.12
- RT-Broken-In: 2.0.13
- RT-Status: resolved
-
- GroupMemmber was looking for the "ModifyGroups" right, when it should have
- been looking for the "AdminGroups" right
-
-2002-04-05 10:24 jesse
-
- * webrt/Ticket/Update.html:
-
- RT-Ticket: 1330
- RT-Status: Resolved
-
- Fixed an html escaping bug in Ticket/Update.html
-
-2002-03-27 22:59 jesse
-
- * Makefile, lib/RT/User.pm:
-
- Fixed a CRITICAL security bug that allowed remote administrative access
- to RT without a password. (Security advisory to follow)
-
-2002-03-14 16:15 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.12
-
-2002-03-06 18:57 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.12pre6
-
-2002-03-06 18:57 jesse
-
- * lib/RT/Transaction.pm:
-
- Added an update that will make dates changed as parts of transaction updates show up in local time
-
-2002-03-06 18:56 jesse
-
- * webrt/Admin/Queues/Modify.html:
-
- Added a note to the queue creation screen about defaults.
-
-2002-03-01 01:41 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- This patch fixes a small problem with printing a message.It checks if themessage is true, not if it has length, so a message containing 0 will notbe printed. From Blair Zajac <blair@orcaware.com>
-
-2002-03-01 01:39 jesse
-
- * bin/rt:
-
- RT-Ticket:438
- RT-Status: resolved
-
- Added brandon's patch to allow searching for tickets by keyword on the commandline
-
-2002-02-28 02:03 jesse
-
- * bin/rt:
-
- RT-Ticket: 1258
- RT-Milestone: 2.0.x
- RT-Subsystem: CLI
- RT-Severity: normal
- RT-Broken in: 2.0-beta3
- RT-Broken in: 2.0.1
- RT-Broken in: 2.0.2
- RT-Broken in: 2.0.3
- RT-Broken in: 2.0.4
- RT-Broken in: 2.0.5
- RT-Broken in: 2.0.6
- RT-Broken in: 2.0.7
- RT-Broken in: 2.0.8
- RT-Broken in: 2.0.9
- RT-Broken in: 2.0.10
- RT-Broken in: 2.0.11
-
- Removed a line that make --limit-priority and --limit-final-priority not
- work
-
-2002-02-28 01:49 jesse
-
- * lib/RT/Action/: Autoreply.pm, SendEmail.pm:
-
- RT-Ticket: 1196
- RT-Status: resolved
-
-2002-02-28 01:38 jesse
-
- * lib/RT/Interface/Web.pm:
-
- RT-Ticket: 1246
- RT-Status: resolved
-
-2002-02-28 01:38 jesse
-
- * tools/testdeps:
-
- Added a couple explicit dependencies to testdeps that should have been there
- forever ago. you'll only run into this if your cpan doesn't do recursive deps.
-
-2002-02-20 20:45 jesse
-
- * Makefile, lib/RT/Interface/Web.pm, webrt/Admin/Users/index.html,
- webrt/Ticket/Update.html:
-
- Bumped the version to 2.0.12-pre5.
-
- Web: Fixed a typo in user administration that prevented user listing
-
- Web: fixed recieve to receive in ticket/update
-
-2002-02-19 03:23 jesse
-
- * lib/RT/Scrips.pm:
-
- Fixed a typo. (Added a missing ;)
-
-2002-02-19 01:04 jesse
-
- * Makefile:
-
- Bumped version to 2.0.12pre4
-
-2002-02-18 18:35 jesse
-
- * lib/RT/Condition/Generic.pm:
-
- RT-Ticket: 1194
-
- cleaned up a reference to "ApplicableTypes", a nonexistent parameter to Condition->new
-
-2002-02-18 18:30 jesse
-
- * webrt/Elements/Login:
-
- RT-Ticket: 1226
- RT-Status: resolved
-
- Added an explicit reset of the content-type to 'text/html' when displaying hte login page
-
-2002-02-18 18:25 jesse
-
- * webrt/Admin/Users/index.html:
-
- rt-ticket: 1190
- rt-status: resolved
-
- Modified administrative userlist to make it easier to click on users who have no Name attribute defined
-
-2002-02-18 18:18 jesse
-
- * webrt/: Elements/Header, SelfService/Elements/Header:
-
- rt-ticket: 1176
- rt-status: resolved
-
- Applied tom's patch which hides the preferences link if the user doesn't have the right to "modify self"
-
-2002-02-18 18:14 jesse
-
- * lib/RT/Interface/Email.pm:
-
- RT-Ticket: 1165
- RT-Status: resolved
-
- exporting the ParseAddressFromHeader subroutine so others can play with it
-
-2002-02-18 18:06 jesse
-
- * webrt/Ticket/Update.html:
-
- RT-Ticket:1209
- RT-Milestone: 2.0.x
- RT-Status: resolved
-
- Removed a bogus font tag from the Ticket update screen
-
-2002-02-18 18:00 jesse
-
- * lib/RT/Interface/Web.pm, webrt/Search/Listing.html:
-
- RT-Ticket: 1243
- RT-Status: resolved
- RT-Milestone: 2.0.x
- RT-Broken-In: 2.0.8
- RT-Broken-In: 2.0.9
- RT-Broken-In: 2.0.10
- RT-Broken-In: 2.0.11
- RT-Subsystem: HTML::Mason Frontend
- RT-Severity: Normal
-
- Switched the web frontend to use an in-core scalar for uploaded attachment content,
- rather than a tempfile which wasn't getting cleaned up properly
-
-2002-02-18 16:53 jesse
-
- * webrt/Search/Listing.html:
-
- RT-Ticket: 1245
- Rt-status: resolved
-
- Applied a patch to nuke duplicate restrictions in the webui.
-
-2002-02-18 16:47 jesse
-
- * webrt/Admin/Groups/Members.html:
-
- RT-Ticket: 1421
- RT-Status: resolved
-
- moved a label inside a loop to make the ui easier to understand
-
-2002-02-18 16:36 jesse
-
- * etc/config.pm:
-
- Set Default for UseFriendlyToLines to 0 by default, to deal with users running
- redhat who have trouble configuring RT.
-
-2002-02-18 16:31 jesse
-
- * Makefile, lib/RT/Scrip.pm, tools/insertdata:
-
- Edited insertdata to insert scrips by default, so that users don't need
- to go through the configuration task themselves.
-
- Change the Makefile's WEB_GROUP to www by default for redhat and OSX.
-
- Correced docs for lib/RT/Scrip new() method
-
-2002-02-08 01:23 jesse
-
- * webrt/SelfService/Display.html:
-
- cleanup to "last trans" in SelfService
-
-2002-02-08 00:53 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Generalized "Abort" function to allow other non-html error messages with
- proper handlers
-
-2002-02-08 00:49 jesse
-
- * etc/: schema.Pg, schema.mysql:
-
- removed duplicate indices
-
-2002-02-07 16:41 jesse
-
- * etc/config.pm:
-
- Added some docs to the config file from Rich Lafferty
-
-2002-02-04 12:37 jesse
-
- * lib/RT/Template.pm:
-
- Output template content to core rather than disk when parsing.
-
-2002-01-28 01:01 jesse
-
- * webrt/Ticket/Elements/ShowHistory:
-
- closing lasttrans anchor
-
-2002-01-28 00:59 jesse
-
- * webrt/Ticket/Elements/ShowHistory:
-
- Closing the #lasttrans anchor
-
-2002-01-28 00:58 jesse
-
- * lib/RT/Record.pm:
-
- RT-Ticket: 1156
-
- Pulling forward the patch for 1156
-
-2002-01-28 00:57 jesse
-
- * lib/RT/Record.pm:
-
- RT-Ticket: 1156
- RT-Status: resolved
-
-2002-01-28 00:47 jesse
-
- * bin/mason_handler.fcgi:
-
- Small fix to the fastcgi handler to make attachment display work better,
- thanks to rich lafferty.
-
-2002-01-28 00:47 jesse
-
- * etc/config.pm:
-
- Removed some extraneous slashes from the config file.
-
-2002-01-28 00:46 jesse
-
- * README:
-
- Clarified some readme stuff
-
-2002-01-28 00:44 jesse
-
- * bin/rt-commit-handler:
-
- Bringing forward a fix to the cvs commit handler to deal with branched
- version #s.
-
-2002-01-28 00:40 jesse
-
- * Makefile:
-
- Bumped the version to 2.1.1
-
-2002-01-28 00:27 jesse
-
- * etc/RT_Config.pm:
-
- file RT_Config.pm was initially added on branch rt-2-1.
-
-2002-01-28 00:27 jesse
-
- * bin/enhanced-mailgate:
-
- file enhanced-mailgate was initially added on branch rt-2-1.
-
-2002-01-28 00:27 jesse
-
- * bin/rt-commit-handler:
-
- file rt-commit-handler was initially added on branch rt-2-1.
-
-2002-01-28 00:27 jesse
-
- * Makefile, bin/enhanced-mailgate, bin/mason_handler.fcgi, bin/rt,
- bin/rt-commit-handler, bin/rt-mailgate, bin/rtadmin, bin/webmux.pl,
- etc/RT_Config.pm, etc/acl.Oracle, etc/acl.Pg, etc/acl.mysql,
- etc/config.pm, lib/RT.pm, lib/RT/Handle.pm, lib/RT/User.pm,
- lib/RT/Watcher.pm, lib/RT/Interface/CLI.pm,
- lib/RT/Interface/Email.pm, tools/cpan2rpm, tools/initdb,
- tools/insertdata, tools/testdeps:
-
- First RT 2.1 checkin. don't expect this to run. (though it does here)
-
-2002-01-25 17:37 jesse
-
- * README:
-
- Added a warning to the readme that 2.1 is scary and people shouldn't use it
-
-2002-01-25 17:24 jesse
-
- * Makefile:
-
- Branching 2.1.0 and incrementing the makefile to 2.1.
-
- Welcome to the future.
-
-2002-01-24 13:30 jesse
-
- * lib/RT/Transaction.pm:
-
- RT-Ticket: 1201
- RT-Status: resolved
-
- Better transaction display for "text" and "message" parts.
-
-2002-01-24 13:00 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- RT-Ticket: 1166
- RT-Status: resolved
-
- Implemented better URL regexp matching.
-
-2002-01-24 10:39 jesse
-
- * bin/rt-mailgate:
-
- Fixed a typo in a debug message in rt-mailgate
-
-2002-01-24 10:34 jesse
-
- * lib/RT/Template.pm:
-
- Switched from bogus mime parsing to using MIME::Parser like we should have
- from the get-go.
-
- Used perltidy to clean up template.pm before we started working on it.
-
-2002-01-24 10:28 jesse
-
- * lib/RT/Record.pm:
-
- Added a check to LoadByCols which causes postgres mode to not try to lookup
- lc(undef)
-
-2002-01-24 10:23 jesse
-
- * webrt/NoAuth/webrt.css:
-
- Added a new style to the stylesheet to support some new reports
-
-2002-01-24 10:21 jesse
-
- * lib/RT/Interface/Email.pm:
-
- mail gateway now unfolds long headers on parse.
-
-2002-01-11 15:20 jesse
-
- * Makefile, lib/RT/Transaction.pm:
-
- RT-Ticket: 950
-
- Aoolyed the recommended patch to make blank bodies not get
- mailed in lieu of the real message
-
-2002-01-11 15:00 jesse
-
- * Makefile, webrt/Ticket/ModifyAll.html:
-
- Fixed a small bug that broke the "jumbo" page after 2.0.11
-
-2002-01-11 01:17 jesse
-
- * bin/rt-mailgate:
-
- Added a new flag to rt-mailgate to enable setting the owner of new tickets based on +extension
-
-2002-01-11 01:13 jesse
-
- * webrt/Ticket/: Modify.html, ModifyAll.html:
-
- Adding a couple ACL checks to better deal with moving tickets to queues the user can't see
-
-2002-01-11 01:11 jesse
-
- * webrt/Admin/Queues/index.html:
-
- Fixed typo in ACL check that resulted in "Create Queue" being more restrictive than
- it needed to be
-
-2002-01-10 19:07 jesse
-
- * webrt/Ticket/Update.html:
-
- more tweaking
-
-2002-01-10 19:05 jesse
-
- * webrt/Ticket/Update.html:
-
- Cleaned up the Ticekt Update ui some
-
-2002-01-10 19:02 jesse
-
- * lib/RT/: Attachment.pm, Action/Notify.pm, Condition/Generic.pm:
-
- Cleanups to make Also-Cc and Also-Bcc go
-
-2002-01-10 19:01 jesse
-
- * lib/RT/Queue.pm:
-
- Changed a test to work the way that Test::Inline does now
-
-2002-01-10 18:34 jesse
-
- * lib/RT/Attachment.pm:
-
- Changes to attachment to provide the header frobbing necessary to send mail to ccs and bccs
-
-2002-01-10 18:32 jesse
-
- * Makefile, README, lib/RT/Ticket.pm, tools/insertdata,
- webrt/Ticket/Update.html, lib/RT/Action/Notify.pm:
-
- Work on "Explicit Cc" and "Explicit Bcc" for a client
-
-2002-01-10 18:27 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- abstracting out a number to a named variable
-
-2002-01-09 02:24 jesse
-
- * webrt/Admin/: Groups/index.html, Keywords/index.html:
-
- A couple tiny ui cleanups (removed some object ids from the UI where they were just being clutter
-
-2002-01-02 21:58 jesse
-
- * Makefile, README, webrt/Elements/Login:
-
- Bumped some copyright notices to 2002. bumped version to 2.0.11
-
-2001-12-26 14:59 jesse
-
- * Makefile:
-
- Bumping version to 2.0.11pre1
-
-2001-12-26 14:51 jesse
-
- * lib/RT/Tickets.pm:
-
- Merges were being over-zealous in what they twiddled the effective id of.
-
- this meant that far too many tickets would show up in ticket listings.
-
-2001-12-24 18:58 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.10
-
-2001-12-19 00:24 jesse
-
- * Makefile:
-
- Bumped version to 2.0.10pre4
-
- fix to makefile to genereate changelog for head
-
-2001-12-18 03:58 jesse
-
- * lib/RT/Tickets.pm:
-
- The "null search" was finding all tickets in 2.0.10pre3. Fixed in CVS
-
-2001-12-18 03:53 jesse
-
- * bin/rt:
-
- fixed typos in bin/rt that stopped --limit-subject --limit-requestors and --limit-body from
- working
-
-2001-12-17 15:13 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.10-test3
-
-2001-12-17 14:58 jesse
-
- * lib/RT/User.pm, tools/insertdata, webrt/Admin/Users/Modify.html:
-
- RT-Ticket: 935
- RT-Status: resolved
-
- cleaned up seph's patch. this enabled me to actually really properly support
- users with no email address, which meant there were a couple other cleanups
- to go through too.
-
-2001-12-17 14:26 jesse
-
- * lib/RT/Ticket.pm:
-
- Some small cleanups to the IsWatcher stuff.
-
- Added checks to make sure that watchers aren't duplicated to ticket.pm
-
-2001-12-17 13:04 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Fixed an unclosed anchor which caused IE to render ticket listings wrong.
-
-2001-12-14 18:29 jesse
-
- * lib/Makefile.PL, tools/testdeps:
-
- Bumped DBIx::SearchBuilder dependency to 0.48
-
-2001-12-14 18:28 jesse
-
- * tools/testdeps, webrt/Elements/Login:
-
- Removed code to special case for bugs in mason < 1.01.
- Moved us up to a mason 1.02 dependency
-
-2001-12-14 18:26 jesse
-
- * bin/rt:
-
- bin/rt: added support for --version, fixed --status = !closed, docced --merge-into
-
-2001-12-14 18:25 jesse
-
- * Makefile:
-
- Some stylistic cleanups to the makefile from blair.
-
-2001-12-14 16:42 jesse
-
- * bin/rtadmin:
-
- rtadmin had some issues where it would assume a 'name' if called without --name for user group and queue editing.
-
-2001-12-14 16:06 jesse
-
- * lib/RT/Tickets.pm:
-
-
- Ticket listings will no longer show tickets which have been merged into others.
-
- -j
-
-2001-12-14 15:27 jesse
-
- * lib/RT/User.pm:
-
- Prevent users from futzing with nobody or rt_System, unless you're setting an email address.
- (Arguably, that's a bug too)
-
-2001-12-14 14:03 jesse
-
- * lib/RT/: ACE.pm, Group.pm, GroupMember.pm, Keyword.pm,
- KeywordSelect.pm, Queue.pm, Scrip.pm, Template.pm, Ticket.pm:
-
- Standardised on "Permission Denied" instead of having some "Permission denied". Thanks simon.
-
- -j
-
-2001-12-14 13:46 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Reordered the order that Basics actions are committed, so that Queue changes
- come after other changes, so that users don't move tickets out of a queue before they have a
- chance to update them.
-
-2001-12-13 02:18 jesse
-
- * lib/RT/Ticket.pm:
-
- Addition to Ticket->Import, so you can set owner by name.
-
- Fix for a bug in Ticket->AddWatcher that would let privileged watchers without
- email addresses add others as watchers.
-
-2001-12-03 20:13 jesse
-
- * Makefile, lib/RT/EasySearch.pm, lib/RT/Keyword.pm,
- lib/RT/Record.pm, lib/RT/Tickets.pm, lib/RT/User.pm:
-
- more work on making sure that only the things we want are case sensitive
- (IE name, content email address should always be insensitive. when loading a row by any field other than ID, that should be case-insensitive)
-
-2001-12-03 19:17 jesse
-
- * Makefile:
-
- bumped the version to 2.0.10-test1
-
-2001-12-03 19:14 jesse
-
- * lib/RT/EasySearch.pm:
-
- We now default to case sensitive searches, rather than case-insensitive ones.
- (This should speed up Pg a LOT. We'll be adding in case-insensitive searching
- for the 13 attributes that matter:
-
- Watcher->Email
- User->name
- User->email
- User->gecos
- Ticket->Subject
- Queue->name
- KeywordSelect->name
- Keyword->Name
- ObjectKeyword->Name
- Attachment->Subject
- Attachment->Content
- Attachment->Headers
-
-2001-12-03 19:13 jesse
-
- * webrt/: Admin/Queues/Modify.html, Admin/Queues/People.html,
- Elements/GotoTicket:
-
- Some small UI cleanups from Hakke
-
-2001-11-29 03:50 jesse
-
- * webrt/: Elements/SelectEqualityOperator, Elements/SelectOwner,
- Search/PickRestriction:
-
- SelectOwner now passes a ticket up the line.
-
- Priority can now have = and != searches
-
-2001-11-29 03:49 jesse
-
- * tools/insertdata:
-
- Cleaned up a template to display Ticket subject, if no transaction subject is given.
-
-2001-11-29 03:48 jesse
-
- * webrt/Ticket/: Update.html, Elements/EditPeople:
-
- Now pass in ticket Id, so that "owner" can be someone who only has rights to that tikcet.
-
-2001-11-29 03:47 jesse
-
- * lib/RT/Ticket.pm:
-
- FinalPriority should never get set to null if a ticket doesn't have the attribute set on create
-
- Untake's arguments were debognifed
-
-2001-11-29 03:45 jesse
-
- * webrt/SelfService/Elements/Header:
-
- "Logout" no longer shows up when using external auth with SelfService
-
-2001-11-29 03:44 jesse
-
- * bin/rt:
-
- Fix for setting priority when creating tickets with the cli
-
-2001-11-29 03:42 jesse
-
- * bin/rt-mailgate:
-
- Added support for --ticket-id-from-extension to rt-mailgate
-
-2001-11-14 14:28 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.9
-
-2001-11-13 11:33 jesse
-
- * Makefile, bin/initacls.Pg, bin/rt:
-
- rt-ticket:1007
- rt-status: resolved
-
- initacls.pg no longer has extranious spaces which break variable assignment for port and host.
-
- Bumped version to 2.0.9pre9
-
-2001-11-12 13:19 jesse
-
- * Makefile, bin/initacls.Pg:
-
- Fix for #1007 (Typo in bin/initacls.Pg)
- Bumped version to 2.0.9pre8
-
-2001-11-09 18:24 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- URL higlighting should now work with mailto: urls
-
-2001-11-09 18:15 jesse
-
- * Makefile, webrt/Ticket/Elements/ShowTransaction:
-
- Cleaned up the url highlighting code
-
- Bumped the version to 2.0.9pre7
-
-2001-11-09 17:27 jesse
-
- * Makefile:
-
- Fixing the new taggy stuff
-
-2001-11-09 17:23 jesse
-
- * Makefile:
-
- Fixing the new branchy stuff
-
-2001-11-09 17:07 jesse
-
- * Makefile, bin/rtadmin, etc/config.pm,
- webrt/Ticket/Elements/ShowTransaction:
-
- Added a bit of doc to etc/config.pm
-
- Modified ShowTransaction to more properly escape html
-
- Fixed some of the cli help for rtadmin
-
- Added support for branch specification to the makefile
-
-2001-11-08 15:15 jesse
-
- * lib/RT/Interface/Web.pm:
-
- I can commit on the head. really.
-
-2001-11-08 15:06 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Dealing with defined but blank Owner fields
-
-2001-11-06 18:06 jesse
-
- * tools/cpan2rpm, tools/initdb, tools/insertdata, tools/testdeps,
- webrt/autohandler, webrt/index.html, webrt/Admin/index.html,
- webrt/Admin/Elements/CreateQueueCalled,
- webrt/Admin/Elements/CreateUserCalled,
- webrt/Admin/Elements/EditUserComments,
- webrt/Admin/Elements/GrantQueueRightsTo,
- webrt/Admin/Elements/GroupTabs, webrt/Admin/Elements/Header,
- webrt/Admin/Elements/ListGlobalKeywordSelects,
- webrt/Admin/Elements/ListGlobalScrips,
- webrt/Admin/Elements/ModifyKeyword,
- webrt/Admin/Elements/ModifyKeywordSelect,
- webrt/Admin/Elements/ModifyQueue,
- webrt/Admin/Elements/ModifyTemplate,
- webrt/Admin/Elements/ModifyUser,
- webrt/Admin/Elements/QueueRightsForUser,
- webrt/Admin/Elements/QueueTabs,
- webrt/Admin/Elements/SelectKeywordSelect,
- webrt/Admin/Elements/SelectModifyGroup,
- webrt/Admin/Elements/SelectModifyKeyword,
- webrt/Admin/Elements/SelectModifyKeywordSelect,
- webrt/Admin/Elements/SelectModifyQueue,
- webrt/Admin/Elements/SelectModifyUser,
- webrt/Admin/Elements/SelectQueueRights,
- webrt/Admin/Elements/SelectRights,
- webrt/Admin/Elements/SelectScrip,
- webrt/Admin/Elements/SelectScripAction,
- webrt/Admin/Elements/SelectScripCondition,
- webrt/Admin/Elements/SelectSingleOrMultiple,
- webrt/Admin/Elements/SelectTemplate,
- webrt/Admin/Elements/SelectUsers, webrt/Admin/Elements/SystemTabs,
- webrt/Admin/Elements/Tabs, webrt/Admin/Elements/UserTabs,
- webrt/Admin/Global/GroupRights.html,
- webrt/Admin/Global/Keywords.html, webrt/Admin/Global/Scrips.html,
- webrt/Admin/Global/Template.html,
- webrt/Admin/Global/Templates.html,
- webrt/Admin/Global/UserRights.html, webrt/Admin/Global/index.html,
- webrt/Admin/Groups/Members.html, webrt/Admin/Groups/Modify.html,
- webrt/Admin/Groups/Rights.html, webrt/Admin/Groups/index.html,
- webrt/Admin/KeywordSelects/Modify.html,
- webrt/Admin/KeywordSelects/index.html,
- webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html,
- webrt/Admin/Queues/Create.html,
- webrt/Admin/Queues/GroupRights.html,
- webrt/Admin/Queues/Keywords.html, webrt/Admin/Queues/Modify.html,
- webrt/Admin/Queues/People.html, webrt/Admin/Queues/Scrips.html,
- webrt/Admin/Queues/Template.html,
- webrt/Admin/Queues/Templates.html,
- webrt/Admin/Queues/UserRights.html, webrt/Admin/Queues/index.html,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html,
- webrt/Admin/Users/Rights.html, webrt/Admin/Users/index.html,
- webrt/Elements/Checkbox, webrt/Elements/CreateTicket,
- webrt/Elements/CustomHomepageHeader, webrt/Elements/Error,
- webrt/Elements/Footer, webrt/Elements/GotoTicket,
- webrt/Elements/Header, webrt/Elements/ListActions,
- webrt/Elements/Login, webrt/Elements/MessageBox,
- webrt/Elements/MyRequests, webrt/Elements/MyTickets,
- webrt/Elements/Quicksearch, webrt/Elements/Refresh,
- webrt/Elements/Section, webrt/Elements/SelectBoolean,
- webrt/Elements/SelectDate, webrt/Elements/SelectDateRelation,
- webrt/Elements/SelectDateType, webrt/Elements/SelectKeyword,
- webrt/Elements/SelectKeywordOptions, webrt/Elements/SelectLinkType,
- webrt/Elements/SelectMatch, webrt/Elements/SelectNewTicketQueue,
- webrt/Elements/SelectOwner, webrt/Elements/SelectQueue,
- webrt/Elements/SelectResultsPerPage,
- webrt/Elements/SelectSortOrder, webrt/Elements/SelectStatus,
- webrt/Elements/SelectTicketSortBy, webrt/Elements/SelectUsers,
- webrt/Elements/SelectWatcherType, webrt/Elements/ShadedBox,
- webrt/Elements/Submit, webrt/Elements/Tabs,
- webrt/Elements/TitleBoxEnd, webrt/Elements/TitleBoxStart,
- webrt/Elements/ViewUser, webrt/Elements/dayMenu,
- webrt/Elements/monthMenu, webrt/Elements/yearMenu,
- webrt/NoAuth/Logout.html, webrt/NoAuth/Reminder.html,
- webrt/NoAuth/webrt.css, webrt/NoAuth/images/rt.jpg,
- webrt/NoAuth/images/spacer.gif, webrt/Search/Bulk.html,
- webrt/Search/Listing.html, webrt/Search/PickRestriction,
- webrt/Search/RestrictSearch.html, webrt/Search/TicketCell,
- webrt/SelfService/Closed.html, webrt/SelfService/Create.html,
- webrt/SelfService/Display.html, webrt/SelfService/Error.html,
- webrt/SelfService/Prefs.html, webrt/SelfService/Update.html,
- webrt/SelfService/index.html,
- webrt/SelfService/Attachment/dhandler,
- webrt/SelfService/Elements/GotoTicket,
- webrt/SelfService/Elements/Header,
- webrt/SelfService/Elements/MyRequests,
- webrt/SelfService/Elements/Tabs, webrt/Ticket/Create.html,
- webrt/Ticket/Display.html, webrt/Ticket/History.html,
- webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html,
- webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyLinks.html,
- webrt/Ticket/ModifyPeople.html, webrt/Ticket/Update.html,
- webrt/Ticket/Attachment/dhandler,
- webrt/Ticket/Elements/AddWatchers,
- webrt/Ticket/Elements/EditBasics, webrt/Ticket/Elements/EditDates,
- webrt/Ticket/Elements/EditKeywordSelects,
- webrt/Ticket/Elements/EditLinks, webrt/Ticket/Elements/EditPeople,
- webrt/Ticket/Elements/EditWatchers,
- webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ShowDates,
- webrt/Ticket/Elements/ShowDependencies,
- webrt/Ticket/Elements/ShowHistory,
- webrt/Ticket/Elements/ShowKeywordSelects,
- webrt/Ticket/Elements/ShowLinks,
- webrt/Ticket/Elements/ShowMemberOf,
- webrt/Ticket/Elements/ShowMembers,
- webrt/Ticket/Elements/ShowPeople,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowRequestor,
- webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction, webrt/Ticket/Elements/Tabs,
- webrt/Ticket/Elements/ToolBar, webrt/User/Prefs.html:
-
- Merging rt-1-1 to the head.
-
- RT 1.0 now lives on the rt-1-0 branch.
-
-2001-11-06 18:03 jesse
-
- * Makefile, NEWS, README, TODO, bin/initacls.Oracle,
- bin/initacls.Pg, bin/initacls.mysql, bin/mason_handler.fcgi,
- bin/mason_handler.scgi, bin/rt, bin/rt-mailgate, bin/rtadmin,
- bin/rtmux.pl, bin/testdeps.pl, bin/webmux.pl, docs/FAQ,
- docs/FAQ.html, docs/README.docs, docs/Security,
- docs/rt-templates.html, docs/rt_users_guide.html,
- docs/design_docs/CARS, docs/design_docs/TransactionTypes.txt,
- docs/design_docs/acls, docs/design_docs/basic-definitions.txt,
- docs/design_docs/cli_spec, docs/design_docs/cvs_integration,
- docs/design_docs/evil_plans, docs/design_docs/link-definitions.txt,
- docs/design_docs/local_hacking,
- docs/design_docs/subscription-definitions.txt,
- docs/design_docs/users, etc/acl.Oracle, etc/acl.Pg, etc/acl.mysql,
- etc/config.pm, etc/mysql.acl, etc/rt.spec, etc/schema,
- etc/schema.Oracle, etc/schema.Pg, etc/schema.mysql, etc/schema.pm,
- etc/suidrt.c, lib/MANIFEST, lib/MANIFEST.SKIP, lib/Makefile.PL,
- lib/RT.pm, lib/test.pl, lib/RT/ACE.pm, lib/RT/ACL.pm,
- lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm,
- lib/RT/Date.pm, lib/RT/EasySearch.pm, lib/RT/Group.pm,
- lib/RT/GroupMember.pm, lib/RT/GroupMembers.pm, lib/RT/Groups.pm,
- lib/RT/Handle.pm, lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm,
- lib/RT/KeywordSelects.pm, lib/RT/Keywords.pm, lib/RT/Link.pm,
- lib/RT/Links.pm, lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm,
- lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm,
- lib/RT/Scrip.pm, lib/RT/ScripAction.pm, lib/RT/ScripActions.pm,
- lib/RT/ScripCondition.pm, lib/RT/ScripConditions.pm,
- lib/RT/Scrips.pm, lib/RT/Template.pm, lib/RT/Templates.pm,
- lib/RT/TestHarness.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
- lib/RT/Transaction.pm, lib/RT/Transactions.pm, lib/RT/User.pm,
- lib/RT/Users.pm, lib/RT/Watcher.pm, lib/RT/Watchers.pm,
- lib/RT/Action/Autoreply.pm, lib/RT/Action/Generic.pm,
- lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm,
- lib/RT/Action/OpenDependent.pm, lib/RT/Action/README.hackers,
- lib/RT/Action/ResolveMembers.pm, lib/RT/Action/SendEmail.pm,
- lib/RT/Action/SendPasswordEmail.pm,
- lib/RT/Action/StallDependent.pm,
- lib/RT/Condition/AnyTransaction.pm, lib/RT/Condition/Generic.pm,
- lib/RT/Condition/NewDependency.pm,
- lib/RT/Condition/StatusChange.pm, lib/RT/Interface/CLI.pm,
- lib/RT/Interface/Email.pm, lib/RT/Interface/Web.pm:
-
- Merging rt-1-1 to the head.
-
- RT 1.0 now lives on the rt-1-0 branch.
-
-2001-11-06 17:57 jesse
-
- * rt.spec, etc/rt.spec:
-
- Cleaned up spec file goodness
-
-2001-11-06 16:28 jesse
-
- * Makefile:
-
- Bumped version to 2.0.9pre5
-
-2001-11-05 00:55 jesse
-
- * rt.spec, lib/Makefile.PL, tools/testdeps:
-
- Bumped the searchbuilder dependency to 0.47
-
-2001-11-05 00:54 jesse
-
- * webrt/Ticket/Update.html:
-
- Named the ticket update form.
-
-2001-11-05 00:52 jesse
-
- * etc/config.pm, lib/RT/Handle.pm:
-
- Added support for postgres' connections-over-ssl
-
-2001-11-05 00:49 jesse
-
- * webrt/Admin/Elements/SelectRights:
-
- Updated ACL selecting UI to work properly with browsers that try to auto-select
- a value in a SELECT
-
-2001-11-02 01:39 jesse
-
- * Makefile:
-
- bumped the version to 2.0.9pre4
-
-2001-11-02 01:31 jesse
-
- * webrt/Ticket/: Display.html, ModifyAll.html:
-
- Fix to not automatically record comments if nothing was typed.
-
-2001-11-02 00:52 jesse
-
- * lib/RT/Ticket.pm:
-
- Fix for duplicated requestors on merge. #791
-
-2001-11-01 17:40 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- More tweaking transaction display
-
-2001-11-01 17:36 jesse
-
- * webrt/: Admin/Users/Modify.html, Ticket/Elements/ShowTransaction:
-
- Fixed newlines between ticket body and headers.
-
- Fix for 934: creating users doesn't completely fail (new)
-
-2001-11-01 17:24 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Cleanups to ShowTransaction
-
-2001-11-01 17:10 jesse
-
- * lib/RT/: Keyword.pm, Interface/Web.pm:
-
- Fix for loading queue (post 2.0.8) when called by name
- Fix for _not_ trying to load keywords when called with no value.
-
-2001-10-31 17:38 jesse
-
- * Makefile:
-
- Fixed the make dist
-
-2001-10-31 02:56 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.9pre3
-
-2001-10-31 02:54 jesse
-
- * lib/RT/Action/SendPasswordEmail.pm:
-
- file SendPasswordEmail.pm was initially added on branch rt-1-1.
-
-2001-10-31 02:54 jesse
-
- * lib/RT/Action/SendPasswordEmail.pm:
-
- Added an action to mail a password to the user.
-
-2001-10-31 02:54 jesse
-
- * bin/rt-mailgate:
-
- added support to rt-mailgate for putting the queue name in a +extension
-
-2001-10-31 02:52 jesse
-
- * lib/RT/Ticket.pm:
-
- Tickets which are created in a "resolved" state will now have their "resolved"
- date set right.
-
-2001-10-31 02:51 jesse
-
- * lib/RT/User.pm:
-
- Started work on "Email password to user"
-
-2001-10-31 02:48 jesse
-
- * lib/RT/Watcher.pm:
-
- Added a patch from Simon Cozens which makes sure that a requestor is always a user, rather than an email address.
-
-2001-10-31 02:47 jesse
-
- * lib/RT/Keyword.pm:
-
- Added a helper Load function to Keyword to load by Id or Path
-
-2001-10-31 02:42 jesse
-
- * lib/RT/Template.pm:
-
-
- Template got new helper functions for loading queue and system templates.
-
-2001-10-31 02:40 jesse
-
- * bin/rt, bin/rtadmin, lib/RT/Interface/CLI.pm,
- lib/RT/Interface/Email.pm:
-
- Bringing forward a security fix from 2.0.8_01. (nonusers could get superuser permissions from the CLI)
-
-2001-10-31 02:37 jesse
-
- * webrt/: Elements/MyRequests, Elements/MyTickets,
- Ticket/Create.html:
-
- Fixed a display bug in mytickets and myrequests which prevented clicking on
- subjectless email
-
-2001-10-31 02:04 jesse
-
- * etc/: config.pm, schema.Pg, schema.mysql, schema.pm:
-
- Lengthened queue name and email addresses in the default DB schema
-
-2001-10-31 02:02 jesse
-
- * webrt/Ticket/Update.html, lib/RT/Interface/Web.pm:
-
- Now show the current ticket subject by default in the update subject box.
- But don't include it in the transaction if it hasn't changed.
-
-2001-10-31 01:09 jesse
-
- * Makefile, bin/rt, bin/rt-mailgate, bin/rtadmin,
- lib/RT/Interface/CLI.pm, lib/RT/Interface/Email.pm:
-
- Security fixes per Jay at mojomole
-
-2001-10-25 17:40 jesse
-
- * webrt/Search/Listing.html:
-
- Fixed a bug in new listing display. introduced after 2.0.8
-
-2001-10-24 14:10 jesse
-
- * Makefile, lib/RT/Ticket.pm:
-
- Fixed the ticket status changes from open to open bug, thanks to raphael
- at linkvest.
-
-2001-10-23 17:34 jesse
-
- * webrt/Ticket/Create.html:
-
- Some cleanups to the Create form. No new functionality, just a little bit prettier
-
-2001-10-23 17:34 jesse
-
- * webrt/Elements/SelectTicketSortBy:
-
- Elements/SelectTicketsSortBy now uses new list of sortable Tickets fields
- in Tickets.pm
-
-2001-10-23 17:32 jesse
-
- * webrt/Search/Listing.html:
-
- Column headings in searches are now clicky, where possible
-
-2001-10-23 17:31 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- URLs in ticket history should now be clicky
-
-2001-10-23 17:26 jesse
-
- * webrt/Elements/CustomHomepageHeader:
-
- file CustomHomepageHeader was initially added on branch rt-1-1.
-
-2001-10-23 17:26 jesse
-
- * webrt/: index.html, Elements/CustomHomepageHeader:
-
- Added a hook for sites to put their own html in the top of the "Home" page
-
-2001-10-23 17:24 jesse
-
- * webrt/Elements/: SelectNewTicketQueue, SelectQueue:
-
- Frefactored SelectQueue to elimintate dupicate code and enable a "too many queues" option
-
-2001-10-23 17:22 jesse
-
- * lib/: RT.pm, RT/Date.pm, RT/Keyword.pm, RT/KeywordSelect.pm,
- RT/Keywords.pm, RT/Link.pm, RT/Links.pm, RT/ObjectKeywords.pm,
- RT/Record.pm, RT/Scrip.pm, RT/ScripActions.pm,
- RT/ScripConditions.pm, RT/Ticket.pm, RT/Action/SendEmail.pm,
- RT/Condition/Generic.pm, RT/Interface/CLI.pm,
- RT/Interface/Email.pm:
-
- Simple fixes to POD from Feargal Reilly to fix complaints from pod2man
-
-2001-10-23 17:08 jesse
-
- * lib/RT/Tickets.pm:
-
- Refactored Tickets.pm a bit to provide better access to fields
- that tickets can be sorted on.
-
-2001-10-23 17:06 jesse
-
- * etc/: config.pm, schema.Pg, schema.mysql, schema.pm:
-
- Added some new indices, based on recommendations from Nobel Tse at Outblaze
-
- Started to cleanup config.pm to not use deprecated methods when displaying
- ticket columns.
-
-2001-10-19 15:44 jesse
-
- * Makefile, bin/initacls.Pg, bin/initacls.mysql, tools/initdb:
-
- Reverting last patch. it lead to too much brokenness
-
-2001-10-19 15:16 jesse
-
- * Makefile, bin/initacls.Pg, bin/initacls.mysql, tools/initdb:
-
- Work on the install procedure to automate it some more. (automatically supply
- passwords defined in the makefile)
-
-2001-10-19 00:49 jesse
-
- * Makefile:
-
- Bumped version to 2.0.9pre1
-
-2001-10-19 00:46 jesse
-
- * docs/design_docs/cvs_integration:
-
- file cvs_integration was initially added on branch rt-1-1.
-
-2001-10-19 00:46 jesse
-
- * webrt/NoAuth/images/rt.jpg:
-
- file rt.jpg was initially added on branch rt-1-1.
-
-2001-10-19 00:46 jesse
-
- * rt.spec, docs/design_docs/cvs_integration, etc/config.pm,
- webrt/rt.jpg, webrt/Elements/Header, webrt/Elements/TitleBoxEnd,
- webrt/Elements/TitleBoxStart, webrt/NoAuth/images/rt.jpg,
- webrt/SelfService/Elements/Header:
-
- Refactored images path to have a configurable URL, so it will work with fastcgi ;)
-
-2001-10-19 00:37 jesse
-
- * webrt/: Elements/Footer, autohandler:
-
- Added support for timing of page display with &Debug=1
-
-2001-10-19 00:29 jesse
-
- * lib/RT/User.pm:
-
- User.pm: a fix to allow you to create multiple users with no email address.
-
-2001-10-19 00:25 jesse
-
- * lib/RT/Tickets.pm:
-
- Added sub Due to Tickets.pm. fixes #910
-
-2001-10-19 00:17 jesse
-
- * etc/rt.spec:
-
- file rt.spec was initially added on branch rt-1-1.
-
-2001-10-19 00:17 jesse
-
- * Makefile, rt.spec, etc/rt.spec:
-
- Some work on the rpm build infrastructure
-
-2001-10-19 00:03 jesse
-
- * tools/cpan2rpm:
-
- cpan2rpm doesn't repeat builds of the same distribution, even if we're looking for differnet modules
-
-2001-10-18 23:30 jesse
-
- * tools/cpan2rpm:
-
- cpan2rpm has been cleaned up a whole lot. it should actually be somewhat smarter about not doing the same work twice
-
-2001-10-18 22:42 jesse
-
- * tools/cpan2rpm:
-
- Added cpan2rpm to the tools directory, for autogenerating rpms of cpan modules
-
-2001-10-18 22:42 jesse
-
- * tools/cpan2rpm:
-
- file cpan2rpm was initially added on branch rt-1-1.
-
-2001-10-18 21:20 jesse
-
- * Makefile, rt.spec:
-
- Added support for autobuilding an rpm with "make rpm"
-
-2001-10-18 02:15 jesse
-
- * tools/insertdata:
-
- Fixed templates to include the ticket subject if it was otherwise blank
-
-2001-10-18 02:14 jesse
-
- * lib/RT/Interface/Web.pm, webrt/Ticket/Display.html:
-
- work on web-based ticket creation. fixed bugs setting due dates, etc
-
-2001-10-18 02:13 jesse
-
- * lib/RT/Interface/Email.pm:
-
- fixed a user creation race condition in the mail gateway
-
-2001-10-18 02:11 jesse
-
- * webrt/Elements/SelectStatus:
-
- use the new status abstraction in the web ui
-
-2001-10-18 02:08 jesse
-
- * tools/testdeps:
-
- moved to a dbix::searchbuilder 0.46 dependency
-
-2001-10-18 02:07 jesse
-
- * lib/RT/Tickets.pm:
-
- Movign away from a deprecated API
-
-2001-10-18 02:07 jesse
-
- * tools/initdb:
-
- initdb won't whine if you don't set a host
-
-2001-10-18 02:05 jesse
-
- * docs/design_docs/evil_plans:
-
- Added some docs about what 2.2 might hold
-
-2001-10-18 02:00 jesse
-
- * lib/RT/: Ticket.pm, Queue.pm:
-
- Abstracted out status enumeration and validation
-
-2001-10-18 01:57 jesse
-
- * webrt/Ticket/Elements/EditLinks:
-
- added WebPath to fix some links in showlinks
-
-2001-10-17 16:34 jesse
-
- * lib/Makefile.PL:
-
- Bumped searchbuilder dependency to 0.46
-
-2001-10-17 16:33 jesse
-
- * webrt/Ticket/Elements/ShowHistory:
-
- Added an optional bit of configuration to not show the "History" header
-
-2001-10-06 03:01 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Added a new option "Show commands" to show tranasaction
-
-2001-10-06 03:00 jesse
-
- * webrt/Admin/: Keywords/index.html, Queues/index.html:
-
- Added support for reenabling deleted queues and keywords
-
-2001-10-06 02:57 jesse
-
- * lib/RT/Condition/Generic.pm:
-
- Added test harness glue
-
-2001-10-06 02:55 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Added code to detect bogus ticket update types
-
-2001-10-06 02:54 jesse
-
- * lib/RT/Interface/: CLI.pm, Email.pm:
-
- Added support for unit testing
-
-2001-10-06 02:51 jesse
-
- * lib/RT/Handle.pm:
-
- Added support for unit testing
-
- Added a test for Database Port definition to stop perl from whining
-
-2001-10-06 02:49 jesse
-
- * lib/RT/: ACE.pm, ACL.pm, Action/Generic.pm, Action/SendEmail.pm,
- Attachment.pm, Attachments.pm:
-
- Added support for unit testing
-
-2001-10-06 02:46 jesse
-
- * lib/RT/: Tickets.pm, Transaction.pm, Transactions.pm, User.pm,
- Users.pm, Watcher.pm, Watchers.pm, Queues.pm, Record.pm, Scrip.pm,
- ScripAction.pm, ScripActions.pm, ScripCondition.pm,
- ScripConditions.pm, Scrips.pm, Template.pm, Templates.pm:
-
- Added support for unit testing
-
-2001-10-06 02:43 jesse
-
- * lib/RT/: Keyword.pm, KeywordSelect.pm, KeywordSelects.pm,
- Keywords.pm, Link.pm, Links.pm, ObjectKeyword.pm,
- ObjectKeywords.pm, CurrentUser.pm, Date.pm, EasySearch.pm,
- Group.pm, GroupMember.pm, GroupMembers.pm, Groups.pm:
-
- Added support for unit testing
-
-2001-10-06 02:38 jesse
-
- * lib/RT.pm:
-
- Added the beginnings of test support to RT.pm
-
-2001-10-06 02:22 jesse
-
- * lib/RT/TestHarness.pm:
-
- file TestHarness.pm was initially added on branch rt-1-1.
-
-2001-10-06 02:22 jesse
-
- * lib/: Makefile.PL, RT/TestHarness.pm:
-
- First bits of glue for new RT unit testing infrastructure
-
-2001-10-06 02:19 jesse
-
- * bin/rt:
-
- bin/rt: Documentation cleanups. removing an unnecessary data tainting check
-
-2001-10-06 02:18 jesse
-
- * bin/initacls.Pg:
-
- Fixes to initacls.Pg to allow installation with Unix Domain sockets
-
-2001-10-04 02:01 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.8
-
-2001-10-01 02:44 jesse
-
- * rt.spec:
-
- Revved the version of DBIx::SearchBuilder needed in the .spec file
-
-2001-10-01 02:42 jesse
-
- * Makefile, lib/RT/Interface/Email.pm:
-
- Fixed the call to MIME::Entity::Build in Email.pm
-
- Bumped the version to 2.0.8pre3
-
-2001-09-30 23:03 jesse
-
- * README, bin/rt, lib/RT/Tickets.pm, lib/RT/Interface/Email.pm,
- webrt/Search/PickRestriction, webrt/Ticket/History.html,
- webrt/Ticket/Elements/EditBasics,
- webrt/Ticket/Elements/ShowHistory:
-
- Code refactoring to allow searching for nonlocal links
- Cleanup to the Loop prevention stuff (v. 2.0.8pre2)
- Readme cleanup
- CLI cleanups. changed "return" to "exit"
-
-2001-09-26 16:31 jesse
-
- * tools/testdeps:
-
- Bumped the searchbuilder dependency. to 0.43
-
-2001-09-26 16:28 jesse
-
- * Makefile, bin/rt, lib/RT/Tickets.pm,
- webrt/Admin/Queues/Scrips.html:
-
- Added a fix for ItemsArrayRef to Tickets which causes the Next/Prev links in
- the web ui to be smarter.
-
- Fixed a typo in SCrips.html
-
- Bumped the version to 2.0.8pre2
-
-2001-09-24 20:10 jesse
-
- * rt.spec:
-
- file rt.spec was initially added on branch rt-1-1.
-
-2001-09-24 20:10 jesse
-
- * Makefile, rt.spec:
-
- Added destdir support to allow building of RPMS.
- added rt.spec for building of RPMS.
-
-2001-09-21 16:51 jesse
-
- * Makefile:
-
- Bumped makefule version to 2.0.8pre1
-
-2001-09-21 16:45 jesse
-
- * bin/rt, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowTransaction:
-
- Fixed a typo in the bin/rt docs
- Allowed "Force owner change" from bulk update screen.
-
-2001-09-20 22:34 jesse
-
- * bin/rt, lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm,
- webrt/Search/Bulk.html, webrt/Ticket/Elements/ShowTransaction:
-
- Fixes for:
-
- 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888862 Re: [rt-users] how does rt --limit-last-updated work?
-
- 863 Ticket/Elements/ShowTransaction doesn't show headers sometimes
-
- Fix for a bug in the code that prevents RT from looping with itself.
-
- Start of work for "force change owner" in Bulk.html
-
-2001-09-19 16:49 jesse
-
- * bin/initacls.Pg, bin/rt, etc/config.pm, lib/RT/Queue.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, webrt/Elements/Header,
- webrt/Search/Listing.html, webrt/Ticket/Create.html,
- webrt/Ticket/Display.html, webrt/Ticket/ModifyAll.html,
- webrt/Ticket/Update.html, webrt/Ticket/Elements/ShowLinks:
-
- Fixed a bug that would cause installation on postgres to lose if $PORT wasn't
- specified
-
- Changed " to ' in a few places in the config file, to make file and variable
- names with embedded metacharacters not lose as badly
-
- Set some logical defaults for Queue->Create, so it's not as likely to fail
- to create a queue if you leave out some fields
-
- Ticket->Create: now takes a Starts date. Also, fixed some API docs.
-
- Tickets: Negative searching on fields like "subject" should now work
-
- WebUI: Added a pragma NO-CACHE pseudo-header, to stop overzealous browsers from caching RT's pages
-
- WebUI: changed the "Bookmark this search" link to "Bookmarkable URL for this search"
-
- WebUI: ticket create now has a "more detail" section
-
- WebUI: ticket updates no longer have a default subject preset.
-
- WebUI: fixed a bug in ShowLinks that generated bogus urls within RT if RT wasn't at / on your server
-
-2001-09-13 00:03 jesse
-
- * Makefile:
-
- Bumping the version to 2.0.7
-
-2001-09-10 02:18 jesse
-
- * Makefile:
-
- Bumped the makefile version to 2.0.7pre1
-
-2001-09-10 02:11 jesse
-
- * bin/mason_handler.fcgi, lib/RT/User.pm:
-
- Fixed #883, a permissions caching bug.
-
- Added the Text::Wrapper dependency to mason_handler.fcgi
-
-2001-09-06 15:59 jesse
-
- * lib/RT/Ticket.pm:
-
- Reverted reopen on correspondence to 1.0 behaviour
-
-2001-09-06 15:41 jesse
-
- * webrt/SelfService/Display.html:
-
- make row coloring alternate in selfservice transaction history
-
-2001-09-06 15:39 jesse
-
- * webrt/SelfService/Display.html:
-
- Fixed cell spacing in selfservice transaction display
-
-2001-09-06 15:33 jesse
-
- * bin/webmux.pl, webrt/SelfService/Display.html,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowHistory,
- webrt/Ticket/Elements/ShowKeywordSelects,
- webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction:
-
- Cleaned up the web ticket transaction display.
-
-2001-09-06 15:32 jesse
-
- * lib/RT/: ObjectKeyword.pm, Queue.pm:
-
- Added some docs.
- Started refactoring Ticket statuses.
-
-2001-09-06 15:32 jesse
-
- * lib/RT/Ticket.pm:
-
- $Ticket->SetTold now optionally takes a date to set it to.
-
-2001-09-06 15:30 jesse
-
- * bin/rt:
-
- Fixing some docs in bin/rt
-
-2001-09-05 11:00 jesse
-
- * webrt/Elements/: Header, Refresh:
-
- Fix for #823 from martin@schapendonk.org
- Refresh now allows you to turn off refresh.
-
-2001-09-01 19:01 jesse
-
- * webrt/Elements/MessageBox:
-
- Fix for [fsck.com #803] Jumbo recording comments accidentally
-
-2001-09-01 18:23 jesse
-
- * Makefile:
-
- Bumped the version to 2.0.6
-
-2001-08-28 15:49 jesse
-
- * Makefile:
-
- Bumped the version to pre7, fixed a typo in the makefile's install instructions.
-
-2001-08-24 00:13 jesse
-
- * lib/RT/Attachment.pm:
-
- importing the Crit->crit typo fix from 2.0.5_01
-
-2001-08-24 00:08 jesse
-
- * Makefile, lib/RT/Interface/Email.pm:
-
- Rolled in the 2.05 perl 5.005 compatibility fix.
- bumped the version to 2.0.6pre6
-
-2001-08-23 19:49 jesse
-
- * bin/rt-mailgate, tools/initdb:
-
- fixed initdb to not append a port= to the db connect string unless it needs one.
-
- added support for $SenderMustExistInExternalDatabase to mailgate.
-
-2001-08-23 19:46 jesse
-
- * lib/RT/Groups.pm:
-
- Added a default alphabetical sort order to lib/RT/Groups
-
-2001-08-23 19:45 jesse
-
- * etc/: config.pm, schema.Pg, schema.mysql, schema.pm:
-
- Added new indices to schema. Regenerated mysql and postgres schema.
-
- Cleaned up etc/config.pm's docs some more, based on comments from Christian Gimore
- Added a default value for RT::OwnerEmail, which was documented by not defined
- by default
-
-2001-08-22 18:48 jesse
-
- * bin/rt, lib/RT/Ticket.pm, webrt/Ticket/Update.html:
-
- bin/rt --create now deals with watchers.
-
- fixed a typo in Ticket/Update.html introduced after 2.0.5_03
-
-2001-08-22 01:37 jesse
-
- * Makefile, lib/RT/Tickets.pm, webrt/Admin/Global/Keywords.html:
-
- Bumped version to 2.0.6-pre5
-
- Fixed 'deep' merges.
-
- Fixed a typo in Global/Keywords
-
-2001-08-22 00:41 jesse
-
- * Makefile, lib/RT/Interface/Email.pm:
-
- Fixed a couple of bugs in the new email db lookups
-
-2001-08-21 23:57 jesse
-
- * Makefile, bin/initacls.Oracle, bin/initacls.Pg,
- bin/initacls.mysql, tools/initdb:
-
- Added support for setting the database port for postgres and mysql
-
-2001-08-21 23:48 jesse
-
- * README:
-
- Updated jesse's email address and shuffled things around a bit.
-
-2001-08-21 23:45 jesse
-
- * etc/config.pm:
-
- Added more docs and updated the default config for the external db lookups
-
-2001-08-21 23:35 jesse
-
- * webrt/: index.html, NoAuth/webrt.css, Search/Listing.html,
- Search/PickRestriction, Ticket/ModifyDates.html,
- Ticket/Update.html, Ticket/Elements/ShowHistory,
- Ticket/Elements/ShowTransaction:
-
- Added support for autorefresh to / and /Search/Listing.html
-
- Tightened up Transaction display. Fixed 'full headers' display.
-
- Cleaned up the ui in ModifyDates a bit
-
- Cleaned up the ui in Ticket/Update.html
-
- fixed a few typos in the css file
-
-2001-08-21 23:30 jesse
-
- * lib/RT/Attachment.pm:
-
- Added some documentation
-
-2001-08-21 23:25 jesse
-
- * bin/rt-mailgate:
-
- Bringing forward a patch to the mailgate from 2.0.5_01
-
-2001-08-21 23:19 jesse
-
- * webrt/Elements/Refresh:
-
- file Refresh was initially added on branch rt-1-1.
-
-2001-08-21 23:19 jesse
-
- * webrt/Elements/Refresh:
-
- Commiting a Refresh control to cvs
-
-2001-08-21 23:17 jesse
-
- * bin/rtadmin:
-
- Fixed cli group creation
-
-2001-08-21 23:12 jesse
-
- * webrt/Elements/MessageBox:
-
- Fixed transaction quoting to use the new transaction content quoting method.
-
-2001-08-21 23:07 jesse
-
- * webrt/Elements/Login:
-
- Display a version string in the login box.
-
-2001-08-21 23:06 jesse
-
- * webrt/Elements/Header:
-
- Added support for refresh to webrt/Elements/Header
- Don't display the logout link if using external auth.
-
-2001-08-21 23:05 jesse
-
- * webrt/Admin/Users/Modify.html:
-
- Little bit of ui and code cleanup to the User editing page
-
-2001-08-21 23:04 jesse
-
- * lib/RT/Record.pm:
-
- Fixed broken caching of the CreatorObj
-
-2001-08-21 23:03 jesse
-
- * lib/RT/Handle.pm:
-
- Added support for Database port to Handle.pm
-
-2001-08-21 22:50 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Added vivek khera's patch to clean up newline processing for incoming messages
-
- Removed debugging output from file attachment subroutine
-
- Added support for setting refresh interval to the search page
-
-2001-08-21 22:46 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Fixed the bug fixed in 2.0.5_?? which called the wrong function for finding
- sender name
-
- Altered the mail interface's external user lookup function to be returned
- a hash of parameters
-
-2001-08-21 22:43 jesse
-
- * lib/RT/Transaction.pm:
-
- Added support for Quoting a transaction to the Content sub.
-
-2001-08-16 00:23 jesse
-
- * Makefile, tools/testdeps:
-
- dependency on CGI::Cookie 1.20 had reverted.
- Bumped version to 2.0.5_03
-
-2001-08-15 16:44 jesse
-
- * Makefile, bin/rt-mailgate, lib/RT/Interface/Email.pm:
-
- A couple of fixes to the mail gateway to deal with proper processing
- of sender email addresses
-
-2001-08-15 16:12 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Trying for 2.0.5-01 again
- Fixed a perl 5.6ism in Interface/Email
- Fixed a bug in Attachment.pm that would cause a DIE on a fatal error
-
-2001-08-15 16:12 jesse
-
- * lib/RT/Attachment.pm:
-
- Trying for 2.0.5-01 again
- Fixed a bug in Attachment.pm that would cause a DIE on a fatal error
-
-2001-08-15 16:12 jesse
-
- * Makefile:
-
- Trying for 2.0.5-01 again
-
-2001-08-15 15:44 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Fixed an error message in Attachment that should never be reached
- Bumped the Makefile version to 2.0.5_01
- Fixed an inadvertent perl 5.6ism in the mail gateway.
-
-2001-08-15 15:42 jesse
-
- * lib/RT/Attachment.pm:
-
- Fixed an error message in Attachment that should never be reached
-
- Bumped the Makefile version to 2.0.5_01
-
-2001-08-15 15:42 jesse
-
- * Makefile:
-
- Bumped the Makefile version to 2.0.5_01
-
-2001-08-15 01:01 jesse
-
- * Makefile:
-
- Bumped version to 2.0.6-pre1
-
-2001-08-15 01:00 jesse
-
- * webrt/: autohandler, Admin/Users/Modify.html, Elements/Login,
- SelfService/Prefs.html, User/Prefs.html:
-
- Added support for external authentication to the web ui
-
-2001-08-15 01:00 jesse
-
- * bin/rt-mailgate, lib/RT/Interface/Email.pm:
-
- Added support for looking up new users in an external datasource
-
-2001-08-15 00:58 jesse
-
- * etc/config.pm:
-
- Added new configuration variables for external authentication for the web ui and
- to support looking up new users in the mail gateway from a site-defined external datasource.
-
-2001-08-15 00:17 jesse
-
- * tools/testdeps:
-
- Fixed testdeps to depend on the right version of CGI.pm
-
-2001-08-14 23:55 jesse
-
- * Makefile:
-
- Released RT 2.0.5 No changes since 2.0.5-test3.
-
-2001-08-12 21:13 jesse
-
- * Makefile, bin/webmux.pl:
-
- Fixed a typo in webmux.pl created after 2.0.4
- Bumped the version to 2.0.5-test3
-
-2001-08-12 20:00 jesse
-
- * docs/manual.pod, lib/RT/Transaction.pm:
-
- Core: Updated Transaction->Content to be smarter about showing the first
- message in the transaction.
-
- Removed the old manual skeleton in docs in favor of the web based docs.
-
-2001-08-12 19:58 jesse
-
- * lib/RT/Attachment.pm:
-
- Core: Added a convenience function to RT::Attachemnt to find Children of this attachment.
- Core: Added code to RT::Attachemnt to allow access to the 'Parent' attribute
-
-2001-08-12 19:55 jesse
-
- * lib/RT/Attachments.pm:
-
- Core: A convenience function to search for Attachments by ContentType.
- Core: Added some docs to RT::Attachments
-
-2001-08-12 19:53 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- WebUI: Show 'comment' and 'correspond' for multipart messages in the per-transaction listing.
-
-2001-08-10 23:59 jesse
-
- * README:
-
- README: added more pointers to the 'complete' docs.
- README: Removed the little bit of configuration info in the readme in favor of the 'complete' docs on the web
-
-2001-08-10 23:58 jesse
-
- * bin/rt-mailgate:
-
- mailgate: RT is now less likely to try to send mail to senders which will cause loops
-
-2001-08-10 23:57 jesse
-
- * webrt/index.html:
-
- Webui: [home] now gets greyed out when you're there
-
-2001-08-10 15:32 jesse
-
- * Makefile, webrt/Elements/MessageBox:
-
- Added a pair of () in webrt/Elements/MessageBox to correct a typo in an if
- Bumped version to 2.0.5-test2
-
-2001-08-10 00:24 jesse
-
- * Makefile:
-
- Bumped version to 2.0.5test1
-
-2001-08-10 00:24 jesse
-
- * lib/RT/Users.pm, webrt/Elements/MessageBox,
- webrt/Ticket/Elements/AddWatchers, webrt/Ticket/Elements/EditDates:
-
- Cleanup to date editing ui
-
- Code cleanups to Elements/MessageBox for more readable and maintainable code
- Code cleanups to TicketElements/AddWatchers for more readable and maintainable code
-
-2001-08-10 00:23 jesse
-
- * webrt/Ticket/Elements/: EditLinks, ShowLinks:
-
- Cleanup to Relationship editing and display ui
-
-2001-08-10 00:21 jesse
-
- * webrt/Ticket/ModifyDates.html:
-
- UI cleanups in Ticket/ModifyDates.html
-
-2001-08-10 00:20 jesse
-
- * webrt/Ticket/ModifyAll.html:
-
- Jumbo no longer loses ticket update contents.
-
-2001-08-09 20:07 jesse
-
- * webrt/Admin/Users/index.html:
-
- Cleaned up Admin/Users search functionality and made it look more like
- other user searching screens and enables searching for disabled users.
-
-2001-08-09 20:02 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Properly strip trailing spaces from things we're trying to link to.
-
-2001-08-09 20:00 jesse
-
- * lib/RT/Links.pm:
-
- By default, try to sort Links by something intelligent when displaying them
-
-2001-08-03 01:52 jesse
-
- * lib/RT/Action/Autoreply.pm:
-
- Autoreplies are now from "Queuename" rather than from "RT"
-
-2001-08-02 04:57 jesse
-
- * webrt/: Admin/Queues/People.html, Elements/Quicksearch,
- Elements/SelectResultsPerPage, Elements/SelectStatus,
- Search/PickRestriction:
-
- WebUI: Fixed a typo in hte 'bookmark this search' link display.
- WebUI: By default, limit displayed results to 50 per page.
-
-2001-08-02 04:57 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Documented a function in the web ui library
-
-2001-08-02 04:56 jesse
-
- * etc/config.pm:
-
- Fixed a typo in the docs in the config file, thanks to sheeri.
-
-2001-08-02 04:55 jesse
-
- * bin/rt-mailgate:
-
- rt-mailgate: bug-fix to properly grab 'from' addresses for purposes of determinigng whether something's a mailer-daemon
-
-2001-08-02 04:54 jesse
-
- * bin/rt:
-
- Added support for merging to the CLI
- Cli now works as described when linking tickets. Formerly, you couldn't admit the "+" before an added link
-
-2001-08-02 04:53 jesse
-
- * webrt/User/Prefs.html:
-
- Bugfix to allow users to fully delete their rt signatures
-
-2001-07-30 03:54 jesse
-
- * docs/design_docs/evil_plans:
-
- file evil_plans was initially added on branch rt-1-1.
-
-2001-07-30 03:54 jesse
-
- * Makefile, docs/design_docs/evil_plans:
-
- bumped the version, so as not to get confused users complaining to the lists
-
- added some notes about what may happen for 2.2
-
-2001-07-30 03:52 jesse
-
- * webrt/SelfService/Display.html:
-
- file Display.html was initially added on branch rt-1-1.
-
-2001-07-30 03:52 jesse
-
- * bin/mason_handler.fcgi, bin/webmux.pl, lib/RT/Interface/Web.pm,
- webrt/SelfService/Create.html, webrt/SelfService/Details.html,
- webrt/SelfService/Display.html, webrt/SelfService/Update.html,
- webrt/SelfService/Elements/GotoTicket,
- webrt/SelfService/Elements/MyRequests, webrt/Ticket/Create.html,
- webrt/Ticket/Display.html, webrt/Ticket/Modify.html,
- webrt/Ticket/ModifyAll.html, webrt/Ticket/ModifyDates.html,
- webrt/Ticket/ModifyLinks.html, webrt/Ticket/ModifyPeople.html,
- webrt/Ticket/Update.html, webrt/Ticket/Elements/EditBasics,
- webrt/Ticket/Elements/ShowTransaction:
-
- Switched SelfService/Details to SelfService/Display to better jibe
- with the regular UI.
-
- Added better current-page navigation hints to most per-ticket pages.
-
- Added support for uploading attachments on ticket create or update.
-
-2001-07-30 03:51 jesse
-
- * webrt/Admin/Elements/ListGlobalScrips:
-
- file ListGlobalScrips was initially added on branch rt-1-1.
-
-2001-07-30 03:51 jesse
-
- * webrt/Admin/: Elements/ListGlobalKeywordSelects,
- Elements/ListGlobalScrips, Global/Scrips.html,
- Queues/Keywords.html, Queues/Scrips.html:
-
- Added some ui to show global scrips and keywordselects in the queue
- uis for adminning the same.
-
-2001-07-30 03:51 jesse
-
- * webrt/Admin/Elements/ListGlobalKeywordSelects:
-
- file ListGlobalKeywordSelects was initially added on branch rt-1-1.
-
-2001-07-30 03:49 jesse
-
- * TODO:
-
- Clarified the errata urls
-
-2001-07-30 03:48 jesse
-
- * lib/RT/Ticket.pm:
-
- Cleaned up the return values from Ticket->CreateLink. (always return $status, $msg);
-
-2001-07-30 03:48 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- changed the case of the Managed-by header to be less grating
-
-2001-07-30 03:45 jesse
-
- * bin/rt-mailgate, lib/RT/Interface/Email.pm:
-
- Moving a bunch of mail gateway library routines to the library where they
- belong
-
-2001-07-27 01:06 jesse
-
- * README:
-
- fixed a typo in the cronjob
-
-2001-07-25 01:05 jesse
-
- * bin/rt-mailgate, lib/RT/Tickets.pm:
-
- Fix for mailgateway being unable to send error mail with 'sendmailpipe' mailing
- Fix for 'blank' searches when using search bookmarking.
-
-2001-07-25 01:00 jesse
-
- * Makefile:
-
- Bumped version to 2.0.4
- Fixed bookmarkable searches
- Fix for sendmailpipe errors in mailgateway
-
-2001-07-24 12:10 jesse
-
- * Makefile, webrt/Search/PickRestriction:
-
- Fixed a bug in Search/PickRestriction, thanks to Vivek Khera
- Bumped version to 2.0.3
-
-2001-07-24 00:28 jesse
-
- * Makefile:
-
- Bumped version to 2.0.2
-
-2001-07-24 00:21 jesse
-
- * lib/RT/Tickets.pm, webrt/Elements/Submit,
- webrt/Search/Listing.html, webrt/Search/PickRestriction:
-
- Bookmarked searches now keep track of sorting and record count limits
- New "Refine" button to allow faster updates of search criteria.
-
-2001-07-24 00:01 jesse
-
- * bin/rt:
-
- Added support for --limit-queue to RT cli tool
-
-2001-07-23 10:43 jesse
-
- * Makefile, tools/testdeps:
-
- Testdeps was accidentally looking for Freeze::Thaw, rather than FreezeThaw
-
-2001-07-23 00:31 jesse
-
- * Makefile:
-
- bumped version to 2.0.2test2
-
-2001-07-23 00:30 jesse
-
- * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, tools/testdeps,
- webrt/Search/Listing.html:
-
- Added support for bookmarkable searches.
-
-2001-07-22 22:12 jesse
-
- * lib/RT/: KeywordSelect.pm, User.pm:
-
- Better error checking in User ACL checking
-
- Fixed an ACL check bug in KeywordSelect.pm, thanks to Matthew Stock.
-
-2001-07-22 22:09 jesse
-
- * webrt/Admin/Users/index.html:
-
- Fix for a users search bug and a clarification of another search option.
-
-2001-07-22 22:06 jesse
-
- * lib/RT/: Keywords.pm, Queues.pm, Users.pm:
-
- By default, order Queues, Users and Keywords alphabetically
-
-2001-07-22 22:05 jesse
-
- * Makefile:
-
- Permissions fix for the data dirs for the fastcgi handler
-
- rt/etc is now mode 755, rather than 555.
-
-2001-07-22 22:03 jesse
-
- * bin/mason_handler.fcgi:
-
- fastcgi handler no longer drops setgidness, so it can deal with session files.
-
-2001-07-22 21:55 jesse
-
- * etc/config.pm:
-
- Cleaned up the config file a bit to make installation easier.
-
-2001-07-22 21:52 jesse
-
- * webrt/Elements/MyRequests:
-
- Clean up phrasing of the "Tickets I own dialogbox"
-
-2001-07-19 00:57 jesse
-
- * Makefile:
-
- Changed Makefile to not use MAN[13]INSTALLSITEPATH per Robert Shaw's changes
-
-2001-07-18 16:20 jesse
-
- * Makefile, lib/RT/Queue.pm:
-
- Added a newline to Queue.pm to fix a pod bug
-
- Bumped version to 2.0.2-test1 to get some feedback
-
-2001-07-18 16:16 jesse
-
- * lib/RT/User.pm:
-
- RT should now honor queue-level pseudogroup memebership for ACL checks.
- Also, simplified some of the queue related ACL checking code.
-
- Reduced the ACL permissions cache from 30sec to 10sec.
-
-2001-07-18 16:13 jesse
-
- * lib/RT/Transaction.pm:
-
- Added BriefDescription, which is just like Description without the "By actor"
- at the end
-
- Descriptions Keyword operations should include _which_ keyword select from
- here on in (also touched the last update to Ticket.pm)
-
-2001-07-18 16:06 jesse
-
- * lib/RT/Ticket.pm:
-
- TTicket->Create no longer just adds admin ccs..unless the person doing the add
- has the right to do so. otherwise, there was an ACL related attack that
- could happen. luckily none of the UI exposedd this hole yet.
-
- Ticket->Create should now be able to set keywords on create
-
- Ticket->Create now reports back non-fatal errors and how they were dealt with
-
- Ticket->AddKeyword got split into AddKeyword and _AddKeyword. The former
- has the acl check and calls the latter. the latter just does the adding.
-
- Ticket->AddKeyword got a Silent flag, which causes a transaction not
- to be written. useful on ticket create.
-
-2001-07-18 15:59 jesse
-
- * tools/testdeps:
-
- Added tests for Apache::Cookie
- and DBI 1.18 to testdeps
-
-2001-07-18 15:53 jesse
-
- * webrt/SelfService/: Details.html, Update.html:
-
- Added the ability for requestors to use the self-service ui to comment on / reply to tickets.
-
-2001-07-18 15:53 jesse
-
- * webrt/SelfService/Update.html:
-
- file Update.html was initially added on branch rt-1-1.
-
-2001-07-17 22:12 jesse
-
- * webrt/Admin/Queues/People.html:
-
- Fixed a link to Users/Modify.html in Queue/People.html
-
-2001-07-17 22:01 jesse
-
- * bin/webmux.pl:
-
- Fix to the solaris chown problem
-
-2001-07-17 18:37 jesse
-
- * README:
-
- Fixed typo in the cron job description
-
-2001-07-13 02:17 jesse
-
- * lib/RT/Tickets.pm:
-
- Work on tickets.pm to support some new searching options
-
-2001-07-12 19:43 jesse
-
- * Makefile:
-
- Bumped version to 2.0.1
-
-2001-07-11 23:17 jesse
-
- * etc/config.pm:
-
- No longer log things of less than 'error' to the logfile
-
-2001-07-11 23:16 jesse
-
- * Makefile, bin/mason_handler.fcgi, bin/rt, bin/rt-mailgate,
- bin/rtadmin, lib/Makefile.PL, lib/RT.pm, lib/RT/Interface/CLI.pm,
- lib/RT/Interface/Email.pm:
-
- Make sure that the setgid programs don't drop setgidness before trying to open logfiles
-
-2001-07-10 20:15 jesse
-
- * Makefile, lib/Makefile.PL, lib/RT/Tickets.pm,
- lib/RT/Interface/Web.pm, tools/testdeps:
-
- Fixes to allow search-by-requestor to search for requestors who don't have RT accounts
-
-2001-07-10 13:53 jesse
-
- * bin/webmux.pl:
-
- Fix for the weird sessiondata permissions bug folks have seen on solaris
-
-2001-07-10 11:47 jesse
-
- * lib/RT/Tickets.pm:
-
- Change to Tickets.pm to fix description of watcher limits
-
-2001-07-10 11:36 jesse
-
- * bin/webmux.pl, webrt/Elements/SelectMatch:
-
- Fixed a bug in webmux.pl that prevented Apache::Cookie support from working
-
- Fixed a bug in the enw SelectMatch code
-
-2001-07-10 11:20 jesse
-
- * lib/RT/Ticket.pm, webrt/Elements/SelectMatch,
- webrt/Search/PickRestriction:
-
- Cleanup to SelectMatch and PickRestriction to clear up the UI issues
- with searching for Tickets from a give nrequestor
-
-2001-07-09 10:36 jesse
-
- * lib/RT/Template.pm:
-
- Fixed a typo in Template.pm that squashed templates on outgoing mail. (Bug in my untainting fix)
-
- Bumped version to 2.0.1-test2
-
-2001-07-09 10:36 jesse
-
- * Makefile:
-
- Fixed a typo in Template.pm that squashed templates on outgoing mail. (Bug in my untainting fix)
-
-2001-07-08 22:31 jesse
-
- * README:
-
- Added some polite comments about supporting the development of RT
- with contracts, cash or gifts
-
-2001-07-08 20:14 jesse
-
- * Makefile, bin/mason_handler.fcgi,
- webrt/SelfService/Elements/ShowTransaction:
-
- Bumped version to 2.01pre1
-
- Fixed mason_handler header newlines
-
-2001-07-08 20:12 jesse
-
- * lib/RT/: ScripAction.pm, ScripCondition.pm, Template.pm,
- Ticket.pm:
-
- Taint fixes for ScripAction, ScripCondtion,Template.
- Header wrapping fix in Template.pm.
- Fix in Ticket.pm to make EffectiveId a public field.
-
-2001-07-06 18:32 jesse
-
- * lib/RT/Attachment.pm:
-
- Applied a patch from ivan to deal with poorly formed mime messages
- and clean up the attachment proccessing code.
-
-2001-07-06 18:26 jesse
-
- * webrt/SelfService/Attachment/dhandler:
-
- file dhandler was initially added on branch rt-1-1.
-
-2001-07-06 18:26 jesse
-
- * webrt/: SelfService/Details.html,
- Ticket/Elements/ShowTransaction, SelfService/Attachment/dhandler:
-
- ShowTransaction now no longer displays 'Comment' and 'Reply' if the user
- doesn't have the right rights.
-
- SelfService uses the 'standard' ShowTransaction.
-
- SelfService now displays Attachments
-
-2001-07-06 18:21 jesse
-
- * etc/schema.mysql:
-
- Switched mysql to use LONGTEXT rather than LONGBLOB to get
- case insensitive searching.
-
-2001-07-06 18:19 jesse
-
- * bin/mason_handler.fcgi, lib/RT/Interface/Web.pm,
- webrt/NoAuth/Logout.html:
-
- Cleanups to deal better with the fastcgi handler.
-
- Switched to CGI::Fast from FCGI
-
- ContentType fixes.
-
- Logging out now clears the session hash, rather than detaching a perfectly good session. (This gets around an obnoxious tainting issue too)
-
-2001-07-06 16:14 jesse
-
- * webrt/Ticket/Attachment/dhandler:
-
- Changed default attachment type to text/plain from text/html
-
-2001-07-05 16:48 jesse
-
- * bin/rt-mailgate, lib/RT/Ticket.pm:
-
- Updates to make Correspondence on a closed or stalled ticket reopen the ticket
-
-2001-07-04 00:51 jesse
-
- * bin/rt:
-
- bin/rt will now show transactions of type 'text'
-
-2001-07-04 00:36 jesse
-
- * bin/webmux.pl:
-
- Minor fixes to webmux.pl for content type stuff.
-
-2001-07-03 23:15 jesse
-
- * lib/RT/Interface/Web.pm, webrt/Admin/Queues/index.html,
- webrt/Search/PickRestriction:
-
- Web ui now supports 'SearchByPriority'
-
-2001-07-03 23:14 jesse
-
- * etc/config.pm:
-
- Added a few comments about configuration variables
-
-2001-07-03 23:12 jesse
-
- * webrt/SelfService/Elements/ShowTransaction:
-
- Now SelfService displays attachments of type 'text'
-
-2001-07-03 23:08 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- With the web ticket display, now display attachments of type 'text' properly.
- Also, always have a download link.
-
-2001-07-03 23:00 jesse
-
- * webrt/Ticket/Elements/ShowLinks:
-
- Changed SubTickets/SuperTickets to Parents/Children
-
-2001-07-03 22:57 jesse
-
- * Makefile:
-
- Added notes to the effect that the speedycgi and fastcgi handlers aren't
- supported.
-
-2001-07-03 22:52 jesse
-
- * bin/webmux.pl, bin/mason_handler.fcgi,
- webrt/Ticket/Attachment/dhandler:
-
- Switched mod_perl hander to use Apache::Cookie
-
- Refactored mime type handling to properly set the mime type with the modperl
- handler and the fastcgi handler
-
- Added untainting for the requirred parts of the fastcgi wrapper.
- I'm not yet confident that it works properly, but it does the right
- thing in the trivial case.
-
-2001-06-27 00:11 jesse
-
- * Makefile:
-
- Bumped version to 2.0 for release to the unsuspecting masses
-
-2001-06-25 16:28 jesse
-
- * Makefile, lib/RT/Ticket.pm:
-
- Fix for a bug introduced by RC2 (while fixing another bug with _Links)
- which caused Links listings to recurse rather infinitely.
-
- Bumped RC2 to RC3
-
-2001-06-25 16:25 jesse
-
- * webrt/Admin/Elements/SelectRights:
-
- Fix for a crashing bug when editing ACLs without permission
-
-2001-06-25 12:19 jesse
-
- * Makefile, lib/RT/Ticket.pm:
-
- Fixed bug in Ticket.pm -> _Links that caused it to return an error
- rather than an empty links object if permission denied.
-
- Bumped version to RC2
-
-2001-06-23 02:48 jesse
-
- * Makefile, README, tools/import-1.0-to-2.0:
-
- removed 1.0-2.0 importer. (it's now in the contrib archive)
- updated readme and makefile to know about the change.
-
- Bumped the version to 2.0.0-RC1. Yeah. That's right. the major version
- number just got incremented.
-
-2001-06-22 14:50 jesse
-
- * Makefile, lib/RT/Ticket.pm:
-
- hopefully a fix for everyone's favorite import bug.
-
-2001-06-20 23:56 jesse
-
- * webrt/Search/Bulk.html:
-
- Display cleanups to Bulk.html.
- Removed bogus nav items
-
-2001-06-20 17:33 jesse
-
- * NEWS, lib/Makefile.PL:
-
- Removed the out of date NEWS file. It's been superceeded by the changelog
-
-2001-06-20 17:27 jesse
-
- * Makefile, README, lib/RT/Ticket.pm, lib/RT/User.pm,
- lib/RT/Interface/Web.pm, tools/import-1.0-to-2.0, tools/testdeps,
- webrt/Ticket/Display.html, webrt/Ticket/History.html:
-
- Fixes for the import problems some folks have been seeing
- Fixes for the Can't click on URL issues reported by mixo and Carl Potter.
- Turned off some overly verbose debugging.
-
- Bumped the version to 1.3.105
-
-2001-06-19 00:34 jesse
-
- * Makefile:
-
- Bumped version to 1.3.104
-
-2001-06-19 00:25 jesse
-
- * lib/RT/Tickets.pm:
-
- A fix for search based on keywords that don't exist. (Some rows would be lost, due to poorly constructed SELECT statements. This change requires DBIx::SearchBuilder 0.39
-
-2001-06-18 15:39 jesse
-
- * Makefile, README, webrt/Ticket/Elements/ShowTransaction:
-
- Updated README to note new RT2 Errata list
- Bumped version to 1.3.103
- Added comments in ShowTransaction to let you see exact transaction / ticket Ids
- if you view source.
-
-2001-06-18 15:32 jesse
-
- * bin/rt:
-
- Better fomating for cli queue listing.
-
-2001-06-17 16:45 jesse
-
- * lib/RT/: Transaction.pm, User.pm:
-
- Added PurgeTransaction datatype for Transactions.
-
- Removed debugging code from User.pm
-
-2001-06-17 14:36 jesse
-
- * webrt/Ticket/Elements/Tabs:
-
- Fix for webui error when displaying next/prev tabs on new tix.
-
-2001-06-15 22:23 jesse
-
- * Makefile, README:
-
- Bumped the version to a private pre-test 1.3.103
-
-2001-06-15 22:19 jesse
-
- * README, lib/RT/Ticket.pm, lib/RT/User.pm:
-
- Debugging fixes for import oddness folks are having
-
-2001-06-15 01:13 jesse
-
- * webrt/Search/Bulk.html:
-
- removed debugging output from bulk.html
-
-2001-06-14 15:53 jesse
-
- * Makefile, lib/RT/Transactions.pm,
- webrt/Ticket/Elements/AddWatchers:
-
- Installation path of man pages is now configurable
- By default Transactions should now be ordered by date, no matter what their id sequence is.
- Fixed an html typo in Tickets/Elements/AddWatchers
-
- Bumped version to 1.3.102
-
-2001-06-14 03:21 jesse
-
- * Makefile:
-
- Bumped the version to 1.3.101
-
-2001-06-14 02:47 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, webrt/Elements/Tabs,
- webrt/Ticket/Elements/Tabs:
-
- Comments in Ticket.pm about less than optimal design
- Enhancments to Interface/Web for the bulk ticket manipulation tool.
- Search navigation was cleaned up a bunch.
-
-2001-06-14 01:52 jesse
-
- * webrt/Search/Bulk.html:
-
- file Bulk.html was initially added on branch rt-1-1.
-
-2001-06-14 01:52 jesse
-
- * webrt/Search/: BuildSearch, Bulk.html, Listing.html, QueueFooter,
- QueueHeader, QueueItem:
-
- Be vewwy vewwy quiet. I'm hunting cweeping features.
- Like the brand new Bulk Ticket manipulator
-
- Removed some cruft from the repository. (unused files from tobix' first
- search implementation)
-
-2001-06-13 03:53 jesse
-
- * Makefile:
-
- Bumped version to 1.3.100
-
-2001-06-13 03:52 jesse
-
- * bin/mason_handler.fcgi:
-
- The fastcgi handler works for everything except attachment viewing. I'm going to have to think a bit about how to set
- content type properly in a nice handler-agnostic manner.
-
-2001-06-13 03:51 jesse
-
- * bin/rt-mailgate:
-
- Fixed a warn -> warning in mailgate's logging
-
-2001-06-13 03:50 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Adjusting spacing
-
-2001-06-13 03:50 jesse
-
- * webrt/Ticket/Elements/Tabs:
-
-
- Added an error check to the new navigation bars to deal with a possible lack of active search
-
-2001-06-12 21:28 jesse
-
- * etc/config.pm:
-
- Clarified required permissions for the RT Logdir
-
-2001-06-12 19:12 jesse
-
- * etc/config.pm, lib/RT/Queue.pm, lib/RT/Transaction.pm:
-
- Cleaned up some docs in config.pm and Queue.pm
- Updated the Transaction Descriptions in transaction.pm to make sure
- that the Actor is listed.
-
-2001-06-12 18:08 jesse
-
- * webrt/Ticket/Elements/Tabs:
-
- Added links to navigate within an existing search.
-
-2001-06-08 23:57 jesse
-
- * webrt/Ticket/Elements/EditKeywordSelects:
-
- Made "(empty)" the same between "EditKeywordSelects" and "SearchByKeywordSelect"
-
-2001-06-08 23:51 jesse
-
- * lib/RT/Ticket.pm:
-
- Ability to set owner by name when creating tickets.
- Ability to set timeleft when creating tickets
-
-2001-06-08 23:00 jesse
-
- * Makefile, README, etc/schema.Pg, lib/RT/Ticket.pm:
-
- Added an index to etc/schema.Pg
- Ticket.pm->Create now passes through a few more values that were missing.
-
- Added doc on imports w/ postgres to the readme.
-
- bumped the version to 1.3.99
-
-2001-06-08 18:32 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Fix for merging more than one ticket.
- Fix for req2rt which imported transactions in reverse order.
-
-2001-06-07 16:02 jesse
-
- * Makefile, lib/RT/Queue.pm, tools/import-1.0-to-2.0:
-
- Catch a possibly undefined value in Queue::AddWatcher
- Bumped verion to 1.3.97
- another attempt at fixing the owner change generation code in import.
-
-2001-06-07 14:59 jesse
-
- * tools/import-1.0-to-2.0:
-
- The importer now imports the root user and the general queue.
-
-2001-06-07 12:44 jesse
-
- * Makefile, etc/config.pm, lib/RT/Interface/Web.pm:
-
- Support for a seperate local component root for local WebRT mods and additions.
-
-2001-06-06 17:25 jesse
-
- * README:
-
- Added instructions for migrating 1.0 instances to 2.0
-
-2001-06-06 16:15 jesse
-
- * Makefile:
-
- Bumped version to 1.3.95
-
-2001-06-06 16:15 jesse
-
- * tools/import-1.0-to-2.0:
-
- Importer should now import tickets created by the req importer
-
-2001-06-06 16:12 jesse
-
- * bin/initacls.Pg:
-
- initacls.Pg should now handle pg database on remote machine
-
-2001-06-06 16:05 jesse
-
- * webrt/Ticket/Elements/ShowRequestor:
-
- Don't show the 'About this Requestor' box if the user is privileged.
-
-2001-06-06 15:37 jesse
-
- * lib/RT/Date.pm:
-
- Now date comparisons against never dtrt.
-
-2001-06-06 15:30 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Search by content now works on the web
-
-2001-06-06 14:22 jesse
-
- * webrt/Admin/Groups/Members.html:
-
- Fix for #552: spurious warning when going into group membership editor
-
-2001-06-06 14:14 jesse
-
- * webrt/Ticket/Elements/EditKeywordSelects:
-
- keywordSelect selction fix (fsck #555)
-
-2001-06-06 10:57 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Removed spurious 'u' from line 1 of importer.
- bumped version to 1.3.95-test2
-
-2001-06-06 09:39 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Possible fix for jens' user import troubles.
- bounced version to 1.3.95-test1
-
-2001-06-06 02:12 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Importer wasn't properly grabbing ACLs. Bumped version to 1.3.94
-
-2001-06-06 01:33 jesse
-
- * tools/import-1.0-to-2.0:
-
- Fixed a bug in the 'Make users superusers' code in the importer
-
-2001-06-06 00:41 jesse
-
- * lib/RT/Ticket.pm:
-
- fixed a missing =cut (end of perldoc in ticket.pm
-
-2001-06-06 00:40 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- fixing a typo in importer's mime parser
-
-2001-06-06 00:19 jesse
-
- * Makefile, lib/Makefile.PL, lib/RT/Action/Notify.pm,
- lib/RT/Action/SendEmail.pm, tools/testdeps:
-
- Cleaned up some dependencies
- RT should no longer send mail when there are no recipients. thanks to the nice folks at Sensarray.com for some good debugging.
-
-2001-06-05 23:16 jesse
-
- * Makefile, bin/webmux.pl, tools/import-1.0-to-2.0:
-
- Fixed some bogus header parsing in import.
- web mux now tries to chown files again. (christian's going to test it again ;)
- Bumped to 1.3.91 for a release
-
-2001-06-05 11:34 jesse
-
- * webrt/Admin/Users/Modify.html:
-
- Rephrased the "Privileged" checkbox in AdminUsers.
-
-2001-06-05 11:18 jesse
-
- * Makefile, bin/webmux.pl, tools/import-1.0-to-2.0,
- webrt/NoAuth/Logout.html:
-
- webmux no longer tries to chown its data directories on startup
- import now handles final_priority
- Logout.html now refreshes to a login page
-
-2001-06-05 10:42 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- When we added support for 'priority' transactions, we accidentally broke
- support for 'subject' transactions. fixed now.
-
-2001-06-05 03:25 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Import tool now handles priority changes.
-
-2001-06-05 02:56 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Minor tweak to importer to try even harder to find users in the database before creating new ones.
-
-2001-06-05 02:32 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- importer is now less likely to try to greate nonexitent empty users.
-
- Makefile now chgrps web ui datafiles
-
-2001-06-05 00:06 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Removed out of date comments in the importer
- Made the importer grab its libraries from the makefile. (Turned off testing code)
-
-2001-06-05 00:01 jesse
-
- * Makefile:
-
- Bumped the version # to 1.3.84 for immediate release
-
-2001-06-04 23:50 jesse
-
- * Makefile, lib/RT/Ticket.pm, tools/import-1.0-to-2.0:
-
- Cleanups to Ticket->Import
- import-1.0-to-2.0 now deals with dates right.
-
-2001-06-04 20:52 jesse
-
- * lib/RT/Link.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- tools/import-1.0-to-2.0:
-
- Cleanup to Ticket, Link and User.
-
- merge now works on import.
-
- most everything in import other than ticket dates should work now.
-
-2001-06-04 01:34 jesse
-
- * tools/import-1.0-to-2.0:
-
- more cleanup
-
-2001-06-04 00:03 jesse
-
- * tools/import-1.0-to-2.0:
-
- First cut at importing queue adminccs and acls
-
-2001-06-03 22:16 jesse
-
- * tools/import-1.0-to-2.0:
-
- Cleanup and better progress indication
-
-2001-06-03 13:33 jesse
-
- * lib/RT/Record.pm, lib/RT/Ticket.pm, tools/import-1.0-to-2.0:
-
- More work on the importer. now it gets transaction creators right and catches requestor email addreses.
-
-2001-06-03 03:43 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm, tools/import-1.0-to-2.0:
-
- Transaction.pm now allows the caller to turn off scrips (for import)
- Ticket.pm now has a mostly working import method.
- import-1.0-to-2.0 seems to have some basic functionality. it's not _working_ yet, but it
- will do most of what we want it to.
-
-2001-06-02 20:36 jesse
-
- * webrt/Ticket/Display.html:
-
- Fix for Ticket #537 Crash when creating ticket without permission to view ticket
-
-2001-06-02 14:22 jesse
-
- * tools/import-1.0-to-2.0:
-
- added a couple of todos to the import tool
-
-2001-06-02 14:14 jesse
-
- * Makefile, tools/import-1.0-to-2.0:
-
- Work on the importer. it now runs. (note that it probably won't yet _import_ anything)
-
-2001-06-02 12:58 jesse
-
- * Makefile, bin/webmux.pl, lib/RT/Ticket.pm, lib/RT/Transaction.pm:
-
- Bumped the version to 1.3.84
-
- Once again chown mason data directory in webmux.pl, this time
- using more reliable, dynamic userids, rather than compiled in defaults.
-
- Added an 'import' method to Ticket, for the RT1 importer.
-
- Added a Subject method to transaction, to simplify the lives of template authors
-
-2001-06-01 23:38 jesse
-
- * tools/: import-1.0-to-2.0, insertdata:
-
- Cleaned up some names and descriptions in insertdata
-
- First checkin of outline of code of import tool. It's never been run.
- It's incomplete.
-
-2001-06-01 23:38 jesse
-
- * tools/import-1.0-to-2.0:
-
- file import-1.0-to-2.0 was initially added on branch rt-1-1.
-
-2001-05-31 23:27 jesse
-
- * lib/RT/Tickets.pm:
-
- Cleaned up Tickets->LimitQueue a bit
-
-2001-05-31 21:22 jesse
-
- * Makefile, tools/testdeps:
-
- Fixed testdeps to use new searchbuilder. bumped version to 1.3.83
-
-2001-05-31 21:14 jesse
-
- * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Elements/SelectKeyword:
-
- Logic fixes for keyword select negation
-
-2001-05-31 20:30 jesse
-
- * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Elements/SelectKeyword:
-
- Added support for "Tickets without keyword 'foo'.
-
-2001-05-31 17:32 jesse
-
- * bin/webmux.pl, lib/RT/Interface/Web.pm,
- webrt/Ticket/Attachment/dhandler:
-
- Fix for #522: attachments without names got short shrift.
- webRT now dies rather than run when users can't log in due to a permissions
- bug.
-
-2001-05-31 02:57 jesse
-
- * etc/: schema.Pg, schema.mysql:
-
- Cleaned up the table indices a bit. for mysql, yanked duplicate indices.
- for Pg, added an index (we need to regen the schema for pg soon)
-
-2001-05-31 02:46 jesse
-
- * Makefile, lib/RT/Interface/Web.pm, webrt/Ticket/ModifyAll.html,
- webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/AddWatchers,
- webrt/Ticket/Elements/EditPeople:
-
- You can now add watchers by email address
- Bumped version to 1.3.82
-
-2001-05-29 15:58 jesse
-
- * webrt/Ticket/Attachment/dhandler:
-
- Fixed the attachments display bug.
-
-2001-05-29 15:48 jesse
-
- * lib/RT/Ticket.pm:
-
- Fix for #513 - status update without permissions returns no error message
-
-2001-05-29 00:38 jesse
-
- * Makefile:
-
- Bumped version to 1.3.81
-
-2001-05-28 20:39 jesse
-
- * bin/webmux.pl:
-
- Removed a bogus line from webmux
-
-2001-05-28 20:29 jesse
-
- * lib/RT/: Ticket.pm, Interface/Web.pm:
-
- Work to solve 325: updating detritus in update listing
-
-2001-05-28 17:35 jesse
-
- * bin/rt, etc/schema.mysql, etc/schema.pm, lib/RT/Ticket.pm,
- lib/RT/Interface/CLI.pm, webrt/Ticket/Attachment/dhandler:
-
- Work on the CLI to resolve #482. Can't add content when creating tix with the CLI
- Do a bunch of better error checking on ticket creation.
-
- Generalized the ticket status checking code.
-
- Added another index on Attachments for increased speed.
-
-2001-05-28 15:49 jesse
-
- * lib/RT/Ticket.pm:
-
- Removed code which auto-opened tickets that were new. It should
- be a scrip and it's too late in teh release cycle to do this right now.
-
-2001-05-28 15:24 jesse
-
- * webrt/SelfService/: Details.html, Elements/MyRequests:
-
- Fixed #506. Non-priv user can't see tickets
-
-2001-05-23 23:53 jesse
-
- * webrt/SelfService/Elements/MyRequests:
-
- Fixed MyRequest so it shows your tickets.
-
-2001-05-23 23:18 jesse
-
- * Makefile:
-
- Bumped the version to 1.3.80
-
-2001-05-23 23:01 jesse
-
- * bin/webmux.pl, docs/manual.pod, webrt/Elements/MyRequests,
- webrt/Elements/MyTickets, webrt/NoAuth/Logout.html,
- webrt/Ticket/ModifyAll.html:
-
- Fixed logout bug from 1.3.79 http://fsck.com/rt2/Ticket/Display.html?id=500
- Fixed bug in jumbo from 1.3.79 http://fsck.com/rt2/Ticket/Display.html?id=496
- Added a bit of docs about templates to the manual
-
- Cleaned up the ui for MyRequests and MyTickets a bit.
-
-2001-05-23 12:34 jesse
-
- * webrt/SelfService/: Prefs.html, index.html:
-
- Little bit of cleanup to SelfService. added prefs.
-
-2001-05-23 12:34 jesse
-
- * webrt/SelfService/Prefs.html:
-
- file Prefs.html was initially added on branch rt-1-1.
-
-2001-05-23 12:07 jesse
-
- * Makefile:
-
- Bumped version to 1.3.79.
-
-2001-05-23 12:06 jesse
-
- * README, tools/testdeps:
-
- Added dependecy on DBIx::SearchBuilder 0.34
-
-2001-05-23 11:43 jesse
-
- * bin/: rt-mailgate, webmux.pl:
-
- Made sure that the webui always writes sessions to disk
- Fixed a typo in the mail gateway.
-
-2001-05-23 00:09 jesse
-
- * Makefile, bin/rt-mailgate:
-
- Added a bit of code to rt-mailgate to deal with not properly loading users on
- ticket creation.
-
-2001-05-22 23:01 jesse
-
- * lib/RT/Ticket.pm:
-
- Within Ticket->Create, always get a Queue object as SystemUser for like, defaults and stuff.
-
-2001-05-21 18:12 jesse
-
- * etc/config.pm:
-
- Added comments from Feargal about how to configure RT for http urls.
-
-2001-05-21 16:37 jesse
-
- * Makefile:
-
- bumped version to 1.3.78
-
-2001-05-21 16:36 jesse
-
- * lib/RT/Ticket.pm, webrt/Ticket/Display.html:
-
- Tickets now open when they're new and get acted on.
-
-2001-05-21 16:09 jesse
-
- * lib/RT/Action/: Autoreply.pm, SendEmail.pm:
-
- Fix for Ticket #481 $CorrespondAddress= variable in config.pm doesn't work
-
-2001-05-21 15:54 jesse
-
- * webrt/Elements/MessageBox:
-
- Added a space at teh end of the line, per the standard convention for signature
- dashes.
-
-2001-05-21 15:54 jesse
-
- * webrt/Elements/MessageBox:
-
- If the user doesn't have a signature, don't include signature dashes
-
-2001-05-21 15:17 jesse
-
- * lib/RT/Tickets.pm, webrt/Ticket/ModifyAll.html:
-
- Dead tickets aren't searchable via the ui anymore.
- ModifyAll is a bit smarter about what to let people do.
-
-2001-05-21 14:02 jesse
-
- * lib/RT/Keyword.pm, webrt/Admin/Keywords/index.html:
-
- Editing keywords without permission now actually tells you so.
-
-2001-05-21 13:32 jesse
-
- * webrt/Admin/: Global/Scrips.html, Queues/Scrips.html:
-
- Users without permission to delete scrips now get a proper permission denied.
-
-2001-05-21 13:20 jesse
-
- * webrt/Ticket/: Update.html, Elements/Tabs:
-
- The ticket update form is now a little smarter about only letting people perform
- updates that they have the right to perform.
-
-2001-05-17 23:09 jesse
-
- * Makefile:
-
- Chmod the makefile in the make dist procedure.
-
-2001-05-17 23:05 jesse
-
- * README:
-
- Cleaned up some instructions. Thanks Feargal.
-
-2001-05-17 22:50 jesse
-
- * Makefile, lib/RT/Transaction.pm, lib/RT/Action/SendEmail.pm,
- tools/insertdata:
-
- Fixed scrip actions to activate when there's a missing scripcontent.
-
- Added a Content method to Transaction.pm
- Fixed Tempates to use new Content method.
-
-2001-05-17 16:19 jesse
-
- * lib/RT/Transaction.pm, lib/RT/Action/SendEmail.pm,
- webrt/Ticket/Display.html, webrt/Ticket/Update.html:
-
- Better debugging info for some scrips.
-
- Fixed bugs which prevented status and owner to change on correspondence
- and comment.
-
-2001-05-17 12:36 jesse
-
- * Makefile, README:
-
- Bumped the version. Added Mark Vevers to the thansk in the readme.
-
-2001-05-17 12:34 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Removed some obsolete code. fixed a bug in Comment recording from Mark Vevers
-
-2001-05-16 18:51 jesse
-
- * Makefile, tools/testdeps:
-
- Fixed testdeps to not install bogus new DBD::mysql rev.
- Bumped rev to 1.3.75
-
-2001-05-16 17:30 jesse
-
- * Makefile:
-
- bumped to 1.3.74
-
-2001-05-16 17:30 jesse
-
- * webrt/Admin/Groups/Modify.html:
-
- Fixed a small bug in Groups editing
-
-2001-05-16 17:21 jesse
-
- * tools/testdeps:
-
- Bumped version to 1.3.73.
- Bumped dependency on searchbuilder to 0.33
-
-2001-05-16 17:15 jesse
-
- * webrt/: Elements/TitleBoxStart, Ticket/Update.html,
- Ticket/Elements/Tabs:
-
- The quick link for 'Resolve' now requests that the user enter a ticket update
-
-2001-05-16 15:45 jesse
-
- * README, lib/RT/Interface/Web.pm, tools/testdeps,
- webrt/Ticket/Display.html:
-
- Added some documentation about what to do if the install fails.
-
- Specified a minimum working version of DBD::mysql.
-
- Fixed support for entering updates via the webui.
-
-2001-05-15 00:55 jesse
-
- * lib/RT/Action/Autoreply.pm:
-
- Fixed a typo that broke autoreplies
-
-2001-05-15 00:37 jesse
-
- * tools/testdeps:
-
- added Errno dependency
-
-2001-05-14 23:44 jesse
-
- * etc/config.pm, tools/insertdata, webrt/Admin/Queues/People.html:
-
- Cleaned up a bit of phrasing. cleaned up some extra /s in urls.
-
-2001-05-14 22:49 jesse
-
- * Makefile, bin/mason_handler.fcgi, bin/mason_handler.scgi, bin/rt,
- bin/webmux.pl, lib/Makefile.PL, lib/RT/Date.pm,
- lib/RT/Interface/Web.pm, tools/testdeps:
-
- Switched from Date::Manip To Graham Barr's Date::Parse
-
-2001-05-14 18:58 jesse
-
- * lib/RT/Scrips.pm, lib/RT/Ticket.pm, lib/RT/Interface/Web.pm,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/Tabs:
-
- Work on the web frontend. the "quick" links have been cleaned up and decomplexified.
-
-2001-05-14 17:11 jesse
-
- * lib/RT/User.pm, lib/RT/Interface/Web.pm,
- webrt/Admin/Groups/Modify.html, webrt/Admin/Users/Modify.html:
-
- Cleaned up bugs related to spurious extra display of information in user and group modification and ACL deletion
- when the user didn't have the right to do so.
-
-2001-05-13 23:05 jesse
-
- * webrt/Admin/Users/index.html:
-
- no longer provide a link to create a new user to someone who doesn't have rights to do so.
-
-2001-05-13 22:49 jesse
-
- * lib/RT/Ticket.pm, tools/insertdata, webrt/Ticket/Modify.html:
-
- yanked bogus Ticket Queue caching
- rephrased ticket creation autoreply
-
-2001-05-13 22:15 jesse
-
- * webrt/User/Prefs.html:
-
- Added a hack to make sure that session gets written to disk
-
-2001-05-13 22:11 jesse
-
- * webrt/User/Prefs.html:
-
- more work on letting users edit their own passwords
-
-2001-05-13 21:40 jesse
-
- * webrt/Ticket/: Attachment/dhandler, Elements/ShowTransaction:
-
- Fix for #433. now attachements are displayable after merges.
-
-2001-05-12 17:46 jesse
-
- * Makefile, lib/Makefile.PL, tools/testdeps, webrt/User/Prefs.html:
-
- Started work on user prefs. password changing is untested
-
- Fixed dependency on SB to .31 and bumped version
-
-2001-05-11 12:32 jesse
-
- * lib/RT/Record.pm:
-
- turned on use of DBIx::SearchBuilder::Record::Cachable
-
-2001-05-11 12:30 jesse
-
- * lib/RT/User.pm, webrt/Elements/Quicksearch:
-
- Redid how the ACL checking works for great perf gains.
- Added stalled lists to quicksearch.
-
-2001-05-09 20:11 jesse
-
- * Makefile:
-
- Bumping the version # so people working off cvs get less confused.
-
-2001-05-09 20:11 jesse
-
- * bin/rt-mailgate, lib/RT/Queue.pm, lib/RT/Action/Autoreply.pm,
- lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm,
- lib/RT/Action/SendEmail.pm:
-
- Cleanup in the mail sending stuff.
- fix for ticket 403: RT should no longer send mail when it has
- no recipients
-
- fix for #404: Squelch-Replies-To should be a bit more intelligent,
- since it was rewritten from scratch
-
- RT should now properly send mail to queue ccs and queue admin ccs
- when you ask it to
-
- internally, RT's mail sending stuff now lets you pass around
- arrays of addresses to send mail to, rather than comma delimited
- strings. More flexible down the line.
-
-2001-05-09 16:39 jesse
-
- * README:
-
- Updated the readme to note the dependency on setuid perl
-
-2001-05-09 16:08 jesse
-
- * webrt/Ticket/Elements/ShowLinks:
-
- fix for RT/fsck.com: Ticket #440 [rt-devel] 'Depended on by' doesn't work
-
-2001-05-08 20:48 jesse
-
- * etc/schema.mysql, etc/schema.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, webrt/Admin/Elements/UserTabs,
- webrt/Admin/Queues/People.html, webrt/Elements/MyRequests,
- webrt/Elements/MyTickets, webrt/Elements/Tabs,
- webrt/Ticket/Elements/ShowBasics,
- webrt/Ticket/Elements/ShowRequestor:
-
- Schema.pm now has a few more indices. the mysql schema has been regenerated, but not
- the Pg or oracle schemas.
-
- in Ticket.pm, a message got the queue id replaced with the queue name
-
- removed a spurious variable localization in Transaction.pm
-
- Removed a pointer to a nonexistent page on admin/user/modify
-
- Modifying queue watchers now has a more coherent title
-
- "This user's tickets, My requests and My tickets are now limited to the 25 highest priority items
- attached to you.
-
- The "Administration" tab has been changed to the "Configuration" tab
-
-2001-04-04 16:55 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Fixing a comment in the web interface. no functional changes.
-
-2001-04-04 16:52 jesse
-
- * Makefile:
-
-
- Bumping the version to 1.3.70 for release
-
-2001-04-04 16:51 jesse
-
- * lib/RT/User.pm:
-
- lib/RT/User no longer treats "ModifySelf" as equivalent to "AdminUsers" for the current user.
-
-2001-04-04 15:08 jesse
-
- * lib/RT/KeywordSelect.pm, lib/RT/Action/Autoreply.pm,
- webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html:
-
- Fixed a crashing bug and an ACL violation on keywordselect deletion
-
-2001-04-04 00:19 jesse
-
- * Makefile:
-
- bumping version for release
-
-2001-04-03 21:14 jesse
-
- * Makefile:
-
- Bumped the version
-
-2001-04-03 21:08 jesse
-
- * etc/config.pm, lib/RT/Action/Notify.pm:
-
- Added configuration tweak to not set a :; To header if the user doesn't want it.
-
-2001-04-03 17:32 jesse
-
- * lib/RT/Action/Notify.pm:
-
- Fix for sendmail null list syntax. : ; is not the same as :; to sendmail
-
-2001-04-03 17:05 jesse
-
- * webrt/Admin/Queues/: GroupRights.html, UserRights.html:
-
- removed a couple of stray 's in the html
-
-2001-04-03 16:50 jesse
-
- * webrt/Elements/Header:
-
- Dropped doctype back to 4.0 because 4.01 makes mozilla render things funny
-
-2001-04-03 16:47 jesse
-
- * webrt/Elements/Quicksearch:
-
- <TABLE>
- should have been </TABLE>
-
-2001-04-03 16:30 jesse
-
- * webrt/Elements/Quicksearch:
-
- Added a feature request/patch from nick@netability.ie
- http://fsck.com/rt2/Ticket/Display.html?id=345
-
-2001-04-03 16:01 jesse
-
- * tools/testdeps:
-
- Adding in testing for params::validate 0.02
-
-2001-04-03 15:46 jesse
-
- * Makefile:
-
- Bumped the version slightly for a prerelease
-
-2001-04-03 15:40 jesse
-
- * lib/RT/Action/Autoreply.pm, lib/RT/Action/SendEmail.pm,
- tools/insertdata:
-
- Fixed autoreply by adding a new scrip. some misc. cleanup in SendEmail (method calls were on the wrong object)
-
-2001-04-03 15:40 jesse
-
- * lib/RT/Action/Autoreply.pm:
-
- file Autoreply.pm was initially added on branch rt-1-1.
-
-2001-04-03 15:15 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- Fixed a bug in the 'blacklist' regexp
-
-2001-04-03 15:04 jesse
-
- * etc/config.pm, lib/RT/Action/SendEmail.pm,
- lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowRequestor:
-
- Two seperate fixes for the "RT doesn't send mail" problem. One that helps fix Mail::Internet->send
- and one that provides an alternative.
-
- A fix for a bad link in ShowRequestor.
-
- Updating fields via the web ui should now be a bit more descriptive
-
-2001-04-03 02:31 jesse
-
- * webrt/Ticket/ModifyPeople.html:
-
- Missed one of the mason fixes
-
-2001-04-03 02:31 jesse
-
- * Makefile, bin/rt-mailgate, etc/config.pm, lib/RT/Date.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm,
- lib/RT/Interface/Web.pm, webrt/Admin/Global/GroupRights.html,
- webrt/Admin/Global/Keywords.html, webrt/Admin/Global/Scrips.html,
- webrt/Admin/Global/UserRights.html,
- webrt/Admin/Keywords/index.html,
- webrt/Admin/Queues/GroupRights.html,
- webrt/Admin/Queues/Keywords.html, webrt/Admin/Queues/People.html,
- webrt/Admin/Queues/Scrips.html, webrt/Admin/Queues/UserRights.html,
- webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html,
- webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyPeople.html:
-
- Added support for parsing Cc and To in the mail gateway
- (resolves the last work item for beta 2 - #219)
-
- Ticket due date is no longer set to "right now" if the queue has an
- undefined "default due in"
-
- Cleanup warnings in date, ticket and watcher
-
- fixes for a bunch of mason 1.01 related bugs (Mason changed handling of combined GET and POST, thus breaking RT)
-
-2001-04-02 23:15 jesse
-
- * README, bin/webmux.pl:
-
- Cleanup for mason 1.01.
- Moved Apache::DBI out of the webmux into the instructions
-
-2001-04-02 17:56 jesse
-
- * tools/initdb:
-
- Typo fix from "Nick Hilliard" <nick@netability.ie>
-
-2001-04-02 15:32 jesse
-
- * Makefile, lib/RT/Keyword.pm, webrt/NoAuth/Logout.html:
-
- Makefile cleanup.
- Fix for #342 - reported by ivan
-
- Fix for a bug that clobbered logouts.
-
-2001-04-02 03:09 jesse
-
- * Makefile:
-
- Bumped version for release
-
-2001-04-01 19:19 jesse
-
- * bin/rtadmin, lib/RT/ACE.pm, lib/RT/Interface/Web.pm,
- webrt/Admin/Elements/SelectRights,
- webrt/Admin/Global/GroupRights.html,
- webrt/Admin/Global/UserRights.html,
- webrt/Admin/Queues/GroupRights.html,
- webrt/Admin/Queues/UserRights.html:
-
- Redid the ACL editor so that it's much much faster. and easier to use...if not quite as pretty.
-
-2001-04-01 17:31 jesse
-
- * webrt/Ticket/Elements/: ShowDates, ShowRequestor:
-
- fixing a couple of html typos
-
-2001-03-31 03:07 jesse
-
- * Makefile:
-
- fixing Changelog generation
-
-2001-03-31 02:52 jesse
-
- * Makefile:
-
- Bumped the version.
-
-2001-03-31 02:52 jesse
-
- * webrt/User/Prefs.html:
-
- Cleaned up user preferences somewhat. removed things that don't do anything.
-
- -j
-
-2001-03-31 01:59 jesse
-
- * bin/rt:
-
- Fix for #88 RT now lets you use the CLI to search for tickets, based on links to other tickets
-
-2001-03-31 01:20 jesse
-
- * README:
-
- Fix for #216: Web session files need better handling and cleanup
-
-2001-03-31 00:49 jesse
-
- * Makefile, README, bin/rtadmin, bin/webmux.pl, etc/config.pm:
-
- Moved RT Session data out of /tmp to somewhere that makes more sense.
- This is the first half of the fix for #216. Now we just need to document the cronjob reaper to kill old sessions
-
- Cleaned up creation of queues and users in bin/rtadmin
-
- Updates to the README
-
-2001-03-30 23:44 jesse
-
- * lib/RT/Ticket.pm:
-
- Fix for http://fsck.com/rt2/Ticket/Display.html?id=324
- mail from requestors does not reopen ticket
-
-2001-03-30 23:19 jesse
-
- * bin/rtadmin, lib/RT/Queue.pm, lib/RT/Watcher.pm:
-
- Work on Watchers and editing watchers from the CLI tool. added support for --list-{queues|users|groups}
-
-2001-03-30 19:31 jesse
-
- * bin/rt, lib/RT/ACE.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm,
- lib/RT/Tickets.pm, lib/RT/Watcher.pm, lib/RT/Action/SendEmail.pm,
- lib/RT/Interface/Web.pm:
-
- A bunch of reworking of access control for watchers. should be much more robust
- and more flexible.
-
- Resolves http://fsck.com/rt2/Ticket/Display.html?id=253 by adding the "Watch" and "WatchAsAdminCc" rights.
-
-2001-03-30 15:41 jesse
-
- * lib/RT/: Action/Notify.pm, Interface/Web.pm:
-
- Tiny cleanup in Interface/Web.pm. no functional difference there just being more explicit.
-
- Fix for #292: Sender of a message is no longer notified of that message.
-
-2001-03-30 02:55 jesse
-
- * Makefile:
-
- Bumped the version
-
-2001-03-30 02:37 jesse
-
- * webrt/Elements/SelectDate:
-
- Fixed an as-yet-untickled bug in SelectDate that incremented things too much
-
-2001-03-30 02:32 jesse
-
- * lib/RT/Template.pm, webrt/Admin/Global/Scrips.html:
-
- Fixes to template creation. stupid typo.
- Global scrips creation should now work better
-
-2001-03-30 02:12 jesse
-
- * webrt/: Admin/Elements/GroupTabs, Admin/Groups/Members.html,
- Admin/Groups/Modify.html, Admin/Users/Modify.html,
- Elements/ListActions:
-
- Fix for PseudoGroups having a prompt to add members.
- some cleanups to not make the "Results" box pop up when it's not wanted.
-
-2001-03-30 01:41 jesse
-
- * lib/RT/Ticket.pm:
-
- Attached is a patch to implement the ShowTicketComments in the
- display of transactions of a ticket.
-
- Arthur de Jong <arthur@West.NL>
-
-2001-03-30 01:34 jesse
-
- * lib/RT/Scrip.pm, webrt/Admin/Global/Scrips.html,
- webrt/Admin/Queues/Scrips.html:
-
- Fix for 328: Re: [rt-users] 1.3.64 & postgres & scrips
- there was an ACL bug.
-
-2001-03-28 22:15 jesse
-
- * Makefile, webrt/autohandler:
-
- Fixed a tiny bug in the new authandler that caused logout to fail
-
-2001-03-27 22:30 jesse
-
- * webrt/index.html:
-
- fixed index.html
-
-2001-03-27 22:26 jesse
-
- * Makefile, webrt/Admin/Groups/Members.html,
- webrt/Ticket/Update.html:
-
- Added a couple of fixes from Arthur at west.nl
- Groups/Members deals better with multiple selections
- Ticket/Update now displays queue watchers.
- bumped the version to 1.3.63
-
-2001-03-27 04:25 jesse
-
- * docs/manual.pod, webrt/autohandler, webrt/index.html,
- webrt/Admin/Users/index.html, webrt/Elements/ShadedBox,
- webrt/Search/Listing.html:
-
- Lots of cleanup of the auothandler.
- a tiny bit of doc about an alternative apache configuration.
- some web ui cleanup so that when you are on a page, your location is more properly hilighted.
- admin/users includes some more verbiage explaining what's going on.
-
-2001-03-25 00:44 jesse
-
- * Makefile, lib/RT/Interface/Web.pm:
-
- Bumped the version.
- cosmetic fix in Interface/Web.pm
-
-2001-03-23 20:33 jesse
-
- * lib/RT/: Action/SendEmail.pm, Interface/Web.pm:
-
- Fixed for TEXTAREA newline bug and Correspondence subject bug.
-
-2001-03-23 00:34 jesse
-
- * lib/RT/Action/Notify.pm:
-
- : goes outside the '' in undisclosed recipients
-
-2001-03-23 00:30 jesse
-
- * lib/RT/: ACL.pm, ObjectKeywords.pm:
-
- Removed some very loud uneccesary debugging statements
-
-2001-03-23 00:27 jesse
-
- * Makefile, lib/RT/Action/Notify.pm, lib/RT/Action/SendEmail.pm:
-
- Work on mail sending routines to be more careful about newlines in subjects.
- And about Undisclosed recipients
-
-2001-03-22 23:17 jesse
-
- * lib/RT/Action/Notify.pm:
-
- yet another typo in notify.pm
-
-2001-03-22 23:12 jesse
-
- * lib/RT/Action/Notify.pm:
-
- typo fix
-
-2001-03-22 23:09 jesse
-
- * lib/RT/Action/: Notify.pm, SendEmail.pm:
-
- Cleanups and fixes to Notify and SendEmail
-
-2001-03-22 19:46 jesse
-
- * webrt/Ticket/ModifyAll.html:
-
- TicketObj->Ticket
-
-2001-03-22 19:42 jesse
-
- * lib/RT/Action/Notify.pm:
-
- A more functional Undisclosed Recipients;
-
-2001-03-22 19:28 jesse
-
- * webrt/Ticket/: ModifyAll.html, Elements/Tabs:
-
- Elements/Tabs now does better access control checking before making
- buttons available to people.
-
- ModifyAll.html has a better title and should now update objectkeywords.
-
-2001-03-22 18:18 jesse
-
- * lib/RT/: Date.pm, Ticket.pm:
-
- Added a routine to Date.pm to advance the date N days
-
- Started using queue defaults on Ticket->Create
-
-2001-03-22 18:17 jesse
-
- * webrt/: autohandler, Elements/Login, NoAuth/Login.html,
- Search/autohandler, Ticket/autohandler:
-
- Cleanup of the login process. now you can't accidentally call "Login.html"
- when you're already logged in.
- removed a couple of bogus old autohandlers
-
-2001-03-22 18:17 jesse
-
- * webrt/Elements/Login:
-
- file Login was initially added on branch rt-1-1.
-
-2001-03-22 14:45 jesse
-
- * webrt/Ticket/Elements/EditPeople:
-
- EditPeople should now enforce a list of possible owners reasonably
-
-2001-03-21 21:40 jesse
-
- * Makefile:
-
- bumped the version to .60
-
-2001-03-21 21:22 jesse
-
- * docs/manual.pod:
-
- Adding some content to the manual. and even more places where the manual is
- missing content. :/
-
-2001-03-21 12:21 jesse
-
- * lib/RT/Action/NotifyAsComment.pm:
-
- NotifyAsComment should now DTRT and send mail from the comments email address
-
-2001-03-21 02:46 jesse
-
- * Makefile:
-
- yanked some cruft from the ChangeLog creator
-
-2001-03-21 02:44 jesse
-
- * Makefile, README:
-
- Bumped the version. added some people to the readme
-
-2001-03-21 02:39 jesse
-
- * webrt/Ticket/Elements/ShowBasics:
-
- Fix for 242: time left displayed via the web ui is now more intuitive
-
-2001-03-21 02:37 jesse
-
- * bin/rt, bin/rt-mailgate, lib/RT.pm, lib/RT/Attachment.pm,
- lib/RT/Date.pm, lib/RT/Tickets.pm, lib/RT/User.pm:
-
- Added more error checking and error handling to the mail gateway
- finished code in Attachment.pm to handle too-long attachments
-
- added support for limiting by date to the CLI
-
- fixed little bugs in user, date and tickets.
-
-2001-03-20 19:02 jesse
-
- * docs/manual.pod:
-
- file manual.pod was initially added on branch rt-1-1.
-
-2001-03-20 19:02 jesse
-
- * docs/manual.pod:
-
- actually adding the outline of the manual
-
-2001-03-20 19:01 jesse
-
- * Makefile, bin/rt, docs/API, docs/README.docs, docs/Security,
- docs/keywords, etc/config.pm:
-
- Starting the doc cleanup
-
-2001-03-20 15:26 jesse
-
- * webrt/Elements/SelectTicketSortBy:
-
- LastUpdated, not LastUpdate
-
-2001-03-20 15:21 jesse
-
- * webrt/Elements/: SelectDate, SelectTicketSortBy:
-
- more things to sort by.
- select date shouldn't insert spurious null dates.
-
-2001-03-20 13:27 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- fixed a typo. $defined is not useful perl ;)
-
-2001-03-20 13:21 jesse
-
- * lib/RT/Action/: Notify.pm, SendEmail.pm:
-
- Fixed a couple bugs in Notify and SendEmail that should get mail flowing
- for transactions without content.
-
-2001-03-20 13:08 jesse
-
- * webrt/Ticket/: Attachment/dhandler, Elements/ShowTransaction:
-
- Making web based attachment display deal nicely with too-long message bodies
-
-2001-03-20 04:26 jesse
-
- * Makefile:
-
- bumping the version
-
-2001-03-20 04:20 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- regexps with three /s need a leading s ;)
-
-2001-03-20 04:16 jesse
-
- * bin/rt-mailgate, lib/RT/Template.pm:
-
- fixing scrips-related mailing stuff. some transaction mailing used to bomb out.
-
-2001-03-20 02:46 jesse
-
- * Makefile, bin/rt-mailgate, etc/config.pm,
- lib/RT/Action/SendEmail.pm, tools/insertdata:
-
- Work on robustification of the mail gateway. including single-transaction
- blacklisting of addresses that might generate bounces.
-
-2001-03-20 00:41 jesse
-
- * lib/RT/User.pm:
-
- Work on user.pm to allow users to be disabled.
-
-2001-03-19 18:03 jesse
-
- * webrt/: autohandler, Elements/MyRequests, NoAuth/Login.html,
- NoAuth/Reminder.html:
-
- fixed the MyRequests bug that caused them not to be listed.
- nonexistent users no longer get shunted to SelfService.
-
-2001-03-19 15:30 jesse
-
- * Makefile, bin/mason_handler.fcgi, bin/mason_handler.scgi, bin/rt,
- bin/rt-mailgate, bin/rtadmin, webrt/Admin/Elements/ModifyTemplate,
- webrt/Admin/Elements/ModifyUser, webrt/Admin/Global/Template.html,
- webrt/Admin/Queues/Template.html, webrt/Admin/Users/Modify.html,
- webrt/Elements/MessageBox:
-
- Fixes for perl path and textarea bugs noted by Arthur de Jong
-
-2001-03-18 14:58 jesse
-
- * lib/RT/Attachment.pm:
-
- Removed an extra signature attachment
-
-2001-03-17 14:57 jesse
-
- * Makefile:
-
- bumped version
-
-2001-03-17 14:55 jesse
-
- * lib/Makefile.PL, lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Elements/Quicksearch, webrt/Elements/SelectDate,
- webrt/Elements/SelectDateType, webrt/Elements/TitleBoxEnd,
- webrt/Search/PickRestriction:
-
- Fixed a bug on simple actions reported by christian.
- Implemented search by date via web ui
-
-2001-03-16 03:55 jesse
-
- * Makefile, lib/RT/Interface/Web.pm, webrt/Elements/Header:
-
- Fixed a tiny typo that prevented objectkeyword editing
-
-2001-03-16 02:29 jesse
-
- * Makefile:
-
- Bumped the version.
-
-2001-03-16 02:27 jesse
-
- * Makefile, README, bin/initacls.Oracle, bin/initacls.Pg,
- bin/initacls.mysql, bin/initdb.Oracle, tools/initdb:
-
- some clarifications to the install procedure.
-
-2001-03-16 02:10 jesse
-
- * lib/RT/Tickets.pm, webrt/Search/Listing.html:
-
- Fixed #2 WebRT doesn't refresh searches properly. the oldest bug in the bug tracking
- system ;)
-
- Fixed Tickets->Count
-
-2001-03-16 01:39 jesse
-
- * webrt/Admin/: Global/Template.html, Global/Templates.html,
- Queues/Modify.html, Queues/Template.html, Queues/Templates.html:
-
- now you can create templates with the web ui.
-
-2001-03-16 00:39 jesse
-
- * webrt/Ticket/Elements/EditLinks:
-
- file EditLinks was initially added on branch rt-1-1.
-
-2001-03-16 00:39 jesse
-
- * webrt/Ticket/ModifyAll.html:
-
- file ModifyAll.html was initially added on branch rt-1-1.
-
-2001-03-16 00:39 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, webrt/Elements/Tabs,
- webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html,
- webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyLinks.html,
- webrt/Ticket/ModifyPeople.html, webrt/Ticket/ValidateUpdate.html,
- webrt/Ticket/Elements/EditKeywordSelects,
- webrt/Ticket/Elements/EditLinks, webrt/Ticket/Elements/EditPeople,
- webrt/Ticket/Elements/Tabs:
-
- A bunch of Ticket modification refactoring and cleanup.
- Added a "ModifyAll" at sam hartman's suggestion
-
-2001-03-14 21:20 jesse
-
- * bin/rt:
-
- --id=43-45 should now work. there was a regex typo
-
-2001-03-14 04:37 jesse
-
- * Makefile, bin/initacls.Oracle, etc/acl.Oracle, etc/acl.mysql,
- etc/schema.Oracle, etc/user.Oracle, tools/initdb, tools/testdeps:
-
- reworked init procedures, oracle schema and
- acl setup for mysql and postgres and oracle.
-
- RT2 now runs on oracle.
-
-2001-03-14 02:08 jesse
-
- * etc/acl.Oracle, etc/schema.Oracle, tools/initdb:
-
- hacking to make oracle work. we're much of the way there. next up:
- schema updates
-
-2001-03-14 02:08 jesse
-
- * etc/acl.Oracle:
-
- file acl.Oracle was initially added on branch rt-1-1.
-
-2001-03-14 01:03 jesse
-
- * webrt/Admin/Queues/GroupRights.html:
-
- file GroupRights.html was initially added on branch rt-1-1.
-
-2001-03-14 01:03 jesse
-
- * webrt/Admin/Queues/UserRights.html:
-
- file UserRights.html was initially added on branch rt-1-1.
-
-2001-03-14 01:03 jesse
-
- * Makefile, lib/RT/ACE.pm, lib/RT/Interface/Web.pm, tools/initdb,
- webrt/Admin/Elements/QueueTabs,
- webrt/Admin/Global/GroupRights.html, webrt/Admin/Queues/ACL.html,
- webrt/Admin/Queues/GroupRights.html,
- webrt/Admin/Queues/UserRights.html, webrt/Elements/Tabs,
- webrt/NoAuth/webrt.css:
-
- Cleanup to the ACL editors (consistency)
- a bit of web ui tuning.
-
- fixes for initdb issues (thanks, jhutz)
-
- minor cleanups to ACE.pm
-
-2001-03-13 22:44 jesse
-
- * lib/RT/Transaction.pm, lib/RT/Transactions.pm, tools/testdeps:
-
- Updated DBIx::SearchBuilder dependency
-
- code cleanup and sketching in Transaction.pm and Transactions.pm
-
-2001-03-12 21:14 jesse
-
- * Makefile, etc/schema.Pg, etc/schema.mysql, tools/initdb,
- tools/testdeps:
-
- initdb now caches schema, eliminating the install-time dependency on DBIx::DBSchema.
-
- this is 1.3.50, folks. it has what I believe to be functional postgres support
-
-2001-03-11 21:58 jesse
-
- * etc/config.pm, etc/schema.pm, lib/RT/Attachment.pm,
- lib/RT/Ticket.pm, tools/initdb:
-
- Cleanup in Ticket.pm
- Bugfixes to Attachment.pm (for postgres mimencoding supporT)
-
- reconfigured to use the new DBIx::DBSchema (which isn't out yet. but should
- be soon)
-
- still need to do a bit more work on attachments configuration.
-
-2001-03-11 02:45 jesse
-
- * bin/rt-mailgate:
-
- file rt-mailgate was initially added on branch rt-1-1.
-
-2001-03-11 02:45 jesse
-
- * Makefile, README, bin/rt-mailgate, bin/rtmux.pl, bin/webmux.pl,
- etc/config.pm, etc/schema.Oracle, etc/schema.pm, lib/RT.pm,
- lib/RT/Attachment.pm, lib/RT/ScripAction.pm, lib/RT/Ticket.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Interface/CLI.pm,
- lib/RT/Interface/Email.pm, tools/insertdata:
-
- This is a bit more of a 'comprehensive' diff than I'd intended. That's what
- I get for working for 1/2 a week at my parents place without real net ;)
-
- Cleanups in the makefile and readme to make installation simpler and more
- sensical.
-
- removed outdated rtmux.pl
- moved old Interface/Email.pm to bin/rt-mailgate
- started new baseclass for new mail gateways (Interface/Email.pm)
-
- first cut implementation of attachment size limits.
-
- switched mysql to use 'longblob' rather than just 'blob', so
- that users can submit > 64k attachments. with the next release
- of DBIx::DBSchema, we should have what we need to get
- PG attachmetns of more reasonable sizes working.
-
- first cut implementation of base64 encoding for MIME objects
- on databases that don't support BLOBs (postgres)
-
- restructured initdb so we'll be able to support databases
- for which we need to hand-hack schema.
-
- added the 'Owner' pseudogroup to insertdata
-
- fixed the bug in logging for the mail gateway that caused
- lots of warnings about joins.
-
- lots of work on the mail gateway to start to clean up and restructure
- things.
-
-2001-03-10 18:53 jesse
-
- * tools/initdb:
-
- Refactoring initdb to make it easier to do things like add oracle support. yay
-
-2001-03-09 15:19 jesse
-
- * lib/RT/Condition/StatusChange.pm:
-
- file StatusChange.pm was initially added on branch rt-1-1.
-
-2001-03-09 15:19 jesse
-
- * Makefile, etc/config.pm, lib/RT/Attachment.pm, lib/RT/Link.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Condition/AnyTransaction.pm,
- lib/RT/Condition/Generic.pm, lib/RT/Condition/StatusChange.pm,
- tools/insertdata, tools/testdeps:
-
- OnResolve scrip now works.
- some cleanup on Scrips and Watchers.
- commented out some debug messages that aren't immediately useful
-
-2001-03-09 15:15 jesse
-
- * webrt/Ticket/: ModifyDates.html, Elements/EditWatchers:
-
- Two bugfixes:
- one, editdates no longer errors out on 5.005
- two, links from watchers to the ModifyUser page now work properly
-
-2001-03-08 15:21 jesse
-
- * Makefile, lib/RT/User.pm, tools/insertdata:
-
-
- Fixed a bootstrapping bug introduced with the new acls on Create.
- bumped version to 1.3.49_01
-
-2001-03-07 00:40 jesse
-
- * lib/: test.pl, RT/ACE.pm, RT/CurrentUser.pm, RT/Group.pm,
- RT/GroupMember.pm, RT/Keyword.pm, RT/KeywordSelect.pm, RT/Link.pm,
- RT/Queue.pm, RT/Scrip.pm, RT/ScripAction.pm, RT/Template.pm,
- RT/Ticket.pm, RT/Transaction.pm, RT/User.pm, RT/Watcher.pm:
-
- acls for Delete methods that needed them.
- flat lockouts on Delete methods that needed them.
-
- test.pl got 'use *' added to it
-
-2001-03-06 18:07 jesse
-
- * lib/RT/Attachment.pm:
-
- Backing out changes that broke ->Content
-
-2001-03-06 17:42 jesse
-
- * Makefile, lib/RT/Attachment.pm, lib/RT/Record.pm,
- lib/RT/Interface/Web.pm, webrt/Elements/SelectSortOrder,
- webrt/Search/Listing.html, webrt/Search/PickRestriction:
-
- work on Attachments.
- cleanup on sorting and limiting.
-
-2001-03-06 16:26 jesse
-
- * webrt/Search/PickRestriction:
-
- adding a header
-
-2001-03-04 19:46 jesse
-
- * etc/schema.pm:
-
- Schema change to support postgres
-
-2001-03-04 19:44 jesse
-
- * lib/RT/Record.pm:
-
- Small change for new DBIx::SearchBuilder::Record PrimaryKey behaviors..
-
-2001-03-04 19:15 jesse
-
- * bin/rt:
-
- rt --id=<int> should work now
-
-2001-03-02 00:26 jesse
-
- * etc/config.pm, lib/RT/Date.pm, lib/RT/Ticket.pm,
- webrt/Ticket/ModifyDates.html:
-
- first pass on dates and timezones...seems to work. for common ops
-
-2001-02-28 16:34 jesse
-
- * lib/RT/User.pm:
-
- fix for RT/fsck.com: Ticket #208 User->Create needs more argument checking
- added a check to User->Create to make sure a name was specified
-
-2001-02-28 08:56 jesse
-
- * Makefile, bin/rtadmin:
-
- Enabled the ability to set a user's password via the CLI
-
-2001-02-27 22:09 jesse
-
- * lib/Makefile.PL, tools/testdeps:
-
- Bumping required version of searchbuilder in testdeps and lib/Makefile.pl
-
-2001-02-27 22:00 jesse
-
- * webrt/Elements/SelectKeyword:
-
- allowing undef keywords
-
-2001-02-27 21:43 jesse
-
- * webrt/Admin/Queues/Scrips.html:
-
- Fix for ticket #50. grammar in per queue scrip descriptions
-
-2001-02-27 21:41 jesse
-
- * tools/insertdata:
-
- resolving ticket #181- extra \s in the autoreply template
-
-2001-02-27 21:36 jesse
-
- * Makefile, lib/RT/Transaction.pm, tools/testdeps:
-
- testdeps now erorrs out if you don't specify a db type.
-
- queue change transaction descriptions are better.
-
- bumped the version
-
-2001-02-27 21:12 jesse
-
- * webrt/Elements/SelectTicketSortBy:
-
- file SelectTicketSortBy was initially added on branch rt-1-1.
-
-2001-02-27 21:12 jesse
-
- * webrt/Elements/SelectSortOrder:
-
- file SelectSortOrder was initially added on branch rt-1-1.
-
-2001-02-27 21:12 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Elements/SelectKeyword, webrt/Elements/SelectResultsPerPage,
- webrt/Elements/SelectSortOrder, webrt/Elements/SelectTicketSortBy,
- webrt/Search/Listing.html, webrt/Search/PickRestriction:
-
- Basic ticket sorting has been implemented.
- Ticket listing by pages works too.
-
- a bit of cleanup in the ticket listing. now select by keywords uses the component designed for that purpose
-
-2001-02-26 15:44 jesse
-
- * lib/RT/Ticket.pm:
-
- No longer generate spurious watchers transactions when merging tickets.
-
-2001-02-26 03:08 jesse
-
- * lib/RT/Ticket.pm:
-
- fixed a typo in a debug message that prevented compilation
-
-2001-02-26 02:53 jesse
-
- * Makefile:
-
- bumped the version for release. again.
-
-2001-02-26 02:52 jesse
-
- * lib/RT/: ACE.pm, Ticket.pm:
-
- Fixed a variable redef in ticket and an acl granting bug in ACE
-
-2001-02-26 01:24 jesse
-
- * Makefile, webrt/Ticket/ModifyLinks.html:
-
- A bit more merging support.
- Bumped version for release
-
-2001-02-25 22:28 jesse
-
- * webrt/Ticket/Elements/: ShowHistory, ShowTransaction:
-
- Cleaning up the transaction display.
-
-2001-02-25 22:22 jesse
-
- * lib/RT/: Scrip.pm, ScripCondition.pm, Ticket.pm:
-
- Some bug fixes for merging.
- Fixed a bug in Scrips that caused an infinite loop if the user had no rights.
-
-2001-02-24 02:42 jesse
-
- * Makefile, lib/RT/Ticket.pm:
-
- Fixed a bug that prevented ticket loading from appearing to work
-
-2001-02-23 19:17 jesse
-
- * Makefile, lib/RT/Ticket.pm, lib/RT/Interface/Web.pm:
-
- Fixed a typo in Ticket.pm that prevented transaction lists from working
- fixed a paste error in Web.pm
-
-2001-02-23 17:41 jesse
-
- * Makefile:
-
- Bumped the version # for release
-
-2001-02-23 17:31 jesse
-
- * Makefile, README, bin/initacls.mysql, bin/webmux.pl,
- lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Link.pm, lib/RT/Queue.pm,
- lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Interface/Web.pm,
- tools/initdb, tools/testdeps:
-
- Fixed a bug that made a first install with mysql fail
- yanked a UNIVERSAL::AUTOLOADER handler I inserted to test things out.
- Fixed several ACL creation bugs.
- Initial implementation of merge for the core.
- Testdeps now does database testing.
-
- Made Ticket->Load smarter. (nolonger needs a seperate LoadByURI sub.
-
- fixed bugs in the readme
-
-2001-02-22 01:03 jesse
-
- * tools/testdeps:
-
- Updated dependencies.
-
-2001-02-21 17:49 jesse
-
- * lib/RT/: Ticket.pm, Tickets.pm:
-
- Cache Queue in Ticket.pm for added perf.
- formatting cleanup in Tickets.pm
-
-2001-02-20 14:38 jesse
-
- * webrt/Ticket/Display.html:
-
- Uncompressed history on summary page...
-
-2001-02-20 14:18 jesse
-
- * lib/RT/ScripCondition.pm:
-
- fixed a pod typo
-
-2001-02-20 14:07 jesse
-
- * Makefile, etc/schema.pm, lib/MANIFEST, tools/insertdata,
- webrt/Admin/Users/Modify.html,
- webrt/SelfService/Elements/ShowTransaction,
- webrt/Ticket/Elements/ShowTransaction:
-
- removed a false unique index from schema. pm.
- make web interface and insertdata deal properly with the fact that email addresses
- should be unique.
-
- cleaned up ShowTransaction for the webui. (now uses CreatorObj rather than Creator,
- as it was confusing
-
-2001-02-20 01:42 jesse
-
- * lib/RT/: ACE.pm, ACL.pm, Attachment.pm, Attachments.pm,
- CurrentUser.pm, EasySearch.pm, Group.pm, GroupMember.pm,
- GroupMembers.pm, Groups.pm, Keyword.pm, KeywordSelect.pm,
- Keywords.pm, Link.pm, Links.pm, ObjectKeyword.pm,
- ObjectKeywords.pm, Queue.pm, Queues.pm, Record.pm, Scrip.pm,
- ScripAction.pm, ScripActions.pm, ScripCondition.pm,
- ScripConditions.pm, Scrips.pm, Template.pm, Templates.pm,
- Ticket.pm, Tickets.pm, Transaction.pm, Transactions.pm, User.pm,
- Users.pm, Utils.pm, Watcher.pm, Watchers.pm, Action/SendEmail.pm:
-
- A major security audit of the codebase has taken place. I was primarily out for
- ACL related issues, but took care of a number of other minor cleanups at the same time.
-
-2001-02-19 17:16 jesse
-
- * NEWS:
-
- fixed a typo in cli_respond_req
-
-2001-02-15 18:02 jesse
-
- * webrt/SelfService/: Details.html, Error.html:
-
- fixing bug #90: SelfService calls to Abort use the 'standard' handler. which includes the wrong header.
-
-2001-02-15 18:02 jesse
-
- * webrt/SelfService/Error.html:
-
- file Error.html was initially added on branch rt-1-1.
-
-2001-02-15 17:39 jesse
-
- * webrt/Admin/Elements/SelectSingleOrMultiple:
-
- file SelectSingleOrMultiple was initially added on branch rt-1-1.
-
-2001-02-15 17:39 jesse
-
- * lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm,
- webrt/Admin/Elements/SelectKeywordSelect,
- webrt/Admin/Elements/SelectSingleOrMultiple,
- webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html,
- webrt/Elements/SelectKeyword, webrt/Elements/SelectKeywordOptions,
- webrt/Ticket/Elements/ModifyTicket:
-
- KeywordSelect.pm got an ACL bug fixed.
- Keyword.pm now does recursive searches in Descendants properly.
-
- KeyworSelect editing via the webui is now much smarter. and cleaner. and better. and faster, and resolving bug 123
-
-2001-02-15 17:39 jesse
-
- * webrt/Admin/Elements/SelectKeywordSelect:
-
- file SelectKeywordSelect was initially added on branch rt-1-1.
-
-2001-02-13 22:54 jesse
-
- * lib/: Makefile.PL, RT/ACE.pm, RT/Keyword.pm, RT/KeywordSelect.pm,
- RT/Scrip.pm:
-
- Better ACL handling for ACEs, Keywords and KeywordSelects.
- specified more accurate versions of some dependencies in lib/Makefile.PL
-
-2001-02-13 12:51 jesse
-
- * bin/rtadmin, etc/schema.pm, lib/RT/Keyword.pm,
- lib/RT/KeywordSelect.pm, lib/RT/KeywordSelects.pm,
- lib/RT/Keywords.pm, lib/RT/Queue.pm, lib/RT/Queues.pm,
- lib/RT/User.pm, lib/RT/Users.pm, webrt/Admin/Global/Keywords.html,
- webrt/Admin/Keywords/index.html, webrt/Admin/Queues/Keywords.html,
- webrt/Admin/Queues/Modify.html, webrt/Admin/Users/Modify.html:
-
- Implemented 'Disabled' for Keywords, KeywordSelects, Queues and Users.
- This supplants 'Delete' for these objects which need to exist to guarantee
- referential integrity.
-
- Implemented cli and web interfaces to support the new code.
-
-2001-02-12 18:27 jesse
-
- * README, bin/rtadmin, etc/schema.pm, lib/RT/Attachment.pm,
- lib/RT/EasySearch.pm, lib/RT/Link.pm, lib/RT/ObjectKeyword.pm,
- lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm,
- lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm,
- lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Watcher.pm, tools/testdeps:
-
- Cleaned up LastUpdated / Created/ LastUpdatedBy / Creator to all get set on
- create for all relevant objects.
-
- Based on discussions with ivan, changed the 'Deleted' flag on various objects to 'Disabled'
- to better represent its purpose.
-
- Fully implemented Disable for queue as a prototype.
-
- fixed queue attribute editing in cli.
-
-2001-02-12 13:59 jesse
-
- * tools/testdeps:
-
- specified a minimum known good version of Getopt::Long
-
-2001-02-12 12:38 jesse
-
- * lib/RT/Queue.pm, webrt/Ticket/Elements/ShowTransaction:
-
- transaction links work again.
- admin ccs get listed.
-
-2001-02-11 22:16 jesse
-
- * Makefile:
-
- bumped the version # for a new release
-
-2001-02-11 22:13 jesse
-
- * lib/RT/Queue.pm, lib/RT/Template.pm, tools/insertdata:
-
- cleaning up queue create.
-
-2001-02-11 22:12 jesse
-
- * etc/schema.pm:
-
- started the work on dealing with Deleting records that need to exist to guarantee ref. integrity
-
-2001-02-11 18:40 jesse
-
- * NEWS:
-
- imported brandon's url importing code
-
-2001-02-06 22:59 jesse
-
- * lib/RT/Queue.pm, webrt/Admin/Queues/Modify.html,
- webrt/Admin/Users/index.html:
-
- Fixes to Queue.pm to stop it from clobbering the Name.
-
- fixed a typo in the webui Admin/Users/index.html
-
-2001-02-06 15:22 jesse
-
- * lib/RT/Queue.pm, webrt/Admin/Elements/QueueRightsForUser,
- webrt/Admin/Elements/SelectRights,
- webrt/Ticket/Elements/ShowMembers:
-
- ACL fixes in Queue.pm.
- ACL search fies for the web ui.
- fixed a recursive subticket display bug.
-
-2001-02-06 12:49 jesse
-
- * Makefile:
-
- removed the old rt 1.0 lib/rt directory forever. yay
-
-2001-02-06 12:48 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Added a tiny patch from ivan to not extract nested messages. not totally sure about this one yet.
-
-2001-02-02 01:26 jesse
-
- * Makefile:
-
- version bumpin
-
-2001-02-02 01:11 jesse
-
- * bin/rtadmin, lib/RT/Keyword.pm:
-
- keyword creation, editing and deletion now works via the cli tool.
-
- This means that for alpha 4, we're *gasp* feature complete. now to fix lots of bugs.
-
-2001-02-01 02:46 jesse
-
- * bin/rtadmin, lib/RT/Group.pm, lib/RT/Keyword.pm,
- lib/RT/KeywordSelect.pm, tools/testdeps, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/ShowHistory,
- webrt/Ticket/Elements/ShowTransaction:
-
- Commandline editing of keywordselects now works.
-
- Added in a patch to collapse history on the ticket listing
- page from Byron Ellacott
-
- Bumped a few dependecy versions. added a File::Spec dependency, since File::Temp
- gets it not quote right.
-
-2001-01-31 02:08 jesse
-
- * bin/rtadmin, lib/RT/Group.pm, webrt/Admin/Groups/Members.html:
-
- Commandline group editing now works. yay. group membership even.
- the api changed to be easier to work with and more consistent with other functions
-
-2001-01-30 23:12 jesse
-
- * lib/RT/Interface/Email.pm, webrt/Ticket/Elements/ShowLinks,
- webrt/Ticket/Elements/ShowRequestor:
-
- The email interface now uses tempdir from File::Temp for increased security.
-
- A couple of webui cleanups to display more sensible things.
-
-2001-01-30 16:42 jesse
-
- * etc/config.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm:
-
- Added mail-on-error to the mail gateway. now it should tell you when it fails.
-
- turned off debugging output from ACLs....
-
-2001-01-29 23:58 jesse
-
- * bin/rtadmin, lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Scrip.pm,
- lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm, lib/RT/Scrips.pm,
- lib/RT/Template.pm, lib/RT/Templates.pm, lib/RT/User.pm,
- lib/RT/Interface/CLI.pm, lib/RT/Interface/Web.pm,
- webrt/Admin/Elements/SelectTemplate,
- webrt/Admin/Global/Template.html,
- webrt/Admin/Global/Templates.html,
- webrt/Admin/Queues/Template.html:
-
- A bunch of work on the admin cli (acl editor now works)
-
- a couple API changes to standardize method names across classes
- template editing via the web should work better now.
-
-2001-01-29 23:56 jesse
-
- * webrt/Elements/: TitleBoxEnd, TitleBoxStart:
-
- Futzing with the title box to make it a bit more consistent
-
-2001-01-29 23:54 jesse
-
- * lib/RT/Record.pm:
-
- Removed a redundant sub new
-
-2001-01-29 22:22 jesse
-
- * lib/RT/Group.pm:
-
- Groups can now be loaded by name.
-
-2001-01-23 15:46 jesse
-
- * bin/rtadmin, etc/schema.pm, lib/RT/Queue.pm, lib/RT/Template.pm,
- lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Interface/CLI.pm,
- tools/initdb:
-
- initdb now punts on database creation for oracle.
-
- Ticket->Name removed from code (retargeted to post 2.0 and its own table)
- Some better error checking in User and Queue.
-
- Can now edit templates (And create them) from the CLI.
-
-2001-01-22 12:51 jesse
-
- * lib/RT/Action/Notify.pm:
-
-
- It's amazing how much effect 3 little letters can have. with this patch,
- scrips that depend on notify (most everything other than autoreply)
- just work. woo!
-
-2001-01-22 06:18 jesse
-
- * lib/RT/Template.pm:
-
- Fixed a couple ACL bugs in Template::_Set
-
-2001-01-22 05:04 jesse
-
- * Makefile:
-
- Bumped the version # because of the schema change
-
-2001-01-22 04:51 jesse
-
- * lib/RT/Interface/CLI.pm:
-
- file CLI.pm was initially added on branch rt-1-1.
-
-2001-01-22 04:51 jesse
-
- * lib/RT/Interface/CLI.pm:
-
- Added CLI.pm, which rt and adminrt are dependant on
-
-2001-01-22 04:46 jesse
-
- * bin/rtadmin, lib/MANIFEST, lib/RT/Template.pm:
-
- a bit more work on rtadmin (the start of template editing)
-
- added Interface/CLI to the manifest.
- added a comment to Template.pm
-
-2001-01-22 02:51 jesse
-
- * Makefile, TODO, bin/mason_handler.scgi, bin/rt, bin/rtadmin,
- bin/rtmux.pl, bin/webmux.pl, etc/config.pm, etc/schema.Oracle,
- etc/schema.pm, lib/RT.pm, lib/RT/Attachment.pm,
- lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/Link.pm,
- lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm, lib/RT/Template.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
- lib/RT/User.pm, lib/RT/Users.pm, lib/RT/Watchers.pm,
- lib/RT/Interface/Email.pm, tools/insertdata,
- webrt/Admin/Elements/CreateQueueCalled,
- webrt/Admin/Elements/CreateUserCalled,
- webrt/Admin/Elements/GrantQueueRightsTo,
- webrt/Admin/Elements/ModifyKeywordSelect,
- webrt/Admin/Elements/ModifyQueue,
- webrt/Admin/Elements/ModifyTemplate,
- webrt/Admin/Elements/ModifyUser,
- webrt/Admin/Elements/SelectModifyQueue,
- webrt/Admin/Elements/SelectModifyUser,
- webrt/Admin/Elements/SelectTemplate,
- webrt/Admin/Elements/SelectUsers, webrt/Admin/Global/Scrips.html,
- webrt/Admin/Global/Template.html,
- webrt/Admin/Global/Templates.html,
- webrt/Admin/Global/UserRights.html,
- webrt/Admin/Groups/Members.html,
- webrt/Admin/KeywordSelects/index.html, webrt/Admin/Queues/ACL.html,
- webrt/Admin/Queues/Create.html, webrt/Admin/Queues/Keywords.html,
- webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/People.html,
- webrt/Admin/Queues/Scrips.html, webrt/Admin/Queues/Template.html,
- webrt/Admin/Queues/Templates.html, webrt/Admin/Queues/index.html,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html,
- webrt/Admin/Users/index.html, webrt/Elements/Header,
- webrt/Elements/MyRequests, webrt/Elements/MyTickets,
- webrt/Elements/Quicksearch, webrt/Elements/SelectNewTicketQueue,
- webrt/Elements/SelectOwner, webrt/Elements/SelectQueue,
- webrt/Elements/SelectUsers, webrt/SelfService/Details.html,
- webrt/SelfService/Elements/Header,
- webrt/SelfService/Elements/MyRequests,
- webrt/SelfService/Elements/ShowTransaction,
- webrt/Ticket/Create.html, webrt/Ticket/ModifyLinks.html,
- webrt/Ticket/autohandler, webrt/Ticket/Elements/AddWatchers,
- webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ShowDates,
- webrt/Ticket/Elements/ShowDependencies,
- webrt/Ticket/Elements/ShowLinks, webrt/Ticket/Elements/ShowPeople,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowTransaction:
-
- In prep for a true schema freeze, I fixed a number of attribute names that were troublesome for
- one reason or another.
-
- Queue->QueueId and User->UserId have been changed to Queue->Name and User->Name, so
- as not to conflict with queue->id and user->id any more. A number of tables
- used "Alias" and "Title" and things like that, rather than the somewhat
- more standard "Name" and "Description"
-
- Abstracted a bunch of the CLI setup stuff out into lib/RT/Interface/CLI
-
- Abstracted some of the core DB startup code into RT.pm
-
- fixed the makefile to handle the new rtadmin.
-
- lots of updates to the new rtadmin (which works for user editing!)
-
- fixed a bug in ObjectKeywords->LoadByName....
-
-2001-01-19 04:23 jesse
-
- * bin/rtadmin:
-
- A bit of cleanup and a bit more docs. it's now actually implementable with getopt::long
-
-2001-01-19 04:16 jesse
-
- * bin/rtadmin:
-
- file rtadmin was initially added on branch rt-1-1.
-
-2001-01-19 04:16 jesse
-
- * bin/rtadmin:
-
- Docced the proposed cli for the new rtadmin tool. It's rather more intense than I'd intended
-
-2001-01-19 02:15 jesse
-
- * lib/RT/User.pm:
-
- Fixed ACL bug that prevented by-group auth from working
-
-2001-01-19 00:52 jesse
-
- * lib/RT/Ticket.pm, lib/RT/User.pm, webrt/SelfService/Details.html:
-
- Work on SelfService (fixing the a permission denied bug)
-
-2001-01-19 00:21 jesse
-
- * webrt/NoAuth/webrt.css:
-
- file webrt.css was initially added on branch rt-1-1.
-
-2001-01-19 00:21 jesse
-
- * webrt/: webrt.css, Elements/Header, NoAuth/webrt.css,
- SelfService/Details.html, SelfService/Elements/Header:
-
- webui cleanups
-
-2001-01-19 00:07 jesse
-
- * bin/rt:
-
- bug-fixing in bin/rt
-
-2001-01-18 23:47 jesse
-
- * lib/RT/Link.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- webrt/Ticket/ModifyLinks.html, webrt/Ticket/Elements/ShowLinks,
- webrt/Ticket/Elements/ShowMembers,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowSummary:
-
- A bunch of work on links.
- API cleanups.
- Ticket-> Members and MemberOf now return Links objects rather than Tickets Objects
- Edit links via the webui works now
-
-2001-01-18 15:11 jesse
-
- * HACKING, docs/API:
-
- Added a bit more documentation and philosophy
- to the API file. yanked tobix' old out of date "HACKING"
- doc
-
-2001-01-18 03:18 jesse
-
- * Makefile, NEWS:
-
- Headers in incoming mail are now parsed case insensitively.
-
- Version is now 1.0.7
-
-2001-01-17 16:41 jesse
-
- * Makefile, tools/testdeps:
-
- updated searchbuilder dependency in testdeps
-
- revved version in Makefile for release.
-
-2001-01-17 14:27 jesse
-
- * Makefile, bin/rt, lib/RT/Date.pm:
-
- Fixed #45 Permissions bug on redhat 6.0
- Fixed #51 RT CLI doesn't check for valid user
-
- Implemented a bunch more searching in bin/rt
-
- Refactored RT::Date a bit.
-
- Fixed some unreported permissions eits.
-
-2001-01-16 11:43 jesse
-
- * webrt/Ticket/Elements/: ShowLinks, ShowMemberOf, ShowMembers,
- ShowPeople, ShowSummary:
-
- Cleaned up and shortened the Ticket Display screen
-
-2001-01-16 10:56 jesse
-
- * lib/RT/Ticket.pm, webrt/Ticket/Modify.html:
-
- Cleaned up and better documented Ticket->SetStatus
- Ticket/Modify.html got rid of a whole bunch of evals.
-
-2001-01-15 23:57 jesse
-
- * Makefile, lib/MANIFEST, lib/RT/Tickets.pm:
-
- Removed a deleted file from the manifest. revved the version
-
-2001-01-15 15:19 jesse
-
- * lib/RT/: KeywordSelect.pm, Queue.pm:
-
- Adding the ability to load keyword selects by name.
-
-2001-01-15 03:49 jesse
-
- * lib/RT/Ticket.pm, webrt/Ticket/Elements/EditKeywordSelects:
-
- keyword display now cleaner. doesn't force you to select a keyword if none
- is selected yet.
-
-2001-01-15 03:36 jesse
-
- * lib/RT/Ticket.pm:
-
- SetQueue is no-longer heinously broken. thanks eoin
-
-2001-01-15 03:10 jesse
-
- * lib/RT/: Queue.pm, User.pm, Action/Notify.pm, Action/Spam.pm:
-
- removed an old RT::Action that didn't actually do anything useful these days. it'll get replaced later.
-
- Scrips which sign watchers up for things _actually seem to work_
- (required some frobbing of watchers)
-
-2001-01-15 02:44 jesse
-
- * bin/rt, etc/schema.pm, lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm,
- lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
- lib/RT/Watchers.pm, webrt/Elements/ViewUser,
- webrt/Ticket/Elements/ShowRequestor:
-
- Added a 'Type' column to templates, to more easily allow for insertable templates for quick responses from customer service folks ,etc.
- Reworked a bunch of the watchers code to not do its own potentially very bogus caching and to reuse more core code.
- Oh. and it always returns the expected object type now.
-
- Redid tobias' old "ViewUser" box to use a set of tickets, rather than a bogus search for watchers (ignoring tickets).
-
- Fixed a bug in searching for tickets by watcher.
-
-2001-01-15 00:53 jesse
-
- * bin/rt, webrt/Elements/SelectOwner, webrt/Elements/TitleBoxStart,
- webrt/NoAuth/Login.html, webrt/Ticket/Elements/ShowSummary:
-
- Added a bunch of doc to bin/rt. probably should have check to see if it runs ;)
- TitleBoxStart got the attributes: class, title_href and titleright_href. makes calls to it cleaner.
- showsummary got a few more links to the places things should go.
- selectOwner now will actually default to nobody if that's the right value.
-
-2001-01-13 03:22 jesse
-
- * TODO:
-
- Changed the TODO file to point to the current TODO list
-
-2001-01-13 03:18 jesse
-
- * Makefile:
-
- Bumped version # for release
-
-2001-01-13 03:11 jesse
-
- * bin/rtmux.pl, lib/RT/Queue.pm, lib/RT/Action/SendEmail.pm:
-
- Fixing a couple minor things in rtmux and Queue.pm so that the mail interfaces work ok.
-
-2001-01-13 02:34 jesse
-
- * lib/RT/User.pm:
-
- Added the ability to generate a random password to RT::User. we don't yet
- have a nice way to email this information to the user. which is a real bummer.
-
-2001-01-12 17:35 jesse
-
- * etc/config.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- lib/RT/Interface/Web.pm, webrt/Admin/Users/Modify.html,
- webrt/SelfService/Create.html, webrt/SelfService/Details.html,
- webrt/SelfService/Elements/Header, webrt/SelfService/Elements/Tabs:
-
- Made ACLs for 'Everyone' work. fixed a few other small ACL bugs.
- Made the 'Requestor-mode' ticket create tool work.
-
-2001-01-12 12:27 jesse
-
- * webrt/Elements/: SelectDate, SelectOwner:
-
- Commented out unimplemented select relative date bits.
- SelectOwner now lets you pick nobody.
-
-2001-01-12 03:16 jesse
-
- * bin/rt, bin/rtmux.pl, lib/RT/Ticket.pm, tools/testdeps:
-
- Comments and Correspondence work from the cli now. with and without --source (for source data) and --no-edit (to disable invocation of $EDITOR)
-
- rt and rtmux.pl now drop setgidness as soon as they can. it's happier this
- way. really :)
-
- testdeps now installs File::Temp, which is needed to do safe tempfile usage.
-
-2001-01-12 00:11 jesse
-
- * webrt/Elements/: MyRequests, MyTickets:
-
- Bug fix for #47 (Id flows into subject on 'home' screen)
-
-2001-01-11 03:34 jesse
-
- * webrt/Elements/Header:
-
- Removed extra spaces from the header
-
-2001-01-11 02:57 jesse
-
- * webrt/Elements/SelectOwner:
-
- Made SelectOwner actually show all the right people
-
-2001-01-11 02:53 jesse
-
- * tools/testdeps:
-
- Added a requirement for the current DBIx::SearchBuilder to testdeps
-
-2001-01-11 02:28 jesse
-
- * Makefile:
-
- revved the version for distribution
-
-2001-01-11 02:28 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm,
- webrt/Elements/Quicksearch, webrt/Elements/TitleBoxStart,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/EditBasics:
-
- fixed a couple of UI bugs. the 'quick' links in the web ticket view should now all work.
- Logger->warn -> Logger->warning in the web ui
-
-2001-01-10 17:42 jesse
-
- * Makefile:
-
- Bumped to 1.3.33
-
-2001-01-10 01:46 jesse
-
- * webrt/Ticket/Attachment/dhandler:
-
- Date: Wed, 10 Jan 2001 16:22:43 +1000 (EST) From: Byron Ellacott <bje@apnic.net> To: rt-devel@fsck.com Subject: Re: [rt-devel] [rt-announce] RT 1.3.30 released List-Id: RT Development <rt-devel.lists.fsck.com> [-- Attachment #1 --] [-- Type: text/PLAIN, Encoding: 7bit, Size: 0.7K --] On Wed, 3 Jan 2001, Jesse wrote: [snip] I noticed 1-3-31 sitting around, so I installed that. I'm giving a demonstration tomorrow, so I've been running through the web UI. I noticed a problem with attachments - HTML::Mason was munging everything to be HTML-nice, but a jpg doesn't display if its < characters are changed to &lt;, and it's not good to have </BODY></HTML> on the end of binary attachments.
-
-2001-01-10 00:24 jesse
-
- * Makefile:
-
- Revved the version to 1.3.32
-
-2001-01-09 23:57 jesse
-
- * webrt/Admin/Users/Rights.html:
-
- file Rights.html was initially added on branch rt-1-1.
-
-2001-01-09 23:57 jesse
-
- * lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm,
- tools/insertdata, webrt/Admin/Elements/UserTabs,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/Rights.html,
- webrt/Elements/Quicksearch, webrt/Elements/TitleBoxEnd,
- webrt/Elements/TitleBoxStart:
-
- Did some work on User creation to check for duplicate userids on create.
- Better user create error checking.
- Switched the TitleBox UI to a compromise between new and old.
-
- Did a bit of ui work on web based user modification
-
-2001-01-09 02:15 jesse
-
- * Makefile, lib/RT/User.pm, tools/insertdata,
- webrt/Admin/Users/Modify.html:
-
- shuffling around hte user password stuff. hopefully the user modification issues seen in 1.3.30 will be fixed.
-
-2001-01-09 00:48 jesse
-
- * webrt/Ticket/History.html:
-
- file History.html was initially added on branch rt-1-1.
-
-2001-01-09 00:48 jesse
-
- * docs/keywords:
-
- file keywords was initially added on branch rt-1-1.
-
-2001-01-09 00:48 jesse
-
- * bin/mason_handler.scgi:
-
- file mason_handler.scgi was initially added on branch rt-1-1.
-
-2001-01-09 00:48 jesse
-
- * Makefile, bin/mason_handler.scgi, bin/webmux.pl, docs/keywords,
- lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Admin/Elements/GrantQueueRightsTo~,
- webrt/Ticket/History.html:
-
- Started to write out notes on a testsuite.
- Started work on a CGI/SpeedyCGI frontend
- added a file that was missing in 1.3.30
-
-2001-01-08 14:04 jesse
-
- * NEWS, README:
-
- Added a web based due-date patch.
-
-2001-01-06 15:17 jesse
-
- * etc/schema.pm:
-
- Added 'Deleted' attributes for tables whose entries can not be safely
- removed from the database for ref. integrity problems.
-
-2001-01-03 23:07 jesse
-
- * Makefile:
-
- Bumped version to 1.3.30
-
-2001-01-03 23:02 jesse
-
- * tools/testdeps:
-
- file testdeps was initially added on branch rt-1-1.
-
-2001-01-03 23:02 jesse
-
- * README, bin/testdeps.pl, lib/Makefile.PL, tools/testdeps,
- webrt/Elements/TitleBoxStart:
-
- a bit of quick UI work.
- an update to depend on DBIx::SearchBuilder 0.15 (just releaseD)
- testdeps moved to tools
-
-2001-01-03 03:21 jesse
-
- * bin/rt, lib/RT/Tickets.pm:
-
- ticket searches for integers are a bit more flexible now (and the code's tighter)
-
- the rtq section of the new bin/rt appears functional, if underdocced.
-
-2001-01-02 22:55 jesse
-
- * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm,
- webrt/Search/PickRestriction:
-
- Imported ivan's keyword search patch, along with a modification to allow
- for _not_ selecting keywords.
-
-2001-01-02 21:45 jesse
-
- * Makefile, bin/testdeps.pl, lib/RT/KeywordSelect.pm,
- lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Watchers.pm,
- lib/RT/Interface/Web.pm, tools/insertdata, webrt/webrt.css,
- webrt/Elements/Header, webrt/Elements/TitleBoxStart,
- webrt/Elements/ViewUser, webrt/Search/Listing.html,
- webrt/Search/PickRestriction, webrt/Ticket/Create.html,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowBasics,
- webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction, webrt/Ticket/Elements/Tabs:
-
- Fixed a warning in testdeps (Well, worked around it, anyway)
- Added some helper functions for keywords and keyword selects.
-
- did a bunch of UI cleanup. started to color-code the webui
-
- started work on a generic queue listing format in Tickets.pm
-
-2001-01-02 15:02 jesse
-
- * webrt/SelfService/Elements/ShowTransaction:
-
- file ShowTransaction was initially added on branch rt-1-1.
-
-2001-01-02 15:02 jesse
-
- * webrt/SelfService/: Create.html, Details.html,
- Elements/GotoTicket, Elements/Header, Elements/ShowTransaction,
- Elements/Tabs:
-
- Fleshed out more of the requestor UI.
- It's good enough for the alpha. yay!
-
-2001-01-02 15:02 jesse
-
- * webrt/SelfService/Elements/GotoTicket:
-
- file GotoTicket was initially added on branch rt-1-1.
-
-2001-01-01 19:06 jesse
-
- * webrt/Ticket/: Modify.html, ModifyDates.html, ModifyPeople.html,
- Elements/EditBasics, Elements/EditKeywordSelects,
- Elements/ShowDates, Elements/ShowSummary:
-
- Even yet still more Technicolor!
-
-2001-01-01 18:42 jesse
-
- * webrt/NoAuth/images/spacer.gif:
-
- file spacer.gif was initially added on branch rt-1-1.
-
-2001-01-01 18:42 jesse
-
- * webrt/NoAuth/Reminder.html:
-
- file Reminder.html was initially added on branch rt-1-1.
-
-2001-01-01 18:42 jesse
-
- * webrt/Elements/Section:
-
- file Section was initially added on branch rt-1-1.
-
-2001-01-01 18:42 jesse
-
- * lib/RT/CurrentUser.pm, lib/RT/KeywordSelect.pm, webrt/webrt.css,
- webrt/Admin/Keywords/index.html, webrt/Admin/Queues/People.html,
- webrt/Elements/Header, webrt/Elements/ListActions,
- webrt/Elements/MyRequests, webrt/Elements/MyTickets,
- webrt/Elements/Section, webrt/Elements/Submit,
- webrt/Elements/TitleBoxEnd, webrt/Elements/TitleBoxStart,
- webrt/NoAuth/Login.html, webrt/NoAuth/Reminder.html,
- webrt/NoAuth/images/spacer.gif, webrt/Ticket/Display.html,
- webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction:
-
- A bunch of UI work.
- Ticket Display is significantly different. and _much_ faster loading.
- A color style guide for the web ui is forthcoming.
-
- removed a Die from CurrentUser.
-
-2000-12-30 03:27 jesse
-
- * webrt/Elements/Tabs:
-
- fixed a ui nit from ivan
-
-2000-12-30 03:03 jesse
-
- * webrt/Ticket/Elements/ShowSummary:
-
- fixed a hyperlink.
-
-2000-12-30 00:07 jesse
-
- * Makefile:
-
- bumped version for release
-
-2000-12-30 00:03 jesse
-
- * etc/config.pm, lib/RT/User.pm,
- webrt/Admin/Elements/ModifyKeywordSelect,
- webrt/Admin/Global/Keywords.html,
- webrt/Admin/KeywordSelects/index.html,
- webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html,
- webrt/Admin/Queues/Keywords.html, webrt/Admin/Users/index.html:
-
- Fixed a bug in keyword creation that caused urls and param values to get buggered.
-
- Passwords are now encrypted in the database
-
-2000-12-29 05:54 jesse
-
- * bin/rt, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Interface/Web.pm, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/ShowDependencies,
- webrt/Ticket/Elements/ShowLinks:
-
- Did a bunch of work on the linking interface. It's now got
- a much easier API. and it's twice as functional (you can delete links)
-
- Did the proof-of concept for the link code in the CLI. it'll need
- fleshing out tomorrow.
-
- Fleshed out other parts of the CLI.
-
- stayed up way too late.
-
-2000-12-29 00:30 jesse
-
- * Makefile, bin/rt, lib/RT/Keyword.pm, lib/RT/Ticket.pm:
-
- Added keyword support to the CLI.
- fixed a couple of Keyword core bugs
-
-2000-12-28 03:56 jesse
-
- * bin/rt, bin/testdeps.pl, lib/RT/Keyword.pm,
- lib/RT/KeywordSelect.pm, lib/RT/User.pm:
-
- Removed unused keyword related code. added in a bit of
- new keyword related code to get "relative" paths of keywords.
-
- fixed a longstanding warning in ACL checking.
-
- first 1/2 of keywords support for the new rt cli.
-
- added Tie::IxHash to testdeps.pl (keywords needs it)
-
-2000-12-27 02:19 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- missed a comma
-
-2000-12-27 01:21 jesse
-
- * webrt/Admin/Global/Keywords.html:
-
- file Keywords.html was initially added on branch rt-1-1.
-
-2000-12-27 01:21 jesse
-
- * etc/schema.pm, lib/RT/ACE.pm, lib/RT/KeywordSelect.pm,
- lib/RT/KeywordSelects.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, webrt/Admin/Elements/SystemTabs,
- webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html,
- webrt/Ticket/Create.html, webrt/Ticket/ModifyPeople.html,
- webrt/Ticket/Elements/EditKeywordSelects,
- webrt/Ticket/Elements/ShowKeywordSelects,
- webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction:
-
- Added the ability to name keyword selects.
- first round of ACLing for keywords.
-
- Added the ability to create KeywordSelects which apply to all queues (Rather than just
- a single queue)
-
- misc bigfixes.
-
-2000-12-26 02:56 jesse
-
- * webrt/Elements/SelectKeywordOptions:
-
- file SelectKeywordOptions was initially added on branch rt-1-1.
-
-2000-12-26 02:56 jesse
-
- * webrt/Admin/Keywords/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-12-26 02:56 jesse
-
- * webrt/Admin/Queues/Keywords.html:
-
- file Keywords.html was initially added on branch rt-1-1.
-
-2000-12-26 02:56 jesse
-
- * webrt/Elements/SelectKeyword:
-
- file SelectKeyword was initially added on branch rt-1-1.
-
-2000-12-26 02:56 jesse
-
- * bin/webmux.pl, etc/schema.pm, lib/RT/Keyword.pm,
- lib/RT/KeywordSelect.pm, lib/RT/KeywordSelects.pm,
- lib/RT/Keywords.pm, lib/RT/ObjectKeyword.pm,
- lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm,
- lib/RT/Watchers.pm, webrt/Admin/Elements/ModifyKeyword,
- webrt/Admin/Elements/ModifyKeywordSelect,
- webrt/Admin/Elements/QueueTabs, webrt/Admin/Elements/Tabs,
- webrt/Admin/KeywordSelects/index.html,
- webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html,
- webrt/Admin/Queues/Keywords.html, webrt/Elements/SelectKeyword,
- webrt/Elements/SelectKeywordOptions, webrt/Ticket/Modify.html,
- webrt/Ticket/Elements/EditKeywordSelects,
- webrt/Ticket/Elements/ShowKeywordSelects:
-
- My first pass at making the keywords stuff work more like the rest of the RT core.
- A couple of minor fixes on non-keywords things, but mostly this was an
- edit of the keywords code to:
- 1. make the admin UI work more like the rest of the admin ui
- (still need to do "global" keyword selections)
-
- 2. bring the coding style of the keywords stuff more into line
- with the rest of the codebase
-
- 3. flesh out the helper methods in the keywords modules.
-
-2000-12-24 02:04 jesse
-
- * lib/RT/: Keyword.pm, KeywordSelect.pm, ObjectKeyword.pm:
-
- A first round of commentary and cleanup on a few modules
-
-2000-12-24 01:34 jesse
-
- * webrt/Ticket/Elements/ShowKeywordSelects:
-
- file ShowKeywordSelects was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Ticket/Elements/EditKeywordSelects:
-
- file EditKeywordSelects was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/: KeywordSelects/Modify.html, Keywords/Modify.html:
-
- file Modify.html was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/KeywordSelects/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/Elements/ModifyKeyword:
-
- file ModifyKeyword was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/Elements/ModifyKeywordSelect:
-
- file ModifyKeywordSelect was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/Elements/SelectModifyKeyword:
-
- file SelectModifyKeyword was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * webrt/Admin/Elements/SelectModifyKeywordSelect:
-
- file SelectModifyKeywordSelect was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/ObjectKeyword.pm:
-
- file ObjectKeyword.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/Keyword.pm:
-
- file Keyword.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/KeywordSelect.pm:
-
- file KeywordSelect.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/test.pl:
-
- file test.pl was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/ObjectKeywords.pm:
-
- file ObjectKeywords.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/KeywordSelects.pm:
-
- file KeywordSelects.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT/Keywords.pm:
-
- file Keywords.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * Makefile, etc/acl.Pg, etc/schema.pm, lib/MANIFEST,
- lib/MANIFEST.SKIP, lib/Makefile.PL, lib/RT.pm, lib/test.pl,
- lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm,
- lib/RT/KeywordSelects.pm, lib/RT/Keywords.pm,
- lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm,
- lib/RT/Ticket.pm, webrt/Admin/Elements/ModifyKeyword,
- webrt/Admin/Elements/ModifyKeywordSelect,
- webrt/Admin/Elements/SelectModifyKeyword,
- webrt/Admin/Elements/SelectModifyKeywordSelect,
- webrt/Admin/Elements/Tabs, webrt/Admin/KeywordSelects/Modify.html,
- webrt/Admin/KeywordSelects/index.html,
- webrt/Admin/Keywords/Modify.html, webrt/Ticket/Modify.html,
- webrt/Ticket/Elements/EditBasics,
- webrt/Ticket/Elements/EditKeywordSelects,
- webrt/Ticket/Elements/ShowKeywordSelects,
- webrt/Ticket/Elements/ShowSummary:
-
- Importing two largish patches from ivan@420.am:
- First up, ivan switched lib/RT over to using MakeMaker..so now
- we get man pages for the core modules and a bunch of other cool stuff.
-
- Second: ivan handed us an almost complete keywords system. Over the next
- week or two, I'm going to be adding ACL support to the keywords system
- and starting to integrate bits of it better into the rest of the core
- (though it's nearly all done already).
-
- Thanks, ivan!
-
-2000-12-24 01:34 jesse
-
- * lib/MANIFEST:
-
- file MANIFEST was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/Makefile.PL:
-
- file Makefile.PL was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/RT.pm:
-
- file RT.pm was initially added on branch rt-1-1.
-
-2000-12-24 01:34 jesse
-
- * lib/MANIFEST.SKIP:
-
- file MANIFEST.SKIP was initially added on branch rt-1-1.
-
-2000-12-23 23:45 jesse
-
- * Makefile, webrt/Ticket/Elements/Tabs:
-
- made the links in the ticket tool bar point to the right places.
-
-2000-12-23 23:15 jesse
-
- * lib/RT/Ticket.pm:
-
- fixing a typo and the docs.
-
-2000-12-23 23:12 jesse
-
- * lib/RT/Ticket.pm:
-
- the internal function _SetTold shouldn't be hitting an ACL check.
-
-2000-12-23 17:37 jesse
-
- * lib/RT/Ticket.pm, webrt/Ticket/Display.html,
- webrt/Ticket/Modify.html, webrt/Ticket/ModifyDates.html,
- webrt/Ticket/ModifyLinks.html, webrt/Ticket/ModifyPeople.html,
- webrt/Ticket/Update.html, webrt/Ticket/Elements/Tabs,
- webrt/Ticket/Elements/TicketToolBox:
-
- Cleaned up a bit of date diff related functionality.
-
- Did work on the ticket tool bar.
-
-2000-12-23 16:46 jesse
-
- * lib/RT/Record.pm:
-
- Lets try that again..
-
-2000-12-23 16:39 jesse
-
- * lib/RT/Record.pm:
-
- LongSinceUpdatedAsString is now actually relative :)
-
-2000-12-23 16:09 jesse
-
- * lib/RT/Tickets.pm:
-
- added a default to LimitStatus.
-
-2000-12-23 01:47 jesse
-
- * bin/: rt, testdeps.pl:
-
- updated testdeps to require the latest mason (for ease of debugging)
- the new combined bin/rt actually implements the behavior of rtq and rt -show
- fully (I believe). next up, more ticket modification and a code cleanup
-
-2000-12-22 18:37 jesse
-
- * Makefile:
-
- bumped to 1.3.28 for release
-
-2000-12-19 22:38 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
- lib/RT/Interface/Web.pm, webrt/Elements/Tabs,
- webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/EditPeople,
- webrt/User/Prefs.html:
-
- Removed outdated CC request to and BCC request to
- did some UI touchups.
-
- started a bit of work in tickets.pm for the new CLI (more explicit searching)
-
-2000-12-19 21:50 jesse
-
- * bin/rt:
-
- Modifying ticket requestors from the commandline works. yay.
- Simplified the commandline arguments a bit too.
-
-2000-12-19 18:37 jesse
-
- * bin/: mason_handler.fcgi, webmux.pl:
-
- updaes to webmux.pl to work on with new versions of HTML::Mason
-
-2000-12-19 14:05 jesse
-
- * webrt/Ticket/Display.html:
-
- Fixed a bug in Ticket/Display.html that caused navigation not to work within new tickets.
-
-2000-12-19 04:03 jesse
-
- * bin/rt:
-
- implemented --history (show ticket history)
- and --limit-status (limit to a ticket status)
- just to make sure that this works at all. it does.
-
- With the new ui, you'll be able to trivially perform actions on large #s of tickets.
-
-2000-12-19 03:38 jesse
-
- * bin/rt:
-
- After playing with a few Getopt variants, I've settled on Getopt::Long for now...
- and implemented the skeleton of the new RT cli. I suspect that with another day's work,
- it should be mostly functional. yay.
-
-2000-12-19 03:38 jesse
-
- * bin/rt:
-
- file rt was initially added on branch rt-1-1.
-
-2000-12-18 19:34 jesse
-
- * docs/design_docs/cli_spec:
-
- file cli_spec was initially added on branch rt-1-1.
-
-2000-12-18 19:34 jesse
-
- * docs/design_docs/cli_spec:
-
- Added the CLI spec from deborah.
-
-2000-12-18 02:11 jesse
-
- * webrt/Elements/: CreateTicket, GotoTicket:
-
- Fixed a basepath error.
-
-2000-12-18 01:19 jesse
-
- * webrt/Elements/CreateTicket:
-
- file CreateTicket was initially added on branch rt-1-1.
-
-2000-12-18 01:19 jesse
-
- * webrt/Elements/GotoTicket:
-
- file GotoTicket was initially added on branch rt-1-1.
-
-2000-12-18 01:19 jesse
-
- * README, webrt/Admin/Queues/Modify.html,
- webrt/Admin/Users/Modify.html, webrt/Elements/CreateTicket,
- webrt/Elements/GotoTicket, webrt/Search/Listing.html:
-
- A few more changes from Lee Ann and a couple of files I missed on the earlier checkins.
-
-2000-12-18 01:14 jesse
-
- * webrt/Admin/Groups/Rights.html:
-
- file Rights.html was initially added on branch rt-1-1.
-
-2000-12-18 01:14 jesse
-
- * webrt/Admin/Groups/: Members.html, Rights.html:
-
- a couple UI tweaks from Lee Ann Goldstein
-
-2000-12-18 00:51 jesse
-
- * webrt/: Admin/Elements/SystemTabs, Admin/Groups/index.html,
- Admin/Users/index.html, Elements/Submit, Elements/Tabs:
-
- More UI hacking. whee
-
-2000-12-17 23:55 jesse
-
- * webrt/: Elements/SelectNewTicketQueue, Elements/SelectOwner,
- Elements/Tabs, Ticket/Create.html, Ticket/Elements/Tabs:
-
- ui hacking to add the "Create Ticket" and "Goto Ticket" ui elements at the top.
-
-2000-12-17 22:17 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- webrt/Elements/MessageBox, webrt/Ticket/Modify.html,
- webrt/Ticket/ModifyPeople.html:
-
- Fixing bugs 7,8,28
-
-2000-12-17 02:38 jesse
-
- * webrt/Ticket/Elements/ShowDates:
-
- *sigh* typo in ShowDates.
-
-2000-12-17 02:34 jesse
-
- * lib/RT/Date.pm, webrt/Ticket/Elements/EditDates,
- webrt/Ticket/Elements/ShowDates:
-
- A bit of work on Dates. a postgres fix from ivan and some display prettification.
-
-2000-12-17 02:15 jesse
-
- * Makefile, webrt/Ticket/Elements/TicketToolBox:
-
- commeted out some toolbar actions which don't work yet.
-
- bumped the version to 1.3.27 for imminent release.
-
-2000-12-17 01:51 jesse
-
- * lib/RT/Attachment.pm:
-
- The ACL problem on attachments was a bootstrapping issue. couldn't check acls because it
- couldn't necessarily see what to check
-
-2000-12-17 01:44 jesse
-
- * lib/RT/Attachment.pm:
-
- acl fix for attachments.
-
-2000-12-17 01:15 jesse
-
- * lib/RT/Ticket.pm:
-
- fixing ugly disgusting ACL bugs
-
-2000-12-17 00:35 jesse
-
- * lib/RT/Transaction.pm, lib/RT/User.pm,
- webrt/Ticket/Elements/ShowTransaction:
-
- Fixing bugs in Transaction ACLs.
-
-2000-12-16 03:56 jesse
-
- * webrt/Admin/Groups/Members.html:
-
- ui nit in admin/groups/members.
-
-2000-12-16 03:31 jesse
-
- * lib/RT/: Group.pm, GroupMember.pm:
-
- $object->$SUPER::Foo is wrong. $object->SUPER::Foo is not.
-
-2000-12-16 03:28 jesse
-
- * lib/RT/Ticket.pm:
-
- Rights checks for ticket ownership work best when the right that's set is the same
- as the right that's checked for *sigh*
-
-2000-12-16 03:26 jesse
-
- * webrt/Admin/Groups/Members.html:
-
- Fixed a couple bugs in Group mebership administration code.
-
-2000-12-16 03:04 jesse
-
- * webrt/: Admin/Elements/GroupTabs, Admin/Elements/QueueTabs,
- Admin/Elements/SystemTabs, Admin/Elements/Tabs,
- Admin/Elements/UserTabs, Admin/Global/index.html,
- Admin/Groups/Modify.html, Admin/Groups/index.html,
- Admin/Queues/People.html, Admin/Queues/index.html,
- Admin/Users/Modify.html, Admin/Users/index.html,
- Elements/SelectWatcherType, Elements/Tabs, Ticket/Create.html,
- Ticket/Display.html, Ticket/Elements/Tabs:
-
- Bugfix in user admin (no longer automatically revokes "privileged status)
- a bunch of tab-related UI cleanup. the start of tabs that reflect the current page.
-
- added the ability to configure queue watchers from the web ui
-
-2000-12-16 03:04 jesse
-
- * webrt/Admin/Queues/People.html:
-
- file People.html was initially added on branch rt-1-1.
-
-2000-12-16 00:58 jesse
-
- * webrt/Admin/Users/index.html:
-
- typo fixing.
-
-2000-12-15 19:12 jesse
-
- * webrt/Admin/Global/GroupRights.html:
-
- file GroupRights.html was initially added on branch rt-1-1.
-
-2000-12-15 19:12 jesse
-
- * webrt/Admin/Global/UserRights.html:
-
- file UserRights.html was initially added on branch rt-1-1.
-
-2000-12-15 19:12 jesse
-
- * webrt/Admin/Elements/GroupTabs:
-
- file GroupTabs was initially added on branch rt-1-1.
-
-2000-12-15 19:12 jesse
-
- * lib/RT/ACE.pm, lib/RT/Group.pm, lib/RT/Groups.pm,
- lib/RT/Record.pm, lib/RT/Scrip.pm, lib/RT/ScripAction.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/User.pm,
- lib/RT/Users.pm, tools/insertdata, webrt/Admin/Elements/GroupTabs,
- webrt/Admin/Elements/SystemTabs, webrt/Admin/Global/ACL.html,
- webrt/Admin/Global/GroupRights.html,
- webrt/Admin/Global/UserRights.html,
- webrt/Admin/Groups/Members.html, webrt/Admin/Groups/Modify.html,
- webrt/Admin/Groups/index.html, webrt/Admin/Users/Modify.html,
- webrt/Admin/Users/index.html:
-
- A bunch of cleanup work on Users and Groups (and a couple of small bugfixes, one
- which might prevent install of Alpha 2) mostly aimed at improving the admin ui.
-
- We now have two levels of "Privileged" for a user, 1 which means "can be granted rights"
- and 2 which means "should not be futzed with by the user"
-
-2000-12-14 23:04 jesse
-
- * webrt/Ticket/Attachment/dhandler:
-
- Accidentally left out of the last rev. sorry about that.
-
-2000-12-14 23:04 jesse
-
- * webrt/Ticket/Attachment/dhandler:
-
- file dhandler was initially added on branch rt-1-1.
-
-2000-12-12 20:44 jesse
-
- * Makefile:
-
- Bumped version to 1.3.26. This is RT2 Alpha 2, folks.
-
-2000-12-12 20:34 jesse
-
- * lib/RT/Attachment.pm, lib/RT/Record.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/User.pm,
- webrt/Ticket/Elements/ShowTransaction:
-
- Attachment display in the webui now just works [tm] RT2 Alpha 2 will be rolled later tonight.
-
-2000-12-12 19:03 jesse
-
- * webrt/Admin/Global/Template.html:
-
- file Template.html was initially added on branch rt-1-1.
-
-2000-12-12 19:03 jesse
-
- * webrt/Admin/Global/Templates.html:
-
- file Templates.html was initially added on branch rt-1-1.
-
-2000-12-12 19:03 jesse
-
- * README, bin/webmux.pl, lib/RT/Attachment.pm, lib/RT/Template.pm,
- lib/RT/Transaction.pm, webrt/Admin/Elements/SelectTemplate,
- webrt/Admin/Elements/SystemTabs, webrt/Admin/Global/Template.html,
- webrt/Admin/Global/Templates.html,
- webrt/Admin/Queues/Templates.html,
- webrt/Ticket/Elements/ShowTransaction:
-
- Working on attachments support.
-
- did some work on global templates
-
-2000-12-12 15:15 jesse
-
- * lib/RT/Template.pm, lib/RT/Templates.pm, tools/insertdata:
-
- Core support for system-scoped templates
-
-2000-12-12 14:12 jesse
-
- * webrt/Admin/: Queues/Modify.html, Users/Create.html,
- Users/Modify.html:
-
- Fixed queue and user creation problems.
-
-2000-12-12 03:05 jesse
-
- * webrt/Ticket/: Link.html, ModifyLinks.html, Elements/ShowSummary,
- Elements/Tabs:
-
- Brought the still basic link editing ui into conformance with the rest of the ticket ui
-
-2000-12-12 03:05 jesse
-
- * webrt/Ticket/ModifyLinks.html:
-
- file ModifyLinks.html was initially added on branch rt-1-1.
-
-2000-12-12 02:41 jesse
-
- * webrt/Ticket/: ModifyDates.html, ModifyPeople.html:
-
- split out the ticket modify screen into 3 more bite-sized pages.
-
-2000-12-12 02:41 jesse
-
- * webrt/Ticket/ModifyPeople.html:
-
- file ModifyPeople.html was initially added on branch rt-1-1.
-
-2000-12-12 02:41 jesse
-
- * webrt/Ticket/ModifyDates.html:
-
- file ModifyDates.html was initially added on branch rt-1-1.
-
-2000-12-12 02:41 jesse
-
- * webrt/Ticket/: Modify.html, Elements/Tabs:
-
- [no log message]
-
-2000-12-11 15:01 jesse
-
- * webrt/NoAuth/Login.html:
-
- file Login.html was initially added on branch rt-1-1.
-
-2000-12-11 15:01 jesse
-
- * webrt/NoAuth/Logout.html:
-
- file Logout.html was initially added on branch rt-1-1.
-
-2000-12-11 15:01 jesse
-
- * webrt/: Login.html, Logout.html, autohandler, Elements/Footer,
- Elements/Header, NoAuth/Login.html, NoAuth/Logout.html:
-
- Moving Login and Logout around so they work right with the new NoAuth scheme
-
-2000-12-11 05:00 jesse
-
- * webrt/: Login.html, autohandler:
-
- fixed a couple login bugs. implemented some logic to deal with different auth classes:
- /NoAuth/ and /SelfService/
-
-2000-12-11 01:46 jesse
-
- * webrt/: rt.jpg, Elements/Header, Elements/MyRequests,
- Elements/MyTickets, Search/Listing.html, Ticket/Create.html,
- Ticket/Create_Detail.html, Ticket/Display.html, Ticket/Modify.html,
- Ticket/Update.html, Ticket/Elements/ShowTransaction,
- Ticket/Elements/Tabs, Ticket/Elements/TicketToolBox:
-
- Work on ticket display. we're getting there.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Queues/Template.html:
-
- file Template.html was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Queues/Templates.html:
-
- file Templates.html was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Elements/QueueTabs:
-
- file QueueTabs was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Elements/SystemTabs:
-
- file SystemTabs was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/: Global/Scrips.html, Queues/Scrips.html:
-
- file Scrips.html was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Elements/UserTabs:
-
- file UserTabs was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/: Global/ACL.html, Queues/ACL.html:
-
- file ACL.html was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * webrt/Admin/Global/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-12-10 23:53 jesse
-
- * Makefile, webrt/index.html, webrt/Admin/ModifyUser,
- webrt/Admin/index.html, webrt/Admin/Elements/Header,
- webrt/Admin/Elements/QueueTabs, webrt/Admin/Elements/SystemTabs,
- webrt/Admin/Elements/Tabs, webrt/Admin/Elements/UserTabs,
- webrt/Admin/Global/ACL.html, webrt/Admin/Global/Scrips.html,
- webrt/Admin/Global/index.html, webrt/Admin/Queues/ACL.html,
- webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/Scrips.html,
- webrt/Admin/Queues/Template.html,
- webrt/Admin/Queues/Templates.html, webrt/Admin/Queues/index.html,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/index.html,
- webrt/Elements/Header, webrt/Elements/Tabs:
-
- Bunch of work on the web administration framework.
- Lots of stuff should be much cleaner now.
-
-2000-12-10 01:21 jesse
-
- * Makefile:
-
- Bumped version to 1.3.25 for release
-
-2000-12-10 01:15 jesse
-
- * webrt/: Elements/TitleBoxEnd, Elements/TitleBoxStart,
- SelfService/Elements/MyRequests, SelfService/Elements/Tabs,
- Ticket/Update.html, User/Prefs.html:
-
- Work on SSRI and a bit of overall UI tweaking
-
-2000-12-09 22:48 jesse
-
- * webrt/SelfService/Elements/Header:
-
- file Header was initially added on branch rt-1-1.
-
-2000-12-09 22:48 jesse
-
- * webrt/SelfService/Elements/: Header, MyRequests, Tabs:
-
- Missed a couple files for SSRI
-
-2000-12-09 22:48 jesse
-
- * webrt/SelfService/Elements/MyRequests:
-
- file MyRequests was initially added on branch rt-1-1.
-
-2000-12-09 22:48 jesse
-
- * webrt/SelfService/Elements/Tabs:
-
- file Tabs was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/SelfService/Create.html:
-
- file Create.html was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/SelfService/Details.html:
-
- file Details.html was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/SelfService/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/SelfService/Closed.html:
-
- file Closed.html was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/Elements/SelectNewTicketQueue:
-
- file SelectNewTicketQueue was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/Admin/Groups/Members.html:
-
- file Members.html was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * webrt/Admin/Elements/SelectUsers:
-
- file SelectUsers was initially added on branch rt-1-1.
-
-2000-12-09 22:43 jesse
-
- * lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/GroupMember.pm,
- lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Users.pm,
- webrt/Login.html, webrt/autohandler,
- webrt/Admin/Elements/SelectModifyGroup,
- webrt/Admin/Elements/SelectUsers, webrt/Admin/Groups/Members.html,
- webrt/Admin/Groups/Modify.html, webrt/Admin/Groups/index.html,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/index.html,
- webrt/Elements/Header, webrt/Elements/SelectNewTicketQueue,
- webrt/SelfService/Closed.html, webrt/SelfService/Create.html,
- webrt/SelfService/Details.html, webrt/SelfService/index.html,
- webrt/User/Prefs.html:
-
- First rev of SSRI, the Self Service Requestor Interface.
- Did a bunch of work on groups and the admin UI
-
-2000-12-05 23:24 jesse
-
- * webrt/Admin/Groups/Modify.html:
-
- file Modify.html was initially added on branch rt-1-1.
-
-2000-12-05 23:24 jesse
-
- * webrt/Admin/Groups/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-12-05 23:24 jesse
-
- * webrt/Admin/Elements/SelectModifyGroup:
-
- file SelectModifyGroup was initially added on branch rt-1-1.
-
-2000-12-05 23:24 jesse
-
- * lib/RT/Action/NotifyAsComment.pm:
-
- file NotifyAsComment.pm was initially added on branch rt-1-1.
-
-2000-12-05 23:24 jesse
-
- * lib/RT/Group.pm, lib/RT/GroupMembers.pm, lib/RT/Scrip.pm,
- lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm,
- lib/RT/Action/SendEmail.pm, tools/insertdata,
- webrt/Admin/Elements/SelectModifyGroup,
- webrt/Admin/Groups/Modify.html, webrt/Admin/Groups/index.html,
- webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/index.html:
-
- Lots of work on groups. I think the core is basically set. UI has been started
-
- Scrips got even more work and more code. they now work at least as well as
- they ever have _and_ they now do it for the right reasons.
-
-2000-12-02 13:44 jesse
-
- * Makefile:
-
-
- fixed a local customization in the makefile
-
-2000-12-02 13:34 jesse
-
- * Makefile:
-
- bumped version to 1.0.6
-
-2000-12-02 03:22 jesse
-
- * webrt/Ticket/Link.html:
-
- file Link.html was initially added on branch rt-1-1.
-
-2000-12-02 03:22 jesse
-
- * lib/RT/Scrip.pm, lib/RT/ScripActions.pm, lib/RT/Scrips.pm,
- webrt/Ticket/Link.html:
-
- catching some stragglers.
-
-2000-12-02 03:22 jesse
-
- * lib/RT/ScripActions.pm:
-
- file ScripActions.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * webrt/Admin/Elements/SelectScripAction:
-
- file SelectScripAction was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * webrt/Admin/Elements/SelectScripCondition:
-
- file SelectScripCondition was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/: Action/Generic.pm, Condition/Generic.pm:
-
- file Generic.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/Condition/AnyTransaction.pm:
-
- file AnyTransaction.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/Condition/NewDependency.pm:
-
- file NewDependency.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/ScripAction.pm:
-
- file ScripAction.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/ScripCondition.pm:
-
- file ScripCondition.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * lib/RT/ScripConditions.pm:
-
- file ScripConditions.pm was initially added on branch rt-1-1.
-
-2000-12-02 03:20 jesse
-
- * bin/webmux.pl, docs/design_docs/subscription-definitions.txt,
- etc/schema.pm, lib/RT/Action.pm, lib/RT/Scrip.pm,
- lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm,
- lib/RT/ScripConditions.pm, lib/RT/ScripScope.pm,
- lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, lib/RT/Transaction.pm,
- lib/RT/Action/Generic.pm, lib/RT/Action/Notify.pm,
- lib/RT/Action/OpenDependent.pm, lib/RT/Action/ResolveMembers.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Action/SendEmailOnResolve.pm,
- lib/RT/Action/StallDependent.pm,
- lib/RT/Condition/AnyTransaction.pm, lib/RT/Condition/Generic.pm,
- lib/RT/Condition/NewDependency.pm, tools/insertdata,
- webrt/Admin/Elements/SelectScripAction,
- webrt/Admin/Elements/SelectScripCondition:
-
- Major major major work on scrips
- scrips now specify a 'Stage' which has only one value for now but should be easier to add in other
- points in the code where they get called
-
- What used to be called Scrip got split into ScripCondition and ScripAction
-
- ScripScope got renamed 'Scrip', like it should have been from the getgo.
-
- Did some work to the scrip mailing routines.All in all, scrips are much
- cleaner and more flexible. and at least as functional as they were last night.
-
- I'll be adjusting the templates as I get to them
-
-2000-12-01 14:02 jesse
-
- * NEWS:
-
- fixed a display bug in how we split messages for the webui
-
-2000-11-30 02:18 jesse
-
- * lib/RT/Action/AutoReply.pm, lib/RT/Action/SendEmail.pm,
- tools/insertdata:
-
- Working on cleaning up the Scrips system. The whole templating system
- was really, really incredibly overdesigned and badly implemented on the first go-round.
- Over the next few checkins, I'll be cleaning it up and cleaning it out...
-
-2000-11-29 16:31 jesse
-
- * bin/testdeps.pl:
-
- updated apache::session dependency
-
-2000-11-29 01:32 jesse
-
- * lib/RT/ACE.pm, lib/RT/ScripScope.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/User.pm, lib/RT/Action/AutoReply.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm,
- webrt/Admin/Elements/SelectScrip,
- webrt/Admin/Elements/SelectTemplate,
- webrt/Ticket/Create_Detail.html:
-
- Work on scrips all around:
- web ui cleanups
- Action::SendEmail cleanups
-
- work on acls for Ticket creation.
- now users who only have "CreateTicket" can actually create tickets,
- even if they can't see the ticket once created.
- RT1's "allow nonmembers to create requests" can be replicated by
- granting the metagroup 'requestors' the right "CreateTicket".
-
- Mail gateway got a lot of debugging stubs. mail gateway now uses
- modern semantics for Create.
-
-2000-11-28 17:46 jesse
-
- * lib/RT/User.pm:
-
- cacheed acl decisions are now properly granular.
-
-2000-11-28 17:39 jesse
-
- * lib/RT/User.pm:
-
- Cached ACL decisions are now expire after 2 minutes.
-
-2000-11-28 03:37 jesse
-
- * etc/config.pm, lib/RT/Ticket.pm, webrt/Ticket/Update.html,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowTransaction:
-
- fixed a small bug in ticket update.
- fixed a set of bugs in "external" links that were discovered when my roommate suggested
- that RT could be used as an mp3 playlist server. Now it can. no, you really don't want to.
- At least until we have asset managment.
-
-2000-11-28 00:20 jesse
-
- * Makefile, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Action/SendEmail.pm:
-
- a couple little tweask to transaction and sendemail.
-
- bumped the version #
-
-2000-11-28 00:12 jesse
-
- * webrt/Ticket/: Display.html, LinkIt.html, ProcessUpdate.html,
- Update.html, Elements/ShowSummary, Elements/ShowTransaction,
- Elements/TicketToolBox:
-
- Work on cleaning up the web ui. got rid of processupdate.html.
- cleaned up the code in display.html.. linking is no longer nearly as offensive.
-
-2000-11-27 20:26 jesse
-
- * webrt/Ticket/Elements/ShowRequestor:
-
- small display fix to not show nobody as a possible requestor
-
-2000-11-27 20:05 jesse
-
- * lib/RT/Ticket.pm, lib/RT/User.pm, webrt/Ticket/Display.html:
-
- Updates to how Create handles Requestor, Cc and Admin Cc.
- it's now much more flexible, cleaner and simpler. yay.
-
-2000-11-27 04:01 jesse
-
- * webrt/Elements/: Error, Header, MyRequests:
-
- Web error reporting tweaks.
- added MyRequests to the front page
-
-2000-11-27 04:01 jesse
-
- * webrt/Elements/MyRequests:
-
- file MyRequests was initially added on branch rt-1-1.
-
-2000-11-27 03:30 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowHistory:
-
- more work on ACLs
-
- Ticket.pm has been fully ACLed.
- Did work on web ticket create. it's no longer a festering pile of garbage.
- Now it's more of an office wastepaper basket full of clean white 20lb paper.
- Seriously, though, it's cleaner. I got rid of some of Tobias' temporary ticket creation
- code.
-
-2000-11-26 23:45 jesse
-
- * lib/RT/ACE.pm, lib/RT/GroupMember.pm, lib/RT/Queue.pm,
- lib/RT/Queues.pm, lib/RT/Template.pm, lib/RT/Ticket.pm,
- lib/RT/User.pm, lib/RT/Interface/Web.pm, tools/insertdata,
- webrt/Admin/Elements/ModifyQueue, webrt/Elements/Header,
- webrt/Elements/Tabs:
-
-
-
- lots more ACL work.
- a little bit of UI cleanup.
-
-2000-11-25 01:56 jesse
-
- * lib/RT/Tickets.pm, webrt/index.html,
- webrt/Ticket/Elements/ShowDates:
-
- made "my requests" doable.
- fixed some ui in showdates.
-
-2000-11-24 20:14 jesse
-
- * lib/RT/: Queue.pm, User.pm:
-
- Fixed a couple of bugs in HasSystemRight that make RT install correctly again.
-
-2000-11-24 19:21 jesse
-
- * etc/schema.pm:
-
- schema fix to make pg happy
-
-2000-11-22 03:08 jesse
-
- * webrt/Ticket/Update.html:
-
- cleaned up the ticket udpdate form. made it more concise.::
-
-2000-11-22 03:04 jesse
-
- * webrt/Ticket/Update.html:
-
- cleaning up the ticket update form
-
-2000-11-22 02:49 jesse
-
- * bin/testdeps.pl:
-
- bumped searchbuilder dependency to the version now in CPAN...
-
-2000-11-22 02:31 jesse
-
- * Makefile, lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Action.pm,
- lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm,
- lib/RT/Date.pm, lib/RT/EasySearch.pm, lib/RT/Group.pm,
- lib/RT/GroupMember.pm, lib/RT/GroupMembers.pm, lib/RT/Groups.pm,
- lib/RT/Handle.pm, lib/RT/Link.pm, lib/RT/Links.pm, lib/RT/Queue.pm,
- lib/RT/Queues.pm, lib/RT/Record.pm, lib/RT/Scrip.pm,
- lib/RT/ScripScope.pm, lib/RT/ScripScopes.pm, lib/RT/Scrips.pm,
- lib/RT/Template.pm, lib/RT/Templates.pm, lib/RT/Ticket.pm,
- lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/Transactions.pm,
- lib/RT/User.pm, lib/RT/Users.pm, lib/RT/Utils.pm,
- lib/RT/Watcher.pm, lib/RT/Watchers.pm:
-
- Bumped version to 1.3.23
- Added pod headers to most core modules?
-
-2000-11-21 23:05 jesse
-
- * webrt/Ticket/Elements/ShowSummary:
-
- removed a dead link
-
-2000-11-21 04:07 jesse
-
- * Makefile, lib/RT/Queue.pm, lib/RT/Scrip.pm, lib/RT/ScripScope.pm,
- lib/RT/Transaction.pm, lib/RT/User.pm:
-
- tmp logfiles now go in /tmp
- oh. and SCRIPS NOW WORK. RT can send mail.
- and recieve mail. life is good.
-
-2000-11-21 02:55 jesse
-
- * lib/RT/Ticket.pm:
-
- Implemented Ticket->IsWatcher.
- This is what we needed to make pseudogroup based ACLs work
-
-2000-11-21 00:55 jesse
-
- * lib/RT/Queue.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- webrt/Elements/Tabs:
-
- fixed a couple of bugs while I was out and about.
- Oh. and most of the rest of the ACL core is implemented now.
- rights for requestor/owner/cc/admincc should now work.
-
-2000-11-20 11:59 jesse
-
- * lib/RT/ACE.pm, lib/RT/User.pm, tools/insertdata:
-
- Added "Requestor" and "Everyone" metagroups to tools/insertdata
-
- Fixed a bug with yet another way to call HasQueueRight.
-
-2000-11-20 00:39 jesse
-
- * Makefile:
-
- bumped to 1.3.22 for release
-
-2000-11-20 00:24 jesse
-
- * webrt/Search/Listing.html:
-
- fixed a big triggered when clearing empty ticket searches
-
-2000-11-19 23:55 jesse
-
- * bin/webmux.pl, lib/RT/User.pm:
-
- fixed a bug that stopped you from specifying an owner on ticket create
- Watcher and Watchers are now preloaded in the App server.
-
-2000-11-19 23:20 jesse
-
- * webrt/Ticket/Elements/Tabs:
-
- file Tabs was initially added on branch rt-1-1.
-
-2000-11-19 23:20 jesse
-
- * webrt/: index.html, Admin/Elements/Tabs, Elements/Header,
- Elements/Tabs, Search/Listing.html, Search/RestrictSearch.html,
- Ticket/Create.html, Ticket/Create_Detail.html, Ticket/Display.html,
- Ticket/EditWatchers.html, Ticket/Modify.html, Ticket/Update.html,
- Ticket/Elements/Tabs:
-
- more UI tweaking. yay.
-
-2000-11-19 17:57 jesse
-
- * webrt/Elements/Quicksearch:
-
- file Quicksearch was initially added on branch rt-1-1.
-
-2000-11-19 17:57 jesse
-
- * webrt/Elements/MyTickets:
-
- file MyTickets was initially added on branch rt-1-1.
-
-2000-11-19 17:57 jesse
-
- * webrt/rt.jpg:
-
- file rt.jpg was initially added on branch rt-1-1.
-
-2000-11-19 17:57 jesse
-
- * lib/RT/ACE.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
- lib/RT/Interface/Web.pm, webrt/index.html, webrt/rt.jpg,
- webrt/Elements/MyTickets, webrt/Elements/Quicksearch,
- webrt/Search/Listing.html:
-
- A bunch of UI work. we now have a placeholder logo
-
-2000-11-18 03:03 jesse
-
- * lib/RT/: User.pm, Interface/Web.pm:
-
- ACL change messages are now properly scoped. so now they don't hang out
- between sessions
-
- if a user has a system right, that right now applies to all queues.
-
-2000-11-17 00:19 jesse
-
- * Makefile:
-
- Rolled rev 1.3.21. now with an ACL editor.
-
-2000-11-17 00:15 jesse
-
- * webrt/Admin/Elements/SelectRights:
-
- file SelectRights was initially added on branch rt-1-1.
-
-2000-11-17 00:15 jesse
-
- * lib/RT/ACE.pm, lib/RT/Group.pm, lib/RT/Queue.pm,
- lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- lib/RT/Interface/Web.pm, webrt/Admin/Elements/SelectRights:
-
- Woo! the ACL editor is now much cleaner. and it works. :)
-
-2000-11-16 01:17 jesse
-
- * lib/RT/: ACE.pm, ACL.pm, Attachment.pm, Attachments.pm,
- CurrentUser.pm, EasySearch.pm, Group.pm, GroupMember.pm,
- GroupMembers.pm, Groups.pm, Link.pm, Links.pm, Queue.pm, Queues.pm,
- Record.pm, Scrip.pm, ScripScope.pm, ScripScopes.pm, Scrips.pm,
- Template.pm, Templates.pm, Ticket.pm, Transaction.pm,
- Transactions.pm, User.pm, Users.pm, Watcher.pm, Watchers.pm,
- Interface/Web.pm:
-
-
- LEANED UP A WHOLE BUNCH OF NEW ROUTINES. FIXED A FREW ACL BUGS.
-
-2000-11-15 02:29 jesse
-
- * lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/CurrentUser.pm,
- lib/RT/Queue.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- webrt/Admin/Elements/Tabs, webrt/Elements/Submit:
-
- refactored ACLS to take out a layer of complexity or two.
-
-2000-11-14 13:17 jesse
-
- * Makefile:
-
- bumped the makefuile version
-
-2000-11-13 23:19 jesse
-
- * bin/webmux.pl, lib/RT/ACL.pm, lib/RT/EasySearch.pm,
- lib/RT/Group.pm, lib/RT/GroupMember.pm, lib/RT/Record.pm,
- lib/RT/User.pm:
-
- A bunch of refactoring to make ACL editable. Lots of work on the ACL editor.
- Basic user ACLs are now editable.
- It needs some more refactoring, since I stopped being on quite as much crack
- over the wekeend and figured out a much less intense way to do a bunch of stuff. Yay.
-
-2000-11-08 14:55 jesse
-
- * Makefile, NEWS:
-
- all mail sent out is now sent out precedence "bulk" like it should be.
-
-2000-11-08 01:24 jesse
-
- * webrt/Admin/Elements/SelectScrip:
-
- file SelectScrip was initially added on branch rt-1-1.
-
-2000-11-08 01:24 jesse
-
- * webrt/Admin/Elements/SelectTemplate:
-
- file SelectTemplate was initially added on branch rt-1-1.
-
-2000-11-08 01:24 jesse
-
- * etc/schema.pm, lib/RT/ACE.pm, lib/RT/ACL.pm,
- lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/Ticket.pm,
- lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/User.pm,
- lib/RT/Users.pm, tools/insertdata,
- webrt/Admin/Elements/SelectScrip,
- webrt/Admin/Elements/SelectTemplate:
-
- A whole slew of work on ACLs and assorted other related things.
- This involved a lot of cleanup of ACL related code and things it touched.
- ACL decisions are now being made. (Yes, you're all still superusers) but I
- think I've got a bunch of the infrastructure cleaned up, so it should be
- easier to finish off the ACL editor. yay!
-
- As part of this, I had to add more groups support. all you groups-maniacs should be pleased ;)
-
-2000-11-06 11:55 jesse
-
- * Makefile:
-
- Fixed yet another typo in manipulate.pm.
-
- Bumped version to 1.0.5
-
-2000-11-05 15:24 jesse
-
- * Makefile:
-
- A fix for action vs actions in mail manipulate.
- fixed a typo normailize -> normalize in database/manipulate.pm
-
-2000-11-03 17:54 jesse
-
- * README, etc/schema.pm, lib/RT/ACE.pm, lib/RT/ACL.pm,
- lib/RT/CurrentUser.pm, lib/RT/GroupMember.pm, lib/RT/Queue.pm,
- lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Users.pm,
- lib/RT/Interface/Email.pm, lib/RT/Interface/Web.pm,
- tools/insertdata, webrt/Admin/ModifyUser,
- webrt/Admin/Elements/QueueRightsForUser, webrt/Admin/Elements/Tabs,
- webrt/Elements/SelectOwner:
-
- A bunch of work on the ACLs. we're getting closer to having a workable ACL
- editor.
-
-2000-11-03 15:37 jesse
-
- * Makefile, NEWS:
-
- We now deal better with merging merged tickets.
-
- We now properly ignore Precedence: {junk|bulk} headers
-
-2000-10-31 00:06 jesse
-
- * lib/RT/: ACE.pm, ScripScope.pm:
-
- Added ACL support to the ScripScope system.
-
-2000-10-29 21:31 jesse
-
- * Makefile, README, bin/webmux.pl, lib/RT/ACE.pm, lib/RT/Group.pm,
- lib/RT/Groups.pm, lib/RT/Queue.pm, lib/RT/ScripScope.pm,
- lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, lib/RT/Template.pm,
- lib/RT/Templates.pm, lib/RT/Transaction.pm, tools/insertdata:
-
- A bunch of hacking to the ScripScopes system.
-
- You can now edit scrips for a given queue.
- but hey, scrips have no ACL checking yet.
-
-2000-10-29 17:51 jesse
-
- * etc/schema.pm:
-
- Added a whole lot of documentation to schema.pm.
-
-2000-10-25 21:09 jesse
-
- * Makefile, bin/testdeps.pl, etc/schema.pm:
-
- Updated schema.pm and testdeps to jibe with the current CPAN versions of things.
- And I bumped the version to 1.3.20
-
-2000-10-23 16:53 jesse
-
- * Makefile, lib/RT/Date.pm:
-
- Reverted to using mysql by default.
- Finished off the postgresql support in the rt core. (well, at least finished the initial support)
-
-2000-10-23 16:35 jesse
-
- * Makefile, lib/RT/ACE.pm, lib/RT/Ticket.pm, tools/insertdata:
-
- Cleanups related to making postgres support work right.
-
-2000-10-22 20:57 jesse
-
- * Makefile, bin/initacls.Pg, bin/testdeps.pl, etc/acl.Pg,
- etc/config.pm, etc/schema.pm, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Tickets.pm, tools/initdb, tools/insertdata,
- webrt/Ticket/Display.html:
-
- merged in ivan's postgres patches.
- made local ticket links work again. *sigh* SQL evil. eeeeevil.
-
-2000-10-16 16:32 jesse
-
- * docs/Security:
-
- file Security was initially added on branch rt-1-1.
-
-2000-10-16 16:32 jesse
-
- * docs/Security:
-
- some initial notes on security. targetted at RT admins.
-
-2000-10-16 03:01 jesse
-
- * lib/RT/: Link.pm, Links.pm, Ticket.pm:
-
- Fixed a couple of typos in link and links.
- Ticket->Load will now do the right hting with ticket uris or aliases.
-
-2000-10-16 00:47 jesse
-
- * etc/config.pm, lib/RT/Link.pm, lib/RT/Links.pm, lib/RT/Ticket.pm:
-
- The linking interface now uses URIs internally. and it does lots of
- sanity checking.
-
- Tickets now understand what their uris should be. you can load tickets by
- uri. and by alias.
-
- We need a bit more work to make alias support just transparent, but we're
- getting really close.
-
- You shouldn't be able to link to nonexistent local objects any mroe.
-
-2000-10-15 01:57 jesse
-
- * lib/RT/CurrentUser.pm:
-
- Added CurrentUser->LoadByGecos.
- The CLI now uses LoadByGecos to load the currentuser.
- This means that users other than root might actually be able to use the cli now
- VS: ----------------------------------------------------------------------
-
-2000-10-15 01:11 jesse
-
- * Makefile:
-
- Significantly redid the installation procedure. we're now _much_
- more careful about what gets installed where and what's owned by whom.
-
- Oh. and RT's now setgid, rather than setuid. and there's no setuid wrapper anymore
-
-2000-10-15 01:08 jesse
-
- * etc/: config.pm, suidrt.c:
-
- Yanked suidrt.c, since we now run setgid.
-
- rt now logs to /tmp/rt.log.pid.userid
-
-2000-10-14 02:56 jesse
-
- * bin/rtmux.pl, bin/webmux.pl, etc/schema.pm,
- lib/RT/CurrentUser.pm, lib/RT/Interface/Email.pm, tools/initdb,
- tools/insertdata:
-
- CurrentUser.pm had LoadByEmail and LoadByUserId methods added and they're now
- actually used most everywhere.
-
- insertdata doesn't force ids for users now.
-
- the schema now actually enforces a lot of important uniqueness constraints.
-
-2000-10-13 10:59 jesse
-
- * etc/schema.mysql:
-
- Removed the old schema.mysql, lest it lead people astray
-
-2000-10-13 02:27 jesse
-
- * webrt/Ticket/Elements/: EditPeople, ShowMembers:
-
- Removed some old warning text that's not true any more.
- Fixed a relative url problem in "show memebers"
-
-2000-10-12 23:22 jesse
-
- * Makefile, bin/testdeps.pl:
-
- updated testdeps.
- Makefile now defaults to installing rt2 in /opt/rt2
-
-2000-10-12 22:54 jesse
-
- * Makefile, lib/RT/ACL.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm,
- lib/RT/User.pm, lib/RT/Users.pm, tools/insertdata,
- webrt/index.html:
-
- A couple of links on the front page.
- Makefile now assumes www-data instead of nobody as the web user. this is not quite right.
-
- Fixed a little bit of the POD in User.pm.
-
- Redid how Ticket.pm deals with Owner on create. the new logic should actually catch errors
- instead of easily letting referential integrity checks just _fail_.
-
- Insertdata got cleaned up a little bit.
-
- ACL got its cleaned up a bit
-
-2000-10-11 23:22 jesse
-
- * webrt/Admin/Elements/QueueRightsForUser:
-
- file QueueRightsForUser was initially added on branch rt-1-1.
-
-2000-10-11 23:22 jesse
-
- * lib/RT/Users.pm, webrt/Admin/Elements/QueueRightsForUser:
-
- Work on ACLs. and the ACL editor
-
-2000-10-11 21:23 jesse
-
- * tools/insertdata:
-
- gave root a password
-
-2000-10-11 12:28 jesse
-
- * Makefile, tools/initdb:
-
- Databasename changed from RT2 to rt2 to make postgres happier.
-
- initdb quoting bug fixed.
-
- debug mode in initdb turned off.
-
- If you're using mysql and running with ivan's current CVS version of DBIx::DBSchema, RT should once again work.
-
-2000-10-09 02:32 jesse
-
- * etc/schema.pm, tools/initdb:
-
- a debugging hook in initdb and defaults (though they don't work just right yet)
- in schema.pm. Note that we now need DBIx::DBSchema from CVS.
-
-2000-10-09 01:59 jesse
-
- * Makefile, NEWS, etc/suidrt.c:
-
- Jan Kujawa fixed a bug in the setuid wrapper
- Jan Okrouhly fixed some bugs in the merged ticket resolution in the cli.
-
- Rolled 1.0.5pre3
-
-2000-10-05 17:30 jesse
-
- * lib/RT/: ACE.pm, ACL.pm:
-
- more work on RT's acl core
-
-2000-10-05 17:30 jesse
-
- * webrt/Admin/Elements/: GrantQueueRightsTo, GrantQueueRightsTo~,
- SelectQueueRights:
-
- more acl work
-
-2000-10-05 17:30 jesse
-
- * webrt/Admin/Elements/GrantQueueRightsTo~:
-
- file GrantQueueRightsTo~ was initially added on branch rt-1-1.
-
-2000-10-05 17:30 jesse
-
- * webrt/Admin/Elements/GrantQueueRightsTo:
-
- file GrantQueueRightsTo was initially added on branch rt-1-1.
-
-2000-10-05 17:30 jesse
-
- * webrt/Admin/Elements/SelectQueueRights:
-
- file SelectQueueRights was initially added on branch rt-1-1.
-
-2000-10-05 15:49 jesse
-
- * etc/suidrt.c:
-
- reordering things in suidrt.c seemed to make them happier.
-
-2000-10-05 15:39 jesse
-
- * etc/suidrt.c:
-
- missed a comma
-
-2000-10-05 15:03 jesse
-
- * bin/testdeps.pl:
-
- added a dependency test script to make installation by newbies easier.
-
-2000-10-05 15:03 jesse
-
- * Makefile, README, etc/suidrt.c:
-
- Major rewrite of suidrt.c by jan kujawa.
- A couple of bugfixes from Jan Okrouhly
- Public history should now work right in the cli
- Web viewing of merged tickets by their old # should now work better.
-
-2000-10-03 20:22 jesse
-
- * bin/testdeps.pl:
-
- cleaned up testedeps.pl output
-
-2000-10-03 02:41 jesse
-
- * tools/insertdata:
-
- file insertdata was initially added on branch rt-1-1.
-
-2000-10-03 02:41 jesse
-
- * tools/initdb:
-
- file initdb was initially added on branch rt-1-1.
-
-2000-10-03 02:41 jesse
-
- * etc/schema.pm:
-
- file schema.pm was initially added on branch rt-1-1.
-
-2000-10-03 02:41 jesse
-
- * Makefile, bin/initdb.Oracle, bin/initdb.Pg, bin/initdb.mysql,
- bin/testdeps.pl, etc/schema.Pg, etc/schema.pm, lib/RT/ACE.pm,
- lib/RT/Queue.pm, lib/RT/Scrip.pm, lib/RT/User.pm, tools/initdb,
- tools/insertdata:
-
- Fairly massive installation changes.
- We now use ivan's really cool DBIx::DBschema, which, when things
- settle out a bit mean that the oracle and postgres (and possibly other) ports
- get their schema updated automatically.
-
- The initial seed data is now inserted by tools/insertdata through the RT API.
-
- ACE::Create now actually works.
- Same with Scrip::Create.
- and Queue::Create.
-
- There are a couple of new installation-only dependencies. One of them (DBSchema) may become a build-only
- dependency if people whine enough :)
-
- date/time handling was a casualty of the changes. some things will be handled oddly for now.
- Once Ivan releases the next DBSchema update, this should get better again. it was
- the result of a namespace collision between pg and mysql. the timestamp column has
- different behavior. go fig.
-
- This version will require DBIx::SearchBuilder 0.06 (aka what I'm about to check in)
-
-2000-10-03 02:07 jesse
-
- * tools/test:
-
- blew away old, crufty "extras"
-
-2000-09-28 13:55 jesse
-
- * lib/RT/Group.pm:
-
- file Group.pm was initially added on branch rt-1-1.
-
-2000-09-28 13:55 jesse
-
- * lib/RT/: Group.pm, GroupMember.pm, GroupMembers.pm, Groups.pm:
-
- Long overdue adding of completely untested (and unused) code for groups in RT.
- note that this implementation does not assume recursive group membership
-
-2000-09-28 13:55 jesse
-
- * lib/RT/GroupMember.pm:
-
- file GroupMember.pm was initially added on branch rt-1-1.
-
-2000-09-28 13:55 jesse
-
- * lib/RT/GroupMembers.pm:
-
- file GroupMembers.pm was initially added on branch rt-1-1.
-
-2000-09-28 13:55 jesse
-
- * lib/RT/Groups.pm:
-
- file Groups.pm was initially added on branch rt-1-1.
-
-2000-09-18 01:57 jesse
-
- * lib/RT/: ACE.pm, Queue.pm, Ticket.pm:
-
- Lots of work on Queue.pm Most cleanups related to queue watchers, but I
- also added a bit more documentation and fixed a bug that could cause DelWatcher
- in ticket.pm to delete watchers it shouldn't
-
-2000-09-18 00:03 jesse
-
- * docs/API, docs/FAQ, docs/README.oracle, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm:
-
- More documentation. removed outdated docs.
-
- docs/API now talks about what those of you writing your own RT client
- code shouldn't be doing. (Which objects you shouldn't touch).
-
-2000-09-18 00:00 jesse
-
- * README:
-
- Clarified license terms. RT is available under Version 2 of the GPL.
- Not version 1. Not some as-yet-unwritten version 3 that says you can only
- use it if you agree to license your children under the GPL. Version 2.
-
-2000-09-17 19:57 jesse
-
- * lib/RT/: TicketCollection.pm, User.pm, Interface/Email.pm:
-
- Removed bogus signature code.
- Documented User->IsPassword
- removed --area flag from Mailgateway (We ain't got no stinking areas)
-
-2000-09-17 19:21 jesse
-
- * etc/schema.Oracle, etc/schema.mysql, lib/RT/ACE.pm,
- lib/RT/ACL.pm, lib/RT/Scrip.pm, lib/RT/User.pm:
-
- Ugh. Mysql isn't respecting SQL92 reserved words. which meant that I didn't
- notice that I was using "Type" and "Action" in my schema.
- This required a bit of churn to the ACE and User modules.
-
-2000-09-17 17:38 jesse
-
- * Makefile:
-
- Ok. I think I've got it now. This is RT 1.3.18. aka RT2 - Alpha 1.
- The "Bear Suit" Release.
-
- A formal release announcement is forthcoming.
-
-2000-09-17 17:29 jesse
-
- * Makefile:
-
- work on the changelog generator
-
-2000-09-17 17:19 jesse
-
- * HACKING, Makefile, README, bin/initdb.mysql, bin/testdeps.pl:
-
- Bumped the required version of SearchBuilder in testdeps, now that it's
- propagated throughout CPAN
-
- Replaced initdb.mysql with ivan's new version.
-
- Tweaked ivan's initdb.mysql to be a little friendlier, create the schema
- (it was missing a FILEHANDLE in a print statement and deal
- better with omitted passwords.
-
- Updated the readme some more.
-
- Added experimental ChangeLog generation to the make dist process
-
- Bumped the version number to 1.3.18 for release as alpha1 for RT2 today.
-
-2000-09-17 01:40 jesse
-
- * Makefile, README, bin/initacls.mysql, bin/testdeps.pl,
- bin/webmux.pl:
-
- Bumped the Mason version requirement up, so we avoid the poisoned v 0.88
- Applied ivan's alpha-1 patches.
- Did some tweaking for the alpha 1 release.
- Cleaned up the readme a bit
-
-2000-09-15 01:21 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-09-15 01:17 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Mail gateway now handles followup correspondence properly
- (It gets the ticket # right)
-
-2000-09-15 01:06 jesse
-
- * lib/RT/Watcher.pm:
-
- fixed a typo (left off a > ) in Watcher.pm
-
-2000-09-15 00:59 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Watcher.pm, webrt/Ticket/Modify.html:
-
- Editing ticket watchers from the webui now works.
- this required a bunch of work on the internal wathers stuff
- in ticket.pm.
- Also added documentation and watcher-related sanity checks
-
-2000-09-14 00:04 jesse
-
- * lib/RT/Ticket.pm, lib/RT/Watcher.pm,
- webrt/Elements/SelectWatcherType, webrt/Ticket/Elements/EditPeople,
- webrt/Ticket/Elements/EditWatchers,
- webrt/Ticket/Elements/ModifyTicket:
-
- Some cleanup to Watcher and Ticket. (mainly documentation updates)
- Added an IsUser sub to Watcher.pm (which tells you if the watcher
- object refers to a local user or a remote email address)
-
- the ui for editing tickets should work now.
- note that the backend for the watchers side of this isn't there
- yet.
-
- -j
-
-2000-09-13 18:10 jesse
-
- * etc/config.pm:
-
- fixed a configfile typo that would break a new installation
-
-2000-09-12 01:28 jesse
-
- * lib/RT/Date.pm, lib/RT/Ticket.pm, webrt/Elements/ListActions,
- webrt/Elements/SelectDate, webrt/Elements/SelectUsers,
- webrt/Elements/SelectWatcherType, webrt/Ticket/Modify.html,
- webrt/Ticket/Elements/AddWatchers, webrt/Ticket/Elements/EditDates,
- webrt/Ticket/Elements/EditPeople,
- webrt/Ticket/Elements/ModifyTicket:
-
- TimeWorked is now read/write (which may be a bad idea. but I'm willing to try it.
- RT::Date now better understands that "never" doesn't mean 1970.
-
- The web modify interface is getting closer to working.
- I mainly need to finish making the watchers column go.
-
-2000-09-11 00:37 jesse
-
- * etc/config.pm:
-
- Some sanity cleanups to the web queue listing.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/EditDates:
-
- file EditDates was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/EditWatchers:
-
- file EditWatchers was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/AddWatchers:
-
- file AddWatchers was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/EditBasics:
-
- file EditBasics was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/EditPeople:
-
- file EditPeople was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/Ticket/Elements/ModifyTicket:
-
- file ModifyTicket was initially added on branch rt-1-1.
-
-2000-09-11 00:35 jesse
-
- * webrt/: Login.html, webrt.css, Elements/SelectDate,
- Elements/SelectMatch, Elements/SelectQueue, Elements/SelectUsers,
- Elements/ShadedBox, Ticket/EditWatchers.html, Ticket/Modify.html,
- Ticket/Elements/AddWatchers, Ticket/Elements/EditBasics,
- Ticket/Elements/EditDates, Ticket/Elements/EditPeople,
- Ticket/Elements/EditWatcherList, Ticket/Elements/EditWatchers,
- Ticket/Elements/ModifyTicket, Ticket/Elements/ShowBasics,
- Ticket/Elements/ShowDates, Ticket/Elements/ShowDependencies,
- Ticket/Elements/ShowHistory, Ticket/Elements/ShowPeople,
- Ticket/Elements/ShowSummary, Ticket/Elements/TicketToolBox:
-
- Lots and lots of work on the webui.
- The display UI has been cleaned up a bit and the modify UI has been started.
- It's not in its final for yet, nor is there any logic backing many of the new ui features, but those will come next.
-
- If I'm remebering my list correctly, this is the one "biggie" before Alpha 1.
-
- Yay!
-
-2000-09-11 00:35 jesse
-
- * webrt/Elements/SelectUsers:
-
- file SelectUsers was initially added on branch rt-1-1.
-
-2000-09-07 00:52 jesse
-
- * webrt/: Login.html, autohandler, Ticket/Elements/ShowSummary:
-
- Replaced tobias' web arg preservation code with something that's actually based on _mason_ rather than the external apache object. This should make the fastcgi port easier
-
- Fixed a bug in showsummary (unqualified WebPath)
-
-2000-09-07 00:30 jesse
-
- * Makefile, bin/rtmux.pl, lib/RT/Handle.pm:
-
- Look ma! it should install again (i'd flubbed a bit of the
- fastcgi mason handler install.
-
- Oh. and oracle support should work now.
-
-2000-09-06 00:52 jesse
-
- * webrt/Logout.html:
-
- Logout.html links you to the right place now
-
-2000-09-05 23:47 jesse
-
- * webrt/Search/Listing.html:
-
- YA typo fix
-
-2000-09-05 23:45 jesse
-
- * webrt/Search/Listing.html:
-
- Damn I wish I could type tonight. :/ missed an $RT::
-
-2000-09-05 23:43 jesse
-
- * webrt/: Search/Listing.html, Ticket/Elements/ShowSummary:
-
- Fixed a few more Absolute url bugs
-
-2000-09-05 23:35 jesse
-
- * webrt/Elements/Tabs:
-
- Tabs needed / as the final character for transparent proxying
-
-2000-09-05 22:39 jesse
-
- * webrt/: Login.html, Admin/Elements/CreateUserCalled,
- Admin/Elements/ModifyQueue, Admin/Elements/ModifyTemplate,
- Admin/Elements/ModifyUser, Admin/Users/index.html:
-
- more work on proper absolute pathing
-
-2000-09-05 22:08 jesse
-
- * webrt/: Login.html, Admin/Elements/CreateQueueCalled,
- Admin/Elements/CreateUserCalled, Admin/Elements/ModifyUser,
- Admin/Users/index.html:
-
- A bunch of the admin tools weren't properly dealing with absolute pathed requests. it made it impossible to have RT2 anywhere other than at the / of your webserver
-
-2000-09-05 21:40 jesse
-
- * lib/RT/Handle.pm:
-
- file Handle.pm was initially added on branch rt-1-1.
-
-2000-09-05 21:40 jesse
-
- * bin/mason_handler.fcgi:
-
- file mason_handler.fcgi was initially added on branch rt-1-1.
-
-2000-09-05 21:40 jesse
-
- * Makefile, bin/mason_handler.fcgi, bin/testdeps.pl,
- lib/RT/Handle.pm:
-
- Updated testdeps to ask for the new version of mailtools
- Added in the new fastcgi handler (not working yet)
- and RT::Handle, which is a wrapper for SearchBuilder::Handle
-
-2000-09-04 22:52 jesse
-
- * Makefile, TODO, bin/rtmux.pl, bin/webmux.pl, etc/config.pm,
- lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Interface/Web.pm,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowRequestor,
- webrt/Ticket/Elements/TicketToolBox:
-
- A couple of bugfixes related to the switch to SearchBuilder.
- A few webui cleanups.
- A bit of abstraction to make the eventual fastcgi port easier.
-
-2000-09-04 12:48 jesse
-
- * bin/testdeps.pl, lib/RT/Attachments.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/Watcher.pm, lib/RT/Watchers.pm,
- lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowDates:
-
- Several batched updates from when pallas was off-net
-
- UpdateTold changed to SetTold.
- A bunch of work to get Scrips working.
- Lots more POD in Ticket.pm
- Transaction->Describe is better about printing what really happened.
- Attachments.pm had a typo that prevented it from dealing with multipart messages.
-
-2000-08-31 02:18 jesse
-
- * Makefile, NEWS, etc/suidrt.c:
-
- Added ENV squashing to suidrt.c
-
-2000-08-30 14:46 jesse
-
- * bin/rtmux.pl:
-
- Rolling in some oracle changes...they're not done yet, but nothing should
- break with mysql. fixed a typo in rtmux.pl that was introduced with the switch to searchbuilder.
-
-2000-08-29 17:02 jesse
-
- * README, bin/rtmux.pl, bin/testdeps.pl, bin/webmux.pl,
- lib/RT/EasySearch.pm, lib/RT/Record.pm:
-
- MAJOR CHANGE: Switched to the new name of the DBIx:: modules.
- We now use DBIx::SearchBuilder rather than DBIx::EasySearch and friends.
- Note that this is only a name and structure change for the module set.
- The functionality is the same...though seperating out oracle and mysql
- specific features comes soon.
-
-2000-08-29 16:57 jesse
-
- * etc/schema.Oracle:
-
- updated the schema.Oracle
-
-2000-08-29 02:02 jesse
-
- * webrt/: Elements/SelectWatcherType, Ticket/EditWatchers.html,
- Ticket/Update.html:
-
- Started hacking on watchers and ticket update webui a bit.
- they need a lot more work
-
-2000-08-29 01:51 jesse
-
- * webrt/Ticket/: Display.html, DisplayHistory, DisplayTransaction,
- Elements/ShowHistory, Elements/ShowTransaction:
-
- Made FullHeaders/BriefHeaders work in the webui
-
-2000-08-28 01:46 jesse
-
- * webrt/Admin/Elements/: CreateUserCalled, ModifyUser:
-
- Fixed some display buglets from tobi oetiker
-
-2000-08-28 01:31 jesse
-
- * webrt/Ticket/Update.html:
-
- Removed some text that harassed the user. that's generally bad policy
-
-2000-08-27 23:56 jesse
-
- * webrt/: Admin/Elements/Header, Admin/Elements/ModifyTemplate,
- Admin/Elements/Tabs, Elements/ListActions, Elements/Tabs:
-
- A few more added helper elements from the webui
-
-2000-08-27 23:56 jesse
-
- * webrt/Admin/Elements/Header:
-
- file Header was initially added on branch rt-1-1.
-
-2000-08-27 23:56 jesse
-
- * webrt/: Admin/Elements/Tabs, Elements/Tabs:
-
- file Tabs was initially added on branch rt-1-1.
-
-2000-08-27 23:56 jesse
-
- * webrt/Admin/Elements/ModifyTemplate:
-
- file ModifyTemplate was initially added on branch rt-1-1.
-
-2000-08-27 23:56 jesse
-
- * webrt/Elements/ListActions:
-
- file ListActions was initially added on branch rt-1-1.
-
-2000-08-27 23:54 jesse
-
- * webrt/Admin/Users/Prefs.html:
-
- file Prefs.html was initially added on branch rt-1-1.
-
-2000-08-27 23:54 jesse
-
- * webrt/Admin/: Queues/Create.html, Users/Create.html:
-
- file Create.html was initially added on branch rt-1-1.
-
-2000-08-27 23:54 jesse
-
- * webrt/Admin/: Queues/Modify.html, Users/Modify.html:
-
- file Modify.html was initially added on branch rt-1-1.
-
-2000-08-27 23:54 jesse
-
- * webrt/Admin/: Queues/index.html, Users/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-08-27 23:54 jesse
-
- * bin/webmux.pl, lib/RT/Area.pm, lib/RT/Areas.pm, lib/RT/Queue.pm,
- lib/RT/ScripScopes.pm, lib/RT/Template.pm, lib/RT/Templates.pm,
- webrt/Admin/CreateQueue.html, webrt/Admin/CreateUser.html,
- webrt/Admin/EditUser.html, webrt/Admin/ModifyQueue.html,
- webrt/Admin/ModifyUser.html, webrt/Admin/index.html,
- webrt/Admin/Elements/CreateQueueCalled,
- webrt/Admin/Elements/CreateUserCalled,
- webrt/Admin/Elements/ModifyQueue, webrt/Admin/Elements/ModifyUser,
- webrt/Admin/Elements/SelectModifyQueue,
- webrt/Admin/Elements/SelectModifyUser,
- webrt/Admin/Queues/Create.html, webrt/Admin/Queues/Modify.html,
- webrt/Admin/Queues/index.html, webrt/Admin/Users/Create.html,
- webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html,
- webrt/Admin/Users/index.html:
-
- Lots of work on the web admin ui. basic user and queue editing working.
- and template editing
-
-2000-08-24 15:53 jesse
-
- * Makefile, README, bin/rtmux.pl, etc/config.pm,
- lib/RT/Action/SendEmail.pm, webrt/Elements/Footer,
- webrt/Elements/Header, webrt/Elements/ViewUser,
- webrt/Ticket/Elements/EditWatcherList:
-
- The first cut at better configuration.
-
- Updated the readme
-
- Made the mail send routine in lib/RT/Action/Email.pm somewhat
- more configurable (though we're still using printing to a pipe
- because Mail::Mailer is busted :/)
-
- Most options moved out of the makefile..this will make packaging
- possible.
-
- Fixed a couple places where tobias had been using a non-relative
- url unnecessarily.
-
-2000-08-22 03:08 jesse
-
- * Makefile:
-
- Getting version #s in sync for RT 1.3.15
-
-2000-08-22 03:05 jesse
-
- * lib/RT/: Scrip.pm, Transaction.pm, Action/AutoReply.pm,
- Action/SendEmail.pm:
-
- Work on making sure mail gets sent. It's not "right" yet but it's getting
- closer.
-
-2000-08-21 19:46 jesse
-
- * webrt/autohandler:
-
- Fixed a minor issue that let people "log in as ''"
-
-2000-08-21 01:12 jesse
-
- * bin/rtmux.pl, etc/config.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm:
-
- Set a default type in ticket.pm
- allowed restriction based on type in tickets.pm
-
- now set the timezone in the config file rather than the rtmux.
- means it effects webmux.pl too.
-
-2000-08-20 23:41 jesse
-
- * etc/schema.mysql, lib/RT/Date.pm, webrt/Elements/SelectOwner:
-
- Standardized StartsBy to Starts.
- Removed a warning from SelectOwner
- Fixed a bug in RT::Date->Set(Format => 'unknown')
-
-2000-08-20 01:46 jesse
-
- * lib/RT/Ticket.pm, webrt/Search/Listing.html,
- webrt/Ticket/Elements/ShowMemberOf,
- webrt/Ticket/Elements/ShowMembers:
-
- Work on MemberOf and Members in Ticket.pm
- they're both now Tickets objects rather than links objects.
- and the things that use them have been updated
-
-2000-08-19 03:03 jesse
-
- * Makefile:
-
- Bumped the version 1.3.14
-
-2000-08-19 02:49 jesse
-
- * README, etc/config.pm, lib/RT/Ticket.pm:
-
- Did some work on logging. switched some carping to some logging.
-
-2000-08-18 02:04 jesse
-
- * Makefile, README:
-
- Minor readme updates.
-
- Bumped the version to 1.3.13
-
-2000-08-18 01:04 jesse
-
- * lib/RT/Transaction.pm:
-
- CurrentUser objects act on things. not user Objects. Thanks, Jens
-
-2000-08-17 23:55 jesse
-
- * webrt/Elements/: SelectOwner, Submit:
-
- notes in select owner. a bit of tweaking in submit ot make it more visible
-
-2000-08-17 16:16 jesse
-
- * Makefile:
-
- Changes to rt-mailgate to properly respect authenticated users
- when performing %RT RESOLVE commands.
-
-2000-08-17 03:01 jesse
-
- * lib/RT/Interface/Web.pm:
-
- Missed a checkin on Web.pm. sorry about that
-
-2000-08-17 02:53 jesse
-
- * bin/webmux.pl, lib/RT/Database.pm, lib/RT/Date.pm,
- lib/RT/Ticket.pm, lib/RT/Interface/Web.pm:
-
- Yanked the ancient lib/RT/Database.pm. It never served any purpose
- added some functionality to RT::Date. it can now take a date type
- of 'unknown.' This will "require" Date::Manip and parse it into
- an ISO style date. note that this should NEVER be called from RT's
- core due to overhead. It is useful from web interfaces and CLI tools....
-
- added date::manip as a requirement to webmux.pl (so it gets loaded before
- client hits)
-
- cleaned up Interface/Web.pm
-
- rationalized some of the routines dealing with date stuff in ticket.pm.
-
- Actual working web date changing should be coming "soon." (where soon is
- defined as sometime this week)
-
-2000-08-16 14:46 jesse
-
- * webrt/Elements/Submit:
-
- file Submit was initially added on branch rt-1-1.
-
-2000-08-16 14:46 jesse
-
- * webrt/: Login.html, index.html, Elements/Footer, Elements/Header,
- Elements/Submit, Ticket/Elements/ShowBasics,
- Ticket/Elements/ShowTransaction:
-
- Various bits of webui cleanup
-
-2000-08-16 14:16 jesse
-
- * lib/RT/: Tickets.pm, Interface/Email.pm:
-
- We can now search for tickets by relationship
-
-2000-08-16 13:18 jesse
-
- * lib/RT/CurrentUser.pm:
-
- the real oneline patch that should make rt-mailgate work for new users again.
-
-2000-08-15 01:17 jesse
-
- * lib/RT/: Tickets.pm, Interface/Web.pm:
-
- The first round of convenience methods in RT/Tickets.pm
- Still need to do the ticket relations methods and the
- date methods
-
-2000-08-14 23:47 jesse
-
- * webrt/Elements/SelectDateType:
-
- file SelectDateType was initially added on branch rt-1-1.
-
-2000-08-14 23:47 jesse
-
- * webrt/Elements/SelectDateType:
-
- ack. missed this in the wackiness with tonight's earlier checkin.
-
-2000-08-14 19:35 jesse
-
- * webrt/: Elements/Header, Elements/SelectDate,
- Elements/SelectQueue, Elements/TitleBoxStart, Search/Listing.html,
- Search/PickRestriction:
-
- The rest of the previous commit.
-
-2000-08-14 19:27 jesse
-
- * etc/config.pm, webrt/Login.html, webrt/Logout.html,
- webrt/autohandler, webrt/index.html, webrt/webrt.css,
- webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowMemberOf,
- webrt/Ticket/Elements/ShowMembers,
- webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction:
-
- Cleaned up the ticket display a bit.
- made logout actually properly erase session data
- protected _everything_ with an autohandler in /
- prettified Login.html
- added some options to /Elements/TitleBoxHead...which seems to have been missed
-
-2000-08-14 14:37 jesse
-
- * README:
-
- Added a warning about postmaster from JD
-
-2000-08-13 21:57 jesse
-
- * lib/RT/TicketCollection.pm, lib/RT/Tickets.pm,
- lib/RT/Interface/Web.pm, webrt/Elements/SelectBoolean,
- webrt/Elements/SelectDate, webrt/Elements/SelectMatch,
- webrt/Elements/SelectOwner, webrt/Elements/SelectQueue,
- webrt/Elements/SelectStatus, webrt/Elements/SelectWatcherType,
- webrt/Search/Listing.html, webrt/Search/PickRestriction,
- webrt/Search/TicketCell:
-
- Significant work on the search and display code.
- I'm not convinced that this doesn't introduce new bugs.
- However, you can now search by ticket content.
-
- I will be reworking Tickets.pm a bit more to add a bunch of convenience methods
- over then next week or so.
-
-2000-08-12 18:07 jesse
-
- * lib/RT/Ticket.pm:
-
- Fixed a bug in WatchersAsString. (RT::Watchers wasn't required early enough)
- this whole routine needs to be redone :/
-
-2000-08-12 18:06 jesse
-
- * lib/RT/User.pm:
-
- User->Create CanManipulate now defaults to 0.
-
-2000-08-12 18:05 jesse
-
- * etc/schema.mysql:
-
- Updated the default user entries in schema.mysql to have the "CanManipulate"
- flag set so they'd show up in owner lists.
-
-2000-08-10 19:16 jesse
-
- * README:
-
- updated instructions for Apache install
-
-2000-08-10 18:59 jesse
-
- * etc/schema.mysql:
-
- the queue values for the first queue were wrong
-
-2000-08-10 17:55 jesse
-
- * lib/RT/Ticket.pm:
-
- BUGFIX: _UpdateTold now doesn't record a transaction, as things should be
-
-2000-08-10 15:43 jesse
-
- * etc/config.pm, etc/schema.Oracle, etc/schema.mysql,
- lib/RT/Attachment.pm, lib/RT/Record.pm, lib/RT/Scrip.pm,
- lib/RT/ScripScope.pm, lib/RT/Ticket.pm, lib/RT/TicketCollection.pm,
- lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/User.pm,
- lib/RT/Action/AutoReply.pm, lib/RT/Action/Notify.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Interface/Web.pm,
- webrt/autohandler, webrt/Elements/Error,
- webrt/Elements/SelectStatus, webrt/Ticket/Update.html,
- webrt/Ticket/Elements/ShowBasics,
- webrt/Ticket/Elements/ShowDependencies,
- webrt/Ticket/Elements/ShowMemberOf,
- webrt/Ticket/Elements/ShowMembers,
- webrt/Ticket/Elements/ShowPeople,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowRequestor,
- webrt/Ticket/Elements/TicketToolBox:
-
- Fixed ACL caching bugs
- Finished adding status "new"
- cli searching based on status works better.
-
- API Change. Queue is NO LONGER the Queue Object for a ticket
- API Change. Owner is NO LONGER the Owner Object for a ticket
-
- instead, both point to their proper database values and OwnerObj and QueueObj
- do the right thing throughout. This was rather more code churn than I was hoping for, but we've now got a cleaner, more consistent API that's easier to work
- with.
-
- little bits of POD update.
-
- Cleaned out some unused code.
-
- Made some error messages more professional.
-
- We now keep track of date started as well as a "start by" date. these both
- need a bit more work.
-
- Calling convention for _Set changed. Rather than three different calling
- conventions which weren't very extensible, DBIx::Record::_Set and all its
- subclasses now use paramhash style calling. it's much more extensible and
- flexible now. (This was necessary for some ACL work, among other things)
-
-2000-08-09 01:11 jesse
-
- * lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- webrt/Elements/SelectStatus, webrt/Elements/dayMenu,
- webrt/Elements/monthMenu, webrt/Elements/yearMenu:
-
- ACL Decisions are now cached
- date menus have a "never" option in the webui
- added a new status. "new" for tickets that aren't yet open
-
-2000-08-08 01:45 jesse
-
- * etc/schema.mysql, lib/RT/Queue.pm:
-
- schema updates.
- fixed queue->Create
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/ModifyQueue.html:
-
- file ModifyQueue.html was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/: CreateQueue.html, CreateUser.html,
- ModifyQueue.html, ModifyUser.html, index.html,
- Elements/CreateQueueCalled, Elements/CreateUserCalled,
- Elements/ModifyQueue, Elements/ModifyUser,
- Elements/SelectModifyQueue, Elements/SelectModifyUser:
-
- Started the new web admin interface.
- it can now edit queues and users and create queues and users
- I'm fairly leery of its user handling stuff. particularly passwords
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/CreateUser.html:
-
- file CreateUser.html was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/SelectModifyUser:
-
- file SelectModifyUser was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/ModifyUser:
-
- file ModifyUser was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/CreateUserCalled:
-
- file CreateUserCalled was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/ModifyUser.html:
-
- file ModifyUser.html was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/CreateQueue.html:
-
- file CreateQueue.html was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/ModifyQueue:
-
- file ModifyQueue was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/SelectModifyQueue:
-
- file SelectModifyQueue was initially added on branch rt-1-1.
-
-2000-08-08 01:44 jesse
-
- * webrt/Admin/Elements/CreateQueueCalled:
-
- file CreateQueueCalled was initially added on branch rt-1-1.
-
-2000-08-07 22:28 jesse
-
- * etc/schema.mysql, lib/RT/Date.pm, lib/RT/Ticket.pm,
- lib/RT/Users.pm:
-
- added a few ticket attributes for forwards compatibility
- fixed another ACL problem in users.pm
- fixed a date display bug
-
-2000-08-07 01:03 jesse
-
- * lib/RT/Transaction.pm, webrt/Ticket/Create.html,
- webrt/Ticket/Elements/ShowTransaction:
-
- Transaction.pm had some lingering ACL bugs ($CurrentUser) isn't a reasonable
- global in core library routines :/
-
- Working on spawning subtickets.
-
-2000-08-07 00:31 jesse
-
- * webrt/User/Prefs.html:
-
- file Prefs.html was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Ticket/Elements/ShowDependencies:
-
- file ShowDependencies was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Ticket/Elements/ShowReferences:
-
- file ShowReferences was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Ticket/Elements/ShowMembers:
-
- file ShowMembers was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Ticket/Elements/ShowMemberOf:
-
- file ShowMemberOf was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Admin/EditUser.html:
-
- file EditUser.html was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * webrt/Admin/Elements/EditUserComments:
-
- file EditUserComments was initially added on branch rt-1-1.
-
-2000-08-07 00:31 jesse
-
- * etc/config.pm, lib/RT/Ticket.pm, webrt/EditUserComments.html,
- webrt/ViewUser.html, webrt/webrt.css, webrt/Admin/EditUser.html,
- webrt/Admin/ModifyUser, webrt/Admin/Elements/EditUserComments,
- webrt/Elements/Error, webrt/Elements/Header,
- webrt/Elements/SelectOwner, webrt/Ticket/Create.html,
- webrt/Ticket/Create_Detail.html, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/EditWatcherList,
- webrt/Ticket/Elements/ShowDependencies,
- webrt/Ticket/Elements/ShowMemberOf,
- webrt/Ticket/Elements/ShowMembers,
- webrt/Ticket/Elements/ShowPeople,
- webrt/Ticket/Elements/ShowReferences,
- webrt/Ticket/Elements/ShowSummary, webrt/User/Prefs.html:
-
- Did a bunch of work on the webui. cleaned up a lot of the link display stuff
- did some work on ticket create
-
- dependencies and subtickets are now listed in the ticketview. yay!
-
-2000-08-05 19:47 jesse
-
- * lib/RT/Ticket.pm, webrt/Ticket/Elements/ShowSummary:
-
- more Nobody fixes in Ticket.pm
- justification fixes in ShowSummary
-
-2000-08-05 18:50 jesse
-
- * webrt/Ticket/ProcessUpdate.html:
-
- The webui can now process updates.
- it needed YA currentuser fix
-
-2000-08-05 18:43 jesse
-
- * lib/RT/Ticket.pm:
-
- Ticket::Create(Owner => now takes either a user object or a userid.
- and defaults to nobody.
-
-2000-08-05 17:51 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-08-05 17:49 jesse
-
- * lib/RT/: Date.pm, Interface/Email.pm:
-
- fixed a few more bugs in the mailgateway. it can create tickets now.
- fixed an undefined default in the cli query
- made the date routine not spit out a stupid warning
-
-2000-08-05 17:21 jesse
-
- * lib/RT/Interface/Email.pm:
-
- fixed typos in the mailgate. thanks gary
-
-2000-08-05 00:16 jesse
-
- * Makefile, NEWS, webrt/Login.html, webrt/autohandler,
- webrt/webrt.css:
-
- little tweaks to the webui.
- bumped the version to 1.3.11 for distribution
-
-2000-08-04 18:45 jesse
-
- * README, bin/rtmux.pl, bin/webmux.pl, lib/RT/Areas.pm,
- lib/RT/Attachments.pm, lib/RT/Date.pm, lib/RT/Link.pm,
- lib/RT/Links.pm, lib/RT/Queue.pm, lib/RT/Queues.pm,
- lib/RT/Record.pm, lib/RT/ScripScopes.pm, lib/RT/Scrips.pm,
- lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
- lib/RT/Transaction.pm, lib/RT/Transactions.pm, lib/RT/Users.pm,
- lib/RT/Watchers.pm, lib/RT/Interface/Web.pm,
- webrt/Admin/ModifyUser, webrt/Elements/SelectOwner,
- webrt/Elements/SelectQueue, webrt/Elements/ViewUser,
- webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html,
- webrt/Ticket/Elements/ShowPeople:
-
- When creating an object, you ALWAYS need to pass in the current user
- or acls break. we were a bit too lax about this before.
-
- this was a major round of bugfixing for the webui
-
-2000-08-04 15:41 jesse
-
- * Makefile, lib/RT/CurrentUser.pm, lib/RT/User.pm, webrt/webrt.css,
- webrt/Elements/Header, webrt/Search/Listing.html,
- webrt/Search/autohandler, webrt/Ticket/autohandler:
-
- Queue listing doesn't have that ugly blue any more. And its code for
- setting row color is a bit cleaner.
-
- we now actually _check_ passwords for web logins.
-
- webrt.css now has slightly darker hyperlinks.
-
- CurrentUser->IsPassword now uses the UserObj
-
- users can't use null passwords for authentication.
-
-2000-08-03 02:19 jesse
-
- * lib/RT/Interface/Web.pm, webrt/Elements/ShadedBox,
- webrt/Elements/TitleBoxStart:
-
- misc fixes to the webui and a leftover fix to the cli.
-
- the webui needs to have some of its internals gutted and
- put back together. it feels very kludgy and not really "planned"
-
-2000-08-03 02:04 jesse
-
- * lib/RT/: Record.pm, Scrip.pm, Ticket.pm, Tickets.pm,
- Transaction.pm, Action/SendEmail.pm:
-
- made status changes work. (RT::Action::SendEmail was being stupid
- and not error checking until it was too late)
-
- removed more use of hardwired SQL "now()"
-
- moved the handling of LastUpdated into RT::Record. from DBIx::Record
-
-2000-08-03 01:09 jesse
-
- * lib/RT/Queue.pm:
-
- fixed a bug in the cli that kept ticket creates from working.
- queue->hasright's calling convention changed.
-
-2000-08-03 00:59 jesse
-
- * Makefile:
-
- fixed a makefile typo. added back the comment about pg
-
-2000-08-03 00:42 jesse
-
- * docs/design_docs/users:
-
- file users was initially added on branch rt-1-1.
-
-2000-08-03 00:42 jesse
-
- * etc/user.Oracle:
-
- file user.Oracle was initially added on branch rt-1-1.
-
-2000-08-03 00:42 jesse
-
- * etc/schema.Oracle:
-
- file schema.Oracle was initially added on branch rt-1-1.
-
-2000-08-03 00:42 jesse
-
- * bin/initacls.Oracle, bin/initdb.Oracle, docs/README.oracle,
- docs/design_docs/users, etc/schema.Oracle, etc/user.Oracle:
-
- A first cut at oracle support from Dave Morgan <dmorgan@bartertrust.com>.
- It is pretty much untested and guaranteed to break. Among other
- things, the schema isn't current. but it's a start.
- Thanks, Dave!
-
-2000-08-03 00:42 jesse
-
- * docs/README.oracle:
-
- file README.oracle was initially added on branch rt-1-1.
-
-2000-08-03 00:42 jesse
-
- * bin/initacls.Oracle:
-
- file initacls.Oracle was initially added on branch rt-1-1.
-
-2000-08-03 00:42 jesse
-
- * bin/initdb.Oracle:
-
- file initdb.Oracle was initially added on branch rt-1-1.
-
-2000-08-03 00:31 jesse
-
- * docs/design_docs/local_hacking:
-
- file local_hacking was initially added on branch rt-1-1.
-
-2000-08-03 00:31 jesse
-
- * HACKING, Makefile, docs/FAQ.html, docs/actions.html,
- docs/admin.html, docs/attributes.html, docs/outline.html,
- docs/rt_users_guide.html, docs/design_docs/local_hacking:
-
- doc updates. removed outdated 1.x docs
-
-2000-08-02 23:53 jesse
-
- * etc/config.pm:
-
- added some comments from tobias
-
-2000-08-02 00:20 jesse
-
- * Makefile, NEWS, TODO, etc/config.pm, etc/schema.mysql,
- lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/CurrentUser.pm,
- lib/RT/Date.pm, lib/RT/Queue.pm, lib/RT/Record.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/User.pm,
- lib/RT/Interface/Email.pm:
-
-
- Weekend of 1 Aug 2000
- ---------------------
- I spent the weekend in DC visiting family. This meant I got a bit of
- code written ;) Sadly, I have no access to the CVS server,
- so I'll be batching a bunch of commits.
-
- 1. Enabled CLI admin tool
- 2. Added ACL listing functionality to the CLI admin tool.
- 3. Enhanced RT::Queue->Grant such that it works with the structure of RT2
- ACLs
- 4. Made the Logging framework actually log errors to STDERR.
- (This makes debugging the CLI tools much easier. It also means
- that the cli tools explain _why_ they're dying.)
- 5. Fully expunged use of Mysql's SQL keyword "now()". I'd have left this
- stuff in, except mysql doesn't seem to deal well with the idea that the
- entire world isn't one timezone. On top of that, it doesn't seem to
- have a way to force it into GMT mode that doesn't involve modifying init
- scripts. *sigh*
- 6. Did a whole bunch more work on the ACL checking in RT::User
- 7. Wrote up some preliminary docs on local hacks to RT
- 8. Added in a routine to allow local canonicalization of email addresses
- 9. Added in the concept of "Disabled users" To preserve RT2's database
- Integrity, whacking user accounts would be a bad thing. So, instead,
- we've got the concept of 'disabled' users. A disabled user fails ANY
- ACL check, ANY password check and doesn't appear in any lists of ACLs.
- (note that the lastmost statement isn't yet true)
-
- 10. rtadmin user -enable and rtadmin user -disable now work.
- 11. ACLs are now enforced for many ticket related actions.
- (this does mean that you'll want to insert some acls like those below)
-
- INSERT INTO ACL VALUES (1,0,'User','SuperUser','Queue',0);
- INSERT INTO ACL VALUES (2,3,'User','CreateTicket','Queue',0);
- INSERT INTO ACL VALUES (3,3,'User','ShowTicket','Ticket',0);
- INSERT INTO ACL VALUES (4,3,'User','ShowTicketHistory','Ticket',0);
- INSERT INTO ACL VALUES (6,3,'User','CreateTicket','Queue',1);
- INSERT INTO ACL VALUES (7,3,'User','ModifyTicket','Ticket',1);
- INSERT INTO ACL VALUES (8,1,'User','Superuser','System',0);
- INSERT INTO ACL VALUES (9,0,'Everyone','Superuser','System',0);
-
-2000-08-02 00:17 jesse
-
- * bin/: rtmux.pl, testdeps.pl:
-
- Bumped us up to requiring Log::Dispatch 1.6.
- Cleaned up testdeps a bit. Now, you knwo it passes.
-
-2000-07-27 03:01 jesse
-
- * Makefile:
-
- Bumped the version to 1.3.9
- Rolled RT 1.3.9
-
-2000-07-27 02:37 jesse
-
- * lib/RT/Date.pm, lib/RT/Ticket.pm, webrt/Elements/ViewUser,
- webrt/Ticket/Elements/ShowDates, webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction, bin/webmux.pl:
-
- Fixed a bug with null due dates.
- Made RT/Date deal with a time of -1 as "Never"
- made html escaping on included entities on webrt default.
-
-2000-07-27 02:01 jesse
-
- * lib/RT/Date.pm:
-
- file Date.pm was initially added on branch rt-1-1.
-
-2000-07-27 02:01 jesse
-
- * README, lib/RT/Date.pm, lib/RT/Record.pm, lib/RT/Ticket.pm,
- bin/testdeps.pl:
-
- Moved Date managment routines from DBIx::Record to RT::Record.
- Initial Checkin of RT::Date, a lightweight Date object capable
- of doing everything RT needs. Oh. and it's fully documented in POD.
-
- Converted RT::Record and RT::Ticket and the cli to use RT::Date instead
- of Date::Kronos. The CLI now feels _much_ zippier and code within
- RT::Ticket is a bit easier to read.
-
-2000-07-27 01:55 jesse
-
- * etc/schema.mysql:
-
- removed extraneous whitespace
-
-2000-07-27 01:51 jesse
-
- * lib/RT/Attachment.pm:
-
- changed the header on attachment.pm
-
-2000-07-24 10:17 tobiasb
-
- * lib/RT/Interface/Web.pm, webrt/ViewUser.html,
- webrt/Search/TicketCell, webrt/Ticket/Display.html,
- webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html:
-
- Moved some things to Web.pm, made some nifty options for getting tickets from the listing in a new window
-
-2000-07-24 06:56 tobiasb
-
- * lib/RT/User.pm:
-
- Some TODOs
-
-2000-07-24 06:54 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Some comments and TODOs.
-
- I fixed one simple TODO about putting in pid + rand into the name of
- the temp directory needed for parsing the mime entity.
-
-2000-07-24 00:52 jesse
-
- * lib/RT/User.pm:
-
- Added a few comments where they really should be
-
-2000-07-24 00:48 jesse
-
- * lib/RT/Interface/Email.pm:
-
- Did a bunch of cleanup work on Interface/Email.pm
- It could still use more.
-
-2000-07-23 03:50 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Added the method 'TimeWorkedAsString'. Ok, I'll start looking into Date::Kronos shortly :)
-
-2000-07-22 20:10 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- [no log message]
-
-2000-07-22 20:05 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Inserted a reference to [fsck 290] in a TODO-comment.
-
-2000-07-22 13:06 tobiasb
-
- * lib/RT/Interface/Web.pm, webrt/Search/Listing.html:
-
- Moved stuff from Listing.html to Web.pm, sub ProcessSearchQuery (suggestions to a better name for the sub?)
-
-2000-07-21 15:11 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm,
- webrt/Search/Listing.html:
-
- bugfixing
-
-2000-07-21 11:09 tobiasb
-
- * etc/schema.mysql:
-
- Bugfix
-
-2000-07-21 10:57 tobiasb
-
- * webrt/index.html:
-
- Now it's possible to select queue from the start page
-
-2000-07-21 10:35 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/Ticket.pm, webrt/Elements/Header,
- webrt/Elements/SelectOwner, webrt/Ticket/Elements/EditWatcherList:
-
- bugfixes, comments. I restricted the Owner-list to those that CanManipulate - this should eventually go away when we have proper access control. Tiny improvement of EditWatcherList - it's now possible to edit user information if the user is found.
-
-2000-07-21 05:48 tobiasb
-
- * lib/RT/CurrentUser.pm:
-
- bugfix
-
-2000-07-21 00:08 jesse
-
- * lib/RT/ACE.pm, lib/RT/Attachment.pm, lib/RT/Queue.pm,
- lib/RT/Ticket.pm, lib/RT/User.pm, webrt/EditUserComments.html:
-
- Cleaned up language in EditUserComments
-
- did work on watchers in ui/cli/admin and Ticket.pm and User.pm
- cleaned up code in Ticket.pm
-
- Start of some work on acls in Queue.pm
-
-2000-07-20 22:13 tobiasb
-
- * lib/RT/Interface/Web.pm, webrt/Elements/SelectWatcherType,
- webrt/Ticket/Display.html, webrt/Ticket/EditWatchers.html,
- webrt/Ticket/Elements/EditWatcherList,
- webrt/Ticket/Elements/ShowHistory, webrt/Ticket/Elements/ShowLinks,
- webrt/Ticket/Elements/TicketToolBox:
-
- Some code improvements, added one popular demand here; to avoid spending too much time clicking around, it should be possible to show all histoies of member requests at the same page.
-
-2000-07-20 18:31 tobiasb
-
- * lib/RT/CurrentUser.pm:
-
- Fixing a bit. Please try to remember to test code before committing
- it :)
-
-2000-07-20 18:09 tobiasb
-
- * webrt/Ticket/ProcessUpdate.html:
-
- once more I've committed without testing..
-
-2000-07-20 18:02 tobiasb
-
- * lib/RT/CurrentUser.pm:
-
- Removed a compile-time bug
-
-2000-07-20 17:48 tobiasb
-
- * lib/RT/User.pm:
-
- bugfix
-
-2000-07-20 17:39 tobiasb
-
- * etc/config.pm, lib/RT/Ticket.pm, lib/RT/User.pm,
- lib/RT/Watcher.pm, lib/RT/Interface/Web.pm,
- webrt/Ticket/Display.html:
-
- bugfixes + conflict resolving at the signature + moved something to Web.pm from Display.html
-
-2000-07-20 17:31 jesse
-
- * lib/RT/: CurrentUser.pm, User.pm:
-
- Culled some not-for-now signature stuff.
- Cleaned up and optimised CurrentUser->UserObj
-
-2000-07-20 16:39 jesse
-
- * Makefile, NEWS:
-
- doing some work for a customer. rt-mailgate --help should tell you
- about the fabulous new mail mode
-
-2000-07-20 15:39 tobiasb
-
- * lib/RT/Interface/Web.pm, webrt/Ticket/Display.html:
-
- moving things from the template to Web.pm was not as straight-forwarded as I had hoped.
-
-2000-07-20 15:20 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/CurrentUser.pm, lib/RT/User.pm,
- lib/RT/Interface/Web.pm, webrt/Ticket/Display.html:
-
- Started moving stuff to Web.pm, fixed and tested signatures
-
-2000-07-20 14:50 tobiasb
-
- * lib/RT/: CurrentUser.pm, User.pm:
-
- moved signature from currentuser to user (but does it make sense, anyway? Signatures is something 'personal' that belongs only to the current user?)
-
-2000-07-20 14:43 tobiasb
-
- * webrt/ViewUser.html:
-
- bugfix ... hmpf, always test before committing .. always test before committing ...
-
-2000-07-20 14:33 tobiasb
-
- * lib/RT/Interface/Web.pm, webrt/ViewUser.html:
-
- bugfix
-
-2000-07-20 14:11 tobiasb
-
- * lib/RT/Interface/Web.pm:
-
- file Web.pm was initially added on branch rt-1-1.
-
-2000-07-20 14:11 tobiasb
-
- * lib/RT/Interface/Web.pm:
-
- I'm considering to move things from Display.html and ProcessUpdate.html to Web.pm. Comments?
-
-2000-07-20 14:06 jesse
-
- * lib/RT/Watcher.pm:
-
- Removed the bogus code frol lib/RT/Watcher.pm
-
-2000-07-20 13:39 jesse
-
- * lib/RT/User.pm:
-
- reversed some bogus code
-
-2000-07-20 11:44 tobiasb
-
- * webrt/Ticket/Elements/EditWatcherList:
-
- file EditWatcherList was initially added on branch rt-1-1.
-
-2000-07-20 11:44 tobiasb
-
- * webrt/Elements/SelectWatcherType:
-
- file SelectWatcherType was initially added on branch rt-1-1.
-
-2000-07-20 11:44 tobiasb
-
- * webrt/: Elements/SelectWatcherType,
- Ticket/Elements/EditWatcherList:
-
- Now it's possible to edit ticket and queue watchers. It's really horrible, but at least it works
-
-2000-07-20 11:43 tobiasb
-
- * webrt/Ticket/: EditWatchers.html, Update.html:
-
- Small comment
-
-2000-07-20 11:40 tobiasb
-
- * webrt/Ticket/Update.html:
-
- Linked in the 'edit watchers' functionality
-
-2000-07-20 11:27 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Watcher.pm,
- webrt/Ticket/EditWatchers.html:
-
- Now it's possible to edit ticket and queue watchers. It's really horrible, but at least it works
-
-2000-07-20 11:27 tobiasb
-
- * lib/RT/User.pm:
-
- bugfix
-
-2000-07-20 11:23 tobiasb
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- This is sort of a local hack, I guess it should be separated ... but maybe not. if content-type =~ /^text/(?\!plain)/, there is now a link for 'view this as plain text', which might be useful for unknown text formats and for viewing 'code'
-
-2000-07-20 02:59 jesse
-
- * lib/RT/: ACE.pm, ACL.pm:
-
- I'm committing ACE.pm and ACL.pm so people can get a bit of a taste of what I'm doing. They don't work, they probably don't even compile yet, but they're not getting called from the rest of the code yet.
-
- These aren't the droids you're looking for.
-
-2000-07-20 02:58 jesse
-
- * lib/RT/User.pm:
-
- updated User.pm to match the schema
-
-2000-07-19 16:45 tobiasb
-
- * webrt/Ticket/EditWatchers.html:
-
- file EditWatchers.html was initially added on branch rt-1-1.
-
-2000-07-19 16:45 tobiasb
-
- * webrt/Ticket/EditWatchers.html:
-
- This should be a template for adding and removing watchers; will be completed tomorrow
-
-2000-07-19 16:10 tobiasb
-
- * webrt/: Logout.html, ViewUser.html, Search/Listing.html,
- Ticket/Display.html, Ticket/Update.html,
- Ticket/Elements/ShowPeople, Ticket/Elements/ShowSummary:
-
- It's now possible to edit user data (realname, userid, email) from the web ui
-
-2000-07-19 16:04 tobiasb
-
- * lib/RT/: CurrentUser.pm, Ticket.pm, Watcher.pm,
- Interface/Email.pm:
-
- Worked a bit with requestors; 1) if we already have a user object at the requestor, we should use it. 2) it should be possible to edit the users email without also updating the watcher email if those are the same. 3) if a user enters an email with a different from address, but can be identified as a previous user (by equal real name or other means of authentication), the email field in the watcher table should be used
-
-2000-07-19 10:06 tobiasb
-
- * webrt/Elements/Header:
-
- bugfixing
-
-2000-07-19 08:53 tobiasb
-
- * webrt/webrt.css:
-
- Our web designer didn't like red table borders
-
-2000-07-19 08:52 tobiasb
-
- * webrt/: Elements/Header, Search/Listing.html:
-
- Fun #440: Popular wish: Fixed alternating colours at the lines in Listing.html
-
-2000-07-19 07:41 tobiasb
-
- * webrt/webrt.css:
-
- oddline for use in Listing.html
-
-2000-07-19 06:54 tobiasb
-
- * webrt/Elements/Header:
-
- nicer
-
-2000-07-19 06:51 tobiasb
-
- * webrt/: index.html, Elements/Header:
-
- Fun #666; Form 'view bug #xxx' from display and the front page
-
-2000-07-18 04:17 tobiasb
-
- * etc/schema.mysql:
-
- bug #286; two nines in schema.sql
-
-2000-07-14 11:40 tobiasb
-
- * webrt/Search/TicketCell:
-
- I'm currently trying to fix it so that each user can put in options in the session information (or should it rather be in the DB?) about whether they want tickets to pop up in separate windows or not.
-
-2000-07-14 10:47 tobiasb
-
- * etc/schema.mysql, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Action/StallDependent.pm,
- webrt/Ticket/Elements/TicketToolBox:
-
- added a scrip for stalling members upon membership linking ... now it's impossible for a request to make a link to itself ... now it's possible to open a request from the ticket display
-
-2000-07-14 09:29 tobiasb
-
- * webrt/Ticket/ProcessUpdate.html:
-
- TODO: Public comments are currently beeing threated as private
- comments (that's better than it beeing ignored ... at least at the
- moment)
-
- Now it skips trying to build a MIME entity if there are no message.
-
-2000-07-14 09:11 tobiasb
-
- * webrt/ViewUser.html:
-
- Bugfix
-
-2000-07-14 09:09 tobiasb
-
- * webrt/Search/Listing.html:
-
- Killed a warning
-
-2000-07-13 13:31 tobiasb
-
- * webrt/index.html:
-
- Typo
-
-2000-07-13 11:44 tobiasb
-
- * webrt/Elements/Header:
-
- huh? seems like I've lost the control of CVS a bit today :)
-
-2000-07-13 11:43 tobiasb
-
- * webrt/Elements/Header:
-
- [no log message]
-
-2000-07-13 11:36 jesse
-
- * webrt/index.html:
-
- tobix missed a &>
-
-2000-07-13 11:08 tobiasb
-
- * webrt/: Search/RestrictSearch.html, Ticket/Display.html,
- Ticket/ProcessUpdate.html, Ticket/Update.html:
-
- Dealt with the footer; it does not need overriding anywhere, and is thus placed in the autohandler
-
-2000-07-13 11:04 tobiasb
-
- * webrt/: Logout.html, ViewUser.html, autohandler, index.html,
- Elements/Header, Search/Listing.html, Ticket/Modify.html,
- Ticket/ValidateUpdate.html:
-
- Dealt with the header module; it's now in the .html templates, not in autohandler ... the title should be nice and informative in all the templates ... and the instance name is viewed along with the header
-
-2000-07-13 07:26 tobiasb
-
- * lib/RT/Link.pm, lib/RT/Ticket.pm, webrt/index.html,
- webrt/Elements/SelectResultsPerPage, webrt/Search/Listing.html,
- webrt/Search/PickRestriction:
-
- small bugfix + better handling of LimitResultsOnPage
-
-2000-07-12 14:09 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm:
-
- bugfix'es. duplicated linking actions are now turned down.
-
-2000-07-12 01:39 jesse
-
- * etc/schema.mysql:
-
- updated the schema for User objects. now they've got _even more_ data.
- and better extension capabilities.
-
-2000-07-12 00:10 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/Scrip.pm, lib/RT/ScripScope.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Action/StallDependent.pm,
- webrt/Elements/SelectResultsPerPage, webrt/Elements/ViewUser,
- webrt/Ticket/Create.html, webrt/Ticket/Elements/ShowTransaction:
-
- Debugged a bit and removed some critical bugs
-
-2000-07-11 14:43 tobiasb
-
- * webrt/Elements/ViewUser:
-
- <% $User->Comments || "No comment entered about this user" |h %>
-
- "|h" seems like some random noise, or have I misunderstood something?
-
-2000-07-11 12:19 tobiasb
-
- * etc/schema.mysql:
-
- Comments
-
-2000-07-11 11:30 tobiasb
-
- * lib/RT/Transaction.pm, lib/RT/Action/AutoReply.pm,
- webrt/Logout.html, webrt/ViewUser.html:
-
- more debug logging + some bugfixing (exception handling)
-
-2000-07-10 20:09 jesse
-
- * bin/testdeps.pl, etc/schema.mysql, lib/RT/Ticket.pm:
-
- work on ACLs. some acl decisions are now made.
-
-2000-07-10 17:13 jesse
-
- * etc/schema.mysql, lib/RT/ACL.pm, lib/RT/CurrentUser.pm,
- lib/RT/Queue.pm, lib/RT/Record.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm,
- webrt/Ticket/Display.html:
-
- Wow. all kinds of work.
-
- Beginning of implementation of ACLs. lots of code cleanup.
-
- schema changes for Groups and Acls.
-
- we now use MIMEObj EVERYWHERE instead of MIMEEntity.
-
-2000-06-29 20:36 jesse
-
- * Makefile:
-
- bumped to 1.0.4pre2
- fixed perms issue for lib/templates
-
-2000-06-29 16:11 jesse
-
- * Makefile, etc/schema:
-
- makefile fixes. bump to 1.0.4pre1
- schema.mysql has a longer phone number field
-
-2000-06-26 15:35 jesse
-
- * README:
-
- [no log message]
-
-2000-06-26 15:10 jesse
-
- * Makefile, bin/rtmux.pl, bin/testdeps.pl:
-
- added Date::Manip to testdeps.pl
- set $ENV{'TZ'} in bin/rtmux.pl to deal with a bug in Date::Manip
- bumped the version to 1.3.8
-
-2000-06-26 14:38 jesse
-
- * bin/testdeps.pl:
-
- added Date::Kronos to testdeps.pl
-
-2000-06-26 14:36 jesse
-
- * bin/testdeps.pl:
-
- added Time::Seconds to testdeps.pl
-
-2000-06-26 14:31 jesse
-
- * bin/testdeps.pl, webrt/autohandler, webrt/webrt.css,
- webrt/Elements/ViewUser, webrt/Ticket/Elements/ShowTransaction:
-
- various hacking for RTCon pilsen. a much enhanced testdeps.pl
-
-2000-06-16 10:51 jesse
-
- * lib/RT/Interface/Email.pm:
-
- some commentary.
-
-2000-06-16 08:57 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Sort of a bugfix
-
-2000-06-16 08:56 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- Removed some old garbage
-
- TODO: Fix message trailer
-
-2000-06-16 04:37 tobiasb
-
- * lib/RT/: Attachment.pm, Record.pm, Ticket.pm, Transaction.pm:
-
- It's no longer mandatory to have a Creator in every RT table. It's just to set them 'read/auto'-accessible. This should fix bug #275
-
-2000-06-15 16:43 tobiasb
-
- * etc/config.pm, lib/RT/Attachment.pm, lib/RT/Link.pm,
- lib/RT/Ticket.pm, webrt/Elements/MessageBox,
- webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html,
- webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html,
- webrt/Ticket/Elements/ShowTransaction:
-
- some few bugfixes + some work to get 'reply-linking' working. In my local version of RT (only changes in the config.pm) people can now enter a 'FAQ-tag', and the right article from KB is automaticly inserted in the reply.
-
-2000-06-15 12:22 tobiasb
-
- * webrt/ViewUser.html:
-
- file ViewUser.html was initially added on branch rt-1-1.
-
-2000-06-15 12:22 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/CurrentUser.pm, lib/RT/Ticket.pm,
- lib/RT/User.pm, lib/RT/Interface/Email.pm, webrt/ViewUser.html,
- webrt/autohandler, webrt/Elements/Error, webrt/Elements/Footer,
- webrt/Elements/Header, webrt/Elements/ViewUser,
- webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html,
- webrt/Ticket/Elements/ShowTransaction:
-
- lots of bugfixes and some enhancements:
- - signature in replies
- - Creator, LastUpdated etc. should be updated in User.pm
- - The message headers of inbound requests is now decoded ... this is
- some sort of a hack as it discards charset information in the header.
- Anyway, in those cases where the header data will be in the same charset
- as the body, this works out nicely.
- - I'm allowing a user to see what data is stored at him. We might need ACLs
- for the user comment. Also, this one is placed directly on the root, so
- it will break if the user is not logged in. Also, the page and the module
- is 'ViewUser', 'ShowUser' would be more consistent.
- - Prettified the ShowTransaction header
-
-2000-06-15 09:02 tobiasb
-
- * etc/schema.mysql:
-
- Added "Signature" to the Users table and worked a bit at the comments
-
-2000-06-14 09:24 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- webrt/Ticket/Display.html, webrt/Ticket/Elements/TicketToolBox:
-
- Tons of minor bugfixes and enhancements
-
-2000-06-14 09:19 tobiasb
-
- * etc/schema.mysql:
-
- Added this:
-
- ##TODO: Get Notify.pm to support OldOwner + fix a template
- #INSERT INTO Scrips VALUES (20, 'NotifyOldOwnerOnSteal',
- # 'Sends mail to the old owner when the ticket is stolen',
- # 'Steal','Notify',10,'OldOwner',1,NULL,1,NULL);
-
-2000-06-14 06:54 tobiasb
-
- * etc/schema.mysql, lib/RT/Attachment.pm, lib/RT/Record.pm,
- lib/RT/Ticket.pm, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/ShowDates:
-
- minor enhancements and bugfixes
-
-2000-06-14 03:30 tobiasb
-
- * etc/schema.mysql:
-
- I just noticed that Jesse already had a 'resolution' attribute in the ticket. I guess that covers the same as my 'state' attribute
-
-2000-06-14 00:12 tobiasb
-
- * lib/RT/Attachment.pm, webrt/Elements/ViewUser,
- webrt/Search/Listing.html, webrt/Search/PickRestriction,
- webrt/Ticket/Elements/ShowDates:
-
- Some enhancements and bugfixes
-
-2000-06-13 23:26 tobiasb
-
- * webrt/Ticket/Elements/ShowDates:
-
- improved
-
-2000-06-13 20:42 tobiasb
-
- * etc/schema.mysql:
-
- Bugfix
-
-2000-06-13 15:53 tobiasb
-
- * lib/RT/TicketCollection.pm, webrt/Search/Listing.html:
-
- Trying to get search on requestor to work - unsuccessful so far :/
-
-2000-06-13 10:23 tobiasb
-
- * webrt/: autohandler, Ticket/Display.html,
- Ticket/Elements/TicketToolBox:
-
- Some bugfixes
-
-2000-06-13 06:41 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Bugfix
-
-2000-06-09 14:43 tobiasb
-
- * webrt/EditUserComments.html:
-
- Hm, aaaalways check if everything is working before committing. Argh.
-
-2000-06-09 14:30 tobiasb
-
- * webrt/: EditUserComments.html, autohandler, Elements/Error,
- Elements/ViewUser:
-
- added a minimum interface for editing comments about users
-
-2000-06-09 12:53 tobiasb
-
- * webrt/Ticket/Elements/ShowRequestor:
-
- file ShowRequestor was initially added on branch rt-1-1.
-
-2000-06-09 12:53 tobiasb
-
- * webrt/Elements/ViewUser:
-
- file ViewUser was initially added on branch rt-1-1.
-
-2000-06-09 12:53 tobiasb
-
- * webrt/EditUserComments.html:
-
- file EditUserComments.html was initially added on branch rt-1-1.
-
-2000-06-09 12:53 tobiasb
-
- * etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/User.pm,
- lib/RT/Users.pm, lib/RT/Watcher.pm, lib/RT/Interface/Email.pm,
- webrt/EditUserComments.html, webrt/Elements/ViewUser,
- webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Elements/ShowPeople,
- webrt/Ticket/Elements/ShowRequestor,
- webrt/Ticket/Elements/ShowSummary:
-
- added a large section in the ticket view for earlier requests (stubbed) by the same requestor and comments about the requestor (the interface for editing those comments are stubbed)
-
-2000-06-09 04:32 tobiasb
-
- * etc/schema.mysql:
-
- Added "Lang" to the users table
-
-2000-06-08 10:17 tobiasb
-
- * etc/config.pm, etc/schema.mysql, lib/RT/Ticket.pm,
- webrt/Elements/SelectMatch, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/TicketToolBox:
-
- Added 'UpdateTold' sub to Tickets. Some minor bugfixes and enhancements. Not much testing done.
-
-2000-06-08 08:19 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm,
- webrt/Ticket/Update.html:
-
- A bit of debugging, and I managed to remove some annoying warnings
-
-2000-06-08 08:10 tobiasb
-
- * etc/schema.mysql:
-
- bugfix
-
-2000-06-08 07:59 tobiasb
-
- * etc/schema.mysql:
-
- Removed the area in one template.
-
-2000-06-08 07:55 tobiasb
-
- * etc/schema.mysql:
-
- # I think it might make sense replacing "TIMESTAMP" with "DATETIME"
- # for mysql. Yes, indeed, I'll do that right away.
-
-2000-06-08 06:53 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Removed some redundant lines.
-
-2000-06-08 06:38 tobiasb
-
- * etc/schema.mysql:
-
- Inserted table AlternateEmails (commented out as for now).
-
- One bugfix (typo) in the ACL table.
-
-2000-06-08 06:31 tobiasb
-
- * etc/schema.mysql:
-
- Grouped into folders
-
-2000-06-08 05:47 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/Ticket.pm, webrt/Login.html,
- webrt/Search/Listing.html, webrt/Ticket/ProcessUpdate.html,
- webrt/Ticket/Elements/ShowTransaction,
- webrt/Ticket/Elements/TicketToolBox:
-
- bugfixes + improvements requested from the support team; kill & take link from the front page, table borders in listing, reduced header printing ...
-
-2000-06-07 16:15 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- webrt/Elements/MessageBox, webrt/Ticket/Elements/ShowTransaction:
-
- bugfixes
-
-2000-06-07 15:46 tobiasb
-
- * etc/schema.mysql:
-
- bugfix
-
-2000-06-07 15:42 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm:
-
- bugfixes
-
-2000-06-07 15:22 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Now, if some Record decendant can _Accessible('Created', auto) and _Accessible('LastUpdated', auto), they will be set automaticly (at least, that's the theory)
-
-2000-06-07 14:16 tobiasb
-
- * etc/schema.mysql:
-
- mysql autosets the first TIMESTAMP in the table on every
- update/insert.
-
-2000-06-07 12:33 tobiasb
-
- * webrt/autohandler:
-
- The error handling here seems to work now ... but only for documents
- at the root. I thought those autohandlers were called recursively?
-
-2000-06-07 12:12 tobiasb
-
- * etc/config.pm, lib/RT/Record.pm, lib/RT/Ticket.pm:
-
- working with those pesky dates
-
-2000-06-07 11:51 tobiasb
-
- * bin/webmux.pl:
-
- bugfix
-
-2000-06-07 08:37 tobiasb
-
- * README:
-
- Added Date::Kronos (not on CPAN yet) to README
-
-2000-06-07 08:17 tobiasb
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Different Comment and Reply links. They link to the same page, but the default
- action is changed.
-
-2000-06-07 07:36 tobiasb
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Now it doesn't display looooong text/plain attachments.
-
- We have a lot of ~1M text/plain attachments in our RT queue.
-
- I'm trying to hack my webrt.cgi to show attachments upon a
- "PickUpTransaction" parameter. I don't know how to do it in the
- mason/mod_perl model.
-
-2000-06-07 04:09 tobiasb
-
- * webrt/Elements/MessageBox:
-
- bugfix
-
-2000-06-06 18:44 jesse
-
- * etc/schema.mysql:
-
- removed an outdated table
-
-2000-06-06 15:42 jesse
-
- * webrt/Login.html:
-
- changed the name of the mason package to RT::Mason, so it didn't conflict with other instances
- on the same webserver
-
- fixed a couple of Log::Dispatch(warn)s to (warning)s
-
- removed tobix' weird session crunching code that was messign me up
-
-2000-06-06 15:42 jesse
-
- * etc/config.pm, lib/RT/Ticket.pm:
-
- changed the name of the mason package to RT::Mason, so it didn't conflict with other instances
- on the same webserver
-
- fixed a couple of Log::Dispatch(warn)s to (warning)s
-
-2000-06-06 15:41 jesse
-
- * bin/webmux.pl:
-
- changed the name of the mason package to RT::Mason, so it didn't conflict with other instances
- on the same webserver
-
- f
-
-2000-06-06 15:41 jesse
-
- * README:
-
- changed the name of the mason package to RT::Mason, so it didn't conflict with other instances
- on the same webserver
-
-2000-06-06 14:40 tobiasb
-
- * webrt/Ticket/: Update.html, Elements/TicketToolBox:
-
- I'm trying to set default action in Update.html dependent on which link the
- user clicked at (update, comment or reply). I'll continue tomorrow (dinnertime
- now :)
-
-2000-06-06 14:11 tobiasb
-
- * webrt/Ticket/ProcessUpdate.html:
-
- bugfix
-
-2000-06-06 13:48 jesse
-
- * etc/config.pm:
-
- changed Log::Dispatch::VERSION (1.2) which didn't work
- to the more standard perl syntax: use Log::Dispatch 1.2;
-
- \ed an @ that tobix left in rtmux.pl
-
-2000-06-06 13:47 jesse
-
- * bin/rtmux.pl:
-
- \ed an @ that tobix left in rtmux.pl
-
-2000-06-06 13:32 jesse
-
- * Makefile:
-
- :%s/ / / in the makefile (convert spaces to tabs)
-
-2000-06-06 13:15 tobiasb
-
- * README:
-
- Mostly doc changes
-
-2000-06-06 11:36 tobiasb
-
- * etc/config.pm:
-
- bugfix
-
-2000-06-06 11:15 tobiasb
-
- * docs/FAQ:
-
- Added some few tips
-
-2000-06-06 11:05 tobiasb
-
- * bin/rtmux.pl:
-
- putted in some warnings about things that doesn't work
-
-2000-06-06 04:21 tobiasb
-
- * README:
-
- added comments about DBMS'es
-
-2000-06-05 16:54 tobiasb
-
- * Makefile:
-
- more bugfixes
-
-2000-06-05 16:46 tobiasb
-
- * Makefile:
-
- bgfx
-
-2000-06-05 14:01 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-06-05 09:26 tobiasb
-
- * README, etc/config.pm, etc/schema.mysql, webrt/autohandler:
-
- done some documentation fixes
-
-2000-06-05 07:14 tobiasb
-
- * README:
-
- updated the STATUS
-
-2000-06-02 03:32 tobiasb
-
- * etc/schema.mysql, lib/RT/Action/SendEmail.pm,
- lib/RT/Interface/Email.pm, webrt/autohandler, webrt/Elements/Error:
-
- bugfix
-
-2000-06-01 23:28 tobiasb
-
- * webrt/Ticket/Elements/TicketToolBox:
-
- file TicketToolBox was initially added on branch rt-1-1.
-
-2000-06-01 23:28 tobiasb
-
- * etc/config.pm, etc/schema.mysql, lib/RT/Link.pm,
- lib/RT/Ticket.pm, lib/RT/Action/SendEmail.pm,
- lib/RT/Interface/Email.pm, webrt/autohandler, webrt/Elements/Error,
- webrt/Elements/SelectOwner, webrt/Ticket/Create_Detail.html,
- webrt/Ticket/Display.html, webrt/Ticket/ProcessUpdate.html,
- webrt/Ticket/Update.html, webrt/Ticket/Elements/TicketToolBox:
-
- ... better logging (logs a warning when it's dieing during an eval) ... maybe the URL in the mails will work now ... misc bugfixes ... some better foldings ... better error handling in the WebUI (not tested! You should absolutely see this, I have a feeling it's unsmart. Check autohandler and Elements/Error) ... misc features added (default values on selectowners now work, auto-fill-in of requestor on create, auto-fill-in of subject on spawn, viewing actions on the ProcessUpdate, ProcessUpdate fixed up a bit ... hm, that's it)
-
-2000-06-01 20:54 tobiasb
-
- * bin/testdeps.pl:
-
- Added Text::Wrapper for quoting of wide messages
-
-2000-06-01 20:50 tobiasb
-
- * lib/RT/Transaction.pm, lib/RT/Action/StallDependent.pm,
- lib/RT/Interface/Email.pm, webrt/Login.html,
- webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowLinks:
-
- lots of bugfixes and minor enhancements
-
-2000-06-01 02:58 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-06-01 02:20 jesse
-
- * Makefile, NEWS:
-
- work on the web ui. cleanups to the comment and reply pages as well as the
- queue view and the ticket detail page
-
-2000-05-31 14:28 tobiasb
-
- * etc/config.pm, webrt/Search/Listing.html,
- webrt/Search/TicketCell, webrt/Ticket/Display.html:
-
- Popular demand: A link for taking an action from the listing page (reduces the change for concurrency problems)
-
-2000-05-31 13:59 tobiasb
-
- * webrt/Search/autohandler:
-
- Uh, some weird debugging stuff came into the last commit - I should
- have checked better.
-
- Some of those autohandlers seems like copies of each other. There
- must be better ways to do this (i.e. separating all the common stuff
- into some module)?
-
-2000-05-31 13:52 tobiasb
-
- * lib/RT/Transaction.pm, lib/RT/Interface/Email.pm,
- webrt/Search/Listing.html, webrt/Search/PickRestriction,
- webrt/Search/autohandler, webrt/Ticket/Display.html,
- webrt/Ticket/Elements/ShowHistory:
-
- popular demands; more navigation ({back to listing} and {last transaction}) and misc details
-
-2000-05-31 12:20 tobiasb
-
- * webrt/Elements/SelectMatch:
-
- This one is plain ugly at the moment. Anyway, it's ment for a more advanced 'regexp match / glob match / word match / substring match / total match'
-
-2000-05-31 12:20 tobiasb
-
- * webrt/Elements/SelectMatch:
-
- file SelectMatch was initially added on branch rt-1-1.
-
-2000-05-31 11:55 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- bugfix
-
-2000-05-31 09:53 tobiasb
-
- * webrt/: Elements/SelectStatus, Ticket/Update.html:
-
- Some popular demands from the support dept;
-
- I've made it possible to kill by selecting status dead
-
- Response is the default action. I've added a cryptical line which
- might or might not give a warning. Ideally, I guess we should do the comment /
- reply selection through submit buttons rather than through a select menu - what
- di you think?
-
-2000-05-30 22:46 tobiasb
-
- * etc/config.pm, lib/RT/Attachment.pm:
-
- Ah ... I had forgotten signatures. Some stubbed work, I'll continue tomorrow
-
-2000-05-30 22:31 tobiasb
-
- * lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/Record.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm, webrt/Login.html,
- webrt/Elements/MessageBox, webrt/Search/Listing.html,
- webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowTransaction:
-
- Quoting works now ... fixed some other misc details + bugfixes ... and I've moved the date handling to RT::Record, it will be completed tomorrow (I hopecvs diff -uw | less)
-
-2000-05-30 20:31 tobiasb
-
- * webrt/Ticket/Create_Detail.html:
-
- Removed those annoying blink tags.. :)
-
-2000-05-30 20:14 tobiasb
-
- * webrt/: Elements/MessageBox, Ticket/Create_Detail.html:
-
- Still working on that MessageBox
-
-2000-05-30 20:09 tobiasb
-
- * webrt/: Elements/MessageBox, Ticket/Update.html:
-
- Separated out the MessageBox
-
-2000-05-30 20:09 tobiasb
-
- * webrt/Elements/MessageBox:
-
- file MessageBox was initially added on branch rt-1-1.
-
-2000-05-30 19:56 tobiasb
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- Changed <BLOCKQUOTE> to <pre> for the message content.
-
- TODO: We really should HTML'ify and/or HTML-escape the Content.
-
-2000-05-29 06:59 tobiasb
-
- * Makefile:
-
- Some bugfixes, but absolutely not tested.
-
-2000-05-26 12:11 tobiasb
-
- * webrt/Search/Listing.html:
-
- Now it runs /Elements/Header - I was a bit annoyed because it was missing Title
-
-2000-05-26 10:11 tobiasb
-
- * webrt/Ticket/Display.html:
-
- Seems like I had introduced an error here
-
-2000-05-24 21:50 jesse
-
- * lib/RT/Ticket.pm, lib/RT/TicketCollection.pm, lib/RT/Tickets.pm,
- webrt/Search/Listing.html, webrt/Ticket/Display.html:
-
- Working on persistable web queries. Introduced RT::TicketCollection
- Arguably this should be in RT::Tickets. and may be some day
-
-2000-05-24 21:50 jesse
-
- * lib/RT/TicketCollection.pm:
-
- file TicketCollection.pm was initially added on branch rt-1-1.
-
-2000-05-24 08:00 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- It should also be possible to "unlink" something (i.e. if a link was
- wrongly set). This is not implemented, but at least mails with
- an "unlink" command will not bounce now.
-
-2000-05-23 18:49 tobiasb
-
- * lib/RT/Transaction.pm:
-
- Made the transaction text from a link action a bit more readable,
- though this still needs quite some work.
-
-2000-05-23 16:57 jesse
-
- * Makefile:
-
- Bumped to 1.3.7
-
-2000-05-23 10:12 tobiasb
-
- * etc/config.pm, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Interface/Email.pm, webrt/Ticket/Display.html:
-
- I've started looking at the mail interface. Now linking works through the mailgate, though we need some info in the docs. I'm proposing that it should accept both commands in the headerlines ("RT-Command: Link/Resolve/Whatever blahblah") and traditional commands in the mail ("%RT Link", "%RT Resolve", etc), though I've only supported the first one yet. Look at the comments in Email.pm for details.
-
-2000-05-23 10:04 tobiasb
-
- * lib/RT/Scrip.pm:
-
- Bugfix/optimalization or something?
-
-2000-05-22 19:09 tobiasb
-
- * lib/RT/Ticket.pm, webrt/Ticket/Create_Detail.html,
- webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html:
-
- I'm not very happy about some comprimises, choises and short-cuts I've done here, but anyway linking & spawning seems to work now.
-
-2000-05-22 18:05 tobiasb
-
- * lib/RT/Transaction.pm, lib/RT/Action/AutoReply.pm,
- webrt/Ticket/Create.html, webrt/Ticket/Create_Detail.html,
- webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html:
-
- all changes here are either related to getting the Create working from the web, or harmless details
-
-2000-05-22 17:39 tobiasb
-
- * webrt/Ticket/Display.html:
-
- $Subject => $Subject||(no subject given)
-
- TODO: HTML-escape
-
-2000-05-22 17:38 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Removed VerboseSubject and HTMLSubject
-
-2000-05-22 17:24 tobiasb
-
- * lib/RT/Ticket.pm:
-
- I do use $Ticket->Subject (and other stuff as well) frequently when
- I'm editing Mason. There is two issues;
-
- 1) Things might look freaked if the ticket has no subject, i.e. Display.html
-
- 2) Things might get totally whacko if the subject contains HTML code.
-
- I could ensure the "right" behaviour all the places by using
- HTML::Entities::encode (I've done it one place), and by always using
- $Subject||"(No subject)". Anyway, I think it might be more
- appropriate to have a sub RT::Ticket::VerboseSubject and
- RT::Ticket::HTMLSubject.
-
- What do you think?
-
-2000-05-22 16:51 tobiasb
-
- * webrt/Ticket/Display.html:
-
- It seems like it can create and view new transactions now.
-
- My next step will be to fix linking
-
-2000-05-22 16:47 tobiasb
-
- * lib/RT/Ticket.pm:
-
- I should never commit before testing ... I should never commit before testing ... I should never commit before ...
-
- bugfix.
-
-2000-05-22 16:38 tobiasb
-
- * lib/RT/Ticket.pm:
-
- I'm trying to get a better propagation of error messages. I'm a bit
- amused to find lots of things that shouldn't pass `perl -w' and `use
- strict'?
-
-2000-05-22 15:52 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Removed a debug (?) line that was commented out:
-
- # print "From is $From\n";
-
- ...and inserted some other logging:
-
- - logs an info message with ticket id, subject and queue upon
- successful message creation.
-
- - logs a warning if it couldn't be created.
-
-2000-05-22 14:11 tobiasb
-
- * lib/RT/Ticket.pm:
-
- In RT::Ticket::Create: Defaulting queue to 'general', and warning when it's not set
-
-2000-05-22 14:06 tobiasb
-
- * README:
-
- Added a 'rt-comment' to the recommended mail configuration
-
-2000-05-22 14:04 tobiasb
-
- * Makefile:
-
- added a comment-mail-alias
-
-2000-05-22 14:03 tobiasb
-
- * etc/config.pm:
-
- Hm ... $RT::CorrespondAddress is used in AutoReply.pm, while only
- $MailAlias is set in config.pm. I'm not sure if this is the Right(tm)
- solution, but anyway ... I added those two lines, additions to the
- Makefile and README file is coming up shortly ...
-
- $CorrespondAddress=$MailAlias;
- $CommentAddress="!!RT_COMMENT_MAIL_ALIAS!!";
-
-2000-05-22 12:53 tobiasb
-
- * webrt/Ticket/Create_Detail.html:
-
- fixed up a bug caused by too quick usage of cut&paste
-
-2000-05-22 12:01 tobiasb
-
- * webrt/Ticket/Create_Detail.html:
-
- Done some work making this page look OK. Now I will put in some logic
- in Display.html for creating and linking requests.
-
-2000-05-22 05:30 tobiasb
-
- * webrt/Elements/SelectOwner:
-
- # TODO: respect the ACLs!!
- # This will be a list of some thousands requestors with the current scheme.
-
-2000-05-19 12:37 tobiasb
-
- * webrt/Ticket/Create.html:
-
- Added a box for setting link information. Only a web mockup, the
- logic doesn't work yet. Feel free to do whatever you'd like with this
- one. It might make sense to move this to the details page.
-
-2000-05-19 12:17 jesse
-
- * webrt/Ticket/LinkIt.html:
-
- Code and formatting cleanups
-
-2000-05-19 11:23 tobiasb
-
- * etc/config.pm:
-
- Removed some weird stuff
-
-2000-05-19 10:59 jesse
-
- * webrt/: index.html, Search/PickRestriction:
-
- fixed some typos
-
-2000-05-19 10:59 jesse
-
- * etc/config.pm:
-
- cleaned up the config file a bit
-
- <M-}>CVS: etc/config.pm
-
-2000-05-19 08:42 tobiasb
-
- * bin/testdeps.pl, bin/webmux.pl, webrt/Elements/SelectLinkType,
- webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html,
- webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Elements/ShowSummary,
- webrt/Ticket/Elements/ShowTransaction:
-
- Started the work getting links to work. While the linking doesn't work yet, this is a hint about how I think things might work
-
-2000-05-19 08:42 tobiasb
-
- * webrt/Elements/SelectLinkType:
-
- file SelectLinkType was initially added on branch rt-1-1.
-
-2000-05-19 08:42 tobiasb
-
- * webrt/Ticket/LinkIt.html:
-
- file LinkIt.html was initially added on branch rt-1-1.
-
-2000-05-18 14:46 jesse
-
- * lib/RT/Ticket.pm:
-
- a tiny bit of doc added to Ticket.pm
- still not happy with the format
-
-2000-05-18 10:56 tobiasb
-
- * webrt/Ticket/autohandler:
-
- undo of last commit; only local modifications for debugging
-
-2000-05-18 10:51 tobiasb
-
- * webrt/: Search/Listing.html, Ticket/Elements/ShowTransaction:
-
- the previous commit had wrong loginfo; those files are modified according to the latest changes in etc/config.pm
-
-2000-05-18 10:42 jesse
-
- * webrt/Elements/SelectResultsPerPage:
-
- adding missing file
-
-2000-05-18 10:41 tobiasb
-
- * webrt/: index.html, Search/Listing.html, Ticket/autohandler,
- Ticket/Elements/ShowTransaction:
-
- A front page for navigation. This one needs work; Masonifying, generalizing and possibilities for customizations needs to be implemented
-
-2000-05-18 10:41 tobiasb
-
- * webrt/index.html:
-
- file index.html was initially added on branch rt-1-1.
-
-2000-05-18 10:36 tobiasb
-
- * webrt/Elements/SelectResultsPerPage:
-
- Added an empty file as for now
-
-2000-05-18 10:36 tobiasb
-
- * webrt/Elements/SelectResultsPerPage:
-
- file SelectResultsPerPage was initially added on branch rt-1-1.
-
-2000-05-18 05:48 tobiasb
-
- * etc/config.pm:
-
- I'm planning to deal with web customizations with one hash RT::WebOptions in config.pm. This hash might contain callbacks and maybe names of extra Mason modules to pull in. What do you think?
-
-2000-05-17 19:08 jesse
-
- * webrt/Search/autohandler:
-
- file autohandler was initially added on branch rt-1-1.
-
-2000-05-17 19:08 jesse
-
- * webrt/Search/: Listing.html, PickRestriction, autohandler:
-
- Work on searches. in the cli -maxitems <n> now does the right thing
-
-2000-05-16 17:48 jesse
-
- * webrt/Ticket/Elements/ShowLinks:
-
- file ShowLinks was initially added on branch rt-1-1.
-
-2000-05-16 17:48 jesse
-
- * bin/rtmux.pl, bin/webmux.pl, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Action/OpenDependent.pm, lib/RT/Action/ResolveMembers.pm,
- lib/RT/Action/Spam.pm, lib/RT/Action/StallDependent.pm,
- webrt/Elements/Error, webrt/Ticket/Elements/ShowLinks,
- webrt/Ticket/Elements/ShowSummary:
-
- Converted the new link code to a fully oo setup, rahter than a mishmash of
- procedural and oo. seperated out webrt/Ticket/Elements/ShowLinks
-
- It's by no means done, but it does seem to work.
-
- jesse
-
-2000-05-16 12:30 tobiasb
-
- * Makefile, etc/config.pm, lib/RT/Link.pm, lib/RT/Ticket.pm,
- webrt/Ticket/Elements/ShowSummary:
-
- Done quite some work at the right hand 'Other Links' window (well, it's not good enough, and it also lists dependencies as for now). Jesse, you might want to do something with ShowSummary, my Mason code seems horribly ugly.
-
-2000-05-16 09:18 tobiasb
-
- * etc/config.pm:
-
- (...)
- # A hash table of convertion subs to be used for transforming RT Link
- # URIs to URLs in the web interface. If you want to use RT towards
- # locally installed databases, this is the right place to configure it.
- # (TODO!)
- my %URI2HTML=
- (
- 'fsck.com-rt' => sub {warn "stub!";},
- 'mozilla.com-bugzilla' => sub {warn "stub!";},
- 'fsck.com-kb' => sub {warn "stub!"}
- );
- (...)
-
- I will also make a sub RT::Links::URI2HTML which gives smart links to
- internal references, and passes other URIs to this hash table, and
- eventually we should make default subs for KB and RT.
-
- What do you think of this idea?
-
-2000-05-16 04:58 tobiasb
-
- * lib/RT/: Link.pm, Ticket.pm:
-
- Enabled link display in the CLI
-
-2000-05-16 04:43 tobiasb
-
- * lib/RT/Transaction.pm:
-
- Seems like I had broken something...(bugfix)
-
-2000-05-13 19:56 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Right, we need to work a bit with the links API.
-
- - we need an AllLinks sub. How to tell EasySearch to give both links
- where we're BASE and were we're TARGET?
-
- - we need an "unresolved dependencies" according to the current
- design. How to tell if a dependency is unresolved? Dependencies can
- point out of this RT instance!
-
- - we might need more subs, but not right now anyway.
-
-2000-05-12 11:32 tobiasb
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- partly a bugfix; 'QouteTransaction=attachment-id' doesn't work very well for transactions without attachment. Maybe that link should only be for attachments, and not for transactions. Anyway, I changed it to transaction-id instead. And I also added 'spawn' to the title; I think 'spawning' should be done through the same page. 'spawn' is when creating a new request that is linked up somehow to the old one. Maybe it rather should be titled 'forward' or 'create new' or something?
-
-2000-05-12 07:54 tobiasb
-
- * webrt/: Elements/Error, Ticket/Display.html:
-
- Bugfixing ... ehrm, why don't I test things before committing? :)
-
-2000-05-12 07:34 tobiasb
-
- * webrt/Elements/Error:
-
- It logs errors now
-
-2000-05-12 07:32 tobiasb
-
- * webrt/Ticket/Display.html:
-
- dies if element can't be loaded
-
-2000-05-12 06:55 tobiasb
-
- * webrt/Login.html:
-
- seems like CGI won't take a combined get+post
-
-2000-05-12 06:51 tobiasb
-
- * etc/config.pm:
-
- bugfix
-
-2000-05-11 12:45 jesse
-
- * webrt/Elements/ShadedBox:
-
- file ShadedBox was initially added on branch rt-1-1.
-
-2000-05-11 12:45 jesse
-
- * webrt/Elements/ShadedBox:
-
- missed this one before. it's somewhat misnamed right now. basically, it
- prints a title and content.
-
-2000-05-11 12:39 jesse
-
- * webrt/Elements/: TitleBoxEnd, TitleBoxStart:
-
- the title box for webui
-
-2000-05-11 12:39 jesse
-
- * webrt/Elements/TitleBoxStart:
-
- file TitleBoxStart was initially added on branch rt-1-1.
-
-2000-05-11 12:39 jesse
-
- * webrt/Elements/TitleBoxEnd:
-
- file TitleBoxEnd was initially added on branch rt-1-1.
-
-2000-05-11 12:37 jesse
-
- * webrt/Ticket/: Display.html, Elements/ShowSummary:
-
- hrml cleanup. it's not as pretty, but man does it render faster
-
-2000-05-11 01:07 jesse
-
- * webrt/: Elements/Footer, Elements/Header, Ticket/Display.html,
- Ticket/Elements/ShowHistory, Ticket/Elements/ShowSummary,
- Ticket/Elements/ShowTransaction:
-
-
- Cleanup
- \
-
-2000-05-11 00:46 tobiasb
-
- * TODO:
-
- Added a list
-
-2000-05-10 23:43 jesse
-
- * webrt/webrt.css:
-
- file webrt.css was initially added on branch rt-1-1.
-
-2000-05-10 23:43 jesse
-
- * webrt/webrt.css:
-
- The base stylesheet.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowSummary:
-
- file ShowSummary was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowTransaction:
-
- file ShowTransaction was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowDates:
-
- file ShowDates was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowHistory:
-
- file ShowHistory was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ToolBar:
-
- file ToolBar was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowBasics:
-
- file ShowBasics was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/Ticket/Elements/ShowPeople:
-
- file ShowPeople was initially added on branch rt-1-1.
-
-2000-05-10 23:41 jesse
-
- * webrt/: Elements/Header, Ticket/Display.html,
- Ticket/DisplayHeader, Ticket/DisplaySummary, Ticket/DisplayTicket,
- Ticket/ProcessUpdate.html, Ticket/ToolBar, Ticket/autohandler,
- Ticket/Elements/ShowBasics, Ticket/Elements/ShowDates,
- Ticket/Elements/ShowHistory, Ticket/Elements/ShowPeople,
- Ticket/Elements/ShowSummary, Ticket/Elements/ShowTransaction,
- Ticket/Elements/ToolBar:
-
- Work on the web ui. mostly on the ticket display interface
-
-2000-05-10 15:43 tobiasb
-
- * README:
-
- Added a comment about how to do the CGI :) Well:
-
- To get it up running even without mod_perl, you will need to
- consult Tobix or the rt-devel mailinglist. Tobix is actively working
- on a (Fast)CGI version, but as for now he has been too lazy to update
- the template for the cgi executable.
-
-2000-05-10 15:39 tobiasb
-
- * webrt/Ticket/Create_Detail.html:
-
- added a require statement. No effect for the mod_perl version, but makes sense for a CGI version.
-
-2000-05-09 05:35 tobiasb
-
- * bin/webmux.pl:
-
- Better formatting
-
-2000-05-08 05:01 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- bugfix
-
-2000-05-05 19:20 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- This one shouldn't loop now - though it's not tested :)
-
-2000-05-05 19:15 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Fixing up the loop control. When a possible loop occurs, an error
- flag is set, and a new header field RT-Loop-Alarm appears. I feel a
- bit bad about the latter, we are indeed changing an email after it
- arrived to the system, which I think is a bad thing - but anyway not
- as bad as dropping the email completely. My idea is that the Actions,
- particularly the SendEmail.pm Action remain silent when this header
- field is set.
-
-2000-05-05 19:01 tobiasb
-
- * etc/config.pm:
-
- Added this about logging to the comments:
-
- # It might generally make sense to send error and higher by email to
- # some administrator. For heavens sake; be sure that the email goes
- # directly to a mailbox, and not via RT :) Mail loops will generate a
- # critical log message.
-
-2000-05-05 16:47 jesse
-
- * bin/testdeps.pl:
-
- Added Log::Dispatch to testdeps.pl
-
-2000-05-05 13:04 tobiasb
-
- * lib/RT/Transaction.pm:
-
- bugfix
-
-2000-05-05 12:47 tobiasb
-
- * etc/config.pm:
-
- I need help, I can't really figure out from this;
-
- When commenting out the $SIG{__DIE__} stuff, everything works fine.
-
- When having this line in the config:
-
- $SIG{__DIE__} = sub {$RT::Logger->log(level=>'crit',message=>$_[0]); print STDERR $_[0]; exit(-1);};
-
- I get this error:
-
- Can't locate Mail/Field/addrlist.pm in @INC (@INC contains: /tmp/FunRT /tmp/DBIx /etc/rt /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at (eval 115)[/usr/local/lib/perl5/site_perl/5.6.0/Mail/Field.pm:87] line 3.
-
- WTF???
-
-2000-05-05 10:29 tobiasb
-
- * bin/rtmux.pl:
-
- I guess this should block that stupid warnings
-
-2000-05-05 10:01 tobiasb
-
- * etc/config.pm:
-
- Added Log::Dispatch. I also have added those comments, which I would
- like comments on (:
-
- # Most (if not all?) $RT:: global variables should be here. I'd
- # suggest putting session information in another Namespace (main:: or
- # RT::main or maybe something like that).
-
- #use strict;
-
- #use vars qw/%SitePolicy $dirmode $transactionmode $DatabasePassword $rtname $domain $host $DatabaseHost $DatabaseUser $RT::DatabaseName $DatabaseType $user_passwd_min $MailAlias $WebrtImagePath $web_auth_mechanism $web_auth_cookies_allow_no_path $DefaultLocale $LocalePath $Nobody $Logger/;
-
- I'm not sure if "use strict" breaks, but at least "use vars" breaks
- bigtime as we are using it other places (like rtmux.pl). I suggest
- using another package name for the execution logic. What do you
- think?
-
-2000-05-05 08:07 tobiasb
-
- * Makefile:
-
- Added RT_LOGFILE, and comments on how to fix advanced logging
-
-2000-05-05 02:31 jesse
-
- * bin/rtmux.pl:
-
- a bit of performance hacking. now require mason and cgi rather than 'use'ing them
-
-2000-05-05 02:22 jesse
-
- * lib/RT/: Action.pm, Scrip.pm, ScripScope.pm, Template.pm,
- Ticket.pm, Transaction.pm, Action/AutoReply.pm,
- Action/SendEmail.pm, Action/Spam.pm:
-
- Cleaned up a couple minor things (like precedence, again) and changed "FixSubject" to "SetSubjectTag"
-
- Fixed the memory leak in Transaction.pm (it wasn't letting go of Scrip objects)
- The fix was a bit of a "large mallet on a small nail" in that I'm now _explicitly_ destroying ScripObjects two different ways and don't quite understand why I have to do it. It does, however, work.
-
-2000-05-04 09:00 tobiasb
-
- * lib/RT/Action/Spam.pm:
-
- Completely untested - but I guess this should do real spamming, that
- is one email for each request(or).
-
-2000-05-04 08:59 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- bugfix
-
-2000-05-04 07:04 tobiasb
-
- * lib/RT/Action/: AutoReply.pm, SendEmail.pm:
-
- Precedence: Bulk should only be set for AutoReply
-
-2000-05-04 05:29 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- sub FixSubject sets the RT tag (unless it is already there). I moved
- it out from Prepare because I need to override this behaviour when
- Spamming people.
-
-2000-05-04 01:34 jesse
-
- * etc/schema.mysql:
-
- spec some defaults in the schema
-
-2000-05-04 01:32 jesse
-
- * lib/RT/Ticket.pm:
-
- Bugfix to ticket.pm for better handling of default values for some queue fields
-
-2000-05-03 14:19 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Sorry, the last commit on this file was not really a bugfix. I'd say all Ticket (Transaction) Actions should return status, message and eventually optional things after the message.
-
-2000-05-03 14:16 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Bugfix
-
-2000-05-03 14:13 tobiasb
-
- * lib/RT/Action/: ResolveMembers.pm, Spam.pm:
-
- Those actually seems to work :)
-
-2000-05-03 14:13 tobiasb
-
- * lib/RT/Action/Spam.pm:
-
- file Spam.pm was initially added on branch rt-1-1.
-
-2000-05-03 14:13 tobiasb
-
- * lib/RT/Action/ResolveMembers.pm:
-
- file ResolveMembers.pm was initially added on branch rt-1-1.
-
-2000-05-03 14:13 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- gubfix
-
-2000-05-03 14:00 tobiasb
-
- * etc/schema.mysql:
-
- Bugfix
-
-2000-05-03 13:29 tobiasb
-
- * etc/schema.mysql:
-
- Commented out the AutoReplies table.
-
-2000-05-03 13:17 tobiasb
-
- * lib/RT/Action/AutoReply.pm:
-
- Putted in "#TODO: " comments for avoiding duplicate AutoReplies.
-
-2000-05-03 13:15 tobiasb
-
- * etc/schema.mysql:
-
- Added a table AutoReplies to avoid sending the same autoreply template
- more than once to each requestor.
-
- Eventually entries should be removed (i.e. after a week) through the
- (upcoming?) timer system (eventually through the good, old crontab(5))
-
-2000-05-03 11:48 tobiasb
-
- * lib/RT/Ticket.pm:
-
- LinkTo and LinkFrom are tested a bit, and they seem to work OK now.
-
-2000-05-03 11:02 tobiasb
-
- * etc/schema.mysql:
-
- Bugfix.
-
-2000-05-03 07:40 tobiasb
-
- * etc/schema.mysql:
-
- I'm putting ResolveGroupTicket on hold. It's just not important.
-
-2000-05-02 18:05 jesse
-
- * lib/RT/Ticket.pm:
-
- Starting to add a bit of inline pod documentation. the style isn't finalized yet
-
-2000-05-02 14:30 tobiasb
-
- * lib/RT/Action/OpenDependent.pm:
-
- file OpenDependent.pm was initially added on branch rt-1-1.
-
-2000-05-02 14:30 tobiasb
-
- * etc/schema.mysql, lib/RT/Link.pm, lib/RT/Ticket.pm,
- lib/RT/Action/OpenDependent.pm, lib/RT/Action/StallDependent.pm:
-
- I just got DependsOn Links to work as they should in the CLI :)
-
-2000-05-02 13:36 tobiasb
-
- * lib/RT/Links.pm:
-
- file Links.pm was initially added on branch rt-1-1.
-
-2000-05-02 13:36 tobiasb
-
- * lib/RT/: Links.pm, Ticket.pm, Action/StallDependent.pm:
-
- [no log message]
-
-2000-05-02 13:07 tobiasb
-
- * lib/RT/Action/StallDependent.pm:
-
- Bugfix. Also, only Open requests should be Stalled.
-
-2000-05-02 13:01 tobiasb
-
- * lib/RT/: Ticket.pm, Action/StallDependent.pm:
-
- Bugfixing
-
-2000-05-02 12:21 tobiasb
-
- * lib/RT/: Ticket.pm, Action/StallDependent.pm:
-
- bugfixes
-
-2000-05-02 11:55 tobiasb
-
- * etc/schema.mysql:
-
- Added TobiX-style logic scrips for DependsOn link and MemberOf link.
-
-2000-05-02 07:55 tobiasb
-
- * lib/RT/: Link.pm, Ticket.pm:
-
- oup, forgot to keep a consistant style
- base => Base
- target => Target
- etc
-
-2000-05-02 07:55 tobiasb
-
- * Makefile, etc/config.pm:
-
- forgot to commit those changes ... configuration for the URI method
-
-2000-05-02 05:45 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Agh, compile error.
-
-2000-05-02 05:30 tobiasb
-
- * lib/RT/Action/StallDependent.pm:
-
- file StallDependent.pm was initially added on branch rt-1-1.
-
-2000-05-02 05:30 tobiasb
-
- * lib/RT/Action/: README.hackers, StallDependent.pm:
-
- Ok, so lets put all Actions into one directory - though I'd say it would be better for future hackers to orient themselves if we grouped them somehow.
-
-2000-05-02 00:11 jesse
-
- * Makefile:
-
- Version bumping
-
-2000-05-01 17:16 jesse
-
- * lib/RT/Ticket.pm:
-
- moved URIIsLocal closer to other linking routines.
-
-2000-05-01 10:16 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Made the transaction data a bit "nicer", should look something like:
-
- THIS DependsOn 4323 as of 342
- <URI> DependsOn THIS as of 343
-
-2000-05-01 08:58 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Changed URL -> URI
-
- Changed NewLink and ReverseLink to LinkTo and LinkFrom
-
- Added one byte to indicate if it's a From-link or a To-link in the
- transaction data.
-
-2000-05-01 01:52 jesse
-
- * etc/schema.mysql:
-
- fixed a few typos in the schema
-
-2000-05-01 01:50 jesse
-
- * lib/RT/ACL.pm:
-
- Initial sketches at RT::ACL.pm. there's no running code here yet.
-
-2000-05-01 01:48 jesse
-
- * lib/RT/Ticket.pm:
-
- Fixed Ticket->URL. changed queue->load to queue->Load
-
-2000-05-01 01:04 jesse
-
- * bin/rtmux.pl:
-
- Fixed improper rt program selection code.
-
-2000-05-01 00:14 jesse
-
- * lib/RT/Queue.pm:
-
- a stub for ACL work.
-
-2000-04-30 13:28 tobiasb
-
- * lib/RT/Link.pm:
-
- file Link.pm was initially added on branch rt-1-1.
-
-2000-04-30 13:28 tobiasb
-
- * lib/RT/: Link.pm, Ticket.pm:
-
- Link.pm
-
-2000-04-30 13:13 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Added a static method URIIsLocal which checks if it's a local URI or not.
-
-2000-04-28 14:20 jesse
-
- * lib/RT/Transaction.pm:
-
- Cleaned up some comments and formatting. and did a bit of reorganizing
- of routines to more closely model other files. Oh. i finally have
- emacs doing proper indenting per perlstyle. so we'll hopefully start
- to get better about that :) Tobix has only been bugging me for a year
-
-2000-04-28 09:05 tobiasb
-
- * lib/RT/Action/README.hackers:
-
- Just some documentation for future hackers :)
-
-2000-04-28 09:05 tobiasb
-
- * lib/RT/Action/README.hackers:
-
- file README.hackers was initially added on branch rt-1-1.
-
-2000-04-28 08:20 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Started the work of implementing links
-
-2000-04-28 04:40 tobiasb
-
- * etc/schema.mysql:
-
- Didn't we once agree that we needed "state" (user-configurable logic)
- and "status" (fixed open/stalled/resolved/dead)? :)
-
-2000-04-28 01:17 jesse
-
- * lib/RT/Ticket.pm:
-
- didn't balance parens. grr
-
-2000-04-28 00:54 jesse
-
- * lib/RT/Ticket.pm:
-
- a bunch of cleanup.. a bunch more folding mode braces.
- a few minor (still not in any codepath) changes for the start of some
- acls work
-
-2000-04-28 00:51 jesse
-
- * docs/design_docs/link-definitions.txt:
-
- a few comments, additions and clarifications. nothing really major
-
-2000-04-27 02:06 jesse
-
- * docs/design_docs/acls:
-
- more thoughts on ACLs. this time including some code snippits.
-
-2000-04-27 02:01 jesse
-
- * etc/schema.mysql:
-
- added the schema for the new ACL system.
- responded to tobix' comments about GECOS.
-
-2000-04-26 14:58 tobiasb
-
- * docs/design_docs/subscription-definitions.txt:
-
- marginal updates to reflect that scrips/actions can be used for more things than subscriptions (the whole document might need a rename)
-
-2000-04-26 14:50 tobiasb
-
- * docs/design_docs/link-definitions.txt, etc/schema.mysql:
-
- only insignificant comments - some made weeks ago
-
-2000-04-26 12:59 jesse
-
- * docs/design_docs/link-definitions.txt:
-
- some comments on link definitions
- my comments are marked with # as the first character of the line.
-
-2000-04-26 02:27 tobiasb
-
- * docs/design_docs/: link-definitions.txt,
- subscription-definitions.txt:
-
- updates
-
-2000-04-26 00:14 jesse
-
- * docs/design_docs/acls:
-
- some more hacking on acls design
-
-2000-04-25 17:58 jesse
-
- * docs/design_docs/acls:
-
- thoughts on acls
-
-2000-04-24 00:17 jesse
-
- * webrt/Ticket/Create_Detail.html:
-
- file Create_Detail.html was initially added on branch rt-1-1.
-
-2000-04-24 00:17 jesse
-
- * webrt/Ticket/Create_Detail.html:
-
- some work on create. nothing ready for consumption yet.
-
-2000-04-24 00:16 jesse
-
- * webrt/: Logout.html, Elements/Footer, Elements/Header,
- Elements/SelectQueue, Ticket/Create.html, Ticket/Display.html,
- Ticket/ProcessUpdate.html, Ticket/SetOwner, Ticket/SetStatus,
- Ticket/Update.html, Ticket/autohandler:
-
- Look ma, $session{'CurrentUser'} contains the current user object.
- you can depend on this being set if the user's authenticated.
-
-2000-04-24 00:16 jesse
-
- * webrt/Logout.html:
-
- file Logout.html was initially added on branch rt-1-1.
-
-2000-04-24 00:14 jesse
-
- * Makefile, bin/testdeps.pl, bin/webmux.pl:
-
- Added Apache::Session support to the HTML::Mason version of things.
-
-2000-04-23 19:45 jesse
-
- * bin/testdeps.pl:
-
- added a little script to test perl dependencies.
- it should probably get integrated into the makefile
-
-2000-04-23 19:45 jesse
-
- * bin/testdeps.pl:
-
- file testdeps.pl was initially added on branch rt-1-1.
-
-2000-04-23 17:28 jesse
-
- * Makefile, docs/design_docs/acls, etc/schema.mysql:
-
- installation seems to work a bit better now
-
-2000-04-20 02:18 jesse
-
- * webrt/Login.html:
-
- Removing cruft from login.html
-
-2000-04-20 02:17 jesse
-
- * webrt/Ticket/autohandler:
-
- Look ma! this autohandler seems to make webauth (with $pass = $user ) work.
-
-2000-04-20 02:09 jesse
-
- * webrt/: autohandler, Ticket/autohandler:
-
- file autohandler was initially added on branch rt-1-1.
-
-2000-04-20 02:09 jesse
-
- * webrt/Login.html:
-
- file Login.html was initially added on branch rt-1-1.
-
-2000-04-20 02:09 jesse
-
- * Makefile, bin/webmux.pl, webrt/Login.html, webrt/autohandler,
- webrt/Ticket/autohandler:
-
- Doing work on cookie-based authentication for WebRT. The basic idea
- is that the autohandler in each directory (unless the global handlers can be made to work) will check to see if the user is authenticated. If they are, then it keeps going happily. otherwise, it forces the user to login with the form in /Login.html, which should eventually be smart enough to put them back to where they want to go.
-
-2000-04-18 02:43 jesse
-
- * docs/design_docs/acls:
-
- checking in design work on ACLs. a bit more work, such as notes
- on order of evaluation and a rough implementation plan and then I'll
- implement
-
-2000-04-13 11:58 tobiasb
-
- * etc/config.pm:
-
- Introduced all columns we need locally, that is all columns as of RT
- 1.0, except due, area and priorities. I guess somebody might want to
- add those columns as well :)
-
-2000-04-13 11:52 tobiasb
-
- * lib/RT/Ticket.pm:
-
- hrmwell, you did introduse a slight bug here.. :)
-
-2000-04-13 11:26 tobiasb
-
- * webrt/Search/: Listing.html, TicketCell:
-
- Looks gruesome, but hey - it works\!
-
-2000-04-13 11:26 tobiasb
-
- * webrt/Search/TicketCell:
-
- file TicketCell was initially added on branch rt-1-1.
-
-2000-04-13 10:52 tobiasb
-
- * etc/config.pm:
-
- agh..
-
-2000-04-13 10:50 tobiasb
-
- * etc/config.pm:
-
- Added the site configurable option "QueueListingCols". It should also
- be possible to override this one at least through the query, but it
- might not be trivial. (maybe you have better suggestions?)
-
-2000-04-13 10:23 tobiasb
-
- * webrt/Search/QueueItem:
-
- I think I want to remove this one, I have other thoughts about how to
- handle this - let's discuss it more when I've made some implementation :)
-
-2000-04-13 10:05 tobiasb
-
- * webrt/Search/Listing.html:
-
- Added this:
-
- # TODO: This one should _not_ be here, rather somewhere else
- # (suggestions?). It might eventually read the cookies, user
- # configuration information from the DB, queue configuration information
- # from the DB, etc. It should be object oriented. But what object can
- # it belong to, and how should it get access to all this data?
-
- sub _cfg {
- my $key=shift;
- return $ARGS{$key} || $RT::SitePolicy{$key};
- }
-
-2000-04-13 10:05 tobiasb
-
- * etc/config.pm:
-
- Added a hash for "tunable" configurations:
-
- # This is where RT's preferences are kept track of
-
- package RT;
-
- # Different "tunable" configuration options should be in this hash:
- %SitePolicy=();
-
-2000-04-13 02:30 jesse
-
- * lib/RT/Ticket.pm:
-
- Ticket::clean became Ticket::_CleanAddressesAsString
- references to clean changed accordingly. i feel a bit dirty not
- making this $self->_CleanAddressesAsString.
-
-2000-04-12 08:53 tobiasb
-
- * webrt/: Elements/SelectStatus, Ticket/ProcessUpdate.html,
- Ticket/Update.html:
-
- bugfixes and insignificant enhancements
-
-2000-04-12 07:14 tobiasb
-
- * webrt/Elements/yearMenu:
-
- "Last year" is now (by default) available
-
-2000-04-12 07:11 tobiasb
-
- * webrt/Search/PickRestriction:
-
- Changed the default to select one queue, not select "anything but" a queue.
-
-2000-04-12 07:07 tobiasb
-
- * webrt/Search/PickRestriction:
-
- Added a stupid "under construction" message.
-
-2000-04-12 07:00 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Ehm .. the last commit message should be more descriptive;
-
- From the README:
-
- rt: |"/path/to/rt/bin/rt-mailgate general correspond"
- | |
- <<queue-name>----/ |
- |
- <<correspond or comment depending on whether |
- the mail shoud be resent to the requestor>---/
- "action" here will make this address only
- parse actions in the message without
- recording the message as a transaction
- of its own"
-
- ...while the implementation required "correspond general"
-
-2000-04-12 06:58 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- This was not in sync with the README
-
-2000-04-12 06:50 tobiasb
-
- * webrt/Search/PickRestriction:
-
- Bugfix
-
-2000-04-12 06:45 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Agh, should have tested before committing :)
-
-2000-04-12 06:44 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Fixd SetOwner to allow stealing and to respect the new Nobody user
-
-2000-04-12 05:19 tobiasb
-
- * webrt/Elements/SelectQueue:
-
- Now this one actually works
-
-2000-04-11 07:30 tobiasb
-
- * webrt/Elements/SelectQueue:
-
- This won't work yet.
-
-2000-04-11 07:17 tobiasb
-
- * lib/RT/Transaction.pm:
-
- Ehr...right. Still fixing at the same bug; the IsInbound sub didn't work....well
-
-2000-04-11 07:08 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm:
-
- argh .. I should learn to test the bugfixes before committing
-
-2000-04-11 06:46 tobiasb
-
- * lib/RT/Transaction.pm:
-
- bugfix
-
-2000-04-11 06:42 tobiasb
-
- * lib/RT/Template.pm, lib/RT/Ticket.pm, webrt/Elements/SelectOwner,
- webrt/Ticket/ProcessUpdate.html:
-
- bugfixes
-
-2000-04-11 05:47 tobiasb
-
- * lib/RT/Ticket.pm:
-
- bugfixing
-
-2000-04-11 04:46 tobiasb
-
- * lib/RT/Watchers.pm:
-
- Bugfix
-
-2000-04-11 04:41 tobiasb
-
- * etc/config.pm, lib/RT/Ticket.pm:
-
- I'm trying to fix this nobody user..
-
-2000-04-11 04:36 tobiasb
-
- * etc/schema.mysql:
-
- I'm trying to fix this nobody user..
-
-2000-04-11 04:29 tobiasb
-
- * lib/RT/Queue.pm, webrt/Ticket/ProcessUpdate.html:
-
- Bugfixing
-
-2000-04-11 03:16 tobiasb
-
- * webrt/Search/Listing.html:
-
- Insignificant. Oh, how should errors be trapped?
-
-2000-04-11 00:40 jesse
-
- * lib/RT/: Queue.pm, Ticket.pm, Watchers.pm:
-
- all the watcher types now have AsString methods. this was done by dropping
- an EmailsAsString method into RT::Watcher
-
-2000-04-10 23:04 tobiasb
-
- * webrt/Ticket/ProcessUpdate.html:
-
- Added those use statements
-
- This page seems very broken in Netscape.
-
-2000-04-10 23:00 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Darn, I thought I had tested this. Well, now it should work!?
-
-2000-04-10 22:54 tobiasb
-
- * lib/RT/Ticket.pm:
-
- ...some work is needed to get Watchers work OK. I commented out my
- try on it, so now it will ignore queue watchers (it simply ignored all
- watchers as it was).
-
-2000-04-10 14:29 tobiasb
-
- * webrt/Ticket/: DisplayTicket, DisplayTransaction:
-
- Update and Modify-links
-
-2000-04-10 14:20 tobiasb
-
- * webrt/Ticket/DisplayTransaction:
-
- Added an "act" link and touched the comments
-
-2000-04-10 14:11 tobiasb
-
- * webrt/Ticket/DisplaySummary:
-
- Reinserted the "Last Contact" and "Last Update" lines, but they're "cleaned" a bit.
-
- (btw, this seems like a crude copy from the cli, does the cli have similar problems?)
-
-2000-04-10 13:51 tobiasb
-
- * webrt/Ticket/DisplaySummary:
-
- Hacking a bit on this
-
-2000-04-10 13:48 tobiasb
-
- * webrt/Ticket/: DisplayTransaction, Update.html:
-
- Hacking a bit on this
-
-2000-04-10 13:18 tobiasb
-
- * webrt/Ticket/Modify.html:
-
- 'undo' (well, not really :)
-
-2000-04-10 13:13 tobiasb
-
- * webrt/Ticket/Update.html:
-
- This 'fix' is maybe only temporary?
-
-2000-04-10 13:08 tobiasb
-
- * webrt/Ticket/Modify.html:
-
- I'd daresay this one is superceded by Update.html?
-
-2000-04-10 13:07 tobiasb
-
- * lib/RT/Ticket.pm:
-
- just added some comments
-
-2000-04-10 12:52 tobiasb
-
- * webrt/Ticket/DisplaySummary:
-
- This 'fix' is maybe only temporary?
-
-2000-04-10 10:35 tobiasb
-
- * webrt/: Elements/SelectBoolean, Search/Listing.html:
-
- insignificant changes
-
-2000-04-10 06:53 tobiasb
-
- * webrt/Elements/SelectOwner:
-
- Insignificant fix (wouldn't work here without)
-
-2000-04-10 05:38 tobiasb
-
- * bin/rtmux.pl:
-
- Might be a bugfix
-
-2000-04-09 16:56 jesse
-
- * lib/RT/Users.pm, webrt/Elements/SelectBoolean,
- webrt/Elements/SelectOwner, webrt/Search/Listing.html,
- webrt/Search/PickRestriction:
-
- I can now get a listing of tickets whose owner is or isn't a given owner.
- and it even lists them. Next, I'll probably make searches for
- other attributes work.
- the plan of attack is requestor, then probably ticket content (as a test
- of whether this whole system works ;)
-
-2000-04-07 20:41 jesse
-
- * webrt/Search/Listing.html:
-
- Added the first bit of code to support queue/owner/requestor/subject search.
- This will make up the core of the web search functionality of the first release of the webui. (not the 2.0 release, but the "tobix needs it now) release.
-
-2000-04-07 14:53 tobiasb
-
- * etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Watchers.pm,
- lib/RT/Action/SendEmail.pm:
-
- hm ... seems like I forgot to commit my last work
-
-2000-04-07 03:55 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm:
-
- it almost works now
-
-2000-04-06 17:40 tobiasb
-
- * lib/RT/Transaction.pm:
-
- development
-
-2000-04-06 17:21 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm, Action/Notify.pm,
- Action/SendEmail.pm:
-
- ouch, found a lot of fatal stubs
-
-2000-04-06 16:54 tobiasb
-
- * etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Action/Notify.pm, lib/RT/Action/SendEmail.pm:
-
- still fighting with the mail handling
-
-2000-04-06 16:12 tobiasb
-
- * etc/schema.mysql, lib/RT/Scrips.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/Action/Notify.pm:
-
- New snapshot of development. Note the change I've done in the Type recognizion
- when selecting the right Scrips in Transaction::Create - it should be more
- flexible this way (replaced "ne" with "!~"). Check the change to schema for
- an example of how this is more flexible.
-
-2000-04-06 15:36 tobiasb
-
- * lib/RT/Action/Notify.pm:
-
- Recipient finder
-
-2000-04-06 15:35 tobiasb
-
- * etc/schema.mysql, lib/RT/Template.pm, lib/RT/Action/SendEmail.pm:
-
- Snapshot; I'm not finished debugging yet, but this should (hopefully) be
- very close to actually work.
-
-2000-04-06 11:38 tobiasb
-
- * docs/FAQ:
-
- this clearly needs a lot more work ...
-
-2000-04-06 11:31 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- ...ah, this felt good.
-
- Checked the recent version of Mailtools at CPAN, so I used the "right"
- method for sending emails.
-
- I also added back again the SetRecipients method, and documented it in
- the POD.
-
- I think I will get this working in a couple of hours, so please don't
- disturb me saying that you disagree very much to those changes.. :)
-
-2000-04-06 10:46 tobiasb
-
- * etc/schema.mysql:
-
- Bugfixing
-
-2000-04-06 10:40 tobiasb
-
- * etc/schema.mysql:
-
- I think that I will get this up working during the next few hours.
-
- If I eventually get it working, I'd really appreciate that you don't
- wreck it until the web interface is working and until we've discussed
- the design thoroughly and come down to some consensus about it.
-
-2000-04-06 06:22 tobiasb
-
- * webrt/Elements/Checkbox:
-
- This is not my turf ... and I don't know what I'm doing ... anyway, it didn't work, but now it works (?) :)
-
-2000-04-06 01:49 jesse
-
- * lib/RT/Action/SendEmailOnResolve.pm:
-
- file SendEmailOnResolve.pm was initially added on branch rt-1-1.
-
-2000-04-06 01:49 jesse
-
- * Makefile, etc/schema.mysql, lib/RT/Template.pm,
- lib/RT/Action/MailComment.pm, lib/RT/Action/MailCorrespondence.pm,
- lib/RT/Action/Notify.pm, lib/RT/Action/NotifyOnResolve.pm,
- lib/RT/Action/SendEmail.pm, lib/RT/Action/SendEmailOnResolve.pm:
-
- Ok, i think i significantly cut down the complexity of the actions we've got
- so far. I nuked the old notify rules, as they were superceeded by my more
- capable SendEmail.pm There are still a few things I'm not happy with...
- like, the way that scrips, scripscopes and templates are related. it needs
- some thought and cleanup. but i think it'll work just fine for now.
-
- I redid the templates and scrips to fit with the revised actions and added
- some more docs to SendEmail.pm
-
- the generic RT::Action should deal with templates, not SendEmail, I think,
- but I'm leaving that abstraction for another day.
-
- Oh, the Argument from the scrip is now passed into the template as $T::Argument.
-
-2000-04-05 23:24 jesse
-
- * webrt/Elements/Checkbox:
-
- stylistic cleanup
- using an explicit defined ($foo)
-
-2000-04-05 18:02 tobiasb
-
- * webrt/: Elements/Checkbox, Search/PickRestriction:
-
- Only minor corrections
-
-2000-04-05 17:43 tobiasb
-
- * webrt/Search/PickRestriction:
-
- It certainly doesn't work okay ... I think I should look into it a bit ...
-
-2000-04-05 17:08 tobiasb
-
- * webrt/Search/PickRestriction:
-
- Added ugly submit button
-
-2000-04-05 10:34 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Temporary implementation of kill
-
- As mentionated earlier, I think the right thing is to just set status
- 'dead' and then eventually do some garbage collection later.
-
-2000-04-05 08:55 tobiasb
-
- * lib/RT/Ticket.pm:
-
- More error handling
-
-2000-04-05 08:51 jesse
-
- * lib/RT/Interface/Email.pm:
-
- added some comments around the dies pointing out that we need better error handling.
-
-2000-04-05 05:34 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Doh...I'm really stupid sometimes...
-
-2000-04-05 05:31 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- For some weird reason (perl 5.6.0 bug?) it wouldn't work here without this fix.
-
-2000-04-05 00:35 jesse
-
- * docs/design_docs/acls:
-
- initial musings on acls for 2.0
-
-2000-04-05 00:35 jesse
-
- * docs/design_docs/acls:
-
- file acls was initially added on branch rt-1-1.
-
-2000-04-04 09:52 tobiasb
-
- * etc/schema.mysql:
-
- Language idea
-
-2000-04-04 02:17 jesse
-
- * Makefile, README, bin/rtmux.pl, etc/config.pm:
-
- The first little bits of structure for future L10n support
-
-2000-04-03 12:40 tobiasb
-
- * Makefile, bin/rtmux.pl:
-
- Cleaned out yet some more visible configuration bugs
-
-2000-04-03 12:29 tobiasb
-
- * README:
-
- Some fixes
-
-2000-04-03 10:44 tobiasb
-
- * Makefile, bin/rtmux.pl:
-
- Just a configuration fix.
-
-2000-04-03 01:26 jesse
-
- * Makefile, bin/rtmux.pl:
-
- Ok, I've modified rtmux.pl and Makefile to add in the first bits of stub
- code for running Mason as a cgi. it compiles and appears to invoke.
- but I haven't tested it under a webserver. I've gotta get to sleep now, but
- figured this would give tobias a leg up with his testing today.
-
- Subject: RE: [Mason] Mason under CGI (was: replacing storyserver)
- Author: Ilmari Karonen <iltzu@sci.fi>
- Date: Fri, 17 Sep 1999 15:10:20 +0300 (EET DST)
-
- On Thu, 16 Sep 1999, Ben Munoz wrote:
- > I'm running Apache 1.3.6 on NT. I'm looking to install HTML::Mason and see
- > what it can do, but from what I've read, I can't install mod_perl with the
- > current version of ActiveState's Perl, which I have installed on my machine.
-
- I realize this is probably not what you were asking for, but I'd like to
- mention here my recent (yesterday) experience in setting up Mason under
- plain ol' CGI.
-
- Setting: One Mason top level component plus a few subcomponents on a
- development server with mod_perl and Mason. One production server with the
- least possible selection of modules. (Not even mod_so!)
-
- Needed to quickly get the Mason component up and running on the second
- server. Installing Mason itself and a few other perl modules was easy.
- But adding mod_perl was definitely out of the question.
-
- What I did was take the usual handler.pl, copy it to cgi-bin, deleting
- everything from "my $ah = new HTML::Mason::ApacheHandler" onward
- inclusive, and replacing it with the following:
-
- use CGI;
- my $q = new CGI;
-
- # This routine comes from ApacheHandler.pm:
- my (%args);
- foreach my $key ( $q->param ) {
- foreach my $value ( $q->param($key) ) {
- if (exists($args{$key})) {
- if (ref($args{$key})) {
- $args{$key} = [@{$args{$key}}, $value];
- } else {
- $args{$key} = [$args{$key}, $value];
- }
- } else {
- $args{$key} = $value;
- }
- }
-
- my $comp = $ENV{'PATH_TRANSLATED'};
- my $root = $interp->comp_root;
- $comp ~= s/^$root// or die "Component outside comp_root";
-
- $interp->exec($comp, %args);
-
- This, plus an Action line in httpd.conf mapping *.mas to this script, has
- so far done the job just fine.
-
- One problem I noticed was that this all would've been much harder if I
- hadn't been familiar with the way ApacheHandler.pm uses CGI.pm and hadn't
- known where to find that parsing routine. IMHO it'd be a good idea to
- separate this loop into a user-callable subroutine.
-
- (Note: this was Mason 0.6.mumble - I have no experience with the newer
- versions.)
-
- --
- Ilmari Karonen (iltzu@sci.fi)
- http://www.sci.fi/~iltzu/
-
- _______________________________________________
- Mason maillist - Mason@netizen.com.au
- http://netizen.com.au/mailman/listinfo/mason
-
-2000-04-03 00:49 jesse
-
- * bin/rtmux.pl, etc/schema.mysql, lib/RT/Action.pm,
- lib/RT/CurrentUser.pm, lib/RT/Scrip.pm, lib/RT/ScripScopes.pm,
- lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Watchers.pm, lib/RT/Action/AutoReply.pm,
- lib/RT/Action/SendEmail.pm:
-
- Well, that was an exciting afternoon! Er, an exciting evening!
- *grin* AutoReply now works. which means that all the infrastructure for
- scrips is back in place. It required refactoring things a bit. as cool
- as making RT::Template a MIME::Entity seemed, I just couldn't get it to work
- right, so now, it just creates a MIME::Entity when it needs it, which is
- probably better anyway. I simplified templates a bit. Now they only have
- access to the Ticket and Transaction. This may not be wise, but we'll see.
-
- Also, I merged the two blobs per template (headers and body).
-
-2000-03-31 08:25 tobiasb
-
- * bin/webmux.pl:
-
- rmvd dupl line
-
-2000-03-31 02:47 jesse
-
- * Makefile:
-
- removed old webui hooks from the makefile. bumped the version to 1.3.0
-
-2000-03-31 02:32 jesse
-
- * webrt/Elements/Error:
-
- file Error was initially added on branch rt-1-1.
-
-2000-03-31 02:32 jesse
-
- * webrt/Ticket/DisplayTicket:
-
- file DisplayTicket was initially added on branch rt-1-1.
-
-2000-03-31 02:32 jesse
-
- * webrt/: Elements/Error, Elements/SelectStatus,
- Ticket/Display.html, Ticket/DisplayTicket,
- Ticket/DisplayTransaction, Ticket/ProcessUpdate.html,
- Ticket/Update.html:
-
- Ticket/Update.html will now allow you to submit a ticket update.
- It's the RT2 equivalent of RT1.0's "comment" and "correspond" pages...
- with a bit of added value. it's not a global "modify ticket" page. that comes
- next. but it's where 90% of your single-ticket action will take place.
-
-2000-03-31 02:28 jesse
-
- * lib/RT/Ticket.pm:
-
- TimeTaken should increment now
-
-2000-03-31 02:26 jesse
-
- * README:
-
- added the mason dependency to the README
-
-2000-03-31 02:25 jesse
-
- * bin/webmux.pl:
-
- added some uses to the webmux so I don't have to add them to each page that
- calls them
-
-2000-03-30 00:44 jesse
-
- * webrt/Search/PickRestriction:
-
- made the variable names in PickRestriction look more like the parameter names
- in EasySearch. Wanna guess why?
-
-2000-03-29 23:52 jesse
-
- * webrt/Search/RestrictSearch.html:
-
- file RestrictSearch.html was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Search/PickRestriction:
-
- file PickRestriction was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/Footer:
-
- file Footer was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/: Elements/Checkbox, Elements/Footer, Elements/Header,
- Elements/SelectBoolean, Elements/SelectDate,
- Elements/SelectDateRelation, Elements/SelectOwner,
- Elements/SelectQueue, Elements/SelectStatus, Elements/dayMenu,
- Elements/monthMenu, Elements/yearMenu, Search/PickRestriction,
- Search/RestrictSearch.html:
-
- A bunch of infrasturcture work on the Ticket Search interface. it doesn't
- have any real logic behind it. that's next.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectBoolean:
-
- file SelectBoolean was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/dayMenu:
-
- file dayMenu was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectStatus:
-
- file SelectStatus was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectQueue:
-
- file SelectQueue was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/yearMenu:
-
- file yearMenu was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/Checkbox:
-
- file Checkbox was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/Header:
-
- file Header was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectOwner:
-
- file SelectOwner was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/monthMenu:
-
- file monthMenu was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectDateRelation:
-
- file SelectDateRelation was initially added on branch rt-1-1.
-
-2000-03-29 23:52 jesse
-
- * webrt/Elements/SelectDate:
-
- file SelectDate was initially added on branch rt-1-1.
-
-2000-03-29 00:33 jesse
-
- * etc/schema.mysql:
-
- added a generic "RefersTo" ticket type to the comments.
- changed the types of Link.Base and Link.Target to VARCHAR(255) from INT(11)
-
-2000-03-28 05:16 tobiasb
-
- * README, tools/test:
-
- darn, it seems like I'll need to install mod-perl ... actually I haven't done that earlier..
-
-2000-03-28 00:13 jesse
-
- * Makefile, lib/RT/Record.pm, lib/RT/Transaction.pm,
- webrt/Search/Listing.html, webrt/Search/QueueItem:
-
- webrt/Search/Listing.html now gives a basic listing of all open tickets
- It even has links to the _still display only_ Display.html for each ticket
-
-2000-03-27 23:55 jesse
-
- * webrt/Ticket/DisplayTransaction:
-
- missed this one. sorry.
-
-2000-03-27 23:55 jesse
-
- * webrt/Ticket/DisplayTransaction:
-
- file DisplayTransaction was initially added on branch rt-1-1.
-
-2000-03-27 23:54 jesse
-
- * webrt/Ticket/: Display.html, DisplayHistory:
-
- Hey. Look Ticket/Display.html?id=<int> works!
-
-2000-03-27 22:35 jesse
-
- * webrt/Ticket/ToolBar:
-
- file ToolBar was initially added on branch rt-1-1.
-
-2000-03-27 22:35 jesse
-
- * webrt/Ticket/DisplaySummary:
-
- file DisplaySummary was initially added on branch rt-1-1.
-
-2000-03-27 22:35 jesse
-
- * webrt/Ticket/DisplayHistory:
-
- file DisplayHistory was initially added on branch rt-1-1.
-
-2000-03-27 22:35 jesse
-
- * README, webrt/Ticket/DisplayHistory, webrt/Ticket/DisplaySummary,
- webrt/Ticket/ToolBar:
-
- Work on WebRT, including a README update!
-
- check out http://s.ly/~jesse/2000_03_28_171606_shot.jpg
-
-2000-03-27 22:31 jesse
-
- * lib/RT/Watchers.pm:
-
- Bugfix in Watchers AdministrativeCc -> AdminCc
-
-2000-03-27 22:30 jesse
-
- * webrt/Ticket/: Display.html, Displaysummary, Update.html:
-
- Work on WebUI. Display.html has slight functionality
-
-2000-03-27 22:13 tobiasb
-
- * docs/design_docs/basic-definitions.txt, tools/test:
-
- minor
-
-2000-03-27 21:50 tobiasb
-
- * tools/test:
-
- added some stuff to the test script
-
-2000-03-27 21:32 tobiasb
-
- * lib/RT/: ScripScope.pm, Transaction.pm:
-
- bugfixing
-
-2000-03-27 21:22 tobiasb
-
- * lib/RT/Transaction.pm:
-
- ...well, even more bugs...
-
-2000-03-27 21:09 tobiasb
-
- * lib/RT/: Scrip.pm, ScripScope.pm, Template.pm, Transaction.pm:
-
- First level bugfixing completed; Now the create (from the cli) calls up the action (though as earlier mentionated no emails are sent).
-
-2000-03-27 20:54 tobiasb
-
- * lib/RT/Scrip.pm:
-
- bgfx
-
-2000-03-27 20:47 tobiasb
-
- * lib/RT/Scrip.pm:
-
- Bugfix
-
-2000-03-27 20:22 tobiasb
-
- * lib/RT/ScripScope.pm:
-
- bugfix
-
-2000-03-27 20:19 tobiasb
-
- * docs/design_docs/basic-definitions.txt:
-
- clarified
-
-2000-03-27 18:58 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- The recipients aren't set anywhere as far as I can see ... and I'm really uncertain what you've thought of with SetEnvelopeTo vs SetTo, etc. You'd better take a look. Obviously, this won't work until the recipients are set somehow
-
-2000-03-27 18:40 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- I've mostly only added comments. Anyway, I must say that I like this
- code. (maybe I'll say something different when I've tried debugging it
- ;)
-
-2000-03-27 17:59 tobiasb
-
- * lib/RT/ScripScope.pm:
-
- bugfix
-
-2000-03-27 17:57 tobiasb
-
- * lib/RT/Action.pm:
-
- comment/folding bugfix
-
-2000-03-27 17:56 tobiasb
-
- * docs/design_docs/basic-definitions.txt:
-
- file basic-definitions.txt was initially added on branch rt-1-1.
-
-2000-03-27 17:56 tobiasb
-
- * docs/design_docs/basic-definitions.txt:
-
- (no comment :)
-
-2000-03-27 17:55 tobiasb
-
- * docs/design_docs/link-definitions.txt:
-
- I think maybe those additions might be appreciated by Rouillard ... and this was (hopefully) the last thing I do with design documentation/discussion until 1.3 is finished :)
-
-2000-03-27 17:33 tobiasb
-
- * docs/design_docs/link-definitions.txt:
-
- Doh ... I really shouldn't waste my time on this now ...
-
-2000-03-27 17:17 tobiasb
-
- * lib/RT/Scrip.pm:
-
- Did you ever try to see if those modules would pass `perl -c'? :)
-
-2000-03-27 16:44 jesse
-
- * etc/schema.mysql, lib/RT/Action.pm, lib/RT/Scrip.pm,
- lib/RT/ScripScope.pm, lib/RT/Action/AutoReply.pm,
- lib/RT/Action/SendEmail.pm:
-
- Lots of works on Scrip, ScripScope, Action. Tobias: wanna take a look?
- Basically, now Templates are autoloaded by RT::Scrip.pm and passed into
- the Action as TemplateObj. Also, Templates are now of type MIME::Entity,
- which means that they have all the attributes of mail messages and can
- just be sent.
-
-2000-03-27 16:20 tobiasb
-
- * docs/design_docs/: TransactionTypes.txt, link-definitions.txt:
-
- Linking definitions
-
-2000-03-27 16:20 tobiasb
-
- * docs/design_docs/link-definitions.txt:
-
- file link-definitions.txt was initially added on branch rt-1-1.
-
-2000-03-27 16:01 tobiasb
-
- * docs/README.docs:
-
- Updated the README to reflect that the docs are old :)
-
-2000-03-27 15:45 tobiasb
-
- * README:
-
- status update
-
-2000-03-27 15:41 tobiasb
-
- * lib/RT/ScripScope.pm:
-
- minor string fix
-
-2000-03-27 15:36 tobiasb
-
- * docs/design_docs/subscription-definitions.txt:
-
- How does the system determinate whom to send mail to?
-
- The ScripScope table in the DB should indicate whether a Scrip is relevant
- for a queue or not /* TobiX thinks that this might eventually be extended to
- keywords, tickets, etc, and not only Queues */ ... the Scope table should
- indicate whether the Scrip is relevant for a given transaction type ... then
- the given Action should determinate whether it applies or not, and finally
- the Action has to find out (via the Watchers table) whom it applies to, and
- how to contact them ... and the Template tells how the mails that are sent
- out should look like.
-
-2000-03-27 12:33 jesse
-
- * lib/RT/ScripScopes.pm:
-
- file ScripScopes.pm was initially added on branch rt-1-1.
-
-2000-03-27 12:33 jesse
-
- * lib/RT/: ScripScope.pm, ScripScopes.pm:
-
- a bit more stub work on ScripScopes for tobias.
- more work after lunch
-
-2000-03-27 07:18 tobiasb
-
- * lib/RT/ScripScope.pm:
-
- test..?
-
-2000-03-27 07:04 tobiasb
-
- * lib/RT/: ScripScope.pm, Scrips.pm:
-
- Initiated work to get the code understand the Scrips/Scripscope split
-
-2000-03-27 07:04 tobiasb
-
- * lib/RT/ScripScope.pm:
-
- file ScripScope.pm was initially added on branch rt-1-1.
-
-2000-03-27 06:55 tobiasb
-
- * etc/schema.mysql:
-
- Added yet a stupid design thought as a comment:
-
- # {{{ TABLE ScripScope
- (...)
- Queue INT(11), #Queue Id 0 for global
- # (maybe there might be conditions where otherb
- # Scopes apply, i.e. a ticket, keyword, owner, etc?)
-
-2000-03-27 00:45 jesse
-
- * lib/RT/Action/Notify.pm:
-
- Oops. forgot to commit Notify.pm
-
-2000-03-27 00:45 jesse
-
- * lib/RT/Action/Notify.pm:
-
- file Notify.pm was initially added on branch rt-1-1.
-
-2000-03-27 00:44 jesse
-
- * lib/RT/Action/NotifyOnResolve.pm:
-
- file NotifyOnResolve.pm was initially added on branch rt-1-1.
-
-2000-03-27 00:44 jesse
-
- * etc/schema.mysql, lib/RT/Ticket.pm,
- lib/RT/Action/NotifyOnResolve.pm, lib/RT/Action/NotifyWatchers.pm:
-
- Work on Notify (Formerly NotifyWatchers)
- Work on NotifyOnResolve (Formerly NotifyWatchersOnResolve)
-
- They don't _work_ per se. But they're getting closer. I'm wondering
- whether we want to do something smarter with all the addresses we're passing
- in to make it easier to remove specific ones...for example, we currently
- have no way to _not_ send mail to the reuqestor.
-
-2000-03-26 18:13 jesse
-
- * lib/RT/Action/: AutoReply.pm, SendEmail.pm:
-
- AutoReply is now a proper subclass of SendEmail.pm
- Maybe tonight, I'll try to get through some work on the Scrips and ScripScope stuff to make it work again.
- then to wrok on NotifyWatchers.pm
-
-2000-03-25 01:03 jesse
-
- * Makefile, lib/RT/Template.pm, lib/RT/Ticket.pm,
- lib/RT/Action/SendEmail.pm:
-
- Work on the templating system. I actually gutted Template.pm and SendEmail.pm
- (sorry tobix :/) Basically RT::Template is now A MIME::Entity object, which
- means that the various things one can do to mail messages can now be done to
- RT::Template objects, once you run $TemplateObj->Parse on them..
- SendEmail was cleaned up somewhat to be less intimidating to people who aren't
- as comfortable with big chunks of fairly dense perl. Oh and it's a heck of a
- lot more subclassable now ;)
-
- Fixed a tiny bug in Ticket.pm resulting from the changes to Watchers.
-
-2000-03-24 08:29 tobiasb
-
- * tools/test:
-
- I'm making a test suite which is intended to be run off from the Makefile after an install
-
-2000-03-24 08:29 tobiasb
-
- * tools/test:
-
- file test was initially added on branch rt-1-1.
-
-2000-03-24 08:06 tobiasb
-
- * etc/schema.mysql:
-
- Added some more noise
-
-2000-03-23 23:41 jesse
-
- * subscription-definitions.txt,
- docs/design_docs/subscription-definitions.txt, etc/schema.mysql,
- lib/RT/Action/NotifyWatchers.pm, lib/RT/Action/SendEmail.pm:
-
- A little bit of cleanup to the SendEmail and NotifyWatchers actions.
- I probably did more damage than good, but that's what I get for messing
- with code that makes little sense to me.
-
-2000-03-23 23:41 jesse
-
- * docs/design_docs/subscription-definitions.txt:
-
- file subscription-definitions.txt was initially added on branch rt-1-1.
-
-2000-03-23 22:19 jesse
-
- * webrt/Search/BuildSearch:
-
- Testing the setgid repository. commiting an empty file
-
-2000-03-23 22:19 jesse
-
- * webrt/Search/BuildSearch:
-
- file BuildSearch was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * webrt/Search/QueueFooter:
-
- file QueueFooter was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * webrt/Search/QueueItem:
-
- file QueueItem was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * webrt/Search/QueueHeader:
-
- file QueueHeader was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * webrt/Admin/ModifyUser:
-
- file ModifyUser was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * lib/RT/Action/NotifyWatchers.pm:
-
- file NotifyWatchers.pm was initially added on branch rt-1-1.
-
-2000-03-23 00:50 jesse
-
- * Makefile, bin/rtmux.pl, etc/schema.mysql, lib/RT/Queue.pm,
- lib/RT/Scrip.pm, lib/RT/Ticket.pm, lib/RT/Watcher.pm,
- lib/RT/Action/NotifyWatchers.pm, webrt/Admin/ModifyUser,
- webrt/Search/Listing.html, webrt/Search/QueueFooter,
- webrt/Search/QueueHeader, webrt/Search/QueueItem,
- webrt/Ticket/Displaysummary:
-
- Did a bit of hacking on webrt2
- Redid the watchers system according to what I posted earlier to rt-devel
- Scrips have now broken..but we'll get them working again really soon.
- Queue Cc and AdminCc now exist in cli adminrt.
-
-2000-03-22 14:56 tobiasb
-
- * subscription-definitions.txt:
-
- definitions in the subscription system
-
-2000-03-22 14:56 tobiasb
-
- * subscription-definitions.txt:
-
- file subscription-definitions.txt was initially added on branch rt-1-1.
-
-2000-03-22 14:42 tobiasb
-
- * etc/schema.mysql:
-
- This is a suggestion about a simple splitting of the Scrips table. I
- think the admin tools will be significantly easier to set up if we do
- it this way. An administrator can through some UI just add and remove
- Scrips from a queue.
-
-2000-03-22 01:02 jesse
-
- * lib/RT/: ACE.pm, ACL.pm, Action.pm, Area.pm, Areas.pm,
- Attachment.pm, Attachments.pm, CurrentUser.pm, EasySearch.pm,
- Queue.pm, Queues.pm, Record.pm, Scrip.pm, Scrips.pm, Template.pm,
- Templates.pm, Ticket.pm, Tickets.pm, Transaction.pm,
- Transactions.pm, User.pm, Users.pm, Utils.pm, Watcher.pm,
- Watchers.pm, Action/AutoReply.pm, Action/MailComment.pm,
- Action/SendEmail.pm, Interface/Email.pm:
-
- This may look like a lot of code. but it's not.
- It's merely the result of running
-
- perl -pi.bak -e 's/sub (.*?){\n/# {{{ sub $1\nsub $1 {\n/; s/^}$/}\n# }}}/'
-
- basically, this adds # {{{ sub function
- and # }}}
- around all the function names. The main reason to do this is for
- emacs fold-minor-mode. It makes things a lot easier to read.
- In an ideal world, we'd have perl-aware folding editor and there'd be
- no need for this markup
-
-2000-03-21 20:38 jesse
-
- * lib/RT/: Queue.pm, Ticket.pm, Watcher.pm, Watchers.pm:
-
- Work on watchers.
-
-2000-03-20 15:21 jesse
-
- * etc/schema.mysql:
-
- Modified the schema for my "New Improved Watchers" system. Basically,
- now you'll be able to tie a template to a given watch. along with a
- boolean "send mail" flag. We'll need a special "Mail Watchers" action to
- make this all work..but the code should be pretty easy.
-
- jesse
-
-2000-03-20 05:27 tobiasb
-
- * bin/initdb.mysql:
-
- bugfix
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/Create.html:
-
- file Create.html was initially added on branch rt-1-1.
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/DisplayHeader:
-
- file DisplayHeader was initially added on branch rt-1-1.
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/SetOwner:
-
- file SetOwner was initially added on branch rt-1-1.
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/SetStatus:
-
- file SetStatus was initially added on branch rt-1-1.
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/: Create.html, Display.html, DisplayHeader,
- Displaysummary, SetOwner, SetStatus, Update.html:
-
- More work on the basic webui
-
-2000-03-17 15:20 jesse
-
- * webrt/Ticket/Displaysummary:
-
- file Displaysummary was initially added on branch rt-1-1.
-
-2000-03-17 11:32 tobiasb
-
- * bin/initdb.mysql:
-
- Bugfix, the password passing didn't work as it should.
-
-2000-03-17 10:52 tobiasb
-
- * etc/schema.mysql:
-
- - Slashed away the old "MailQueueMembersOn..." junk.
-
- - Added Scrips to the Watchers table. ... the Watchers/Scrips system
- seems quite flexible .. BUT .. I have a certain feeling that it might
- be hard to make administration tools that helps a non-hacking
- administrator to find out which mails are sent where, etc. Well,
- that's something we'll have to worry about later :)
-
-2000-03-17 08:47 tobiasb
-
- * Makefile, etc/schema.mysql:
-
- removed some instanses of 'su' that really shouldn't be needed, and which also broke on anything but GNU shellutils
-
-2000-03-17 07:32 tobiasb
-
- * README:
-
- Some additions and changes to reflect that this is, after all, a
- development version. Meri, do you subscribe to cvs-commit? :)
-
-2000-03-17 06:01 tobiasb
-
- * etc/schema.mysql:
-
- # Those subscription field are not used in RT 1.1 as I see it.
- # I think we should modify the Scrips system so it by default
- # respects those fields.
- MailOwnerOnTransaction INT, # notify owner on transaction
- MailMembersOnTransaction INT, # notify list members on transaction
- MailRequestorOnTransaction INT, # notify requestor on transaction
- MailRequestorOnCreation INT, # notify user on creation
- MailMembersOnCorrespondence INT, # notify members on creation
- MailMembersOnComment INT, # notify members on comment
-
-2000-03-16 16:31 jesse
-
- * webrt/: Search/Listing.html, Ticket/Display.html,
- Ticket/Modify.html, Ticket/ProcessUpdate.html, Ticket/Update.html,
- Ticket/ValidateUpdate.html:
-
- The beginnings of the All New! Web UI based around HTML::Mason
- There's nothing functional here yet. but it's a start at a framework.
- Ticket/Update.html is probably the closest to "real" code so far.
-
-2000-03-16 16:31 jesse
-
- * webrt/Ticket/ValidateUpdate.html:
-
- file ValidateUpdate.html was initially added on branch rt-1-1.
-
-2000-03-16 16:31 jesse
-
- * webrt/Ticket/Display.html:
-
- file Display.html was initially added on branch rt-1-1.
-
-2000-03-16 16:31 jesse
-
- * webrt/Ticket/Modify.html:
-
- file Modify.html was initially added on branch rt-1-1.
-
-2000-03-16 16:31 jesse
-
- * webrt/Search/Listing.html:
-
- file Listing.html was initially added on branch rt-1-1.
-
-2000-03-16 16:31 jesse
-
- * webrt/Ticket/ProcessUpdate.html:
-
- file ProcessUpdate.html was initially added on branch rt-1-1.
-
-2000-03-16 16:31 jesse
-
- * webrt/Ticket/Update.html:
-
- file Update.html was initially added on branch rt-1-1.
-
-2000-03-16 14:46 tobiasb
-
- * Makefile:
-
- Changed the default database name from rt to RT to avoid confusion with previously installed versions of rt
-
-2000-03-16 02:34 tobiasb
-
- * lib/RT/User.pm:
-
- Bugfixes: It was impossible not to give requests to somebody.
-
-2000-03-16 01:32 tobiasb
-
- * lib/RT/Interface/Email.pm:
-
- Bugfixes
-
- was
-
- if ($CurrentUser->Id == 0) {
- #If it fails, create a user
-
- now
-
- unless ($CurrentUser->Id) {
- #If it fails, create a user
-
- as Id returned undef.
-
- Changed 'Queue' to 'QueueTag'.
-
- Added some few comments
-
-2000-03-14 00:40 jesse
-
- * README:
-
- Modified the README for the beginnings of the new webui
-
-2000-03-14 00:39 jesse
-
- * bin/: rtmux.pl, webmux.pl:
-
- added webmux. modified rtmux.pl to clean out some cruft
-
-2000-03-14 00:39 jesse
-
- * bin/webmux.pl:
-
- file webmux.pl was initially added on branch rt-1-1.
-
-2000-03-13 12:53 jesse
-
- * lib/RT/Interface/Email.pm:
-
- rt-mailgate has now recieved and logged correspondence and comments with current schema.
-
-2000-03-08 23:26 jesse
-
- * lib/RT/: Ticket.pm, Transaction.pm:
-
- DBIx cleanups to deal with load by id when id is null
- Work on comment and correspond. Eventually, we'll get the
- per-transaction cc and bcc working.
-
-2000-03-08 18:22 jesse
-
- * bin/rtmux.pl, lib/RT/Queue.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/User.pm:
-
- rtq works a bit better
- rtadmin works again.
- rtadmin -user create
- -user modify
- both seem to work ok
-
- rt -create now makes sure a queue exists and permits ticket creation
- rt -create now make sure a prospective owner has queue membership.
-
-2000-03-02 17:23 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Action/SendEmail.pm, etc/schema.mysql:
-
- resolve, open, take (if unowned, at least) seems to work
-
-2000-03-02 16:10 tobiasb
-
- * lib/RT/: Ticket.pm, Ticket.pm:
-
- Bugfixing
-
-2000-03-02 14:35 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Correspondence almost works
-
-2000-03-02 13:26 tobiasb
-
- * lib/RT/Ticket.pm, lib/RT/Action/MailComment.pm, etc/schema.mysql:
-
- Comments almost work now (from the cli)
-
-2000-03-02 12:38 tobiasb
-
- * lib/RT/Action/: MailComment.pm, MailCorrespondence.pm:
-
- one minor bugfix + some comments
-
-2000-03-01 23:58 jesse
-
- * NEWS:
-
- brought the news up to date.
- nuked old /contrib
- nuked old /etc/templates.
-
- bedtime now.
-
-2000-03-01 23:57 jesse
-
- * NEWS:
-
- brought the news up to date (a bit)
-
-2000-03-01 23:50 jesse
-
- * Makefile:
-
- removed a lot of outdated cruft.
- Bumped the version to 1.1.11 for a release later this week.
-
-2000-03-01 23:18 jesse
-
- * lib/RT/: Ticket.pm, Interface/Email.pm:
-
- The mail gateway now lets you create, comment and correspond on tickets.
- Ticket->Owner now deals better when the owner is NULL
-
-2000-03-01 21:27 jesse
-
- * HACKING:
-
- minor comments added to hacking
-
-2000-03-01 21:20 jesse
-
- * HACKING:
-
- Trivial change to HACKING to test commitinfo
-
-2000-03-01 21:09 jesse
-
- * lib/RT/Interface/Email.pm:
-
- file Email.pm was initially added on branch rt-1-1.
-
-2000-03-01 21:09 jesse
-
- * bin/rtmux.pl, lib/RT/Interface/Email.pm:
-
- work on mailgate
-
-2000-03-01 18:36 tobiasb
-
- * docs/design_docs/TransactionTypes.txt, etc/schema.mysql:
-
- Some loose thoughts only ... as comments and a doc which I'm not sure
- if it's possible to understand by others than me anyway :)
-
- Anyway, it is too complex. We'll just continue following the current design.
-
-2000-03-01 18:36 tobiasb
-
- * docs/design_docs/TransactionTypes.txt:
-
- file TransactionTypes.txt was initially added on branch rt-1-1.
-
-2000-03-01 17:51 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Seems like it's a lot of things that doesn't work here.
-
-2000-03-01 16:26 tobiasb
-
- * etc/schema.mysql:
-
- Ehm ... maybe I forgot to commit this one. It contains some fixes.
-
-2000-03-01 16:08 jesse
-
- * TODO:
-
- ripped a bit of obsolete code from rtmux.pl
- updated the TODO to reference the production instance of RT.
-
-2000-03-01 14:48 jesse
-
- * bin/rtmux.pl:
-
- removed the old web ui hooks from rtmux.pl
-
-2000-03-01 12:12 tobiasb
-
- * lib/RT/: Action.pm, Scrip.pm, Template.pm, Ticket.pm,
- Watchers.pm, Action/AutoReply.pm, Action/SendEmail.pm:
-
- I've done some debugging and polishing. I hope it won't break with stuff you're eventually working with
-
-2000-02-29 16:58 tobiasb
-
- * lib/RT/: Queue.pm, Ticket.pm, Watchers.pm:
-
- One sort of bugfix..
-
-2000-02-29 16:35 tobiasb
-
- * lib/RT/: Queue.pm, Template.pm, Ticket.pm, Watcher.pm,
- Watchers.pm, Action/SendEmail.pm:
-
- Scrips work for me. Well, I'm not that sure anyway. I had actually
- expected one email to drop in for each Scrip - but I only got the
- AutoReply and the Correspondence. Maybe I should debug even more.
-
-2000-02-29 14:29 tobiasb
-
- * lib/RT/Watchers.pm:
-
- LimitToTicket updated (not tested, though)
- LimitToQueue added (not tested, though)
-
-2000-02-29 14:27 tobiasb
-
- * etc/schema.mysql:
-
-
- # Primarly used by RT::Actions::SendEmail as well as some subclasses
- # to determinate whom to send emails to. This scheme should work out
- # better than the scheme under RT 1.0, and should suit most users.
- # For more fine grained control, it's possible to create tables as you
- # like and make a new subclass of RT::Actions::SendEmail where the
- # SetRecepients sub is overloaded :)
-
- CREATE TABLE Watchers (
- id int(11) AUTO_INCREMENT PRIMARY KEY,
- Value int(11),
- Scope varchar(16), # Might be "Queue" and "Ticket" as for now
- # ... might be extended to "Keywords", "Owners", etc.
- Email VARCHAR(255),
- Type VARCHAR(16), #Requestor, Cc, Bcc
- Creator INT(11),
- Created TIMESTAMP,
- LastUpdatedBy INT(11),
- LastUpdated TIMESTAMP
- )\g
-
-2000-02-29 13:40 tobiasb
-
- * etc/schema.mysql:
-
- CREATE TABLE Watchers (
- id int(11) AUTO_INCREMENT PRIMARY KEY,
- Ticket int(11), # 0 for all
- Queue int(11), # 0 for all
- # We might consider adding more power here,
- # i.e. TransactionType, Scrip, etc
- Email VARCHAR(255),
- Type VARCHAR(16), #Requestor, Cc, Bcc
- Creator INT(11),
- Created TIMESTAMP,
- LastUpdatedBy INT(11),
- LastUpdated TIMESTAMP
- )\g
-
-2000-02-29 10:43 tobiasb
-
- * etc/schema.mysql:
-
- Template.{content and title} => Content and Title - since we use
- UpperCase in the rest of the DD.
-
-2000-02-29 10:31 tobiasb
-
- * etc/schema.mysql:
-
- Blob, that is..
-
-2000-02-29 10:12 tobiasb
-
- * etc/schema.mysql:
-
- Added ExtraHeaders as VARCHAR(255). 255 characters should be enough
- for storing some few extra header lines, but anyway maybe it should
- have been blob instead?
-
-2000-02-29 09:51 tobiasb
-
- * lib/RT/: Attachment.pm, Action/AutoReply.pm, Action/SendEmail.pm:
-
- I've continued the work on mail sending. There is still some missing
- stuff:
-
- 1. EasySearch/Scrips issue - currently it doesn't properly output "
- all scrips that has (queue=0 or queue=this) and (type="any" or type=this)".
-
- 2. A serious stub in RT::Action::SendEmail - I don't know where to find
- "interessted parties". I think it could be nice putting queue watchers
- in the same table as ticket watchers.
-
-2000-02-29 09:42 tobiasb
-
- * lib/RT/Scrips.pm:
-
- Hack - everything that applies for a Correspondence action also
- applies for a Create action (I'd daresay).
-
-2000-02-29 07:02 tobiasb
-
- * lib/RT/Transaction.pm:
-
- Some insignificant changes. Well, one marginally significant; it
- shouldn't $Scrip->Commit unless $Scrip->Prepare()
-
-2000-02-29 04:12 tobiasb
-
- * etc/schema.mysql:
-
- I've started at general transaction emails.
-
-2000-02-29 03:58 tobiasb
-
- * lib/RT/Watchers.pm:
-
- Added an Emails method. It can be used like:
-
- print join(",", @{$Watchers->Emails("Requestors")});
-
- or
-
- $Watchers->LimitToRequestors;
- $Emails=$Watchers->Emails;
-
- ...
-
-2000-02-29 02:31 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- Sender => RT-Originator
-
-2000-02-29 00:40 jesse
-
- * README:
-
- Added Into Netowrks and Funcom to the thanks at the top of the readme
- `
-
-2000-02-28 23:20 jesse
-
- * Makefile:
-
- RT 1.1.10 released. Tobix has autoreply basically working :)
-
-2000-02-28 22:49 jesse
-
- * Makefile, NEWS, README:
-
- Fixed a longstanding bug in the WebRT administrator
- added a note about stripmime to the readme.
- added a bit of code from curl.com that adds functionality to rtq for reporting
-
-2000-02-28 22:17 jesse
-
- * Makefile, NEWS:
-
- bumped the version for release of 1.0.2
-
-2000-02-28 11:33 tobiasb
-
- * lib/RT/: Template.pm, Transaction.pm, Action/AutoReply.pm,
- Action/SendEmail.pm:
-
- AutoReply seems to work now ... except that rtadmin didn't set email
- aliases for the queue, so the mail bounces with invalid from address.
- I won't look more at this until tomorrow. You're very welcome to take
- over for a while if you feel like it :)
-
-2000-02-28 11:29 tobiasb
-
- * etc/schema.mysql:
-
- AutoReply seems to work now
-
-2000-02-28 08:18 tobiasb
-
- * HACKING:
-
- Added some hints and misc. Please look through.
-
-2000-02-28 05:25 tobiasb
-
- * lib/RT/: Ticket.pm, Transaction.pm, Action/AutoReply.pm,
- Action/SendEmail.pm:
-
- - The queue tag rather than queue id is delievered from the cli, this
- broke in Ticket::Create. Fixed.
-
- - The Attachments have to be assigned to a transaction before Scrips
- is run. Now the Attachments are delievered as a part of the parameters
- to Transaction::Create
-
-2000-02-27 23:28 tobiasb
-
- * etc/schema.mysql:
-
- Fixed the AutoReply template ... still not tested, though.
-
-2000-02-27 22:04 tobiasb
-
- * lib/RT/Action/: AutoReply.pm, SendEmail.pm:
-
- I think we can nuke the old rt/lib/rt/support/mail.pm now - everything
- should be located in SendEmail.pm, AutoReply.pm and Template.pm by now :)
-
- It's not tested yet, and the templates needs upgrading. Anyway, I will
- probably not mess more around with the perl code as for now.
-
-2000-02-27 21:43 tobiasb
-
- * bin/rtmux.pl:
-
- Seems like $rtversion="!!RT_VERSION!!" had disappeared. I renamed the
- variable to $VERSION.
-
-2000-02-27 21:22 jesse
-
- * lib/RT/Ticket.pm:
-
- dates now display in the cli.
-
-2000-02-27 20:53 tobiasb
-
- * lib/RT/Templates.pm:
-
- Fixed DBIx::EasySearch => RT::EasySearch
-
-2000-02-27 20:53 tobiasb
-
- * lib/RT/Template.pm:
-
- Method Template::Parse added, Text::Template used for the moment.
-
- (sigh ... that means my next worktask will be to update the
- templates...)
-
-2000-02-27 20:49 jesse
-
- * lib/RT/Ticket.pm:
-
- so. Ticket->Create now actually figures out ccs and bccs and requestors from the mime
- object passed in to it.
-
-2000-02-27 19:05 jesse
-
- * lib/RT/Transaction.pm:
-
- added a comment for tobias about a new line that didn't make sense.
-
-2000-02-27 18:46 jesse
-
- * lib/RT/: Ticket.pm, Watchers.pm:
-
- watchers updates.
-
-2000-02-27 17:25 tobiasb
-
- * lib/RT/Template.pm:
-
- file Template.pm was initially added on branch rt-1-1.
-
-2000-02-27 17:25 tobiasb
-
- * lib/RT/: Attachment.pm, Template.pm, Templates.pm,
- Action/AutoReply.pm, Action/SendEmail.pm:
-
- Development snapshot. I guess I'll have it working in half an hour
- with _efficient_ working, that is some four hours working at my
- current efficiency rate :/
-
-2000-02-27 17:25 tobiasb
-
- * lib/RT/Templates.pm:
-
- file Templates.pm was initially added on branch rt-1-1.
-
-2000-02-27 16:43 tobiasb
-
- * etc/schema.mysql:
-
- Added some templates
-
-2000-02-27 11:19 tobiasb
-
- * lib/RT/: Scrip.pm, Transaction.pm:
-
- development snapshot
-
-2000-02-27 10:31 tobiasb
-
- * lib/RT/Action/: AutoReply.pm, MailComment.pm,
- MailCorrespondence.pm, SendEmail.pm:
-
- I've started bashing at the mail sending functionallity. It seemed quite
- stubbed to me.
-
-2000-02-24 03:44 tobiasb
-
- * etc/schema.mysql:
-
- minor bug in comment
-
-2000-02-24 03:24 tobiasb
-
- * lib/RT/Action/SendEmail.pm:
-
- clearing out a potential weird bug
-
-2000-02-24 00:27 jesse
-
- * lib/RT/Scrips.pm:
-
- Fixed a typo in my code near tobix' changes to Scrips.pm. his changes look good.
-
-2000-02-24 00:03 jesse
-
- * Makefile, NEWS, README:
-
- little fix to mail manipulate from "Heather L. Sherman" <heather@idealab.com>
-
-2000-02-23 17:06 tobiasb
-
- * lib/RT/: Scrips.pm, Action/SendEmail.pm:
-
- Some small fixes. You'd better look through it, as I'm not completely sure what I'm doing :)
-
-2000-02-23 16:07 tobiasb
-
- * etc/schema.mysql:
-
- An insert entry here reffers to SendMail.pm, while the file is SendEmail.pm
-
-2000-02-23 15:26 jesse
-
- * docs/rt-templates.html:
-
- [no log message]
-
-2000-02-23 11:38 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Could not get 'rt -create' working. It seems more sane now, but I'm not really sure what I'm doing ... so you should have a peek at it. I changed $Id->SUPER::_Set("EffectiveId",$id); to $self->SUPER::_Set etc
-
-2000-02-22 23:35 jesse
-
- * lib/RT/InterestedParty.pm:
-
- removed vestigal code
-
-2000-02-22 23:25 jesse
-
- * etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/Transactions.pm, lib/RT/Watchers.pm:
-
- A bit more work on watchers. we're getting close.
- rtq works today.
- rt -create basically works.
- rt -take works.
-
- rt -show will now start to show ownership changes.
-
-2000-02-22 08:06 jesse
-
- * Makefile, etc/schema.mysql, lib/RT/Ticket.pm:
-
- Work on Watchers. Most of the code needed to make this work is now
- present. sadly I haven't even _tried_ to run it yet.
-
-2000-02-21 01:33 jesse
-
- * lib/RT/Watcher.pm:
-
- file Watcher.pm was initially added on branch rt-1-1.
-
-2000-02-21 01:33 jesse
-
- * lib/RT/: InterestedParties.pm, InterestedParties.pm~,
- Notification.pm, Ticket.pm, Watcher.pm, Watchers.pm:
-
- Renamed interested parties to "Watchers"
- Watchers are now keyed by EmailAddress rather than UserId. Not every CC will have an rt account, i think
-
-2000-02-21 01:33 jesse
-
- * lib/RT/Watchers.pm:
-
- file Watchers.pm was initially added on branch rt-1-1.
-
-2000-02-20 18:28 jesse
-
- * lib/RT/InterestedParties.pm~:
-
- file InterestedParties.pm~ was initially added on branch rt-1-1.
-
-2000-02-20 18:28 jesse
-
- * lib/RT/InterestedParties.pm:
-
- file InterestedParties.pm was initially added on branch rt-1-1.
-
-2000-02-20 18:28 jesse
-
- * lib/RT/InterestedParty.pm:
-
- file InterestedParty.pm was initially added on branch rt-1-1.
-
-2000-02-20 18:28 jesse
-
- * lib/RT/: InterestedParties.pm, InterestedParties.pm~,
- InterestedParty.pm:
-
- [no log message]
-
-2000-02-20 18:24 jesse
-
- * etc/schema.mysql, lib/RT/Ticket.pm:
-
- [no log message]
-
-2000-02-20 15:27 jesse
-
- * etc/schema.mysql, lib/RT/Action.pm, lib/RT/Scrip.pm,
- lib/RT/Action/AutoReply.pm, lib/RT/Action/SendEmail.pm:
-
- Work on scrips. stubs for the webui
-
-2000-02-19 17:45 jesse
-
- * lib/RT/: Action.pm, Scrip.pm:
-
- work on actions. checking in for eric to take a look
-
-2000-02-19 16:48 jesse
-
- * lib/RT/Action/AutoReply.pm:
-
- file AutoReply.pm was initially added on branch rt-1-1.
-
-2000-02-19 16:48 jesse
-
- * lib/RT/Action/MailCorrespondence.pm:
-
- file MailCorrespondence.pm was initially added on branch rt-1-1.
-
-2000-02-19 16:48 jesse
-
- * lib/RT/Action.pm:
-
- file Action.pm was initially added on branch rt-1-1.
-
-2000-02-19 16:48 jesse
-
- * lib/RT/Action/MailComment.pm:
-
- file MailComment.pm was initially added on branch rt-1-1.
-
-2000-02-19 16:48 jesse
-
- * lib/RT/: Action.pm, Action/AutoReply.pm, Action/MailComment.pm,
- Action/MailCorrespondence.pm, Action/SendEmail.pm:
-
- As it turns out, Action needed to be abstracted a bit and renamed.
-
- I'm also making the Object syntax a bit.
-
-2000-02-19 16:48 jesse
-
- * lib/RT/Action/SendEmail.pm:
-
- file SendEmail.pm was initially added on branch rt-1-1.
-
-2000-02-17 09:19 jesse
-
- * etc/schema.mysql, lib/RT/Scrip.pm, lib/RT/Scrips.pm,
- lib/RT/Transaction.pm:
-
- The base architecture for Scrips to work should now be in place.
- Next up: write example "Actions" (gotta move the Scrips directory to Actions)
- for the scrip handlers to use.
-
-2000-02-16 09:59 jesse
-
- * lib/RT/: Scrip.pm, Transaction.pm:
-
- Starting to make scrips actually work
-
-2000-02-10 23:24 jesse
-
- * lib/RT/Scrips.pm:
-
- file Scrips.pm was initially added on branch rt-1-1.
-
-2000-02-10 23:24 jesse
-
- * lib/RT/: Scrip.pm, Scrips.pm, Transaction.pm:
-
- more work stubbing scrips. but now my arms hurt badly enough that i'm going to log out.
-
-2000-02-10 23:24 jesse
-
- * lib/RT/Scrip.pm:
-
- file Scrip.pm was initially added on branch rt-1-1.
-
-2000-01-31 02:38 tobiasb
-
- * README, lib/RT/Attachments.pm:
-
- does the commit automail work now?
-
-2000-01-30 23:54 jesse
-
- * NEWS, README, etc/schema.mysql, lib/RT/CurrentUser.pm,
- lib/RT/Record.pm, lib/RT/User.pm:
-
- Work on the User object.
- The mail gateway now autocreates users. (This will make more sense
- once we start tying tickets to users by means of the InterestedParties table.
-
-2000-01-29 01:33 jesse
-
- * Makefile:
-
- makefile cleanup. including removing the C compiler and template and
- transaction directories
-
-2000-01-29 01:30 jesse
-
- * Makefile:
-
- removed C compiler from the makefile
-
-2000-01-29 01:25 jesse
-
- * Makefile:
-
- Removed C compiler from the makefile. we just don't need it anymore
-
-2000-01-29 01:22 jesse
-
- * Makefile:
-
- bumped version to 1-1-8
-
-2000-01-29 01:20 jesse
-
- * Makefile:
-
- removed template and transaction paths from the makefile.
- (to test new cvs wrappers and cuz they should be gona anyway)
-
-2000-01-29 00:26 jesse
-
- * etc/schema.mysql:
-
- Started to do work on scrips. see the schema for how it would work.
-
-2000-01-28 20:04 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Some modifications and bugfixes on the messages popping up after a `successful' correspondence/comment
-
-2000-01-28 19:47 tobiasb
-
- * lib/RT/Ticket.pm:
-
- Removed some annoying warnings. I don't know if this is the "right"
- way to remove them, but it works (for me, at least), it's an easy
- way to do it, and it's harmless;
-
- instead of writing
- $var_that_might_be_undef
- I write
- $var_that_might_be_undef || ""
- eventually with parantheses, and eventually with "" replaced by 0, or maybe
- (not tested) even undef.
-
-2000-01-28 13:22 tobiasb
-
- * Makefile:
-
- Two substitution parameters was forgotten in config.pm
-
-2000-01-28 13:12 tobiasb
-
- * etc/schema.mysql:
-
- Oups, committed the wrong file
-
-2000-01-28 13:10 tobiasb
-
- * Makefile, etc/schema.mysql:
-
- Two substitution parameters was forgotten in config.pm
-
-2000-01-27 04:09 tobiasb
-
- * Makefile, bin/initdb.mysql:
-
- small password fix
-
-2000-01-25 23:26 jesse
-
- * Makefile:
-
- bumped the version to 1.1.7 for tonight's release.
-
-2000-01-25 23:12 jesse
-
- * lib/RT/: Attachments.pm, Ticket.pm, Transaction.pm:
-
- DBIx::EasySearch now has a -> First method. which is like -> Next, but picks
- the first element
-
- DBIx::Record -> now returns '' rather than undef for null values. it's less
- likely to break interfaces.
-
-2000-01-25 16:36 tobiasb
-
- * README:
-
- aargh
-
-2000-01-25 16:31 tobiasb
-
- * TODO:
-
- test
-
-2000-01-25 14:57 tobiasb
-
- * etc/schema.mysql:
-
- bugfix
-
-2000-01-25 14:44 tobiasb
-
- * Makefile:
-
- removed obsoleteness
-
-2000-01-25 14:37 tobiasb
-
- * README:
-
- The UPGRADE section of the README was inaccurate
-
-2000-01-25 14:31 tobiasb
-
- * lib/RT/Transaction.pm:
-
- comment bug
-
-2000-01-24 01:45 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-01-24 01:43 jesse
-
- * Makefile, NEWS, lib/RT/Attachment.pm, lib/RT/Attachments.pm,
- lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
- lib/RT/Transaction.pm, lib/RT/Transactions.pm:
-
-
- * Attachments support in code. rtq now basically works
- Mailgate creates new tickets
- rt -show now works a bit (doesn't display transaction content yet)
- rt -subject works. several other commandline tools work
-
-2000-01-23 18:32 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-01-23 18:27 jesse
-
- * Makefile:
-
- [no log message]
-
-2000-01-23 18:19 jesse
-
- * etc/schema.mysql, lib/RT/Attachment.pm, lib/RT/Attachments.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm:
-
- Work to make attachments work. So far we've got something that puts attachments
- in the database.
-
-2000-01-21 12:25 tobiasb
-
- * README:
-
- doc-bugfix
-
-2000-01-18 23:56 jesse
-
- * lib/RT/Ticket.pm:
-
- work on the mail gateway. (mainly disemboweled it)
-
-2000-01-18 00:34 jesse
-
- * lib/RT/Attachments.pm:
-
- file Attachments.pm was initially added on branch rt-1-1.
-
-2000-01-18 00:34 jesse
-
- * docs/API:
-
- file API was initially added on branch rt-1-1.
-
-2000-01-18 00:34 jesse
-
- * lib/RT/Attachment.pm:
-
- file Attachment.pm was initially added on branch rt-1-1.
-
-2000-01-18 00:34 jesse
-
- * HACKING:
-
- file HACKING was initially added on branch rt-1-1.
-
-2000-01-18 00:34 jesse
-
- * HACKING, Makefile, docs/API, etc/schema.mysql,
- lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm,
- lib/RT/Queue.pm, lib/RT/Record.pm, lib/RT/Ticket.pm,
- lib/RT/Transaction.pm, lib/RT/Utils.pm:
-
- work on attachments.
- work on structure
-
-2000-01-17 12:59 jesse
-
- * Makefile, etc/schema.mysql, lib/RT/ACE.pm, lib/RT/ACL.pm,
- lib/RT/CurrentUser.pm, lib/RT/Queue.pm, lib/RT/Queues.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
- lib/RT/Transactions.pm, lib/RT/User.pm, lib/RT/Users.pm:
-
- work on create. work on attachments. upcased the table names.
-
-2000-01-14 15:34 jesse
-
- * etc/schema.mysql:
-
- work on schema
-
-2000-01-14 14:47 jesse
-
- * NEWS, etc/schema:
-
- schema change to make long email addresses work better for queue members.
-
-2000-01-14 01:07 jesse
-
- * lib/RT/: EasySearch.pm, Record.pm, Ticket.pm, Tickets.pm,
- Transaction.pm:
-
- basic searches now work.
- comments almost work.
- creates are having an issue with effectiveid not getting set.
-
-2000-01-13 18:04 jesse
-
- * Makefile, lib/RT/EasySearch.pm, lib/RT/Tickets.pm:
-
- [no log message]
-
-2000-01-13 15:03 jesse
-
- * lib/RT/Utils.pm:
-
- file Utils.pm was initially added on branch rt-1-1.
-
-2000-01-13 15:03 jesse
-
- * lib/RT/Utils.pm:
-
- [no log message]
-
-2000-01-09 20:38 jesse
-
- * lib/RT/EasySearch.pm:
-
- file EasySearch.pm was initially added on branch rt-1-1.
-
-2000-01-09 20:38 jesse
-
- * lib/RT/: EasySearch.pm, Queue.pm, Queues.pm, Record.pm,
- Tickets.pm:
-
- added RT/EasySearch.pm
-
- rtadmin queue -list will now show all queues.
- removed some debugging output
-
-2000-01-04 01:21 jesse
-
- * etc/schema.mysql, lib/RT/CurrentUser.pm, lib/RT/Queue.pm,
- lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
- lib/RT/User.pm:
-
- Lots of work. first working ticket update.
-
-2000-01-04 01:21 jesse
-
- * lib/RT/CurrentUser.pm:
-
- file CurrentUser.pm was initially added on branch rt-1-1.
-
-2000-01-03 07:40 tobiasb
-
- * README, README:
-
- bugfix
-
-2000-01-03 01:39 jesse
-
- * lib/RT/: Record.pm, Ticket.pm, User.pm:
-
- basic create support working.
- more boackend and abstraction work
-
-2000-01-02 22:04 jesse
-
- * lib/RT/Ticket.pm:
-
- [no log message]
-
-2000-01-02 20:31 jesse
-
- * lib/RT/: ACE.pm, Area.pm, Queue.pm, Record.pm, Ticket.pm,
- Transaction.pm, User.pm:
-
- work on a buit more abstraction
-
-2000-01-01 19:01 jesse
-
- * etc/schema.mysql, lib/RT/ACE.pm, lib/RT/Ticket.pm,
- lib/RT/User.pm:
-
- work on Ticket.pm, schema.
- things are starting to use immutable ids when referring to other tables.
-
-1999-12-30 02:13 jesse
-
- * Makefile, etc/schema.mysql, lib/RT/Queue.pm, lib/RT/Record.pm,
- lib/RT/User.pm:
-
- reworked things to use autoloaded functions.
-
-1999-12-29 00:24 jesse
-
- * Makefile, bin/rtmux.pl, etc/schema.mysql, lib/RT/ACE.pm,
- lib/RT/Area.pm, lib/RT/Queue.pm, lib/RT/Record.pm,
- lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/User.pm:
-
- lots of changes. some of them not quite done perfectly.
- but admin is closer
-
-1999-12-28 01:39 jesse
-
- * bin/rtmux.pl, etc/config.pm, lib/RT/ACE.pm, lib/RT/ACL.pm,
- lib/RT/Area.pm, lib/RT/Areas.pm, lib/RT/Notification.pm,
- lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm,
- lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
- lib/RT/Transactions.pm, lib/RT/User.pm, lib/RT/Users.pm:
-
- rtadmin will now invoke and exit.
-
-1999-12-27 19:54 jesse
-
- * Makefile, bin/initacls.mysql, bin/rtmux.pl, etc/acl.mysql,
- etc/config.pm, lib/RT/Record.pm:
-
- first steps toward runability
-
-1999-12-27 01:51 jesse
-
- * Makefile, bin/rtmux.pl, etc/config.pm:
-
- trying to get the config worked out
-
-1999-12-26 21:58 jesse
-
- * Makefile, Makefile:
-
- [no log message]
-
-1999-12-26 21:55 jesse
-
- * Makefile, Makefile:
-
- [no log message]
-
-1999-12-26 21:53 jesse
-
- * Makefile, Makefile, Makefile:
-
- [no log message]
-
-1999-12-26 21:51 jesse
-
- * Makefile, Makefile, Makefile:
-
- [no log message]
-
-1999-12-26 21:45 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-12-26 21:42 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-12-26 21:34 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-12-26 21:19 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-12-26 18:35 jesse
-
- * Makefile:
-
- work on the makefile
-
-1999-12-26 17:42 jesse
-
- * lib/RT/User.pm:
-
- more fixes for the new Handle object
-
-1999-12-26 17:03 jesse
-
- * bin/rtmux.pl, lib/RT/ACL.pm, lib/RT/Areas.pm, lib/RT/Queues.pm,
- lib/RT/Tickets.pm, lib/RT/Transactions.pm, lib/RT/Users.pm:
-
- more work on making everything use DBIx::Handle
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Ticket.pm:
-
- file Ticket.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Queue.pm:
-
- file Queue.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Transaction.pm:
-
- file Transaction.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Notification.pm:
-
- file Notification.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/ACE.pm:
-
- file ACE.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Areas.pm:
-
- file Areas.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/ACL.pm:
-
- file ACL.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Users.pm:
-
- file Users.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Database.pm:
-
- file Database.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Tickets.pm:
-
- file Tickets.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Queues.pm:
-
- file Queues.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Transactions.pm:
-
- file Transactions.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Area.pm:
-
- file Area.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/: ACE.pm, ACL.pm, Area.pm, Areas.pm, Database.pm,
- Notification.pm, Queue.pm, Queues.pm, Record.pm, Ticket.pm,
- Tickets.pm, Transaction.pm, Transactions.pm, User.pm, Users.pm:
-
- moving things to a more sane directory
-
-1999-12-26 15:58 jesse
-
- * lib/RT/Record.pm:
-
- file Record.pm was initially added on branch rt-1-1.
-
-1999-12-26 15:58 jesse
-
- * lib/RT/User.pm:
-
- file User.pm was initially added on branch rt-1-1.
-
-1999-12-23 01:05 jesse
-
- * Makefile, NEWS:
-
- 23 Dec 1999
- -----------
-
- * Enabled a status = unresolved option for the web ui. thanks to
- brandon allbery <allbery@ece.cmu.edu> and Marion Hakanson <hakanson@cse.ogi.edu>
-
- * Made most of the permissions and directory changes from Marion
- Hakanson <hakanson@cse.ogi.edu> generally cleaned things up. but DID not
- include the changes to the directory creation, file copying and permission
- fixing code to enable RT_VAR_DIR
-
- * Made the web ui use $MESSAGE_FONT when putting up the compose window.
- Marion Hakanson <hakanson@cse.ogi.edu>
-
- * Genericised the templates to not mention the mythical "systems group"
-
-1999-12-19 01:54 jesse
-
- * Makefile, etc/schema.mysql:
-
- work on ticket, transaction.
- schema cleanup
-
-1999-12-18 13:25 jesse
-
- * etc/schema:
-
- removed obsolete schema
-
-1999-12-17 01:28 jesse
-
- * Makefile:
-
- set version
-
-1999-12-17 01:27 jesse
-
- * etc/: config.pm, schema.mysql:
-
- more cleanup. we're getting there. just another zillion hours or so
-
-1999-12-15 23:56 jesse
-
- * docs/: FAQ, FAQ.html:
-
- faq updates committed
-
-1999-12-15 23:26 jesse
-
- * README:
-
- updates to tobix' additions
-
-1999-12-15 18:32 tobiasb
-
- * README:
-
- duh
-
-1999-12-15 18:04 tobiasb
-
- * README:
-
- Some few pitfalls mentionated
-
-1999-12-09 00:38 jesse
-
- * etc/schema.mysql:
-
- work on Ticket and Transaction.
- we're getting there.
-
-1999-12-08 03:40 tobiasb
-
- * etc/suidrt.c:
-
- bugfixes
-
-1999-12-06 21:41 jesse
-
- * Makefile, NEWS:
-
- [no log message]
-
-1999-12-06 06:27 tobiasb
-
- * Makefile:
-
- insignificant output fix
-
-1999-12-04 03:30 jesse
-
- * NEWS, etc/schema.mysql:
-
- [no log message]
-
-1999-12-04 01:46 jesse
-
- * NEWS:
-
- Fixed tobix-induced bug in lib/rt/database/manipulate.pm
- that'll teach him to make untested fixes to the stable branch.
-
-1999-12-02 13:18 tobiasb
-
- * etc/schema:
-
- I'm unfortunately not even half on the way in my merging. I'm in a hurry, some small notes:
-
- 1.1:
- - work on dependencies done
- - work on mail distribution done.
- - requires sub dist_list
- - requires sub open_parents
- - requires sub add_link
-
- Dependencies & linking in general.
-
- Mail distribution. The distribution list is set by a &dist_list
- sub. The transaction mail is never sent out for comments and
- correspondence, but people who subscribe all transactions will get the
- comments and correspondence.
-
-1999-12-02 03:10 tobiasb
-
- * etc/mysql.acl:
-
- This file is renamed
-
-1999-12-02 03:05 tobiasb
-
- * etc/: schema.Pg, schema.mysql:
-
- This file was fucked up, I don't know why. I'll just truncate it for now
-
-1999-12-02 02:56 jesse
-
- * Makefile:
-
- bumped version
-
-1999-12-02 02:54 tobiasb
-
- * etc/schema:
-
- Added links (dependency + knowledge db)
-
-1999-12-02 01:42 jesse
-
- * Makefile:
-
- some makefile cleanup
-
-1999-12-01 23:16 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-12-01 23:10 jesse
-
- * bin/rtmux.pl, etc/schema.mysql:
-
- mots of work on the new backend.
- cliadmin is mostly up to date.
- no, i haven't run any of the code :)
-
-1999-11-30 21:52 jesse
-
- * etc/: acl.Pg, schema.mysql:
-
- [no log message]
-
-1999-11-23 17:21 jesse
-
- * docs/design_docs/CARS:
-
- file CARS was initially added on branch rt-1-1.
-
-1999-11-23 17:21 jesse
-
- * README, docs/design_docs/CARS, etc/schema.mysql:
-
- schema hacking for rt-1-1 features.
-
-1999-11-18 21:40 jesse
-
- * Makefile, Makefile, Makefile:
-
- [no log message]
-
-1999-11-17 17:36 tobiasb
-
- * NEWS:
-
- merged in changes from 1.0
-
-1999-11-16 23:09 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-11-08 20:54 jesse
-
- * NEWS:
-
- fixed a longstanding bug in cli/query
-
-1999-11-08 18:02 jesse
-
- * Makefile, NEWS, etc/config.pm:
-
- [no log message]
-
-1999-11-05 03:50 tobiasb
-
- * Makefile, NEWS, README, bin/initacls.mysql, bin/initdb.mysql,
- etc/acl.mysql, etc/config.pm:
-
- patch from khamer integrated - no testing done, however
-
-1999-10-22 14:09 tobiasb
-
- * etc/schema:
-
- merged 1.1-changes
-
-1999-10-22 12:14 tobiasb
-
- * NEWS, etc/mysql.acl, etc/schema:
-
- Merged in changes from 1.0. I haven't checked that things works quite well, anyway.
-
-1999-10-21 16:21 jesse
-
- * Makefile, NEWS:
-
- changes to date_diff, some of the oldest code in RT
-
-1999-10-21 07:07 tobiasb
-
- * docs/actions.txt, docs/admin.txt, docs/attributes.txt,
- docs/outline.txt, docs/rt_users_guide.html, etc/config.pm:
-
- merged from 1.0
-
-1999-10-20 23:16 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-10-20 22:25 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-10-20 21:58 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-10-20 21:43 jesse
-
- * Makefile, NEWS:
-
- [no log message]
-
-1999-10-20 10:33 tobiasb
-
- * Makefile, NEWS, README, README.91UPGRADE, TODO,
- bin/initacls.mysql, bin/initdb.mysql, docs/README.docs:
-
- Merged 1.0-development into 1.1
-
-1999-10-20 01:23 jesse
-
- * Makefile, NEWS:
-
-
- 20 Oct 1999
- -----------
- * RT now uses a queue's mail alias when sending mail.
-
-1999-10-20 00:44 jesse
-
- * Makefile, NEWS:
-
-
- 20 Oct 1999
- -----------
-
- * Using the web UI to send correspondence should no longer not
- sent the correspondence if there are CCs, BCCs or the actor is
- the same as the requestor. thanks to <douglas@arepa.com> for
- pointing out the deficiency.
-
-1999-10-13 19:32 jesse
-
- * Makefile, TODO:
-
- Released version 1.0 Updated the TODO file.
-
-1999-10-06 18:01 jesse
-
- * Makefile:
-
- bumped version
-
-1999-10-06 17:57 jesse
-
- * Makefile, NEWS, README, docs/README.docs:
-
- [no log message]
-
-1999-10-06 17:48 jesse
-
- * docs/: FAQ, FAQ.html, README.docs, actions.html, actions.txt,
- admin.html, admin.txt, attributes.html, attributes.txt,
- outline.html, outline.txt, rt_users_guide.html:
-
- major documentation updates from mbrader
-
-1999-10-04 14:22 jesse
-
- * Makefile, NEWS:
-
- bumped the version to 1.0.0pre2
-
-1999-10-01 01:39 jesse
-
- * Makefile:
-
- fixed a makefile typo
-
-1999-10-01 01:37 jesse
-
- * NEWS, README, README.91UPGRADE:
-
- updated readme
-
-1999-10-01 01:07 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-10-01 00:22 jesse
-
- * NEWS, etc/config.pm:
-
-
- 30 Sep 1999
- -----------
-
- * Fixed a bug which caused RT to go crazy when comments were submitted
- by may without a ticket #.
-
- The following changes are from johnl@microware.com
-
- 1. Directories were not getting created with the correct modes under /usr/local/rt/transactions. The umask() takes an octal file mode mask, not a file mode. In addition I read the comments about $dirmode not working when doing the mkdir's in content.pm. I also fixed content.pm to use $dirmode. The main problem was the $dirmode was being set to a string instead of an octal number.
-
- Fixes to database.pm
- 1. The first hunk fixes problem where the call to write_content is passing $time. This variable does not exist. It looked like $time was supposed to be the current time. ($time always == 0). I changed all occurances of $time to time (IE: time()). 2. The first hunk also passes $in_time instead of $time. 3. The rest of the hunks fix $time and replace them with time().
-
- 27 Sep 1999
- -----------
- Fixed a bug which caused the priority not to get set to the default
- when requests were created in the webui. Thanks to <Elmar.Knipp@knipp.de>
-
-1999-09-23 23:16 anoncvs
-
- * Makefile:
-
- [no log message]
-
-1999-09-23 23:09 anoncvs
-
- * Makefile, Makefile:
-
- [no log message]
-
-1999-09-23 23:07 anoncvs
-
- * Makefile:
-
- [no log message]
-
-1999-09-23 23:01 anoncvs
-
- * Makefile:
-
- [no log message]
-
-1999-09-23 22:52 anoncvs
-
- * Makefile:
-
- [no log message]
-
-1999-08-08 22:20 tobiasb
-
- * etc/schema:
-
- ups
-
-1999-08-07 02:27 tobiasb
-
- * etc/schema:
-
- in-work
-
-1999-08-04 02:48 tobiasb
-
- * Makefile, NEWS:
-
- Merge
-
-1999-08-03 22:38 jesse
-
- * NEWS:
-
- first cut of -trans
-
-1999-08-03 22:27 jesse
-
- * Makefile, NEWS:
-
- reved the version to .99.9. tiny mail manipulate fix
-
-1999-08-03 11:31 tobiasb
-
- * bin/initdb.mysql:
-
- file initdb.mysql was initially added on branch rt-1-1.
-
-1999-08-03 11:31 tobiasb
-
- * bin/initdb.Pg:
-
- file initdb.Pg was initially added on branch rt-1-1.
-
-1999-08-03 11:31 tobiasb
-
- * bin/initacls.mysql:
-
- file initacls.mysql was initially added on branch rt-1-1.
-
-1999-08-03 11:31 tobiasb
-
- * bin/: initacls.Pg, initacls.mysql, initdb.Pg, initdb.mysql:
-
- Scripts for initing the DB
-
-1999-08-03 11:31 tobiasb
-
- * bin/initacls.Pg:
-
- file initacls.Pg was initially added on branch rt-1-1.
-
-1999-08-03 10:31 tobiasb
-
- * etc/schema.mysql:
-
- file schema.mysql was initially added on branch rt-1-1.
-
-1999-08-03 10:31 tobiasb
-
- * etc/schema.Pg:
-
- file schema.Pg was initially added on branch rt-1-1.
-
-1999-08-03 10:31 tobiasb
-
- * etc/acl.mysql:
-
- file acl.mysql was initially added on branch rt-1-1.
-
-1999-08-03 10:31 tobiasb
-
- * etc/acl.Pg:
-
- file acl.Pg was initially added on branch rt-1-1.
-
-1999-08-03 10:31 tobiasb
-
- * Makefile, etc/acl.Pg, etc/acl.mysql, etc/mysql.acl, etc/schema,
- etc/schema.Pg, etc/schema.mysql:
-
- More work on the move to a DBMS-independent RT. The Makefile and executables _really_ need some testing and eventually debugging.
-
-1999-08-03 02:14 tobiasb
-
- * Makefile, etc/config.pm:
-
- It seems to me that I've somehow managed to go to DBI...WebRT seems to work locally, but that's the only testing I've done
-
-1999-08-02 07:07 tobiasb
-
- * etc/schema:
-
- in-work
-
-1999-07-29 02:55 tobiasb
-
- * etc/schema:
-
- uuuurghh
-
-1999-07-28 10:42 tobiasb
-
- * README:
-
- One small update on the work to link requests...
-
-1999-07-27 07:08 tobiasb
-
- * NEWS:
-
- 1.0-gospel
-
-1999-07-27 06:48 tobiasb
-
- * etc/schema:
-
- asdfjlsadfhjkhdfawhi
-
-1999-07-26 21:21 jesse
-
- * Makefile, NEWS:
-
- fixes to the mail gateway header handling
- added cli rtq flags to the help
-
-1999-07-26 07:03 tobiasb
-
- * NEWS:
-
- Merge
-
-1999-07-24 20:43 jesse
-
- * Makefile:
-
- bumpted the version
-
-1999-07-24 20:40 jesse
-
- * NEWS:
-
- added a few options to the cli query engine. area limitying and display of due dates.
-
-1999-07-23 03:20 tobiasb
-
- * NEWS:
-
- Some merges
-
-1999-07-23 02:56 tobiasb
-
- * etc/schema:
-
- With generic links
-
-1999-07-22 23:13 jesse
-
- * Makefile, NEWS:
-
- 22 Jul 99 (Jesse)
- -----------------
- Inital cleanup to the web ticket view. I'd like to significantly
- compact and simplify that display. More tables are probably in
- order. Additionally, I want to get rid of all those buttons "I
- changed this." There's just no need for them. we can write logic
- to do that for us. Also, I bumped the version to 1.1.1. I'd like
- to do this 'linux-kernel-esque' The 1.1.x
- series will be a development series leading toward 1.2. Once we
- get the DB changes in, I'll feel comfortable rolling a 'releaseable'
- 1.1 version for people who like pain.
-
-1999-07-21 23:47 jesse
-
- * Makefile, NEWS:
-
- 21 July 1999
- ------------
-
- Fix for [fsck #102] Better checks in is_not_a_requestor. this should fix
- issues with external users being equated with queue members.
-
- Fix for [fsck #114] Comment from bin/rt was accidentaly access controlled.
-
- Fix for [fsck #113] Display of requests users can't manipulate should now give
- ian error
-
-1999-07-20 23:40 tobiasb
-
- * etc/schema:
-
- For a general way of linking WebRT requests to other web-based DBs
-
-1999-07-20 21:42 tobiasb
-
- * NEWS:
-
- [no log message]
-
-1999-07-20 21:11 tobiasb
-
- * NEWS:
-
- Hmf.
-
-1999-07-20 21:07 tobiasb
-
- * README, etc/config.pm:
-
- updated for Internet::Mail
-
-1999-07-20 21:01 tobiasb
-
- * Makefile:
-
- updated for Internet::Mail
-
-1999-07-20 01:21 jesse
-
- * NEWS:
-
- Fix for [fsck #88] WebUI area SELECT bug.
-
- Fix for [fsck #90] A small html bug in WebRT
-
- Fix for [fsck #92] "Allow non-members to create requests" appeared twice
- in the WebAdmin
-
- Fix for [fsck #94] web ui forms are now 78 chars wide
-
-1999-07-20 00:09 jesse
-
- * NEWS:
-
- 19 July 1999
- ------------
- Fix for [fsck #104] We no longer try to reset the user's uid after writing
- transaction content to the filesystem. This should help out Net/OpenBSD
- compatibility
-
- Removed some legacy support for glimpse searching
-
- Fix for [fsck #115] The web ticket list should now wrap reasonably, so it's
- printable.
-
-1999-07-19 03:26 tobiasb
-
- * NEWS:
-
- some updates
-
-1999-07-17 13:14 tobiasb
-
- * NEWS:
-
- Updated a bit
-
-1999-07-16 23:42 tobiasb
-
- * Makefile:
-
- Version number 1.pre1.1 - what do you think about it?
-
-1999-07-16 22:49 tobiasb
-
- * bin/rtmux.pl:
-
- Filled in a missing comment
-
-1999-07-16 22:46 tobiasb
-
- * Makefile:
-
- Set version to 1.1.0pre1, and changed /opt/rt to /usr/local/rt, I'd
- daresay the next is more widely preffered.
-
-1999-07-16 18:36 tobiasb
-
- * COPYING, Makefile, NEWS, README, README.91UPGRADE, TODO,
- bin/rtmux.pl, docs/FAQ, docs/FAQ.html, docs/README.docs,
- docs/actions.html, docs/actions.txt, docs/admin.html,
- docs/admin.txt, docs/attributes.html, docs/attributes.txt,
- docs/outline.html, docs/outline.txt, etc/config.pm, etc/mysql.acl,
- etc/schema, etc/suidrt.c:
-
- Imported Tobix' current version
-
-1999-07-08 02:10 jesse
-
- * Makefile, NEWS, TODO:
-
- Rolled .99.8
-
-1999-07-07 15:37 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-07-07 00:45 jesse
-
- * Makefile, NEWS:
-
- updated makefile and news.
-
-1999-07-06 22:58 jesse
-
- * NEWS:
-
- 6 Jul 99
- --------
- Now, if you move a request to a new queue, it won't disown it if the same person can own reqs in the new queue. [fsck #75] (untested)
-
- Fixed a problem with cli create not properly handling due dates ([fsck #67])
- Fixed a duplicate --help entry for bin/rt [fsck #69]
- Fixed bugs fsck #68/77: Odness Merging RT requests
-
- Transactions from merged requests will now be displayed along with the request id of the request that transaction was originially associated with.
-
- Fixed [fsck #74], which was reported by charlie brady:
- Messages are sent out from the mail interface with content first, then
- "--- Headers Follow ---", then the headers. In our vanilla sendmail setup,
- before the headers is a UUCP style deliver notification "From blah Tue Jul
- 6 18:13:01 1999" line. This is interpreted by many mail agents as a
- message delimiter, so that what is seen in the mail agent is not one, but
- two messages. This is easily fixed by using the conventional quoting
- mechanism...
- Fixed [fsck #71] WebRT: "User" should be "Requestor"
-
-1999-07-06 21:35 jesse
-
- * NEWS:
-
- resovled #71, #74. worked on merge functionality
-
-1999-06-29 17:39 jesse
-
- * Makefile, NEWS:
-
- [no log message]
-
-1999-06-29 17:20 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-06-24 00:52 jesse
-
- * Makefile, NEWS, README, TODO:
-
- lots of touchups.
-
-1999-06-23 23:29 jesse
-
- * NEWS:
-
- moved to CGI.pm's form parser.
-
-1999-06-17 01:49 jesse
-
- * NEWS:
-
- edited news
-
-1999-06-16 23:21 jesse
-
- * Makefile, NEWS:
-
- Fixed an auth bug.
-
-1999-06-15 02:13 jesse
-
- * Makefile:
-
- upped the version to .99.8pre5
-
-1999-06-15 02:09 jesse
-
- * Makefile, NEWS:
-
- lots of misc changes. see the diff to the news file
-
-1999-05-12 20:37 jesse
-
- * Makefile, NEWS:
-
- cookies hacked to deal with the fact that netscape can't handle path=/
-
-1999-05-12 01:57 jesse
-
- * Makefile:
-
- bumped the version number to .99.8pre3
-
-1999-05-12 01:56 jesse
-
- * NEWS:
-
- Made error messages on the web admin interface more prominent.
-
- All the following changes are from tobix:
-
- Correspondence from RT now properly reflect the name of the sender
- in the "from" header.
-
- Automated messages now properly have a "Precedence: bulk" header
-
- A stupid error with rt::mail_alias has been fixed
-
- Tobix' patch removes headers from all correspondence. I'm relatively
- afraid of this change, so I'm going to comment it out for now.
-
- rtadmin (the commandline has a new tool) :
- -update <passwd> <admin> [<users>] updates user(s) from the
- /etc/passwd file. If no users are specified, ALL
- of /etc/passwd will be processed.
-
-1999-05-11 16:46 jesse
-
- * Makefile, NEWS, README:
-
- mail loop fix from toby
-
-1999-05-09 20:35 jesse
-
- * Makefile:
-
- bumped version numbers
-
-1999-05-09 20:35 jesse
-
- * Makefile, NEWS, README:
-
- updated makefile and news
-
-1999-05-09 20:17 jesse
-
- * bin/rtmux.pl:
-
- modifications to cookies support to md5 hash the password.
- modification to allow non-nph web ui
-
-1999-05-05 02:39 jesse
-
- * NEWS:
-
- fixed some cookies/frames problems
-
-1999-05-05 02:10 jesse
-
- * Makefile, NEWS:
-
- fixed bugs in web auth from charlie brady
-
-1999-05-03 21:44 jesse
-
- * Makefile:
-
- bumped the version #
-
-1999-04-28 16:03 jesse
-
- * Makefile:
-
- bumped version
-
-1999-04-28 16:03 jesse
-
- * NEWS:
-
- updated content.pm to spit errors.
-
-1999-04-27 02:58 jesse
-
- * Makefile:
-
- downed the makefile version
-
-1999-04-27 02:57 jesse
-
- * Makefile:
-
- fixed a makefile bug
-
-1999-04-26 21:57 jesse
-
- * NEWS, README:
-
- added configuration info about mod_auth_mysql
-
-1999-04-26 21:45 jesse
-
- * Makefile, etc/config.pm:
-
- Updated authetication stuff with patches from ingo. updated them further.
- Added the ability to configure whether external authentication is done for webrt
- added the ability to turn off ie compatibility mode
-
-1999-04-23 19:31 jesse
-
- * Makefile, NEWS, README, TODO:
-
- started to update the README and Makefile
-
-1999-04-13 04:00 jesse
-
- * Makefile:
-
- fixed totally fuxored makefile
-
-1999-04-13 03:28 jesse
-
- * README:
-
- noted that there's a dependency on gnu make
-
-1999-04-13 03:07 jesse
-
- * Makefile:
-
- bumped version
-
-1999-04-13 03:06 jesse
-
- * NEWS:
-
- updated news
-
-1999-04-08 04:36 jesse
-
- * docs/rt.gif:
-
- added the gif to the docs
-
-1999-04-08 04:35 jesse
-
- * NEWS:
-
- fixes for new mysql modules
-
-1999-04-07 23:57 jesse
-
- * NEWS:
-
- updates
-
-1999-04-07 02:14 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-04-07 02:09 jesse
-
- * Makefile, README:
-
- fixes for cookie auth from charlie brady
-
-1999-04-06 06:30 jesse
-
- * Makefile, NEWS, README:
-
- misc changes to support cookie authentication
-
-1999-04-03 04:57 jesse
-
- * NEWS, docs/FAQ, docs/FAQ.html, docs/README.docs,
- docs/actions.html, docs/actions.txt, docs/admin.html,
- docs/admin.txt, docs/attributes.html, docs/attributes.txt,
- docs/outline.html, docs/outline.txt:
-
- major update of the docs from adam.
-
-1999-04-03 04:49 jesse
-
- * Makefile:
-
- makefile hackery to ease installs slightly.
-
-1999-03-21 20:24 jesse
-
- * Makefile:
-
- updated makefile
-
-1999-03-21 20:22 jesse
-
- * NEWS, README:
-
- mail changes
-
-1999-03-08 14:50 jesse
-
- * NEWS:
-
- turned off the troll
-
-1999-03-08 14:02 jesse
-
- * Makefile:
-
- fixed makefile bogosity for ACLs
-
-1999-03-04 01:50 jesse
-
- * Makefile, NEWS:
-
- fixed a subject line parsing error.
-
-1999-02-26 22:29 jesse
-
- * NEWS:
-
- added a check to make sure you don't merge ar equest into a non-existent other request
-
-1999-02-26 21:43 jesse
-
- * README.91UPGRADE, README.FIRST, TODO:
-
- moved readme.fdirst to readmne.91upgrade
-
-1999-02-26 19:59 jesse
-
- * Makefile, NEWS:
-
- updated makefile: added upgrade-noclobber
-
-1999-02-24 19:11 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-02-23 14:41 jesse
-
- * NEWS:
-
- updated bnews
-
-1999-02-23 03:20 jesse
-
- * docs/: actions.txt, admin.txt, attributes.txt:
-
- added updates for adam for the docs.
-
- updated the news
-
-1999-02-23 03:20 jesse
-
- * NEWS:
-
- updated the news
-
-1999-02-21 01:56 jesse
-
- * Makefile:
-
- fixed the .4
-
-1999-02-21 01:53 jesse
-
- * Makefile:
-
- fixed make pre
-
-1999-02-20 23:27 jesse
-
- * Makefile:
-
- addded back predist
-
-1999-02-20 16:36 jesse
-
- * NEWS:
-
- edited the news to reflect changes
-
-1999-02-20 14:56 jesse
-
- * Makefile, NEWS:
-
- bumped the version to .99.4 for testing.
-
-1999-02-20 14:48 jesse
-
- * etc/mysql.acl:
-
- updated acls so they'll work with newer versions of mysql 3.22
-
-1999-01-20 02:21 jesse
-
- * Makefile:
-
- [no log message]
-
-1999-01-20 02:13 jesse
-
- * Makefile:
-
- On another note, here is a fix for the "HTML turd" reported by Benji
- Cline in lib/rt/ui/web/forms.pm:
- ========== diff -r0.99.2 forms.pm
- 87c87 < $u = 0;
- --- > $u = 1;
- 91c91 < $u = 1; --- > $u = 0;
- ==========
-
- With this patch applied, v0.99.2 (0.99.3?) appears to be as solid as v0.9.18, if not more
- so.
-
- Upgraded the version to .99.3
-
-1999-01-16 20:44 jesse
-
- * NEWS:
-
- [no log message]
-
-1999-01-16 20:39 jesse
-
- * Makefile:
-
- fixed a web acls bug. incremented the version.
-
-1999-01-16 01:22 jesse
-
- * Makefile:
-
- bumped version to .99.1
-
-1999-01-16 01:20 jesse
-
- * Makefile, NEWS:
-
- fixed some web admin sillyness..acls work better.
- we no longer dump back to the main menu quite as gratuitously.
- acls are no longer broken on the CLI either.
-
-1998-12-16 01:31 jesse
-
- * Makefile:
-
- fixed the following things:
-
- From owner-rt-users@horked.fsck.com Tue Nov 24 02:24:03 1998
- Return-Path: <owner-rt-users@lists.fsck.com>
- Received: (from majordomo@localhost)
- by horked.fsck.com (8.8.7/8.8.7) id CAA11181
- for rt-users-outgoing; Tue, 24 Nov 1998 02:24:01 -0500
- X-Authentication-Warning: horked.fsck.com: majordomo set sender to owner-rt-users@lists.fsck.com using -f
- Received: from modgud.nordicdms.com (h21-168-107.nordicdms.com [207.21.168.107] (may be forged))
- by horked.fsck.com (8.8.7/8.8.7) with SMTP id CAA11177
- for <rt-users@lists.fsck.com>; Tue, 24 Nov 1998 02:23:58 -0500
- Received: (qmail 6211 invoked by alias); 24 Nov 1998 07:25:59 -0000
- Message-ID: <19981124072559.6209.qmail@modgud.nordicdms.com>
- Received: (qmail 6197 invoked from network); 24 Nov 1998 07:25:59 -0000
- Received: from mail-ftp.nordicdms.com (HELO mail-ftp) (207.21.168.100)
- by mail.nordicdms.com with SMTP; 24 Nov 1998 07:25:59 -0000
- From: "Dave Walton" <walton@nordicdms.com>
- Organization: Nordic Entertainment Worldwide
- To: Jesse <jrvincent@wesleyan.edu>, rt-users@lists.fsck.com
- Date: Mon, 23 Nov 1998 23:25:58 -0800
- MIME-Version: 1.0
- Content-type: text/plain; charset=US-ASCII
- Content-transfer-encoding: 7BIT
- Subject: Two bugfixes
- Reply-to: walton@nordicdms.com
- In-reply-to: <19981013013318.H18644@horked.fsck.com>
- References: <19981013042506.9798.qmail@modgud.nordicdms.com>; from Dave Walton on Mon, Oct 12, 1998 at 09:25:06PM -0700
- X-mailer: Pegasus Mail for Win32 (v3.01d)
- Sender: owner-rt-users@lists.fsck.com
- Precedence: bulk
-
- 1. A backwards search was causing lib/rt/ui/web/support.pm to
- crash when data that looks like an invalid regex is present in the
- message headers.
- ------------------------------------------------------------
- # diff support.old.pm support.pm
- 44c44
- < ($headers_ignore !~ /$field/i)) {
- ---
- > ($field !~ /$headers_ignore/i)) {
- ------------------------------------------------------------
-
- 2. HTML buglet in lib/rt/ui/web/manipulate.pm.
- ------------------------------------------------------------
- # diff manipulate.old.pm manipulate.pm
- 894c894
- < <font color=\"\$fg_color\">
- ---
- > <font color=\"$fg_color\">
- ------------------------------------------------------------
-
- Dave
-
- ----------------------------------------------------------------------
- Dave Walton
- Webmaster, Postmaster Nordic Entertainment Worldwide
- walton@nordicdms.com http://www.nordicdms.com
- ----------------------------------------------------------------------
-
- From benji@hnt.com Fri Nov 20 14:28:44 1998
- Return-Path: <benji@hnt.com>
- Received: from horked.fsck.com (jesse@localhost [127.0.0.1])
- by horked.fsck.com (8.8.7/8.8.7) with ESMTP id OAA04739
- for <jesse@localhost>; Fri, 20 Nov 1998 14:28:44 -0500
- Received: from mail.wesleyan.edu
- by horked.fsck.com (fetchmail-4.3.2 POP3 run by jrvincent)
- for <jesse@localhost> (single-drop); Fri Nov 20 14:28:44 1998
- Received: from columbus.hnt.com (columbus.hnt.com [208.221.11.10]) by mail.wesleyan.edu (8.8.6/8.7.3) with ESMTP id OAA18408 for <jrvincent@wesleyan.edu>; Fri, 20 Nov 1998 14:30:34 -0500 (EST)
- Received: from peppermint.hnt.com (peppermint.hnt.com [208.221.11.51])
- by columbus.hnt.com (8.9.1/8.9.1/HnT-980729) with ESMTP id OAA26134
- for <jrvincent@wesleyan.edu>; Fri, 20 Nov 1998 14:30:32 -0500 (EST)
- Received: from localhost by peppermint.hnt.com (8.9.1/8.9.1/HnT-nullclient-980724) with ESMTP id OAA02733
- for <jrvincent@wesleyan.edu>; Fri, 20 Nov 1998 14:30:32 -0500 (EST)
- X-Authentication-Warning: peppermint.hnt.com: benji owned process doing -bs
- Date: Fri, 20 Nov 1998 14:30:31 -0500 (EST)
- From: Benjamin Cline <benji@hnt.com>
- To: Jesse <jrvincent@mail.wesleyan.edu>
- Subject: Re: 0.9.20 is out
- In-Reply-To: <19981120005718.F28841@horked.fsck.com>
- Message-ID: <Pine.GSO.4.05.9811201427100.2438-100000@peppermint.hnt.com>
- MIME-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-UIDL: 4f1695a69f7cdbefcfce9198121fef95
-
- I think I've found a buglet in 0.9.20, I had to add an extra curly bracket
- ("}") to the end of lib/rt/database/admin.pm (just before the "1;") to get
- it to work right.
-
- benji
-
- P.S. Sorry if that's not the most coherent bug report/fix, I'm afraid I'm
- not much of a perl hacker.
-
- On Fri, 20 Nov 1998, Jesse wrote:
-
- > ftp://horked.fsck.com/pub/rt/devel/rt-0.9.20.tar.gz
- >
- > 19 Nov 98
- > ---------
- >
- > Incorportated patches from Dave Walton to fix a typo, replace an
- > accidentally
- > blown away library and add a "last acted" column to the web ui.
- > incremented version to .9.20
- >
- >
- > jesse
- >
- > --
- > jesse reed vincent -- jrvincent@wesleyan.edu -- jesse@fsck.com
- > pgp keyprint: 50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91
- > --------------------------------------------------------------
- > They'll take my private key when they pry it from my cold dead fingers!
- >
-
- --
- Benjamin R. Cline Harrison & Troxell, Inc. benji@hnt.com
- Quis Custodiet Ipsos Custodes?
-
- From adam@baz.org Fri Nov 13 17:07:09 1998
- Return-Path: <adam@baz.org>
- Received: from horked.fsck.com (jesse@localhost [127.0.0.1])
- by horked.fsck.com (8.8.7/8.8.7) with ESMTP id RAA10943
- for <jesse@localhost>; Fri, 13 Nov 1998 17:07:09 -0500
- Received: from mail.wesleyan.edu
- by horked.fsck.com (fetchmail-4.3.2 POP3 run by jrvincent)
- for <jesse@localhost> (single-drop); Fri Nov 13 17:07:09 1998
- Received: from impei.baz.org (adam@impei.baz.org [139.167.64.229]) by mail.wesleyan.edu (8.8.6/8.7.3) with ESMTP id RAA08425 for <jrvincent@wesleyan.edu>; Fri, 13 Nov 1998 17:08:38 -0500 (EST)
- Received: (from adam@localhost)
- by impei.baz.org (8.8.7/8.8.8) id RAA18674
- for jrvincent@wesleyan.edu; Fri, 13 Nov 1998 17:08:38 -0500
- Message-ID: <19981113170837.A18668@baz.org>
- Date: Fri, 13 Nov 1998 17:08:37 -0500
- From: secret agent man <adam@baz.org>
- To: "J.R.Ewing" <jrvincent@mail.wesleyan.edu>
- Subject: RT bug, mebbe?
- Mime-Version: 1.0
- X-Mailer: Mutt 0.93.2i
- Content-Type: text/plain; charset=us-ascii
- X-UIDL: 5563064ca159a5eee88e16843932a45f
-
- <jailbait> q: If you leave the field blank when clicking on "create new
- (queue|user) named", it goes to the create screen with an empty field that
- can't be filled. It should either be editable there or it should reject
- you.
-
- A
-
- --
- Everything I needed to know about life I learned <adam@baz.org>
- from killing smarter people and eating their brains. adam hirsch
-
-1998-11-20 00:45 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-11-20 00:28 jesse
-
- * Makefile, NEWS:
-
- 19 Nov 98
- ---------
-
- Incorportated patches from Dave Walton to fix a typo, replace an accidentally
- blown away library and add a "last acted" column to the web ui.
- incremented version to .9.20
-
-1998-11-18 02:26 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-10-13 03:37 jesse
-
- * Makefile, README, etc/mysql.acl:
-
- shiny:% cat >> changes ~ 10:53PM:tt
- 2. Made comments and replies update date_acted.
-
- -- Dave Walton
-
- Ok.. I know this is being picky, but, in rt/lib/ui/web/support.pm, the
- subroutine "content_header", at line 290, should have:
- print "<head><title>WebRT</title></head>\n";
-
- Otherwise, when running in frames, you never get a title on the page. :(
-
- No biggie...
-
- -Rich
-
- Oh, one other.
-
- 8. etc/mysql.acl, line 5
- The RT_MYSQL_HOST entry on that line doesn't make any sense
- when MySQL is on a different host than RT. That should be
- RT_HOST, or some such thing.
-
- Dave
-
- After just upgrading to Apache 1.3.0 from 1.2.5, I figured I would make it
- known that, in the file <apache_src_dir>/src/main/util_script.c, you have
- to define SECURITY_HOLE_PASS_AUTHORIZATION to allow for RT's authorization
- to work properly.
- -Rich
-
- On Tue, Oct 06, 1998 at 09:19:07PM -0700, Dave Walton wrote:
- > I just discovered that if there is an error in add_correspondence, the
- > mail interface discards the incoming mail without comment. To
- > correct this, I took the following steps:
- >
- In mail.pm, there's a space before :
-
- From: $rt::mail_alias
-
- This causes problems in some mail clients, putting the From: line on the
- same line as the subject. If the spaces are removed this is fixed.
-
- Regards,
- From: "Andrew Foster" <adf@fl.net.au>
-
-1998-09-11 01:15 jesse
-
- * docs/README.docs:
-
- updated lists for rt docs.
-
-1998-09-08 03:23 jesse
-
- * NEWS:
-
- updated news
-
-1998-09-08 03:18 jesse
-
- * Makefile, NEWS, README, etc/config.pm:
-
- Final bug fixes for .9.18
-
-1998-08-09 17:43 jesse
-
- * NEWS, README, TODO:
-
- All kinds of crazy updates for .9.18. Mostly from serge zhuk
-
-1998-08-04 03:09 jesse
-
- * NEWS:
-
- first round of updates from serge
-
-1998-06-26 17:07 jesse
-
- * Makefile, NEWS:
-
- modified makefile and news
-
-1998-06-26 16:34 jesse
-
- * docs/: README.docs, actions.txt, admin.txt, attributes.txt,
- outline.txt:
-
- Added documentation from <adam@apocalypse.org>
-
-1998-06-25 17:06 jesse
-
- * Makefile, README, etc/config.pm:
-
- removed refs to glimpse
-
-1998-06-25 15:46 jesse
-
- * Makefile:
-
- dist fixes
-
-1998-06-25 15:44 jesse
-
- * Makefile:
-
- dist fixes
-
-1998-06-25 14:09 jesse
-
- * Makefile:
-
- edited dist. maker
-
-1998-05-21 22:40 jesse
-
- * Makefile:
-
- added httpd.conf configurator for cern
-
-1998-04-27 20:17 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-04-20 14:53 jesse
-
- * Makefile:
-
- bumped version to .9.14.
-
-1998-04-20 14:53 jesse
-
- * Makefile:
-
- bumped version to .9.13.1
-
-1998-04-19 03:14 jesse
-
- * Makefile:
-
- updated version number.
- now explicitly create rt-etc-dir
-
-1998-04-16 21:40 jesse
-
- * bin/rtmux.pl:
-
- removed a spurious addition to the lib path from the mux
- abstracted a bunch of stuff out of the mux and throughout the makefile.
- like program names.
-
-1998-04-16 21:39 jesse
-
- * Makefile:
-
- abstracted a bunch of stuff out of the mux and throughout the makefile.
- like program names.
-
-1998-04-16 19:47 jesse
-
- * COPYING, Makefile, NEWS, README, README.FIRST, TODO:
-
- commiting updates
-
-1998-04-08 13:35 jesse
-
- * etc/config.pm:
-
- fixed typos in config.pm that prevented mail from working with .9.11
- bumped version to .12
-
-1998-04-08 13:34 jesse
-
- * Makefile:
-
- bumped version to .12
-
-1998-04-02 21:30 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-04-02 21:27 jesse
-
- * Makefile:
-
- fixed make dist
-
-1998-04-02 15:36 jesse
-
- * Makefile, Makefile:
-
- [no log message]
-
-1998-04-02 15:29 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-04-02 15:25 jesse
-
- * etc/config.pm:
-
- split mail program and mail program flags
- hopefully fixed make dist
-
-1998-04-02 15:25 jesse
-
- * Makefile:
-
- hopefully fixed make dist
-
-1998-04-02 11:02 jesse
-
- * Makefile, NEWS:
-
- updated news
-
-1998-04-02 10:55 jesse
-
- * Makefile:
-
- [no log message]
-
-1998-04-02 10:31 jesse
-
- * etc/config.pm:
-
- reshuffled files that the user won't be changing out of etc and into lib
- this includes generic templates and images for the web ui
- updated src and makefiles accordingly.
- verbosifoed part of config.pm
-
-1998-04-02 10:31 jesse
-
- * Makefile:
-
- reshuffled files that the user won't be changing out of etc and into lib
- this includes generic templates and images for the web ui
- updated src and makefiles accordingly.
-
-1998-04-02 10:20 jesse
-
- * Makefile:
-
- built more auto-dist stuff
-
-1998-04-02 03:22 jesse
-
- * README:
-
- added apache patch to readme
-
-1998-04-02 03:13 jesse
-
- * Makefile, README, TODO, etc/config.pm:
-
- updated makefile and readme and todo
- added toggle for mysql 3.21
- moved sendmail flags to makefile for compat w 8.6
-
-1998-02-08 21:12 jesse
-
- * Makefile:
-
- make upgrade now calls mux-install
-
-1998-01-30 22:31 jesse
-
- * Makefile, README, README.FIRST:
-
- added bits to upgrade from .9.1
- made make upgrade upgrade the conf file
-
-1998-01-27 01:56 jesse
-
- * NEWS:
-
- updated news
-
-1998-01-27 01:48 jesse
-
- * Makefile:
-
- started a make dist
-
-1998-01-26 17:59 jesse
-
- * Makefile, README, README.FIRST:
-
- updated readme
-
-1998-01-21 18:37 jesse
-
- * Makefile:
-
- fixes to makefile to allow for proper specification of database as local.
- added "you are logged in as..." to web/support...
- changed sendmail options in mail.pm/
-
-1998-01-14 23:49 jesse
-
- * Makefile, etc/mysql.acl:
-
- incremented version number
-
-1998-01-09 14:48 jesse
-
- * bin/rtmux.pl:
-
- added taint safeness for $ENV{'ENV}
- updated makefile version number
-
-1998-01-09 14:47 jesse
-
- * Makefile:
-
- updated makefile version number
-
-1998-01-08 16:17 jesse
-
- * README.FIRST:
-
- ipdated readme.first.
-
-1998-01-08 14:53 jesse
-
- * etc/suidrt.c:
-
- made suidrt.c work
- updated the mux
-
-1998-01-08 14:53 jesse
-
- * bin/rtmux.pl:
-
- updated the mux
-
-1998-01-08 13:10 jesse
-
- * Makefile:
-
- more fixes to make suid wrapper stuff work.
-
-1998-01-08 12:51 jesse
-
- * bin/rtmux.pl:
-
- made rtmux attempt to work with the suid wrapper
-
-1998-01-08 12:48 jesse
-
- * etc/suidrt.c:
-
- added back suidrt.c. blech.
-
-1998-01-08 12:44 jesse
-
- * Makefile, bin/rtmux.pl:
-
- brought back suidrt.c
- bleck.
-
-1998-01-07 18:06 jesse
-
- * Makefile:
-
- added a sane mode for $(RT_PATH)
-
-1998-01-07 00:37 jesse
-
- * Makefile, README.FIRST:
-
- added basic old upgrade instructions.
- added info to README.FIRST about upgrading.
-
-1998-01-07 00:31 jesse
-
- * bin/rtmux.pl:
-
- made mailing work.
-
-1998-01-06 10:27 jesse
-
- * bin/rtmux.pl:
-
- made the mux require ui::mail before it tried to invoke it.
-
-1998-01-04 02:26 jesse
-
- * README:
-
- told users to read readme.first.
-
-1998-01-04 02:25 jesse
-
- * README, README.FIRST:
-
- added readme.first
-
-1998-01-04 02:12 jesse
-
- * Makefile:
-
- updated webadmin interface. fixed some logout problems. fixed an html bug in web-manip.
-
-1998-01-02 01:14 jesse
-
- * Makefile, bin/rtmux.pl:
-
- fixed more problems w/ making cliadmin run
- merged mux-install and mux-links into one section of makefile
-
-1998-01-02 00:59 jesse
-
- * Makefile, NEWS, README, TODO, bin/rtmux.pl, etc/config.pm:
-
- fixed typo in Makefile: install-libs -> libs-install
-
-1998-01-01 03:07 jesse
-
- * Makefile, bin/rtmux.pl:
-
- commented makefile better
- added more stuff for taint checks to rtmux.pl
- fixed a non-frames web bug in FormComment
-
-1997-12-31 01:55 jesse
-
- * Makefile, bin/rtmux.pl, etc/config.pm:
-
- lots of cleanup to get web interface running.
- beginnigs of taint-safe scripts.
-
-1997-12-30 23:49 jesse
-
- * Makefile, bin/rtmux.pl:
-
- cleanup in cli admin.pm, cli query.pm, the mux, the makefile
- database routines now assign an effective serial # to a request when you get
- the fact's serial number
-
-1997-12-30 22:56 jesse
-
- * Makefile, README, bin/rtmux.pl:
-
- remodded rtmux to use correct vars for command line arguments.
- moved RT_VERSION to makefile.
- updated README for new install procedure
-
-1997-12-30 01:09 jesse
-
- * Makefile, etc/config.pm, etc/mysql.acl:
-
- fixed typo in web/admin.pm
- set up config.pm mysql.acl and rtmux.pl to get themselves parsed from the makefile.
- removed last vestiges of C
-
-1997-12-28 18:59 jesse
-
- * Makefile, etc/schema:
-
- removed suidrt for a preparation to move to a c-free system
- added provisions for token-parsing to makefile
-
-1997-12-28 03:10 jesse
-
- * etc/schema:
-
- added tags to schema
-
-1997-12-28 02:48 jesse
-
- * Makefile:
-
- started to modify toplevel makefile
-
-1997-12-19 03:04 jesse
-
- * lib/rtmux.pl:
-
- moved the executable rtmux.pl to bin, where it belongs.
- made sure bin/cgi gets created on checkout
-
-1997-12-19 03:03 jesse
-
- * bin/rtmux.pl:
-
- moved the executable rtmux.pl to bin, where it belongs.
-
-1997-12-18 19:05 jesse
-
- * lib/rtmux.pl:
-
- worked on the mux
-
-1997-12-09 15:14 jesse
-
- * TODO:
-
- added things for v1.0 to the todo list
-
-1997-12-09 02:03 jesse
-
- * etc/config.pm:
-
- broke configuration out into config.pm
-
-1997-12-09 01:54 jesse
-
- * COPYING, Makefile, NEWS, README, TODO, etc/mysql.acl, etc/schema:
-
- initial commit after i nuked the repository
-
-1997-12-09 01:54 jesse
-
- * COPYING, Makefile, NEWS, README, TODO, etc/mysql.acl, etc/schema:
-
- Initial revision
-
diff --git a/rt/Makefile b/rt/Makefile
index fe01b71c1..644722109 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -1,18 +1,49 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/Makefile,v 1.1 2002-08-12 06:17:06 ivan Exp $
-# RT is Copyright 1996-2002 Jesse Vincent <jesse@bestpractical.com>
-# It is distributed under the terms of the GNU General Public License, version 2
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 1996-2002 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
+
+
+#
+# DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated.
+# Have a look at "configure" and "Makefile.in" instead
+#
+
PERL = /usr/bin/perl
-RT_VERSION_MAJOR = 2
-RT_VERSION_MINOR = 0
-RT_VERSION_PATCH = 14
+CONFIG_FILE_PATH = /opt/rt3/etc
+CONFIG_FILE = $(CONFIG_FILE_PATH)/RT_Config.pm
+SITE_CONFIG_FILE = $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
+RT_VERSION_MAJOR = 3
+RT_VERSION_MINOR = 0
+RT_VERSION_PATCH = 4
+
RT_VERSION = $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
TAG = rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
-BRANCH = HEAD
# This is the group that all of the installed files will be chgrp'ed to.
RTGROUP = rt
@@ -27,7 +58,8 @@ LIBS_OWNER = root
# Group that should own all of RT's libraries, generally root.
LIBS_GROUP = bin
-
+WEB_USER = www
+WEB_GROUP = www
# {{{ Files and directories
@@ -37,33 +69,22 @@ LIBS_GROUP = bin
DESTDIR =
-# RT_PATH is the name of the directory you want make to install RT in
-# RT must be installed in its own directory (don't set this to /usr/local)
-
-RT_PATH = /opt/rt2
-
-# The rest of these paths are all configurable, but you probably don't want to
-# put them elsewhere
-
-RT_LIB_PATH = $(RT_PATH)/lib
-RT_ETC_PATH = $(RT_PATH)/etc
-RT_CONFIG_PATH = $(RT_ETC_PATH)
-RT_BIN_PATH = $(RT_PATH)/bin
-RT_MAN_PATH = $(RT_PATH)/man
-MASON_HTML_PATH = $(RT_PATH)/WebRT/html
-
-
-# RT allows sites to overlay the default web ui with
-# local customizations Those files can be placed in MASON_LOCAL_HTML_PATH
-
-MASON_LOCAL_HTML_PATH = $(RT_PATH)/local/WebRT/html
-
-# RT needs to be able to write to MASON_DATA_PATH and MASON_SESSION_PATH
-# RT will create and chown these directories. Don't just set them to /tmp
-MASON_DATA_PATH = $(RT_PATH)/WebRT/data
-MASON_SESSION_PATH = $(RT_PATH)/WebRT/sessiondata
-
-RT_LOG_PATH = /tmp
+RT_PATH = /opt/rt3
+RT_ETC_PATH = /opt/rt3/etc
+RT_BIN_PATH = /opt/rt3/bin
+RT_SBIN_PATH = /opt/rt3/sbin
+RT_LIB_PATH = /opt/rt3/lib
+RT_MAN_PATH = /opt/rt3/man
+RT_VAR_PATH = /opt/rt3/var
+RT_DOC_PATH = /opt/rt3/share/doc
+RT_LOCAL_PATH = /opt/rt3/local
+LOCAL_ETC_PATH = /opt/rt3/local/etc
+LOCAL_LEXICON_PATH = /opt/rt3/local/po
+MASON_HTML_PATH = /opt/rt3/share/html
+MASON_LOCAL_HTML_PATH = /opt/rt3/local/html
+MASON_DATA_PATH = /opt/rt3/var/mason_data
+MASON_SESSION_PATH = /opt/rt3/var/session_data
+RT_LOG_PATH = /opt/rt3/var/log
# RT_READABLE_DIR_MODE is the mode of directories that are generally meant
# to be accessable
@@ -71,25 +92,33 @@ RT_READABLE_DIR_MODE = 0755
-# The location of your rt configuration file
-RT_CONFIG = $(RT_CONFIG_PATH)/config.pm
+
+# {{{ all these define the places that RT's binaries should get installed
# RT_MODPERL_HANDLER is the mason handler script for mod_perl
RT_MODPERL_HANDLER = $(RT_BIN_PATH)/webmux.pl
-
# RT_FASTCGI_HANDLER is the mason handler script for FastCGI
-# THIS HANDLER IS NOT CURRENTLY SUPPORTED
RT_FASTCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.fcgi
+# RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
+RT_WIN32_FASTCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.svc
+# RT's admin CLI
+RT_CLI_ADMIN_BIN = $(RT_BIN_PATH)/rtadmin
+# RT's mail gateway
+RT_MAILGATE_BIN = $(RT_BIN_PATH)/rt-mailgate
+# RT's cron tool
+RT_CRON_BIN = $(RT_BIN_PATH)/rt-crontool
-# RT_SPEEDYCGI_HANDLER is the mason handler script for SpeedyCGI
-# THIS HANDLER IS NOT CURRENTLY SUPPORTED
-RT_SPEEDYCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.scgi
+# }}}
-# The following are the names of the various binaries which make up RT
+SETGID_BINARIES = $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+ $(DESTDIR)/$(RT_WIN32_FASTCGI_HANDLER)
+
+BINARIES = $(DESTDIR)/$(RT_MODPERL_HANDLER) \
+ $(DESTDIR)/$(RT_MAILGATE_BIN) \
+ $(DESTDIR)/$(RT_CRON_BIN) \
+ $(SETGID_BINARIES)
+SYSTEM_BINARIES = $(DESTDIR)/$(RT_SBIN_PATH)/
-RT_CLI_BIN = $(RT_BIN_PATH)/rt
-RT_CLI_ADMIN_BIN = $(RT_BIN_PATH)/rtadmin
-RT_MAILGATE_BIN = $(RT_BIN_PATH)/rt-mailgate
# }}}
@@ -99,34 +128,19 @@ RT_MAILGATE_BIN = $(RT_BIN_PATH)/rt-mailgate
# DB_TYPE defines what sort of database RT trys to talk to
# "mysql" is known to work.
# "Pg" is known to work
-# "Oracle" is in the early stages of working.
DB_TYPE = mysql
-# DB_HOME is where the Database's commandline tools live. $DB_HOME/bin
-# should contain the binaries themselves, e.g. if "which mysql" gives
-# "/usr/local/mysql/bin/mysql", $DB_HOME should be "/usr/local/mysql"
-
-DB_HOME = /usr
-
# Set DBA to the name of a unix account with the proper permissions and
-# environment to run your commandline SQL tools
+# environment to run your commandline SQL sbin
# Set DB_DBA to the name of a DB user with permission to create new databases
-# Set DB_DBA_PASSWORD to that user's password (if you don't, you'll be prompted
-# later)
# For mysql, you probably want 'root'
# For Pg, you probably want 'postgres'
# For oracle, you want 'system'
DB_DBA = root
-DB_DBA_PASSWORD =
-
-#
-# Set this to the Fully Qualified Domain Name of your database server.
-# If the database is local, rather than on a remote host, using "localhost"
-# will greatly enhance performance.
DB_HOST = localhost
@@ -136,6 +150,9 @@ DB_HOST = localhost
DB_PORT =
+
+
+
#
# Set this to the canonical name of the interface RT will be talking to the
# database on. If you said that the RT_DB_HOST above was "localhost," this
@@ -149,81 +166,72 @@ 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 = rt2
-
-# Set this to the name of the rt database user
-
+DB_DATABASE = rt3
DB_RT_USER = rt_user
-
-# Set this to the password used by the rt database user
-# *** Change This Before Installation***
-
DB_RT_PASS = rt_pass
# }}}
-# {{{ Web configuration
-
-# The user your webserver runs as. needed so that webrt can cache mason
-# objectcode
-WEB_USER = www
-WEB_GROUP = rt
-
-# }}}
-
-
-####################################################################
-# No user servicable parts below this line. Frob at your own risk #
####################################################################
+all: default
+
default:
@echo "Please read RT's readme before installing. Not doing so could"
@echo "be dangerous."
-install: dirs initialize.$(DB_TYPE) upgrade insert instruct
+
instruct:
@echo "Congratulations. RT has been installed. "
- @echo "You must now configure it by editing $(RT_CONFIG)."
- @echo "From here on in, you should refer to the users guide."
+ @echo ""
+ @echo ""
+ @echo "You must now configure RT by editing $(SITE_CONFIG_FILE)."
+ @echo ""
+ @echo "(You will definitely need to set RT's database password before continuing."
+ @echo " Not doing so could be very dangerous)"
+ @echo ""
+ @echo "After that, you need to initialize RT's database by running"
+ @echo " 'make initialize-database'"
+# @echo " or by executing "
+# @echo " '$(RT_SBIN_PATH)/rt-setup-database --action init \ "
+# @echo " --dba $(DB_DBA) --prompt-for-dba-password'"
-insert: insert-install
- $(PERL) -I$(DESTDIR)/$(RT_ETC_PATH) -I$(DESTDIR)/$(RT_LIB_PATH) $(DESTDIR)/$(RT_ETC_PATH)/insertdata
-upgrade: dirs config-replace upgrade-noclobber upgrade-instruct
upgrade-instruct:
@echo "Congratulations. RT has been upgraded. You should now check-over"
- @echo "$(RT_CONFIG) for any necessary site customization. Additionally,"
+ @echo "$(CONFIG_FILE) for any necessary site customization. Additionally,"
@echo "you should update RT's system database objects by running "
- @echo " $(RT_ETC_PATH)/insertdata <version>"
- @echo "where <version> is the version of RT you're upgrading from."
+ @echo " ls etc/upgrade"
+ @echo "For each file in that directory whose name is greater than"
+ @echo "your previously installed RT version, run:"
+ @echo " $(RT_SBIN_PATH)/rt-setup-database --action insert --datafile etc/upgrade/<version>"
-upgrade-noclobber: insert-install libs-install html-install bin-install nondestruct
-nondestruct: fixperms
+upgrade: dirs upgrade-noclobber upgrade-instruct
-testdeps:
- $(PERL) ./tools/testdeps -warn $(DB_TYPE)
+upgrade-noclobber: config-install libs-install html-install bin-install local-install doc-install fixperms
-fixdeps:
- $(PERL) ./tools/testdeps -fix $(DB_TYPE)
+# {{{ dependencies
+testdeps:
+ $(PERL) ./sbin/rt-test-dependencies --with-$(DB_TYPE)
+fixdeps:
+ $(PERL) ./sbin/rt-test-dependencies --install --with-$(DB_TYPE)
-all:
- @echo "Read the readme."
+#}}}
+# {{{ fixperms
fixperms:
# Make the libraries readable
- chmod -R $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_PATH)
+ chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_PATH)
chown -R $(LIBS_OWNER) $(DESTDIR)/$(RT_LIB_PATH)
chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(RT_LIB_PATH)
-
- chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_BIN_PATH)
- chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_BIN_PATH)
+ chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(RT_LIB_PATH)
chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH)
@@ -237,36 +245,19 @@ fixperms:
chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_ETC_PATH)
chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH)
- chmod 0550 $(DESTDIR)/$(RT_CONFIG)
+ chmod 0550 $(DESTDIR)/$(CONFIG_FILE)
+ chmod 0550 $(DESTDIR)/$(SITE_CONFIG_FILE)
# Make the interfaces executable and setgid rt
- chown $(BIN_OWNER) $(DESTDIR)/$(RT_MAILGATE_BIN) \
- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
- $(DESTDIR)/$(RT_CLI_BIN) \
- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
-
- chgrp $(RTGROUP) $(DESTDIR)/$(RT_MAILGATE_BIN) \
- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
- $(DESTDIR)/$(RT_CLI_BIN) \
- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
-
- chmod 0755 $(DESTDIR)/$(RT_MAILGATE_BIN) \
- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
- $(DESTDIR)/$(RT_CLI_BIN) \
- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
-
- chmod g+s $(DESTDIR)/$(RT_MAILGATE_BIN) \
- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
- $(DESTDIR)/$(RT_CLI_BIN) \
- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
+ chown $(BIN_OWNER) $(BINARIES)
+ chgrp $(RTGROUP) $(BINARIES)
+ chmod 0755 $(BINARIES)
+ chmod g+s $(SETGID_BINARIES)
# Make the web ui readable by all.
chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(MASON_HTML_PATH) \
- $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
+ $(DESTDIR)/$(MASON_LOCAL_HTML_PATH) \
+ $(DESTDIR)/$(LOCAL_LEXICON_PATH)
chown -R $(LIBS_OWNER) $(DESTDIR)/$(MASON_HTML_PATH) \
$(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(MASON_HTML_PATH) \
@@ -279,140 +270,216 @@ fixperms:
$(DESTDIR)/$(MASON_SESSION_PATH)
chgrp -R $(WEB_GROUP) $(DESTDIR)/$(MASON_DATA_PATH) \
$(DESTDIR)/$(MASON_SESSION_PATH)
+# }}}
+
+fixperms-nosetgid: fixperms
+ @echo "You should never be running RT this way. it's unsafe"
+ chmod 0555 $(SETGID_BINARIES)
+ chmod 0555 $(DESTDIR)/$(CONFIG_FILE)
+ chmod 0555 $(DESTDIR)/$(SITE_CONFIG_FILE)
+
+# {{{ dirs
dirs:
- mkdir -p $(DESTDIR)/$(RT_BIN_PATH)
+ mkdir -p $(DESTDIR)/$(RT_LOG_PATH)
mkdir -p $(DESTDIR)/$(MASON_DATA_PATH)
+ mkdir -p $(DESTDIR)/$(MASON_DATA_PATH)/cache
+ mkdir -p $(DESTDIR)/$(MASON_DATA_PATH)/etc
+ mkdir -p $(DESTDIR)/$(MASON_DATA_PATH)/obj
mkdir -p $(DESTDIR)/$(MASON_SESSION_PATH)
- mkdir -p $(DESTDIR)/$(RT_ETC_PATH)
- mkdir -p $(DESTDIR)/$(RT_LIB_PATH)
mkdir -p $(DESTDIR)/$(MASON_HTML_PATH)
mkdir -p $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
+ mkdir -p $(DESTDIR)/$(LOCAL_ETC_PATH)
+ mkdir -p $(DESTDIR)/$(LOCAL_LEXICON_PATH)
+# }}}
-libs-install:
- [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir $(DESTDIR)/$(RT_LIB_PATH)
- chown -R $(LIBS_OWNER) $(DESTDIR)/$(RT_LIB_PATH)
- chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(RT_LIB_PATH)
- chmod -R $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_LIB_PATH)
- ( cd ./lib; \
- $(PERL) Makefile.PL INSTALLSITELIB=$(DESTDIR)/$(RT_LIB_PATH) \
- INSTALLMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \
- INSTALLMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \
- && make \
- && make test \
- && $(PERL) -p -i -e " s'!!RT_VERSION!!'$(RT_VERSION)'g;" blib/lib/RT.pm ;\
- make install \
- INSTALLSITEMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \
- INSTALLSITEMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \
- )
+install: config-install dirs files-install fixperms instruct
-html-install:
- cp -rp ./webrt/* $(DESTDIR)/$(MASON_HTML_PATH)
+files-install: libs-install etc-install bin-install sbin-install html-install local-install doc-install
+
+config-install:
+ 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)
+
+ chgrp $(RTGROUP) $(DESTDIR)/$(CONFIG_FILE)
+ chown $(BIN_OWNER) $(DESTDIR)/$(CONFIG_FILE)
+ chgrp $(RTGROUP) $(DESTDIR)/$(SITE_CONFIG_FILE)
+ chown $(BIN_OWNER) $(DESTDIR)/$(SITE_CONFIG_FILE)
+ @echo "Installed configuration. about to install rt in $(RT_PATH)"
-genschema:
- $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' generate
+test:
+ $(PERL) -Ilib lib/t/00smoke.t
+regression-nosetgid-quiet: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db testify-pods fixperms-nosetgid apachectl
+ $(PERL) sbin/regression_harness
-initialize.Pg: createdb initdb.dba acls
+regression-nosetgid: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db testify-pods fixperms-nosetgid apachectl
+ $(PERL) lib/t/02regression.t
-initialize.mysql: createdb acls initdb.rtuser
+regression: config-install dirs files-install libs-install sbin-install bin-install regression-instruct regression-reset-db testify-pods apachectl
+ $(PERL) lib/t/02regression.t
-initialize.Oracle: acls initdb.rtuser
+regression-quiet:
+ $(PERL) sbin/regression_harness
-acls:
- cp etc/acl.$(DB_TYPE) '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)'
- $(PERL) -p -i -e " s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\
- s'!!DB_HOST!!'"$(DB_HOST)"'g;\
- s'!!DB_RT_PASS!!'"$(DB_RT_PASS)"'g;\
- s'!!DB_RT_HOST!!'"$(DB_RT_HOST)"'g;\
- s'!!DB_RT_USER!!'"$(DB_RT_USER)"'g;\
- s'!!DB_DATABASE!!'"$(DB_DATABASE)"'g;" $(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)
- bin/initacls.$(DB_TYPE) '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DBA_PASSWORD)' '$(DB_DATABASE)' '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)'
+regression-instruct:
+ @echo "About to wipe your database for a regression test. ABORT NOW with Control-C"
+# {{{ database-installation
+
+regression-reset-db:
+ $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action drop --dba $(DB_DBA) --dba-password ''
+ $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --dba-password ''
+
+initialize-database:
+ $(PERL) $(DESTDIR)/$(RT_SBIN_PATH)/rt-setup-database --action init --dba $(DB_DBA) --prompt-for-dba-password
dropdb:
- $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' drop
+ $(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
+# }}}
+
+# {{{ libs-install
+libs-install:
+ [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir $(DESTDIR)/$(RT_LIB_PATH)
+ -cp -rp lib/* $(DESTDIR)/$(RT_LIB_PATH)
+# }}}
+
+# {{{ html-install
+html-install:
+ [ -d $(DESTDIR)/$(MASON_HTML_PATH) ] || mkdir $(DESTDIR)/$(MASON_HTML_PATH)
+ -cp -rp ./html/* $(DESTDIR)/$(MASON_HTML_PATH)
+# }}}
+
+# {{{ doc-install
+doc-install:
+ # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
+ -[ -f $(DESTDIR)/$(RT_DOC_PATH) ] && rm $(DESTDIR)/$(RT_DOC_PATH)
+ [ -d $(DESTDIR)/$(RT_DOC_PATH) ] || mkdir $(DESTDIR)/$(RT_DOC_PATH)
+ -cp -rp ./README $(DESTDIR)/$(RT_DOC_PATH)
+# }}}
+# {{{ etc-install
-createdb:
- $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' create
-initdb.dba:
- $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' insert
+etc-install:
+ mkdir -p $(DESTDIR)/$(RT_ETC_PATH)
+ -cp -rp \
+ etc/acl.* \
+ etc/initialdata \
+ etc/schema.* \
+ $(DESTDIR)/$(RT_ETC_PATH)
+# }}}
-initdb.rtuser:
- $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_RT_USER)' '$(DB_DATABASE)' insert
+# {{{ sbin-install
+sbin-install:
+ mkdir -p $(DESTDIR)/$(RT_SBIN_PATH)
+ chmod +x sbin/rt-setup-database \
+ sbin/rt-test-dependencies
+ -cp -rp \
+ sbin/rt-setup-database \
+ sbin/rt-test-dependencies \
+ $(DESTDIR)/$(RT_SBIN_PATH)
+# }}}
-insert-install:
- cp -rp ./tools/insertdata \
- $(DESTDIR)/$(RT_ETC_PATH)
- $(PERL) -p -i -e " s'!!RT_ETC_PATH!!'$(RT_ETC_PATH)'g;\
- s'!!RT_LIB_PATH!!'$(RT_LIB_PATH)'g;"\
- $(DESTDIR)/$(RT_ETC_PATH)/insertdata
+# {{{ bin-install
bin-install:
- cp -p ./bin/webmux.pl $(DESTDIR)/$(RT_MODPERL_HANDLER)
- cp -p ./bin/rt-mailgate $(DESTDIR)/$(RT_MAILGATE_BIN)
- cp -p ./bin/rtadmin $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
- cp -p ./bin/rt $(DESTDIR)/$(RT_CLI_BIN)
- cp -p ./bin/mason_handler.fcgi $(DESTDIR)/$(RT_FASTCGI_HANDLER)
- cp -p ./bin/mason_handler.scgi $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER)
-
- $(PERL) -p -i -e "s'!!RT_PATH!!'"$(RT_PATH)"'g;\
- s'!!PERL!!'"$(PERL)"'g;\
- s'!!RT_VERSION!!'"$(RT_VERSION)"'g;\
- s'!!RT_ETC_PATH!!'"$(RT_CONFIG_PATH)"'g;\
- s'!!RT_LIB_PATH!!'"$(RT_LIB_PATH)"'g;"\
- $(DESTDIR)/$(RT_MODPERL_HANDLER) \
- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
- $(DESTDIR)/$(RT_CLI_BIN) \
- $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \
- $(DESTDIR)/$(RT_MAILGATE_BIN)
-
-
-config-replace:
- -[ -f $(DESTDIR)/$(RT_CONFIG) ] && \
- mv $(DESTDIR)/$(RT_CONFIG) $(DESTDIR)/$(RT_CONFIG).old && \
- chmod 000 $(DESTDIR)/$(RT_CONFIG).old
- cp -rp ./etc/config.pm $(DESTDIR)/$(RT_CONFIG)
- $(PERL) -p -i -e "\
- s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\
- s'!!DB_HOST!!'"$(DB_HOST)"'g;\
- s'!!DB_PORT!!'"$(DB_PORT)"'g;\
- s'!!DB_RT_PASS!!'"$(DB_RT_PASS)"'g;\
- s'!!DB_RT_USER!!'"$(DB_RT_USER)"'g;\
- s'!!DB_DATABASE!!'"$(DB_DATABASE)"'g;\
- s'!!MASON_HTML_PATH!!'"$(MASON_HTML_PATH)"'g;\
- s'!!MASON_LOCAL_HTML_PATH!!'"$(MASON_LOCAL_HTML_PATH)"'g;\
- s'!!MASON_SESSION_PATH!!'"$(MASON_SESSION_PATH)"'g;\
- s'!!MASON_DATA_PATH!!'"$(MASON_DATA_PATH)"'g;\
- s'!!RT_LOG_PATH!!'"$(RT_LOG_PATH)"'g;\
- s'!!RT_VERSION!!'"$(RT_VERSION)"'g;\
- " $(DESTDIR)/$(RT_CONFIG)
+ mkdir -p $(DESTDIR)/$(RT_BIN_PATH)
+ chmod +x bin/rt-mailgate \
+ bin/rt-crontool
+ -cp -rp \
+ bin/rt-mailgate \
+ bin/mason_handler.fcgi \
+ bin/mason_handler.svc \
+ bin/webmux.pl \
+ bin/rt-crontool \
+ $(DESTDIR)/$(RT_BIN_PATH)
+# }}}
+
+# {{{ local-install
+local-install:
+ -cp -rp ./local/html/* $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
+ -cp -rp ./local/po/* $(DESTDIR)/$(LOCAL_LEXICON_PATH)
+ -cp -rp ./local/etc/* $(DESTDIR)/$(LOCAL_ETC_PATH)
+# }}}
+
+# {{{ Best Practical Build targets -- no user servicable parts inside
+
+
+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)
+
+regenerate-catalogs:
+ $(PERL) sbin/extract-message-catalog
+
+license-tag:
+ $(PERL) sbin/license_tag
+
+factory: initialize-database
+ cd lib; $(PERL) ../sbin/factory $(DB_DATABASE) RT
+
commit:
- cvs commit
+ aegis -build ; aegis -diff ; aegis -test; aegis -develop_end
+
+integrate:
+ aegis -integrate_begin; aegis -build; aegis -diff; aegis -test ; aegis -integrate_pass
+
+predist: commit tag-and-tar
+
+tag-and-release-baseline:
+ aegis -cp -ind Makefile -output /tmp/Makefile.tagandrelease; \
+ $(MAKE) -f /tmp/Makefile.tagandrelease tag-and-release-never-by-hand
-predist: commit
- cvs tag -r $(BRANCH) -F $(TAG)
+
+# Running this target in a working directory is
+# WRONG WRONG WRONG.
+# it will tag the current baseline with the version of RT defined
+# in the currently-being-worked-on makefile. which is wrong.
+# you want tag-and-release-baseline
+
+tag-and-release-never-by-hand:
+ aegis --delta-name $(TAG)
rm -rf /tmp/$(TAG)
- cvs co -d /tmp/$(TAG) -r $(TAG) rt
- cd /tmp/$(TAG); chmod 600 Makefile; /usr/local/bin/cvs2cl.pl \
- --no-wrap --separate-header \
- --window 120
+ mkdir /tmp/$(TAG)
+ cd /tmp/$(TAG); \
+ aegis -cp -ind -delta $(TAG) . ;\
+ make reconfigure;\
+ chmod 600 Makefile;\
+ aegis --report --project rt.$(RT_VERSION_MAJOR) \
+ --page_width 80 \
+ --page_length 9999 \
+ --change $(RT_VERSION_MINOR) --output Changelog Change_Log
+
cd /tmp; tar czvf /home/ftp/pub/rt/devel/$(TAG).tar.gz $(TAG)/
chmod 644 /home/ftp/pub/rt/devel/$(TAG).tar.gz
-dist: commit predist
- rm -rf /home/ftp/pub/rt/devel/rt.tar.gz
- ln -s ./$(TAG).tar.gz /home/ftp/pub/rt/devel/rt.tar.gz
+reconfigure:
+ aclocal -I m4
+ autoconf
+ chmod 755 ./configure
+ ./configure
rpm:
(cd ..; tar czvf /usr/src/redhat/SOURCES/rt.tar.gz rt)
rpm -ba etc/rt.spec
+
+
+apachectl:
+ apachectl stop
+ sleep 3
+ apachectl start
+# }}}
diff --git a/rt/README b/rt/README
index d16100c5f..7c5e4d47a 100755
--- a/rt/README
+++ b/rt/README
@@ -1,139 +1,167 @@
-$Header: /home/cvs/cvsroot/freeside/rt/README,v 1.1 2002-08-12 06:17:06 ivan Exp $
-RT is (c) 1996-2002 by Jesse Vincent <jesse@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.
-RT is licensed to you under the terms of version 2 of the GNU General
-Public License.
-If you don't have a copy of the GPL, you've been living in a cave,
-but one should be included in this distribution.
-
-
-INSTALLATION INSTRUCTIONS
--------------------------
-
-These instructions are a summary of those at http://www.fsck.com/rtfm/
-The docs on the web at www.fsck.com/rtfm/ are likely to be more up to
-date and complete than this document. You should consult them before
-proceeding.
+ Jesse Vincent
+ Best Practical Solutions, LLC
+ March 2003
REQUIRED PACKAGES:
------------------
-o Perl5.005_03 or later with support for setgid perl scripts
- RT's command line and mail gateway tools run 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".
+o Perl 5.8.0 or later (http://www.perl.com).
+
+ (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.)`
+
+ Perl 5.6.1 is currently deprecated and will be officially desupported
+ in a future release
o A DB backend; MySQL is recommended ( http://www.mysql.com )
- Currently supported: Mysql 3.23.38 or newer.
- (Some older releases had crippling SQL bugs)
- Postgres 7.1 or newer.
+ Currently supported: Mysql 4.0.13 or later.
+ Postgres 7.2 or later.
+
+ 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)
+
+ 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.
+
+ 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.
-o Apache + mod_perl -- ( http://perl.apache.org)
- or A webserver with FastCGI support (www.fastcgi.com)
- If you compile mod_perl as a DSO, you're on your own. It's known
- to have massive stability problems.
- mod_perl must be build with EVERYTHING=1
o Various and sundry perl modules
- RT takes care of the installation of most of these automatically
- during the "make testdeps" and "make fixdeps" stages below
+ A tool included with RT takes care of the installation of
+ most of these automatically during the install process.
+
+ 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
+ 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 'Chapter 2: Installing' in RT's manual, available at
+http://www.bestpractical.com/rt
+
1 Unpack this distribution SOMWHERE OTHER THAN where you want to install RT
Granted, you've already got it open. To do this cleanly:
- tar xzvf rt.tar.gz -C /tmp
+ tar xzvf rt.tar.gz -C /tmp
-2 Check over /tmp/rt/Makefile
+2 Run the "configure" script.
- There are many variables you NEED to customize for your site.
- Even if you are just upgrading, you must set ALL variables.
+ ./configure --help to see the list of options
+ ./configure (with the flags you want)
-3 Satisfy RT's myriad dependencies. There's a perl script in rt/tools
- called testdeps that uses CPAN to automate all of this.
+3 Satisfy RT's myriad dependencies.
3.1 Check for compliance:
- make testdeps
+
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment>
+
+ databasename is one of: mysql, postgres
+ web-environment is one of: fastcgi, modperl1, modperl2
-3.2 If there are unsatisfied dependencies, install them by hand or run
- make fixdeps
-
- (You may need to install Apache::Session and Apache::DBI by hand.
+3.2 If there are unsatisfied dependencies, install them by hand or run:
- You might need to install Msql-Mysql-Modules by hand.
- perl -MCPAN -e'install DBD::mysql::Install' should do it for you.
- )
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment> --install
+
3.3 Check to make sure everything was installed properly:
- make testdeps
+
+ perl sbin/rt-test-dependencies \
+ --with-<databasename> --with-<web-environment>
4 Create a group called 'rt'
5a FOR A NEW INSTALLATION:
As root, type:
- make install (replace "make" with the local name for
- Make, if you need to)
+ make install (replace "make" with the local name for
+ Make, if you need to)
- If the make fails, type:
- make dropdb
- and start over from step 5a
+
+ make initialize-database
-5b FOR UPGRADING: (Within the RT 2.0.x series)
- Make a backup of /path/to/rt/etc/config.pm
-
- As root, type:
- make upgrade (replace "make" with the local name for
- Make, if you need to)
+ If the make fails, type:
+ make dropdb
+ and start over from step 5a
- This will build new binaries, config files and libraries without
- overwriting your RT database.
+5b FOR UPGRADING: (Within the RT 3.0.x series)
- WARNING: This WILL clobber your existing configuration file!
-
- The install process will then instruct you to update your RT system
- database objects by running rt/etc/insertdata <version> where
- <version> is the version of RT you're upgrading from.
+ As root, type:
+ make upgrade (replace "make" with the local name for
+ Make, if you need to)
+ This will build new binaries, config files and libraries without
+ overwriting your RT database.
-
-5c FOR UPGRADING (From 1.0.x):
-
- Follow the instructions for installing RT 2.0.
+ It may then instruct you to update your RT system database objects
- Once you have installed RT 2.0, download import-1.0-to-2.0
- from http://www.fsck.com/pub/rt/contrib/2.0/rt-addons
-
- Edit the configuration defaults in import-1.0-to-2.0
-
- If you don't set $DEFAULTQUEUE to the name of one of your
- RT 1.0 queues, THE IMPORT WILL FAIL.
-
- perl ./import-1.0-to-2.0
-
- The import tool will do its thing. If you're using postgres, you'll
- need to execute the following SQL statement within your RT2 database:
-
- select setval('tickets_id_seq', (select max(id) from tickets));
-
- It imports:
- Queues, Areas, Users, Acls, Mailing Rules, Queue Members,
- Tickets and Transactions.
-
- It DOES NOT IMPORT:
- Attachments removed by stripmime or Templates.
-
-6 Edit etc/config.pm in your RT installation directory. In many
- cases sensible defaults have been included. In others, you MUST
- supply a value.
+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
7 Configure the email and web gateways, as described below.
@@ -142,97 +170,81 @@ GENERAL INSTALLATION
NOTE: root's password for the web interface is "password"
(without the quotes.) Not changing this is a SECURITY risk
-9 Configure RT per the instructions at http://www.fsck.com/rtfm/
+9 Configure RT per the instructions in RT's manual.
- Until you do this, RT will not be able to send or recieve email,
+ 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 MAIL GATEWAY
----------------------------
+THE WEB INTERFACE
+-----------------
-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) :
-
-rt: "|/path/to/rt2/bin/rt-mailgate --queue general --action correspond"
-rt-comment: "|/path/to/rt2/bin/rt-mailgate --queue general --action comment"
- | |
- <queue-name>----/ |
- |
- <correspond or comment depending on whether |
- the mail should be resent to the requestor>---/
-
-
-
-THE WEB UI
-----------
-
-RT's web ui is based around HTML::Mason, which works well with the mod_perl
-perl interpreter within Apache httpd as well as with a webserver which
-supports FastCGI. (Instructions for configuring RT for use with FastCGI
-are available at http://www.fsck.com/rtfm/ )
+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'.
Apache
- RT Uses HTML::Mason. You'll need to add a few lines to your
- httpd.conf telling it to use rt's web ui. If you have mod-perl
- (you should, the perl scripts will go quite a bit faster around with
- it), you can do something like this:
-
+ You'll need to add a few lines to your httpd.conf telling it about RT:
<VirtualHost your.ip.address>
-DocumentRoot /path/to/rt2/WebRT/html
-ServerName your.rt.server.hostname
-PerlModule Apache::DBI
-PerlFreshRestart On
-PerlRequire /path/to/rt2/bin/webmux.pl
-<Location />
- SetHandler perl-script
- PerlHandler RT::Mason
-</Location>
+ 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
+ </Location>
+
+ # 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>
-Additionally, you should set up a cron job to remove stale session data.
-
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- WARNING: Don't install this cron job or run this find command if your
- MASON_SESSION_PATH (known in config.pm as $MasonSessionDir)
- points to a directory that could EVER contain any file that's not
- a Apache::Session datafile.
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-# Every hour, nuke session files and lockfiles that haven't been
-# touched in 10 hours
-
-0 * * * * find /path/to/rt2/WebRT/sessiondata -type f -amin +600 -exec rm {} \;
-THE CLI
--------
- Binaries for the CLI are located in rt/bin
- You've got:
+SETTING UP THE MAIL GATEWAY
+---------------------------
- "rt" (manipulate or display requests)
- "rtadmin" (modify queues, users and acls)
+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) :
- Both of these programs take --help as an option.
+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>---/
BUGS
----
-Known issues with releases of RT2 are listed at
-<URL:http://fsck.com/rt2/NoAuth/Errata.html>. This includes every bug known
-to exist in each release of RT. (When prompted, login as guest/guest)
-
-To find out more about currently open bugs, check out the live
-Buglist at <URL:http://fsck.com/rt2/NoAuth/Buglist.html>.
-(When prompted, login as guest/guest)
-
-To report a bug, send an email to rt-2.0-bugs@fsck.com.
+To report a bug, send email to rt-3.0-bugs@fsck.com.
GETTING HELP
------------
@@ -249,8 +261,8 @@ information about commercial support options, please send email to
RT-USERS MAILINGLIST
--------------------
-To keep up to date on the latest RT tips, techniques and extections,
-you probably want to join the rt-users mailinglist. Send a message to:
+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.fsck.com
@@ -258,79 +270,31 @@ With the body of the message consisting of only the word:
subscribe
-If you're interested in hacking on rt, you'll want to subscribe to
+If you're interested in hacking on RT, you'll want to subscribe to
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
-your questions are best not asked publically, send them personally to
+your questions are best not asked publicly, send them personally to
<jesse@bestpractical.com>.
-If you want to be informed of every commit to the CVS repository,
-subscribe to rt-commit@fsck.com using similar instructions to those above.
-
RT WEBSITE
----------
For current information about RT, check out the RT website at
-http://www.bestpractical.com/rt You'll find screenshots, a pointer
-to the current version of rt, contributed patches and lots of other great
-stuff.
+ http://www.bestpractical.com/
+
+You'll find screenshots, a pointer to the current version of RT, contributed
+patches, and lots of other great stuff.
TROUBLESHOOTING
---------------
-All errors will be appended to a logfile, which lives in /tmp/rt.log.* unless
-you've reconfigured it. Check etc/config.pm for details.
-
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 release
+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).
-GIVING SOMETHING BACK
----------------------
-
-RT is free software. You are not obligated to pay for it. You should be
-aware, however, that bestpractical.com's sole source of revenue is commercial
-work related to RT. If you are able, either a contract to extend RT in some
-way that would be useful to your organization, a financial contribution, or
-even something off the author's amazon wishlist
- ( http://www.amazon.com/exec/obidos/wishlist/2GMHUDAFBT2XR/ )
-would be much appreciated.
-
Thanks!
-
-
-CREDITS
--------
-
-A lot of people are responsible for making RT a better program. Many
-thanks to Lauren Burka, who originally tasked me with writing this beast.
-She forced me to use a database backend. I've thanked her for it every
-day since. Rich West rewrote this readme and did some UI hacking. Adam
-Hirsch, Kit Kraysha, Robin Garner, Jens Glaser, John Adams, Trey Belew,
-Sean Dague, Nathan Mehl, Kee Hinckley, Rich West, Dale Bewley, Serge Zhuk,
-John Lengeling, Elmar Knipp, Gerald Abshez, Dave Hull, Dave Schenet,
-Dave Walton, Jan Okrouhly, Tobias Brox, Lamont Lucas, Charlie Brady,
-Robin Shostack, Eric Mumpower, Jerrod Wiesman, Adam Hammer, Ivan Kohler, Alex
-Pilosov, Mary Alderdice, Deborah Kaplan, Jens von Bülow, Tristan Horn,
-Lee Ann Goldstein, Karel P Kerezman, Feargal Reilly, Christian Steger,
-Christian Kurz, JD Falk, Arthur de Jong, Ben Carter, Mark Vevers
-and many others
-have all contributed bug reports, code or ideas that have helped RT along.
-
-Arepa, Inc, Utopia Inc, Wesleyan University and The Leftbank Operation
-have paid me to maintain RT and release it to the public. Without their
-support RT would not exist.
-
-If I've left you out, please drop me a line ....it wasn't intentional.
-
-
- Enjoy
-
- Jesse Vincent
- <jesse@bestpractical.com>
- Best Practical Solutions, LLC
diff --git a/rt/TODO b/rt/TODO
deleted file mode 100755
index 3d1b7d02e..000000000
--- a/rt/TODO
+++ /dev/null
@@ -1,9 +0,0 @@
-Errata for RT 2.x can be found at http://fsck.com/rt2/NoAuth/Errata.html
-
-A list of all open issues, including those which haven't been added
-to the official Errata lists, can be found at
-http://fsck.com/rt2/NoAuth/Buglist.html
-
-If you want to look at bugs in more detail, you may need to login as guest with a password of 'guest'
-
-
diff --git a/rt/bin/initacls.Oracle b/rt/bin/initacls.Oracle
deleted file mode 100644
index 8d05f45e1..000000000
--- a/rt/bin/initacls.Oracle
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-DATABASEHOME=$1
-HOSTNAME=$2
-PORT=$3
-DATABASEADMIN=$4
-DBAPASSWD=$5
-DATABASENAME=$6
-DATABASEACLS=$7
-
-BINDIR=${DATABASEHOME}/bin
-
-echo "DBHOME = $DATABASEHOME"
-echo "HOSTNAME = $HOSTNAME"
-echo "PORT = $PORT"
-echo "DATABASEADMIN = $DATABASEADMIN"
-echo "DBAPASSWD = $DBAPASSWD"
-echo "DATABASENAME = $DATABASENAME"
-
-PATH=$PATH:$BINDIR
-export PATH
-
-echo "Please enter ${DATABASEADMIN}'s password for the SID ${DATABASENAME} to create an rt user";
-
-$BINDIR/sqlplus ${DATABASEADMIN}@${DATABASENAME} @$DATABASEACLS
-
diff --git a/rt/bin/initacls.Pg b/rt/bin/initacls.Pg
deleted file mode 100755
index 82e32de74..000000000
--- a/rt/bin/initacls.Pg
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-DATABASEHOME=$1
-HOSTNAME=$2
-PORT=$3
-DATABASEADMIN=$4
-DBAPASSWD=$5
-DATABASENAME=$6
-DATABASEACLS=$7
-
-BINDIR=${DATABASEHOME}/bin
-
-
-PATH=$PATH:$BINDIR
-export PATH
-
-echo "Enter the postgres administrator's database password to create a new user for rt"
-
-if [ "fnord$PORT" != "fnord" ]; then
- PORT="-p $PORT"
-fi;
-
-if [ "fnord$HOSTNAME" != "fnord" ]; then
- HOSTNAME="-h $HOSTNAME"
-fi;
-
-psql $HOSTNAME $PORT -d $DATABASENAME -f $DATABASEACLS -U $DATABASEADMIN
-
diff --git a/rt/bin/initacls.mysql b/rt/bin/initacls.mysql
deleted file mode 100755
index 17e63f837..000000000
--- a/rt/bin/initacls.mysql
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-DATABASEHOME=$1
-HOSTNAME=$2
-PORT=$3
-DATABASEADMIN=$4
-DBAPASSWD=$5
-DATABASENAME=$6
-DATABASEACLS=$7
-
-BINDIR=${DATABASEHOME}/bin
-
-PATH=$PATH:$BINDIR
-export PATH
-
-echo "Enter the mysql administrator's database password to create a new user for RT"
-$BINDIR/mysql --host=${HOSTNAME} --port=${PORT} --user=${DATABASEADMIN} -p${DBAPASSWD} mysql < $DATABASEACLS
-
-echo "Enter the mysql administrator's database password to nondestructively reload the database"
-$BINDIR/mysqladmin --host=${HOSTNAME} --port=${PORT} --user=${DATABASEADMIN} -p${DBAPASSWD} reload
diff --git a/rt/bin/mason_handler.fcgi b/rt/bin/mason_handler.fcgi
index e8a4e128f..431eccbd3 100755
--- a/rt/bin/mason_handler.fcgi
+++ b/rt/bin/mason_handler.fcgi
@@ -1,221 +1,54 @@
-#!!!PERL!!
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/mason_handler.fcgi,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent (jesse@fsck.com);
+#!/usr/bin/perl
+# 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
use strict;
-$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 File::Basename;
+require ('/opt/rt3/bin/webmux.pl');
+my $h = &RT::Interface::Web::NewCGIHandler();
-# We really don't want apache to try to eat all vm
-# see http://perl.apache.org/guide/control.html#Preventing_mod_perl_Processes_Fr
-
-
-package RT::Mason;
-#use CGI qw(-private_tempfiles); # pull in CGI with the private tempfiles
- #option predefined
-use HTML::Mason; # brings in subpackages: Parser, Interp, etc.
-
-use vars qw($VERSION %session $Nobody $SystemUser $cgi);
-
-# List of modules that you want to use from components (see Admin
-# manual for details)
-
-#Clean up our umask...so that the session files aren't world readable, writable or executable
-umask(0077);
-
-
-
-$VERSION="!!RT_VERSION!!";
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-#This drags in RT's config.pm
-use config;
-use Carp;
-
-{
- package HTML::Mason::Commands;
- use vars qw(%session $ContentType);
-
- use RT;
- use RT::Ticket;
- use RT::Tickets;
- use RT::Transaction;
- use RT::Transactions;
- use RT::User;
- use RT::Users;
- use RT::CurrentUser;
- use RT::Template;
- use RT::Templates;
- use RT::Queue;
- use RT::Queues;
- use RT::ScripAction;
- use RT::ScripActions;
- use RT::ScripCondition;
- use RT::ScripConditions;
- use RT::Scrip;
- use RT::Scrips;
- use RT::Group;
- use RT::Groups;
- use RT::Keyword;
- use RT::Keywords;
- use RT::ObjectKeyword;
- use RT::ObjectKeywords;
- use RT::KeywordSelect;
- use RT::KeywordSelects;
- use RT::GroupMember;
- use RT::GroupMembers;
- use RT::Watcher;
- use RT::Watchers;
- use RT::Handle;
- use RT::Interface::Web;
- use MIME::Entity;
- use CGI::Cookie;
- use Date::Parse;
- use HTML::Entities;
- use Text::Wrapper;
-
- #TODO: make this use DBI
- use Apache::Session::File;
- use CGI::Fast;
-
- # set the page's content type.
- # In this case, just save it to a variable that we can pull later;
- sub SetContentType {
- $ContentType = shift;
- }
- sub CGIObject {
- return $RT::Mason::cgi;
- }
-}
-
-
-my ($output, $parser, $interp);
-if ($HTML::Mason::VERSION < 1.0902) {
- require HTML::Mason::ApacheHandler;
-
- $parser = &RT::Interface::Web::NewParser(allow_globals => [%session]);
-
- $interp = &RT::Interface::Web::NewInterp(parser=>$parser,
- allow_recursive_autohandlers => 1,
- out_method => \$output);
-}
-else {
- $interp = &RT::Interface::Web::NewInterp(
- allow_globals => [%session],
- default_escape_flags => 'h',
-
- out_method => \$output);
-}
-# Die if WebSessionDir doesn't exist or we can't write to it
-
-stat ($RT::MasonSessionDir);
-die "Can't read and write $RT::MasonSessionDir"
- unless (( -d _ ) and ( -r _ ) and ( -w _ ));
-
+# Enter CGI::Fast mode, which should also work as a vanilla CGI script.
+require CGI::Fast;
RT::Init();
# Response loop
-while ($RT::Mason::cgi = new CGI::Fast) {
-
- $HTML::Mason::Commands::ContentType = 'text/html';
-
- # This routine comes from ApacheHandler.pm:
- my (%args, $cookie);
- foreach my $key ( $cgi->param ) {
- foreach my $value ( $cgi->param($key) ) {
- if (exists($args{$key})) {
- if (ref($args{$key})) {
- $args{$key} = [@{$args{$key}}, $value];
- } else {
- $args{$key} = [$args{$key}, $value];
- }
- } else {
- $args{$key} = $value;
- }
-
- }
-
- }
-
-
- my $comp = $ENV{'PATH_INFO'};
-
- if ($comp =~ /^(.*)$/) { # untaint the path info. apache should
- # never hand us a bogus path.
- # We should be more careful here.
- $comp = $1;
- }
-
- if ($comp =~ /\/$/) {
- $comp .= "index.html";
- }
-
- #This is all largely cut and pasted from mason's session_handler.pl
-
- # {{{ Cookies
- my %cookies = fetch CGI::Cookie();
-
- eval {
- my $session_id = undef;
-
- #Get the session id and untaint it
- if ($cookies{'AF_SID'} && $cookies{'AF_SID'}->value() =~ /^(.*)$/) {
- $session_id = $1;
- }
-
- tie %HTML::Mason::Commands::session, 'Apache::Session::File',
- $session_id,
- { Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- } ;
- };
-
- if ( $@ ) {
- # If the session is invalid, create a new session.
- if ( $@ =~ m#^Object does not exist in the data store# ) {
- tie %HTML::Mason::Commands::session, 'Apache::Session::File', undef,
- { Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
- undef $cookies{'AF_SID'};
- }
- else {
- die "$@ \nProbably means that RT Couldn't write to session directory '$RT::MasonSessionDir'. Check that this directory's permissions are correct.";
- }
+while ( my $cgi = CGI::Fast->new ) {
+ # the whole point of fastcgi requires the env to get reset here..
+ # So we must squash it again
+ $ENV{'PATH'} = '/bin:/usr/bin';
+ $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'};
+
+ unless ($h->interp->comp_exists($cgi->path_info)) {
+ $cgi->path_info($cgi->path_info . "/index.html");
}
-
- if ( !$cookies{'AF_SID'} ) {
- $cookie = new CGI::Cookie
- (-name=>'AF_SID',
- -value=>$HTML::Mason::Commands::session{_session_id},
- -path => '/',);
-
- } else {
- $cookie = undef;
- }
-
- # }}}
-
- $output = '';
- eval {
- my $status = $interp->exec($comp, %args);
- };
-
- if ($@) {
- $output = "<PRE>$@</PRE>";
- }
-
- print "Content-Type: $HTML::Mason::Commands::ContentType\r\n";
- print "Set-Cookie: $cookie\r\n" if ($cookie);
- print "\r\n";
- print $output;
- untie %HTML::Mason::Commands::session;
-
+ $h->handle_cgi_object($cgi);
+ # _should_ always be tied
}
+
+1;
diff --git a/rt/bin/mason_handler.scgi b/rt/bin/mason_handler.scgi
index b9846c898..8e1135c2f 100755
--- a/rt/bin/mason_handler.scgi
+++ b/rt/bin/mason_handler.scgi
@@ -1,193 +1,41 @@
-#!!!PERL!! -w
-
-#!/usr/bin/speedy -- -t600 -M8
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/mason_handler.scgi,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent (jesse@fsck.com);
-#
-# Contains code derived from mason.cgi
-# mason.cgi is Copyright December 2000 Joshua Kronengold (mneme@io.com,
-# mneme@cyberspace.org). All Rights Reserved.
+#!/usr/local/bin/speedy
+# 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
use strict;
-# {{{ Clean out the environment a little bit
-$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'};
-# }}}
-
-package RT::Mason;
-use HTML::Mason; # brings in subpackages: Parser, Interp, etc.
-use vars qw($VERSION %session $Nobody $SystemUser);
-
-# List of modules that you want to use from components (see Admin
-# manual for details)
-
-$VERSION="!!RT_VERSION!!";
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-
-#This drags in RT's config.pm
-use config;
-use Carp;
-
-use HTML::Mason::FakeApache;
-use CGI;
-
-# {{{ Set up CGI environment and grab CGI params:
+require ('/opt/rt3/bin/webmux.pl');
-my $r=new HTML::Mason::FakeApache;
+my $h = &RT::Interface::Web::NewCGIHandler();
-$|=1; # set output to non-buffered.
+require CGI;
-my %cgi;
-CGI::ReadParse(\%cgi); # %cgi is now a tied hash containing our params.
+RT::Init();
-my $q=$cgi{CGI}; # $q now contains the object tied to %cgi.
-# }}}
-
-# {{{ require what we need
-{
- package HTML::Mason::Commands;
-
- use vars qw(%session);
-
- use RT::Ticket;
- use RT::Tickets;
- use RT::Transaction;
- use RT::Transactions;
- use RT::User;
- use RT::Users;
- use RT::CurrentUser;
- use RT::Template;
- use RT::Templates;
- use RT::Queue;
- use RT::Queues;
- use RT::ScripAction;
- use RT::ScripActions;
- use RT::ScripCondition;
- use RT::ScripConditions;
- use RT::Scrip;
- use RT::Scrips;
- use RT::Group;
- use RT::Groups;
- use RT::Keyword;
- use RT::Keywords;
- use RT::ObjectKeyword;
- use RT::ObjectKeywords;
- use RT::KeywordSelect;
- use RT::KeywordSelects;
- use RT::GroupMember;
- use RT::GroupMembers;
- use RT::Watcher;
- use RT::Watchers;
- use RT::Handle;
- use RT::Interface::Web;
- use MIME::Entity;
- use CGI::Cookie;
- use Date::Parse;
- use HTML::Entities;
-
-
- use Apache::Session::File;
-
-
+my $cgi = CGI->new;
+unless ($h->interp->comp_exists($cgi->path_info)) {
+ $cgi->path_info($cgi->path_info . "/index.html");
}
-# }}}
-
-# {{{ RT Database setup
- $RT::Handle = new RT::Handle;
-
- $RT::Handle->Connect;
-
- use RT::CurrentUser;
-
- #RT's system user is a genuine database user. its id lives here
- $RT::SystemUser = new RT::CurrentUser();
- $RT::SystemUser->LoadByName('RT_System');
-
- #RT's "nobody user" is a genuine database user. its ID lives here.
- $RT::Nobody = new RT::CurrentUser();
- $RT::Nobody->LoadByName('Nobody');
-
-
-# }}}
-
-
-
-
-# {{{ Deal with cookies
-
-my %cookies = fetch CGI::Cookie();
-eval {
- tie %HTML::Mason::Commands::session, 'Apache::Session::File',
- ( $cookies{'AF_SID'} ? $cookies{'AF_SID'}->value() : undef );
-};
-
-if ( $@ ) {
- # If the session is invalid, create a new session.
- if ( $@ =~ m#^Object does not exist in the data store# ) {
- tie %HTML::Mason::Commands::session, 'Apache::Session::File', undef;
- undef $cookies{'AF_SID'};
- }
-}
-
-if ( !$cookies{'AF_SID'} ) {
- my $cookie = new CGI::Cookie(
- -name=>'AF_SID',
- -value=>$HTML::Mason::Commands::session{_session_id},
- -path => '/');
- print 'Set-Cookie: '. $cookie."\r\n";
-}
-
-# }}}
-
-my $path=$ENV{PATH_INFO} || "/"; $path=~s/\'/\\\'/g;
-
-my $type=`/usr/bin/file '$RT::MasonComponentRoot/$path'`;
-
-# {{{ if it's a text file, handle it with mason.
-if($type=~/text|directory/) {
- my ($out, %mason_params);
- my $parser = RT::Interface::Web::NewParser(allow_globals=>[qw($r)]);
- $mason_params{parser}=$parser;
- $r->content_type('text/html');
- # (get cookies line) ...
- $r->access_hash('headers_in','Cookie',$ENV{HTTP_COOKIE});
- $r->{'args@'}=[];
- $mason_params{out_method}=\$out;
-
- my $interp = RT::Interface::Web::NewInterp(%mason_params);
-
- $interp->set_global(r=>$r);
- $interp->exec($path,%cgi);
- $r->send_http_header();
- print $out;
-}
-# }}}
-
-# {{{ if it's not a text file, just stream it out.
-
-else { # file is binary, damn it
- my $mime_type;
- if ( $mime_type=
- eval{ use MIME::Types;
- my($type,$encoding)=MIME::Types::by_suffix($path);
- $type; }) {
- print $q->header($mime_type);
- $path=~s/[\|\>\<\&]//g;
- open F,"$RT::MasonComponentRoot/$path" or
- die "couldn't open $path -- $!";
- print while <F>;
- close F;
- } else {
- die "couldn't resolve type of non-text file (!@; $type) -- install Mime::Types\n";
- }
- }
-
-# }}}
+$h->handle_cgi_object($cgi);
-untie %HTML::Mason::Commands::session;
+1;
diff --git a/rt/bin/rt b/rt/bin/rt
deleted file mode 100755
index 41220bb56..000000000
--- a/rt/bin/rt
+++ /dev/null
@@ -1,1391 +0,0 @@
-#!!!PERL!! -w
-#
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/Attic/rt,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent <jesse@bestpractical.com>
-
-use strict;
-use Carp;
-use Getopt::Long;
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser GetMessageContent);
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-LoadConfig();
-
-#Connect to the database and get RT::SystemUser and RT::Nobody loaded
-DBConnect();
-
-#Drop setgid permissions
-RT::DropSetGIDPermissions();
-
-#Get the current user all loaded
-my $CurrentUser = GetCurrentUser();
-
-unless ($CurrentUser->Id) {
- print "No RT user found. Please consult your RT administrator.\n";
- exit(1);
-}
-
-
-# {{{ commandline flags
-
-my ( @id,
- @limit_queue,
- @limit_status,
- @limit_owner,
- @limit_priority,
- @limit_final_priority,
- @limit_requestor,
- @limit_subject,
- @limit_body,
- @limit_created,
- @limit_resolved,
- @limit_lastupdated,
- @limit_dependson,
- @limit_dependedonby,
- @limit_memberof,
- @limit_hasmember,
- @limit_refersto,
- @limit_referredtoby,
- @limit_keyword,
-
- @limit_due,
- @limit_starts,
- @limit_started,
- $limit_first,
- $limit_rows,
- $history,
- $summary,
- $create,
- @requestors,
- @cc,
- @admincc,
- $status,
- $subject,
- $owner,
- $steal,
- $queue,
- $time_left,
- $priority,
- $final_priority,
- $due,
- $starts,
- $started,
- $contacted,
- $comment,
- $reply,
- $source,
- $edit,
- @dependson,
- @memberof,
- @refersto,
- $mergeinto,
- @keywords,
- $time_taken,
- $verbose,
- $debug,
- $help,
- $version);
-
-# }}}
-
-# Set defaults for cli args
-
-$edit = 1; # Assume the user wants to edit replies and comments
- # unless they specify --noedit
-
-# {{{ args
-
-my @args =("id=s" => \@id,
- "limit-queue=s" => \@limit_queue,
- "limit-status=s" => \@limit_status,
- "limit-owner=s" => \@limit_owner,
- "limit-priority=s" => \@limit_priority,
- "limit-final-priority=s" => \@limit_final_priority,
- "limit-requestor=s" => \@limit_requestor,
- "limit-subject=s" => \@limit_subject,
- "limit-body=s", \@limit_body,
- "limit-created=s" => \@limit_created,
- "limit-due=s" => \@limit_due,
- "limit-last-updated=s" => \@limit_lastupdated,
- "limit-keyword=s" => \@limit_keyword,
-
- "limit-member-of=s" => \@limit_memberof,
- "limit-has-member=s" => \@limit_hasmember,
- "limit-depended-on-by=s" => \@limit_dependedonby,
- "limit-depends-on=s" => \@limit_dependson,
- "limit-referred-to-by=s" => \@limit_referredtoby,
- "limit-refers-to=s" => \@limit_refersto,
-
- "limit-starts=s" => \@limit_starts,
- "limit-started=s" => \@limit_started,
- "limit-first=i" => \$limit_first,
- "limit-rows=i" => \$limit_rows,
- "history|show" => \$history,
- "summary:s" => \$summary,
- "create" => \$create,
- "keywords=s" => \@keywords,
- "requestor|requestors=s" => \@requestors,
- "cc=s" => \@cc,
- "admincc=s" => \@admincc,
- "status=s" => \$status,
- "subject=s" => \$subject,
- "owner=s" => \$owner,
- "steal" => \$steal,
- "queue=s" => \$queue,
-
-
- "priority=i" => \$priority,
- "final-priority=i" => \$final_priority,
- "due=s" => \$due,
- "starts=s" => \$starts,
- "started=s" => \$started,
- "contacted=s" => \$contacted,
- "comment", \$comment,
- "reply|respond", \$reply,
- "source=s" => \$source,
- "edit!" => \$edit,
- "depends-on=s" => \@dependson,
- "member-of=s" => \@memberof,
- "merge-into=s" => \$mergeinto,
- "refers-to=s" => \@refersto,
- "time-left=i" => \$time_left,
- "time-taken=i" => \$time_taken,
- "verbose+" => \$verbose,
- "debug" => \$debug,
- "version" => \$version,
- "help|h|usage" => \$help
- );
-
-# }}}
-
-
-
-GetOptions(@args);
-
-print join(':',@keywords);
-# {{{ If they want it, print a usage message and get out
-
-if ($help) {
-
-
-print <<EOUSAGE;
-
-Limit the set of records returned:
-
---id=[first][-][last]
- Specify a single ticket, a range, or to start with (n-) or end with (-n)
-a specific ticket.
-
- --limit-queue=<queue>
- --limit-status=[!](new|open|stalled|resolved)
-
- --limit-owner=[!]<userid>
- --limit-priority=[starts][-][ends]
- --limit-final-priority=[starts][-][ends]
- starts is less than ends
- --limit-requestor=[!]<userid>|<email>
- --limit-subject=[!]<text>
- --limit-body=[!]<text>
- --limit-keyword=[!]<select>/<keyword>
-
- Links
- --limit-member-of=<ticketid>
- --limit-has-member=<ticketid>
- --limit-refers-to=<ticketid>
- --limit-referred-to-by=<ticketid>
- --limit-depends-on=<ticketid>
- --limit-depended-on-by=<ticketid>
-
-
- Dates
- --limit-created=[starts][-][ends]
- --limit-due=[starts][-][ends]
- --limit-starts=[starts][-][ends]
- --limit-started=[starts][-][ends]
- --limit-resolved=[starts][-][ends]
- --limit-last-updated=[starts][-][ends]
- starts and ends are dates. starts can not be less than ends
-
- --limit-first=<first row returned>
- --limit-rows=<row count>
-
- --history | --show
- show a history of the tickets found
-
-
- --summary [format-string]
- show a listing-style summary of the tickets found. If format string
- is ommitted, uses \$RT_SUMMARY_FORMAT or an internal default
-
-
- #TODO: doc summary
- format: <atom>%<format>
- atom: <name><size>
- size: <integer>
- name: (grep for # {{{ attribs for the array of ok values)
-
-
- --create
- create a new ticket. Any attributes that you can modify on an existing ticket
- can also be used for ticket creation.
-
-
-
-Attributes
- Basics
- --status=<new|open|stalled|resolved|dead>
- sets status
- --subject=<subject>
- sets subject
- --owner=<userid>
- set owner to
- --steal
- Become the owner, even if someone else owns the ticket
- --queue=<queueid>
- set queue to
-
- --priority=<int>
-
- --final-priority=<int>
-
- Watchers
- --requestors=[+|-]<userid|email address>
- add or remove this user as a ticket requestor
- --cc=[+|-]<userid|email address>
- add or remove this user as a ticket cc
- --admincc=[+|-]<userid|email address>
- add or remove this user as a ticket admincc
-
- (When creating tickets, just leave off the + or - )
-
- Keywords
- --keywords[+|-]<keyword_select>/<keyword>
- Add or remove a keyword.
-
-
-
- Dates
- --due=<date>
- --starts=<date>
- --started=<date>
- --contacted=<date>
-
- --time-left=<int>
-
- --time-taken=<int>
-
-
- Link related manipulation:
-
- --depends-on=[+|-]<ticketid>
- --member-of=[+|-]<ticketid>
- --refers-to=[+|-]<ticketid>
- --merge-into=<ticketid>
-
-Comments and replies
-
- --comment
- --reply|respond
- --source <path>
- Specify the path to the source file for this ticket update
-
- --noedit
- Don't invoke \$EDITOR to edit the content of this update
-
-
-
-
- Condiments
-
- --verbose
- --debug
- --version
- --help|h|usage
- You're reading it.
-
-EOUSAGE
-
- exit(0);
-}
-
-# Print version, and leave
-if ($version) {
- print "RT $RT::VERSION for $RT::rtname. Copyright 1996-2001 Jesse Vincent <jesse\@fsck.com>\n";
- exit(0);
-}
-
-# }}}
-
-# {{{ Validate any options that were passed in. normalize them.
-
-#if a queue was specified
-if ($queue) {
- # make sure that $queue is a valid queue and load it into $queue_obj
-}
-
-#For each date in: $due, $starts, $started
-
-# load up an RT::Date object and parse it into a normalized form
-# if it can't parse it, log an error and null out the variable
-
-# }}}
-
-# {{{ Check if we're creating, if so, create the ticket and be done
-
-if ($create) {
- $RT::Logger->debug("Creating a new ticket");
-
- #Make sure the current user can create tickets in this queue
-
- #Make sure that the owner specified can own tickets in this queue
-
-
-
- my $linesref = GetMessageContent( Edit => $edit, Source => $source,
- CurrentUser => $CurrentUser
- );
-
- require MIME::Entity;
- my $MIMEObj;
-
- if ($linesref) {
- $MIMEObj = MIME::Entity->build(Data => $linesref);
- }
-
- use RT::Ticket;
- my $Ticket=new RT::Ticket($CurrentUser);
- my ($ticket, $trans, $msg) =
- $Ticket->Create(Queue => $queue,
- Owner => $owner,
- Status => $status || 'new' ,
- Subject => $subject,
- Requestor => \@requestors,
- Cc => \@cc,
- AdminCc => \@admincc,
- Due => $due,
- Starts => $starts,
- Started => $started,
- TimeLeft => $time_left,
- InitialPriority => $priority,
- FinalPriority => $final_priority,
- MIMEObj => $MIMEObj
- );
- print $msg . "\n";
-}
-
-# }}}
-
-else {
- #Apply restrictions
- use RT::Tickets;
- my $Tickets = new RT::Tickets($CurrentUser);
-
- # {{{ Limit our search
- my $value; #to use when iterating through restrictions
- my $queue_id; #to use when limiting by keyword
-
- # {{{ limit on id
-
- foreach $value (@id) {
- if ($value =~ /^(\d+)$/) {
- $Tickets->LimitId ( VALUE => $1,
- OPERATOR => '=');
- }
- elsif ($value =~ /^(\d*)\D?(\d*)$/) {
- my $start = $1;
- my $end = $2;
- $Tickets->LimitId(
- VALUE => "$start",
- OPERATOR => '>=') if ($start);
- $Tickets->LimitId(
- VALUE => "$end",
- OPERATOR => '<=') if ($end);
- }
- }
-
-
- # }}}
-
- # {{{ limit on status
-
- foreach $value (@limit_status) {
- if ($value =~ /^(=|!=|!|)(.*)$/) {
- my $op = $1;
- my $val = $2;
-
-
- $op = ParseBooleanOp($op);
- $Tickets->LimitStatus(VALUE => "$val",
- OPERATOR => "$op");
- }
- }
-
- # }}}
-
-
-
- # {{{ limit on queue
- foreach $value (@limit_queue) {
- if ($value =~ /^(\W?)(.*?)$/i) {
- my $op = $1;
- my $val = $2;
-
- $op = ParseBooleanOp($op);
-
- my $queue_obj = new RT::Queue($RT::SystemUser);
-
- unless ($queue_obj->Load($val)) {
- $RT::Logger->debug("Queue '$val' not found");
- print STDERR "Queue '$val' not found\n";
- exit(-1);
- }
- $RT::Logger->debug ("Limiting queue to $op ".$queue_obj->Name);
- $Tickets->LimitQueue(VALUE => $queue_obj->Name,
- OPERATOR => $op);
- $queue_id=$queue_obj->id;
- }
- }
-
- # {{{ limit on keyword
- foreach $value (@limit_keyword) {
- if ($value =~ /^(\W?)(.*?)\/(.*)$/i) {
- my $op = $1;
- my $select = $2;
- my $keyword = $3;
-
- $op = ParseBooleanOp($op);
-
- # load the keyword select
- my $keyselect = RT::KeywordSelect->new($RT::SystemUser);
- unless ($keyselect->LoadByName(Name=>$select, Queue=>$queue_id)) {
- $RT::Logger->debug("KeywordSelect '$select' not found");
- print STDERR "KeywordSelect '$select' not fount\n";
- exit(-1);
- }
-
- # load the keyword
- my $k = RT::Keyword->new($RT::SystemUser);
- unless ($k->LoadByNameAndParentId($keyword, $keyselect->Keyword)) {
- $RT::Logger->debug("Keyword '$keyword' not found");
- print STDERR "Keyword '$keyword' not found\n";
- exit(-1);
- }
- $Tickets->LimitKeyword(OPERATOR => $op,
- KEYWORDSELECT => $keyselect->id,
- KEYWORD => $k->id);
- $RT::Logger->debug ("Limiting keyword to $op ".$k->Path);
- }
- }
- # }}}
- # {{{ limit on owner
- foreach $value (@limit_owner) {
- if ($value =~ /^(\W?)(.*?)$/i) {
- my $op = $1;
- my $val = $2;
-
- $op = ParseBooleanOp($op);
-
- my $user_obj = new RT::User($RT::SystemUser);
-
- unless ($user_obj->Load($val)) {
- $RT::Logger->debug("User '$val' not found");
- print STDERR "User '$val' not found\n";
- exit(-1);
- }
- $val = $user_obj->id();
-
- $RT::Logger->debug ("Limiting owner to $op $val");
- $Tickets->LimitOwner(VALUE => "$val",
- OPERATOR => "$op");
- }
- }
- # }}}
- # {{{ limt on priority
-
- foreach $value (@limit_priority) {
- my ($start, $end) = ParseRange($value);
- if ($start == $end) {
- $Tickets->LimitPriority( VALUE => $start,
- OPERATOR => '=');
- } elsif ($start) {
- $Tickets->LimitPriority( VALUE => $start,
- OPERATOR => '>=');
- } elsif ($end) {
- $Tickets->LimitPriority( VALUE => $end,
- OPERATOR => '<=');
- }
-
- }
- foreach $value (@limit_final_priority) {
- my ($start, $end) = ParseRange($value);
- if ($start == $end) {
- $Tickets->LimitFinalPriority( VALUE => $start,
- OPERATOR => '=');
- } elsif ($start) {
- $Tickets->LimitFinalPriority( VALUE => $start,
- OPERATOR => '>=');
- } elsif ($end) {
- $Tickets->LimitFinalPriority( VALUE => $end,
- OPERATOR => '<=');
- }
- }
- # }}}
-
- foreach $value (@limit_requestor) {
- if ($value =~ /^(\W?)(.*?)$/i) {
- my $op = $1;
- my $val = $2;
-
- $op = ParseBooleanOp($op);
- $Tickets->LimitRequestor(VALUE => $val,
- OPERATOR => $op );
- }
-
- }
- foreach $value (@limit_subject) {
-
- if ($value =~ /^(\W?)(.*?)$/i) {
- my $op = $1;
- my $val = $2;
-
- $op = ParseLikeOp($op);
-
- $Tickets->LimitSubject(VALUE => $val,
- OPERATOR => $op );
- }
- }
-
- foreach $value (@limit_body) {
- if ($value =~ /^(\W?)(.*?)$/i) {
- my $op = $1;
- my $val = $2;
-
- $op = ParseLikeOp($op);
-
- $Tickets->LimitBody(VALUE => $val,
- OPERATOR => $op );
- }
-
- }
-
-
-
- # Dates
- foreach my $date (@limit_created) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitCreated ( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitCreated ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $date (@limit_due) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitDue ( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitDue ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $date (@limit_starts) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitStarts ( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitStarts ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $date (@limit_started) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitStarted ( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitStarted ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $date (@limit_resolved) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitResolved ( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitResolved ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $date (@limit_lastupdated) {
- my ($start, $end) = ParseDateRange($date);
- $Tickets->LimitLastUpdated( VALUE => $start,
- OPERATOR => '>=' ) if ($start);
- $Tickets->LimitLastUpdated ( VALUE => $end,
- OPERATOR => '<=' ) if ($end);
- }
-
- foreach my $link (@limit_memberof) {
- $Tickets->LimitMemberOf($link);
- }
-
- foreach my $link (@limit_hasmember) {
- $Tickets->LimitHasMember($link);
- }
-
- foreach my $link (@limit_dependson) {
- $Tickets->LimitDependsOn($link);
- }
-
- foreach my $link (@limit_dependedonby) {
- $Tickets->LimitDependedOnBy($link);
- }
- foreach my $link (@limit_refersto) {
- $Tickets->LimitRefersTo($link);
- }
-
- foreach my $link (@limit_referredtoby) {
- $Tickets->LimitReferredToBy($link);
- }
-
-
- if ($limit_first){
- }
- if ($limit_rows){
- }
-
-# }}}
-
- # {{{ Iterate through all tickets we found
-
-
- my ($format, $titles, $code);
-
- #Set up the summary format if we need to
- if (defined $summary) {
- my $format_string = $summary || $ENV{'RT_SUMMARY_FORMAT'} || "%id4%status4%queue7%subject40%requestor16";
-
- ($format, $titles, $code) = BuildListingFormat($format_string);
- printf "$format\n", eval "$titles";
- }
-
-
-
- while (my $Ticket = $Tickets->Next()) {
- $RT::Logger->debug ("Now working on ticket ". $Ticket->id);
-
- #Run through all the ticket modifications we might want to do
- #TODO: these are all insufficiently lazy and should be replaced with some
- # nice foreaches.
-
-
- # {{{ deal with watchers
-
- # add / delete requestors
- foreach $value (@requestors) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $addr = $2;
-
- $Ticket->AddRequestor(Email => $addr) if ($op eq '+');
- $Ticket->DeleteRequestor( $addr) if ($op eq '-');
- }
- }
-
- # add / delete ccs
- foreach $value (@cc) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $addr = $2;
- $Ticket->AddCc(Email => $addr) if ($op eq '+');
- $Ticket->DeleteCc($addr) if ($op eq '-');
- }
- }
-
- # add / delete adminccs
- $RT::Logger->debug("Looking at admin ccs");
- foreach $value (@admincc) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $addr = $2;
- $Ticket->AddAdminCc(Email => $addr) if ($op eq '+');
- $Ticket->DeleteAdminCc($addr) if ($op eq '-');
- }
- }
-
- # }}}
-
- # {{{ Deal with ticket keywords
-
- my $KeywordSelects = $Ticket->QueueObj->KeywordSelects();
- $RT::Logger->debug ("Looking at keywords");
- foreach $value (@keywords) {
- $RT::Logger->debug("Looking at --keyword=$value");
- if ($value =~ /^(\W?)(.*?)\/(.*)$/) {
- my $op = $1;
- my $select = $2;
- my $keyword = $3;
-
- $RT::Logger->debug("Going to $op Keyword $select / $keyword");
- while (my $ks = $KeywordSelects->Next) {
- $RT::Logger->debug("$select is select ".$ks->Name." is found");
- next unless ($ks->Name =~ /$select/i);
- $RT::Logger->debug ("Found a match for $select\n");
- my $kids = $ks->KeywordObj->Descendents;
-
- my ($kid);
- foreach $kid (keys %{$kids}) {
- $RT::Logger->debug("Now comparing $keyword with ".$kids->{$kid}. "\n");
- next unless ($kids->{$kid} =~ /^$keyword$/i);
- $RT::Logger->debug("Going to $op $select / $keyword (".$kids->{$kid} .")");
- $Ticket->DeleteKeyword(KeywordSelect => $ks->id,
- Keyword => $kid) if ($op eq '-');
-
- $Ticket->AddKeyword(KeywordSelect => $ks->id,
- Keyword => $kid) if ($op eq '+');
- }
-
- }
- }
- }
- # }}}
-
- # {{{ deal with links
-
- # Deal with merging {
- if ($mergeinto) {
- my ($trans, $msg) =$Ticket->MergeInto($mergeinto);
- print $msg."\n";
- }
- # add /delete depends-ons
-
- foreach my $value (@dependson) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $ticket = $2;
- if (!$op or ($op eq '+')) {
- my ($trans, $msg) =
- $Ticket->AddLink(Type => 'DependsOn', Target => $ticket);
- print $msg."\n";
- }
- elsif ($op eq '-') {
- my ($trans, $msg) =
- $Ticket->DeleteLink(Type => 'DependsOn', Target => $ticket);
- print $msg."\n";
- }
-
- }
- }
- # add /delete member-of
- foreach my $value (@memberof) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $ticket = $2;
- if ($op eq '+') {
- my ($trans, $msg) =
- $Ticket->AddLink(Type => 'MemberOf', Target => $ticket);
- print $msg;
- }
- elsif ($op eq '-') {
- my ($trans, $msg) =
- $Ticket->DeleteLink(Type => 'MemberOf', Target => $ticket);
- print $msg;
- }
-
- }
- }
- # add / delete refers-to
- foreach my $value (@refersto) {
- if ($value =~ /^(\W?)(.*)$/) {
- my $op = $1;
- my $ticket = $2;
- if ($op eq '+') {
- my ($trans, $msg) =
- $Ticket->AddLink(Type => 'RefersTo', Target => $ticket);
- print $msg;
- }
- elsif ($op eq '-') {
- my ($trans, $msg) =
- $Ticket->DeleteLink(Type => 'RefersTo', Target => $ticket);
- print $msg;
- }
-
- }
- }
-
- # }}}
-
- # {{{ deal with dates
-
- #set due
- if ($due) {
- my $iso = ParseDateToISO($due);
- if ($iso) {
- $RT::Logger->debug("Setting due date to $iso ($due)");
- my ($trans, $msg) =
- $Ticket->SetDue($iso);
- print $msg;
- }
- else {
- print "Due date '$due' could not be parsed";
- }
- }
-
- #set starts
- if ($starts) {
- my $iso = ParseDateToISO($due);
- if ($iso) {
- my ($trans, $msg) =
- $Ticket->SetStarts($iso);
- print $msg."\n";
- }
- else {
- print "Starts date '$starts' could not be parsed";
- }
- }
- #set started
- if ($started) {
- my $iso = ParseDateToISO($started);
- if ($iso) {
- my ($trans, $msg) =
- $Ticket->SetStarted($iso);
- print $msg."\n";
- }
- else {
- print "Started date '$started' could not be parsed";
- }
- }
- #set contacted
- if ($contacted) {
- my $iso = ParseDateToISO($contacted);
- if ($iso) {
- my ($trans, $msg) =
- $Ticket->SetContacted($iso);
- print $msg."\n";
- }
- else {
- print "Contacted date '$contacted' could not be parsed";
- }
- }
-
- # }}}
-
- # {{{ set other attributes
-
- #Set subject
- if ($subject) {
- my ($trans, $msg) = $Ticket->SetSubject($subject);
- print $msg."\n";
- }
-
- #Set priority
- if ($priority) {
- my ($trans, $msg) =
- $Ticket->SetPriority($priority);
- print $msg."\n";
- }
-
- #Set final priority
- if ($final_priority) {
- my ($trans, $msg) =
- $Ticket->SetFinalPriority($final_priority);
- print $msg."\n";
- }
-
- #Set status
- if ($status) {
- my ($trans, $msg) =
- $Ticket->SetStatus($status);
- print $msg."\n";
- }
-
- #Set time left
- if ($time_left) {
- my ($trans, $msg) =
- $Ticket->SetTimeLeft($time_left);
- print $msg."\n";
- }
-
- #Set time_taken
- if ($time_taken) {
- my ($trans, $msg) =
- $Ticket->SetTimeTaken($time_taken);
- print $msg."\n";
- }
-
- #Set owner
- if ($owner) {
- my ($trans, $msg) =
- $Ticket->SetOwner($owner);
- print $msg."\n";
- }
-
- # Steal
- if ($steal) {
- my ($trans, $msg) =
- $Ticket->Steal();
- print $msg . "\n";
- }
- #Set queue
- if ($queue) {
- my ($trans, $msg) =
- $Ticket->SetQueue($queue);
- print $msg."\n";
- }
-
- # }}}
-
-
-
- # {{{ Perform ticket comments/replies
- if ($reply) {
- $RT::Logger->debug("Replying to ticket ".$Ticket->Id);
-
- my $linesref = GetMessageContent( Edit => $edit, Source => $source,
- CurrentUser => $CurrentUser
- );
-
- #TODO build this entity
- require MIME::Entity;
- my $MIMEObj = MIME::Entity->build(Data => $linesref);
-
- $Ticket->Correspond( MIMEObj => $MIMEObj ,
- TimeTaken => $time_taken);
- }
-
- elsif ($comment) {
- $RT::Logger->debug("Commenting on ticket ".$Ticket->Id);
-
- my $linesref =GetMessageContent(Edit => $edit, Source => $source,
- CurrentUser => $CurrentUser);
- #TODO build this entity
- require MIME::Entity;
- my $MIMEObj = MIME::Entity->build(Data => $linesref);
-
- $Ticket->Comment( MIMEObj => $MIMEObj,
- TimeTaken => $time_taken);
- }
-
- # }}}
-
- # {{{ Display whatever we need to display
-
- # {{{ Display a full ticket listing and history
- if ($history) {
- #Display the history
- $RT::Logger->debug("Show history for ".$Ticket->id);
-
- if ($Ticket->CurrentUserHasRight("ShowTicket")) {
- &ShowSummary($Ticket);
- print "\n";
- &ShowHistory($Ticket);
- }
- else {
- print "You don't have permission to view that ticket.\n";
- }
- }
-
- # }}}
-
- # {{{ Display a summary if we need to
- if (defined $summary) {
- $RT::Logger->debug ("Show ticket summary with format $format");
-
- printf $format."\n", eval $code;
-
- }
- # }}}
-
- # }}}
-
- }
-
- # }}}
-
-}
-
-
-$RT::Handle->Disconnect();
-
-
-
-
-
-
-
-# {{{ sub ParseBooleanOp
-
-=head2 ParseBooleanOp
-
- Takes an option modifier. returns the apropriate SQL operator.
- If it's handed ! or -, returns !=. Otherwise returns =.
-
-=cut
-
-sub ParseBooleanOp {
-
- my $op = shift;
-
- #so that !new limits to not new, etc
- if ($op =~ /^(\!|-)/) {
- $op = "!=";
- }
- else {
- $op = "=";
- }
-
- return($op);
-}
-
-# }}}
-
-# {{{ sub ParseLikeOp
-=head2 ParseLikeOp
-
- Takes an option modifier. returns the apropriate SQL operator.
- If it's handed ! or -, returns NOT LIKE. Otherwise returns LIKE
-
-=cut
-
-sub ParseLikeOp {
-
- my $op = shift;
-
- #so that !new limits to not new, etc
- if ($op =~ /^(\!|-)/) {
- $op = "NOT LIKE";
- }
- else {
- $op = "LIKE";
- }
-
- return($op);
-}
-# }}}
-
-# {{{ sub ParseDateToISO
-
-=head2 ParseDateToISO
-
-Takes a date in an arbitrary format.
-Returns an ISO date and time in GMT
-
-=cut
-
-sub ParseDateToISO {
- my $date = shift;
-
- my $date_obj = new RT::Date($CurrentUser);
- $date_obj->Set( Format => 'unknown',
- Value => $date
- );
- return ($date_obj->ISO);
-}
-
-# }}}
-
-# {{{ sub ParseDateRange
-
-=head2 ParseDateRange [RANGE]
-
-Takes a range of dates of the form [<date>][-][<date>] and returns
-starting and ending dates (as ISOs) If a date is specified as neither a starting nor ending
-date, we parse it it as "midnight tonight to midnight tomorrow"
-
-=cut
-
-sub ParseDateRange {
- my $in = shift;
- my ($start, $end);
-
-
- use RT::Date;
- my $start_obj = new RT::Date($CurrentUser);
- my $end_obj = new RT::Date($CurrentUser);
-
- if ($in =~ /^(.*?)-(.*?)$/) {
- $start = $1;
- $end = $2;
-
- if ($start) {
- $start_obj->Set(Format => 'unknown',
- Value => $start);
- }
- if ($end) {
- $end_obj->Set(Format => 'unknown',
- Value => $end);
- }
- }
- else {
- $start = $in;
- $end = $in;
-
- $start_obj->Set(Format => 'unknown',
- Value => $start);
-
- $end_obj->Set(Format => 'unknown',
- Value => $end);
-
- $start_obj->SetToMidnight();
- $end_obj->SetToMidnight();
- $end_obj->AddDay();
- }
-
- if ($start) {
- $start = $start_obj->ISO;
- }
- if ($end) {
- $end = $end_obj->ISO;
- }
-
- return ($start, $end);
-}
-
-# }}}
-
-# {{{ ParseRange
-=head2 ParseRange [RANGE]
-
-Takes a range of the form [<int>][-][<int>] and returns
-a first and a last value. If the - is omitted, both $start and $end are the same.
-=cut
-
-sub ParseRange {
- my $in = shift;
- my ($start, $end);
-
- if ($in =~ /(.*?)-(.*?)/) {
- $start = $1;
- $end = $2;
- }
- else {
- $start = $in;
- $end = $in;
- }
-
- return ($start, $end);
-
-
-
-}
-
-# }}}
-
-# {{{ sub ShowSummary
-
-sub ShowSummary {
- my $Ticket = shift;
-
-
- print <<EOFORM;
-Serial Number: @{[$Ticket->Id]} Status:@{[$Ticket->Status]} Worked: @{[$Ticket->TimeWorked]} minutes Queue:@{[$Ticket->QueueObj->Name]}
- Subject: @{[$Ticket->Subject]}
- Requestors: @{[$Ticket->RequestorsAsString]}
- Cc: @{[$Ticket->CcAsString]}
- Admin Cc: @{[$Ticket->AdminCcAsString]}
- Owner: @{[$Ticket->OwnerObj->Name]}
- Priority: @{[$Ticket->Priority]} / @{[$Ticket->FinalPriority]}
- Due: @{[$Ticket->DueAsString]}
- Created: @{[$Ticket->CreatedAsString]} (@{[$Ticket->AgeAsString]})
- Last Contact: @{[$Ticket->ToldAsString]} (@{[$Ticket->LongSinceToldAsString]})
- Last Update: @{[$Ticket->LastUpdatedAsString]} by @{[$Ticket->LastUpdatedByObj->Name]}
-
-EOFORM
-
-my $selects = $Ticket->QueueObj->KeywordSelects();
- #get the keyword selects
- print "Keywords:\n";
- while (my $select = $selects->Next) {
- print "\t" .$select->Name .": ";
- my $keys = $Ticket->KeywordsObj($select->id);
- while (my $key = $keys->Next) {
- print $key->KeywordObj->RelativePath($select->KeywordObj) . " ";
-
- }
- print "\n";
- }
-
-#iterate through the keyword selects.
-#print the keyword select and all the related keywords
-
-
-
-#TODO: finish link descriptions
-print "Dependencies: \n";
- while (my $l=$Ticket->DependedOnBy->Next) {
- print $l->BaseObj->id," (",$l->BaseObj->Subject,") ",$l->Type," this ticket\n";
- }
- while (my $l=$Ticket->DependsOn->Next) {
- print "This ticket ",$l->Type," ",$l->TargetObj->Id," (",$l->TargetObj->Subject,")\n";
- }
-}
-
-# }}}
-
-# {{{ sub ShowHistory
-sub ShowHistory {
- my $Ticket = shift;
- my $Transaction;
- my $Transactions = $Ticket->Transactions;
-
- while ($Transaction = $Transactions->Next) {
- &ShowTransaction($Transaction);
- }
- }
-# }}}
-
-# {{{ sub ShowTransaction
-sub ShowTransaction {
- my $transaction = shift;
-
-print <<EOFORM;
-==========================================================================
-Date: @{[$transaction->CreatedAsString]} (@{[$transaction->TimeTaken]} minutes)
-@{[$transaction->Description]}
-EOFORM
- ;
- my $attachments=$transaction->Attachments();
- while (my $message=$attachments->Next) {
- print <<EOFORM;
---------------------------------------------------------------------------
-@{[$message->Headers]}
-EOFORM
-
- if ($message->ContentType =~ m{^(text/plain|message|text$)}) {
- print $message->Content;
- } else {
- print $message->ContentType, " not shown";
- }
- }
- print "\n";
- return();
-}
-# }}}
-
-
-# {{{ sub BuildListingFormat
-
-sub BuildListingFormat {
- my $format_string = shift;
-
- my ($id, @format, @code, @titles);
- my ($field,$titles,$length, $format);
-
- my $code = "";
-
- # {{{ attribs
- my $attribs = { id => { chars => '4',
- justify => 'r',
- title => 'id',
- value => '$Ticket->id',
- },
-
- queue => { chars => '8',
- justify => 'l',
- title => 'Queue',
- value => '$Ticket->QueueObj->Name'
- },
- subject => { chars => '30',
- justify => 'l',
- title => 'Subject',
- value => '$Ticket->Subject',
- },
- priority => { chars => '2',
- justify => 'r',
- title => 'Pri',
- value => '$Ticket->Priority',
- },
- final_priority => { chars => '2',
- justify => 'r',
- title => 'Fin',
- value => '$Ticket->FinalPriority',
- },
- time_worked => { chars => '6',
- justify => 'r',
- title => 'Worked',
- value => '$Ticket->TimeWorked',
- },
- time_left => { chars => '5',
- justify => 'r',
- title => 'Left',
- value => '$Ticket->TimeLeft',
-
- },
-
- status => { chars => '6',
- justify => 'r',
- title => 'Status',
- value => '$Ticket->Status',
- },
- owner => { chars => '10',
- justify => 'r',
- title => 'Owner',
- value => '$Ticket->OwnerObj->Name'
- },
- requestor => { chars => '10',
- justify => 'r',
- title => 'Requestor',
- value => '$Ticket->RequestorsAsString'
- },
- created => { chars => '12',
- justify => 'r',
- title => 'Created',
- value => '$Ticket->CreatedAsString'
- },
- updated => { chars => '12',
- justify => 'r',
- title => 'Updated',
- value => '$Ticket->LastUpdatedAsString'
- },
- due => { chars => '12',
- justify => 'r',
- title => 'Due',
- value => '$Ticket->DueAsString'
- },
- told => { chars => '12',
- justify => 'r',
- title => 'Told',
- value => '$Ticket->ToldAsString'
- },
-
-
-
- };
-
- # }}}
-
-
- foreach $field (split ('%',$format_string)) {
-
- if ($field =~ /^(\D*?)(\d*?)$/) {
- $id = $1;
- $length = $2;
- }
- else {
- $RT::Logger->debug ("Error parsing $field\n");
- }
- if ($length) {
- push (@format, "%".$length.".".$length."s ");
-
- push (@code, $attribs->{"$id"}->{'value'});
-
- push (@titles, "'". $attribs->{"$id"}->{title}. "'");
- }
-
-
- }
- $code = join (',', @code);
- $format = join (" ", @format);
- $titles = join (', ', @titles);
-
-
- return ($format, $titles, $code);
-}
-
-# }}}
-
-
-
-1;
diff --git a/rt/bin/rt-mailgate b/rt/bin/rt-mailgate
index e6f0d95c5..b30443638 100755
--- a/rt/bin/rt-mailgate
+++ b/rt/bin/rt-mailgate
@@ -1,367 +1,587 @@
-#!!!PERL!! -w
+#!/usr/bin/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
+
+=head1 NAME
+
+rt-mailgate - Mail interface to RT3.
+
+=begin testing
+
+use RT::I18N;
+
+
+# {{{ Test new ticket creation by root who is privileged and superuser
+
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: root\@localhost
+To: rt\@example.com
+Subject: This is a test of new ticket creation
+
+Blah!
+Foob!
+EOF
+close (MAIL);
+
+use RT::Tickets;
+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 (UNIVERSAL::isa($tick,'RT::Ticket'));
+ok ($tick->Id, "found ticket ".$tick->Id);
+ok ($tick->Subject eq 'This is a test of new ticket creation', "Created the ticket");
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/rt-mailgate,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2001 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
+# }}}
-package RT;
-use strict;
-use vars qw($VERSION $Handle $Nobody $SystemUser);
-
-$VERSION="!!RT_VERSION!!";
-
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-use RT::Interface::Email qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser
- GetMessageContent
- CheckForLoops
- CheckForSuspiciousSender
- CheckForAutoGenerated
- ParseMIMEEntityFromSTDIN
- ParseTicketId
- MailError
- ParseCcAddressesFromHead
- ParseSenderAddressFromHead
- ParseErrorsToAddressFromHead
- );
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-LoadConfig();
-
-#Connect to the database and get RT::SystemUser and RT::Nobody loaded
-DBConnect();
-
-#Drop setgid permissions
-RT::DropSetGIDPermissions();
-
-use RT::Ticket;
-use RT::Queue;
-use MIME::Parser;
-use File::Temp;
-use Mail::Address;
-
-
-#Set some sensible defaults
-my $Queue = 1;
-my $time = time;
-my $Action = "correspond";
-
-my ($Verbose, $ReturnTid, $Debug);
-my ($From, $TicketId, $Subject,$SquelchReplies);
-
-# using --owner-from-extension, this will let you set ticket owner on create
-my $AssignTicketTo = undef;
-my ($status, $msg);
-
-# {{{ parse commandline
-
-while (my $flag = shift @ARGV) {
- if (($flag eq '-v') or ($flag eq '--verbose')) {
- $Verbose = 1;
- }
- if (($flag eq '-t') or ($flag eq '--ticketid')) {
- $ReturnTid = 1;
- }
-
- if (($flag eq '-d') or ($flag eq '--debug')) {
- $RT::Logger->debug("Debug mode enabled\n");
- $Debug = 1;
- }
-
- if (($flag eq '-q') or ($flag eq '--queue')) {
- $Queue = shift @ARGV;
- }
- if ($flag eq '--ticket-id-from-extension') {
- $TicketId = $ENV{'EXTENSION'};
- }
- if ($flag eq '--queue-from-extension') {
- $Queue = $ENV{'EXTENSION'};
- }
- if ($flag eq '--owner-from-extension') {
- $AssignTicketTo = $ENV{'EXTENSION'};
- }
-
- if (($flag eq '-a') or ($flag eq '--action')) {
- $Action = shift @ARGV;
- }
-
-
-}
+# {{{This is a test of new ticket creation as an unknown user
+
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist\@example.com
+To: rt\@example.com
+Subject: This is a test of new ticket creation as an unknown user
+
+Blah!
+Foob!
+EOF
+close (MAIL);
+
+$tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+$tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+ok ($tick->Subject ne 'This is a test of new ticket creation as an unknown user', "failed to create the new ticket from an unprivileged account");
+my $u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist@example.com');
+ok( $u->Id == 0, " user does not exist and was not created by failed ticket submission");
+
# }}}
-# get the current mime entity from stdin
-my ($entity, $head) = ParseMIMEEntityFromSTDIN();
+# {{{ now everybody can create tickets. can a random unkown user create tickets?
-#Get someone to send runtime errors to;
-my $ErrorsTo = ParseErrorsToAddressFromHead($head);
+my $g = RT::Group->new($RT::SystemUser);
+$g->LoadSystemInternalGroup('Everyone');
+ok( $g->Id, "Found 'everybody'");
-#Get us a current user object.
-my $CurrentUser = GetCurrentUser($head, $entity, $ErrorsTo);
+my ($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
+ok ($val, "Granted everybody the right to create tickets - $msg");
-# We've already performed a warning and sent the mail off to somewhere safe ($RTOwner).
-# this is _exceedingly_ unlikely but we don't want to keep going if we don't have a current user
+sleep(60); # gotta sleep so the remote process' ACL cache times out
-unless ($CurrentUser->Id) {
- exit(1);
-}
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist\@example.com
+To: rt\@example.com
+Subject: This is a test of new ticket creation as an unknown user
-my $MessageId = $head->get('Message-Id') ||
- "<no-message-id-".time.rand(2000)."\@.$RT::Organization>";
+Blah!
+Foob!
+EOF
+close (MAIL);
-#Pull apart the subject line
-$Subject = $head->get('Subject') || "[no subject]";
-chomp $Subject;
-# Get the ticket ID unless it's already set
-$TicketId = ParseTicketId($Subject) unless ($TicketId);
+$tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id' ,OPERATOR => '>', VALUE => '0');
+$tick = $tickets->First();
+ok ($tick->Id, "found ticket ".$tick->Id);
+ok ($tick->Subject eq 'This is a test of new ticket creation as an unknown user', "failed to create the new ticket from an unprivileged account");
+my $u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist@example.com');
+ok( $u->Id != 0, " user does not exist and was created by ticket submission");
-#Set up a queue object
-my $QueueObj = RT::Queue->new($CurrentUser);
-$QueueObj->Load($Queue);
-unless ($QueueObj->id ) {
+# }}}
- MailError(To => $RT::OwnerEmail,
- Subject => "RT Bounce: $Subject",
- Explanation => "RT couldn't find the queue: $Queue",
- MIMEObj => $entity);
-}
+# {{{ can another random reply to a ticket without being granted privs? answer should be no.
-# {{{ Lets check for mail loops of various sorts.
-my $IsAutoGenerated = CheckForAutoGenerated($head);
+#($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
+#ok ($val, "Granted everybody the right to create tickets - $msg");
+#sleep(60); # gotta sleep so the remote process' ACL cache times out
-my $IsSuspiciousSender = CheckForSuspiciousSender($head);
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist-2\@example.com
+To: rt\@example.com
+Subject: [example.com #@{[$tick->Id]}] This is a test of a reply as an unknown user
-my $IsALoop = CheckForLoops($head);
+Blah!
+Foob!
+EOF
+close (MAIL);
+$u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist-2@example.com');
+ok( $u->Id == 0, " user does not exist and was not created by ticket correspondence submission");
+# }}}
+# {{{ can another random reply to a ticket after being granted privs? answer should be yes
-#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;
-
- #TODO: Is what we want to do here really
- # "Make the requestor cease to get mail from RT"?
- # This might wreak havoc with vacation-mailing users.
- # Maybe have a "disabled for bouncing" state that gets
- # turned off when we get a legit incoming message
+($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'ReplyToTicket');
+ok ($val, "Granted everybody the right to reply to tickets - $msg");
+sleep(60); # gotta sleep so the remote process' ACL cache times out
-}
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist-2\@example.com
+To: rt\@example.com
+Subject: [example.com #@{[$tick->Id]}] This is a test of a reply as an unknown user
+Blah!
+Foob!
+EOF
+close (MAIL);
-# {{{ Warn someone if it's a loop
-
-# Warn someone if it's a loop, before we drop it on the ground
-if ($IsALoop) {
- $RT::Logger->crit("RT Received mail ($MessageId) from itself.");
-
- #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 => $entity);
-
- #Do we actually want to store it?
- exit unless ($RT::StoreLoops);
- }
-}
+
+$u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist-2@example.com');
+ok( $u->Id != 0, " user exists and was created by ticket correspondence submission");
# }}}
+# {{{ can another random comment on a ticket without being granted privs? answer should be no.
- #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')
- }
+#($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CreateTicket');
+#ok ($val, "Granted everybody the right to create tickets - $msg");
+#sleep(60); # gotta sleep so the remote process' ACL cache times out
-if ($SquelchReplies) {
- ## TODO: This is a hack. It should be some other way to
- ## indicate that the transaction should be "silent".
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action comment"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist-3\@example.com
+To: rt\@example.com
+Subject: [example.com #@{[$tick->Id]}] This is a test of a comment as an unknown user
- my ($Sender, $junk) = ParseSenderAddressFromHead($head);
- $head->add('RT-Squelch-Replies-To', $Sender);
-}
+Blah!
+Foob!
+EOF
+close (MAIL);
+
+$u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist-3@example.com');
+ok( $u->Id == 0, " user does not exist and was not created by ticket comment submission");
# }}}
+# {{{ can another random reply to a ticket after being granted privs? answer should be yes
-# {{{ If we require that the sender be found in an external DB and they're not
-# forward this message to RTOwner
+($val,$msg) = $g->PrincipalObj->GrantRight(Right => 'CommentOnTicket');
+ok ($val, "Granted everybody the right to reply to tickets - $msg");
+sleep(60); # gotta sleep so the remote process' ACL cache times out
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action comment"), "Opened the mailgate - $@");
+print MAIL <<EOF;
+From: doesnotexist-3\@example.com
+To: rt\@example.com
+Subject: [example.com #@{[$tick->Id]}] This is a test of a comment as an unknown user
+Blah!
+Foob!
+EOF
+close (MAIL);
-if ($RT::LookupSenderInExternalDatabase &&
- $RT::SenderMustExistInExternalDatabase ) {
- MailError(To => $RT::OwnerEmail,
- Subject => "RT Bounce: $Subject",
- Explanation => "RT couldn't find requestor via its external database lookup",
- MIMEObj => $entity);
-
-}
+$u = RT::User->new($RT::SystemUser);
+$u->Load('doesnotexist-3@example.com');
+ok( $u->Id != 0, " user exists and was created by ticket comment submission");
# }}}
-# {{{ elsif we don't have a ticket Id, we're creating a new ticket
-
-
-
-elsif (!defined($TicketId)) {
-
- # {{{ Create a new ticket
- if ($Action =~ /correspond/) {
-
- # open a new ticket
- my @Requestors = ($CurrentUser->id);
-
- my @Cc;
- if ($RT::ParseNewMessageForTicketCcs) {
- @Cc = ParseCcAddressesFromHead(Head => $head,
- CurrentUser => $CurrentUser,
- QueueObj => $QueueObj );
- }
-
- my $Ticket = new RT::Ticket($CurrentUser);
- my ($id, $Transaction, $ErrStr) =
- $Ticket->Create ( Queue => $Queue,
- Subject => $Subject,
- Owner => $AssignTicketTo,
- Requestor => \@Requestors,
- Cc => \@Cc,
- MIMEObj => $entity
- );
- if ($id == 0 ) {
- MailError( To => $ErrorsTo,
- Subject => "Ticket creation failed",
- Explanation => $ErrStr,
- MIMEObj => $entity
- );
- $RT::Logger->error("Create failed: $id / $Transaction / $ErrStr ");
- }
- }
-
- # }}}
-
- else {
- #TODO Return an error message
- MailError( To => $ErrorsTo,
- Subject => "No ticket id specified",
- Explanation => "$Action aliases require a TicketId to work on",
- MIMEObj => $entity
- );
-
- $RT::Logger->crit("$Action aliases require a TicketId to work on ".
- "(from ".$CurrentUser->UserObj->EmailAddress.") ".
- $MessageId);
- }
-}
+# {{{ Testing preservation of binary attachments
+
+# Get a binary blob (Best Practical logo)
+
+# Create a mime entity with an attachment
+
+use MIME::Entity;
+my $entity = MIME::Entity->build( From => 'root@localhost',
+ To => 'rt@localhost',
+ Subject => 'binary attachment test',
+ Data => ['This is a test of a binary attachment']);
+
+# currently in lib/t/autogen
+$entity->attach(Path => '../../../html/NoAuth/images/spacer.gif',
+ Type => 'image/gif',
+ Encoding => 'base64');
+
+# Create a ticket with a binary attachment
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+
+$entity->print(\*MAIL);
+
+close (MAIL);
+
+my $tickets = RT::Tickets->new($RT::SystemUser);
+$tickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
+ $tick = $tickets->First();
+ok (UNIVERSAL::isa($tick,'RT::Ticket'));
+ok ($tick->Id, "found ticket ".$tick->Id);
+ok ($tick->Subject eq 'binary attachment test', "Created the ticket - ".$tick->Id);
+
+my $file = `cat ../../../html/NoAuth/images/spacer.gif`;
+ok ($file, "Read in the logo image");
+
+
+ use Digest::MD5;
+warn "for the raw file the content is ".Digest::MD5::md5_base64($file);
+
+
+
+# Verify that the binary attachment is valid in the database
+my $attachments = RT::Attachments->new($RT::SystemUser);
+$attachments->Limit(FIELD => 'ContentType', VALUE => 'image/gif');
+ok ($attachments->Count == 1, 'Found only one gif in the database');
+my $attachment = $attachments->First;
+my $acontent = $attachment->Content;
+
+ warn "coming from the database, the content is ".Digest::MD5::md5_base64($acontent);
+
+is( $acontent, $file, 'The attachment isn\'t screwed up in the database.');
+# Log in as root
+use Getopt::Long;
+use LWP::UserAgent;
+
+
+# Grab the binary attachment via the web ui
+my $ua = LWP::UserAgent->new();
+
+my $full_url = "http://localhost/Ticket/Attachment/".$attachment->TransactionId."/".$attachment->id."/spacer.gif?&user=root&pass=password";
+my $r = $ua->get( $full_url);
+
+
+# Verify that the downloaded attachment is the same as what we uploaded.
+is($file, $r->content, 'The attachment isn\'t screwed up in download');
+
+
# }}}
-# {{{ If we've got a ticket ID, update the ticket
-
-else {
-
- # If the action is comment, add a comment.
- if ($Action =~ /comment/i){
-
- my $Ticket = new RT::Ticket($CurrentUser);
- $Ticket->Load($TicketId);
- unless ($Ticket->Id) {
- MailError( To => $ErrorsTo,
- Subject => "Comment not recorded",
- Explanation => "Could not find a ticket with id $TicketId",
- MIMEObj => $entity
- );
- #Return an error message saying that Ticket "#foo" wasn't found.
- }
-
- ($status, $msg) = $Ticket->Comment(MIMEObj=>$entity);
- unless ($status) {
- #Warn the sender that we couldn't actually submit the comment.
- MailError( To => $ErrorsTo,
- Subject => "Comment not recorded",
- Explanation => $msg,
- MIMEObj => $entity
- );
- }
- }
-
- # If the message is correspondence, add it to the ticket
- elsif ($Action =~ /correspond/i) {
- my $Ticket = RT::Ticket->new($CurrentUser);
- $Ticket->Load($TicketId);
-
- #TODO: Check for error conditions
- ($status, $msg) = $Ticket->Correspond(MIMEObj => $entity);
- unless ($status) {
-
- #Return mail to the sender with an error
- MailError( To => $ErrorsTo,
- Subject => "Correspondence not recorded",
- Explanation => $msg,
- MIMEObj => $entity
- );
- }
- }
-
- else {
- #Return mail to the sender with an error
- MailError( To => $ErrorsTo,
- Subject => "RT Configuration error",
- Explanation => "'$Action' not a recognized action.".
- " Your RT administrator has misconfigured ".
- "the mail aliases which invoke RT" ,
- MIMEObj => $entity
- );
-
- $RT::Logger->crit("$Action type unknown for $MessageId");
-
- }
-
-}
+# {{{ Simple I18N testing
+
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+
+print MAIL <<EOF;
+From: root\@localhost
+To: rtemail\@example.com
+Subject: This is a test of I18N ticket creation
+Content-Type: text/plain; charset="utf-8"
+
+2 accented lines
+\303\242\303\252\303\256\303\264\303\273
+\303\241\303\251\303\255\303\263\303\272
+bye
+EOF
+close (MAIL);
+
+my $unitickets = RT::Tickets->new($RT::SystemUser);
+$unitickets->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$unitickets->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
+my $unitick = $unitickets->First();
+ok (UNIVERSAL::isa($unitick,'RT::Ticket'));
+ok ($unitick->Id, "found ticket ".$unitick->Id);
+ok ($unitick->Subject eq 'This is a test of I18N ticket creation', "Created the ticket - ". $unitick->Subject);
+
+
+
+my $unistring = "\303\241\303\251\303\255\303\263\303\272";
+Encode::_utf8_on($unistring);
+is ($unitick->Transactions->First->Content, $unitick->Transactions->First->Attachments->First->Content, "Content is ". $unitick->Transactions->First->Attachments->First->Content);
+ok($unitick->Transactions->First->Attachments->First->Content =~ /$unistring/i, $unitick->Id." appears to be unicode ". $unitick->Transactions->First->Attachments->First->Id);
+# supposedly I18N fails on the second message sent in.
+
+ok(open(MAIL, "|/opt/rt3/bin/rt-mailgate --url http://localhost/ --queue general --action correspond"), "Opened the mailgate - $@");
+
+print MAIL <<EOF;
+From: root\@localhost
+To: rtemail\@example.com
+Subject: This is a test of I18N ticket creation
+Content-Type: text/plain; charset="utf-8"
+
+2 accented lines
+\303\242\303\252\303\256\303\264\303\273
+\303\241\303\251\303\255\303\263\303\272
+bye
+EOF
+close (MAIL);
+
+my $tickets2 = RT::Tickets->new($RT::SystemUser);
+$tickets2->OrderBy(FIELD => 'id', ORDER => 'DESC');
+$tickets2->Limit(FIELD => 'id', OPERATOR => '>', VALUE => '0');
+my $tick2 = $tickets2->First();
+ok (UNIVERSAL::isa($tick2,'RT::Ticket'));
+ok ($tick2->Id, "found ticket ".$tick2->Id);
+ok ($tick2->Subject eq 'This is a test of I18N ticket creation', "Created the ticket");
+
+
+
+my $unistring = "\303\241\303\251\303\255\303\263\303\272";
+Encode::_utf8_on($unistring);
+
+ok ($tick2->Transactions->First->Content =~ $unistring, "It appears to be unicode - ".$tick2->Transactions->First->Content);
# }}}
-$RT::Handle->Disconnect();
+($val,$msg) = $g->PrincipalObj->RevokeRight(Right => 'CreateTicket');
+ok ($val, $msg);
+
+
+
+=end testing
+
+=cut
+
+
+use strict;
+use Getopt::Long;
+use LWP::UserAgent;
+
+use constant EX_TEMPFAIL => 75;
+
+my %opts;
+GetOptions( \%opts, "queue=s", "action=s", "url=s", "jar=s", "help", "debug", "extension=s" );
+
+if ( $opts{help} ) {
+ require Pod::Usage;
+ import Pod::Usage;
+ pod2usage("RT Mail Gateway\n");
+ exit 1; # Don't want to succeed if this is really an email!
+}
+
+for (qw(url)) {
+ die "$0 invoked improperly\n\nNo $_ provided to mail gateway!\n" unless $opts{$_};
+}
+
+undef $/;
+my $message = <>;
+my $ua = LWP::UserAgent->new();
+$ua->cookie_jar( { file => $opts{jar} } );
+
+my %args = (
+ queue => $opts{queue},
+ action => $opts{action},
+ message => $message,
+ SessionType => 'REST', # Surpress login box
+);
+
+
+if ($opts{'extension'}) {
+ $args{$opts{'extension'}} = $ENV{'EXTENSION'};
+}
+
+# Set up cookie here.
+
+my $full_url = $opts{'url'}. "/REST/1.0/NoAuth/mail-gateway";
+warn "Connecting to $full_url" if $opts{'debug'};
+
+
+
+my $r = $ua->post( $full_url, {%args} );
+check_failure($r);
+
+my $content = $r->content;
+warn $content if ($opts{debug});
+
+if ( $content !~ /^(ok|not ok)/ ) {
+
+ # It's not the server's fault if the mail is bogus. We just want to know that
+ # *something* came out of the server.
+ die <<EOF
+RT server error.
+
+The RT server which handled your email did not behave as expected. It
+said:
+
+$content
+EOF
+
+}
+
+sub check_failure {
+ my $r = shift;
+ return if $r->is_success();
+
+ # This ordinarily oughtn't to be able to happen, suggests a bug in RT.
+ # So only load these heavy modules when they're needed.
+ require HTML::TreeBuilder;
+ require HTML::FormatText;
+
+ my $error = $r->error_as_HTML;
+ my $tree = HTML::TreeBuilder->new->parse($error);
+ $tree->eof;
+
+ # It'll be a cold day in hell before RT sends out bounces in HTML
+ my $formatter = HTML::FormatText->new( leftmargin => 0,
+ rightmargin => 50 );
+ warn $formatter->format($tree);
+ warn "This is $0 exiting because of an undefined server error" if ($opts{debug});
+ exit EX_TEMPFAIL;
+}
+
+
+=head1 SYNOPSIS
+
+ rt-mailgate --help : this text
+
+Usual invocation (from MTA):
+
+ rt-mailgate --action (correspond|comment) --queue queuename
+ --url http://your.rt.server/
+ [ --extension (queue|action|ticket)
+
+See C<man rt-mailgate> for more.
+
+=head1 OPTIONS
+
+=over 3
+
+=item C<--action>
+
+Specifies whether this is a correspondence or comment address.
+
+=item C<--queue>
+
+Reflects which queue this address handles.
+
+=item C<--url>
+
+The location of the web server for your RT instance.
+
+
+=item C<--extension> OPTIONAL
+
+Some MTAs will route mail sent to user-foo@host or user+foo@host to user@host
+and present "foo" in the environment variable $EXTENSION. By specifying
+the value "queue" for this parameter, the queue this message should be
+submitted to will be set to the value of $EXTENSION. By specifying
+"ticket", $EXTENSION will be interpreted as the id of the ticket this message
+is related to. "action" will allow the user to specify either "comment" or
+"correspond" in the address extension.
+
+
+=head1 DESCRIPTION
+
+The RT mail gateway is the primary mechanism for communicating with RT
+via email. This program simply directs the email to the RT web server,
+which handles filing correspondence and sending out any required mail.
+It is designed to be run as part of the mail delivery process, either
+called directly by the MTA or C<procmail>, or in a F<.forward> or
+equivalent.
+
+=head1 SETUP
+
+Much of the set up of the mail gateway depends on your MTA and mail
+routing configuration. However, you will need first of all to create an
+RT user for the mail gateway and assign it a password; this helps to
+ensure that mail coming into the web server did originate from the
+gateway.
+
+Next, you need to route mail to C<rt-mailgate> for the queues you're
+monitoring. For instance, if you're using F</etc/aliases> and you have a
+"bugs" queue, you will want something like this:
+
+ bugs: "|/opt/rt3/bin/rt-mailgate --queue bugs --action correspond
+ --url http://rt.mycorp.com/"
+
+ bugs-comment: "|/opt/rt3/bin/rt-mailgate --queue bugs --action comment
+ --url http://rt.mycorp.com/"
+
+Note that you don't have to run your RT server on your mail server, as
+the mail gateway will happily relay to a different machine.
+
+=head1 CUSTOMIZATION
+
+By default, the mail gateway will accept mail from anyone. However,
+there are situations in which you will want to authenticate users
+before allowing them to communicate with the system. You can do this
+via a plug-in mechanism in the RT configuration.
+
+You can set the array C<@RT::MailPlugins> to be a list of plugins. The
+default plugin, if this is not given, is C<Auth::MailFrom> - that is,
+authentication of the person is done based on the C<From> header of the
+email. If you have additional filters or authentication mechanisms, you
+can list them here and they will be called in order:
+
+ @RT::MailPlugins = (
+ "Filter::SpamAssassin",
+ "Auth::LDAP",
+ # ...
+ );
+
+See the documentation for any additional plugins you have.
+
+You may also put Perl subroutines into the C<@RT::MailPlugins> array, if
+they behave as described below.
+
+=head1 WRITING PLUGINS
+
+What's actually going on in the above is that C<@RT::MailPlugins> is a
+list of Perl modules; RT prepends C<RT::Interface::Email::> to the name,
+to form a package name, and then C<use>'s this module. The module is
+expected to provide a C<GetCurrentUser> subroutine, which takes a hash of
+several parameters:
+
+=over 4
+
+=item Message
+
+A C<MIME::Entity> object representing the email
+=item CurrentUser
+
+An C<RT::CurrentUser> object
+
+=item AuthStat
+
+The authentication level returned from the previous plugin.
+
+=item Ticket [OPTIONAL]
+
+The ticket under discussion
+
+=item Queue [OPTIONAL]
+
+If we don't already have a ticket id, we need to know which queue we're talking about
+
+=item Action
-# Everything below this line is a helper sub. most of them will eventually
-# move to Interface::Email
+The action being performed. At the moment, it's one of "comment" or "correspond"
-#When we call die, trap it and log->crit with the value of the die.
-$SIG{__DIE__} = sub {
- unless ($^S || !defined $^S ) {
- $RT::Logger->crit("$_[0]");
- MailError( To => $ErrorsTo,
- Bcc => $RT::OwnerEmail,
- Subject => "RT Critical error. Message not recorded!",
- Explanation => "$_[0]",
- MIMEObj => $entity
- );
- exit(-1);
- }
- else {
- #Get out of here if we're in an eval
- die $_[0];
- }
-};
+=back 4
+It returns two values, the new C<RT::CurrentUser> object, and the new
+authentication level. The authentication level can be zero, not allowed
+to communicate with RT at all, (a "permission denied" error is mailed to
+the correspondent) or one, which is the normal mode of operation.
+Additionally, if C<-1> is returned, then the processing of the plug-ins
+stops immediately and the message is ignored.
+=cut
-1;
diff --git a/rt/bin/rtadmin b/rt/bin/rtadmin
deleted file mode 100644
index 25ba1b06a..000000000
--- a/rt/bin/rtadmin
+++ /dev/null
@@ -1,1040 +0,0 @@
-#!!!PERL!! -w
-#
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/Attic/rtadmin,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent <jesse@fsck.com>
-
-use strict;
-use Carp;
-use Getopt::Long qw(:config pass_through);
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser GetMessageContent);
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-LoadConfig();
-
-#Connect to the database and get RT::SystemUser and RT::Nobody loaded
-DBConnect();
-
-#Drop setgid permissions
-RT::DropSetGIDPermissions();
-
-#Get the current user all loaded
-my $CurrentUser = GetCurrentUser();
-
-unless ($CurrentUser->Id) {
- print "No RT user found. Please consult your RT administrator.\n";
- exit(1);
-}
-
-
-
-
-PickMode();
-
-
-# {{{ Help
-
-sub Help {
-
- # {{{ help_acl
-my $help_acl ="
- Access control
- --grant-right <right>
- --revoke-right <right>
- --userid <user>
- --groupid <group>
- --list-rights";
-
-# }}}
-
- # {{{ help_keyword_sel
-my $help_keyword_sel = "
- Keyword Selections
- --add-keyword-select
- --modify-keyword-select <name>
- --ks-name <name>
- --ks-keyword <keyword>
- --ks-single
- --ks-multiple
- --ks-depth <int>
-
- --disable-keyword-select <name>";
-# }}}
-
- # {{{ help_scrip
-my $help_scrip = "
- Scrips
- --create-scrip
- --scrip-condition <condition name or id>
- --scrip-action <action name or id>
- --scrip-template <template name or id>
-
- --delete-scrip <id>
- --list-scrips";
-
-# }}}
-
- # {{{ help_template
-my $help_template = "
- Templates
- --delete-template [<id>|<name>]
- --display-template [<id>|<name>]
-
- --create-template
- --modify-template [<id>|<name>]
- Flags for --create-template and --modify-template
- --template-name
- --template-description
- --template-edit-content
-
- --list-templates";
-
-# }}}
-
-
-print <<EOF;
-
-USAGE: rtadmin --user <userid> [Userflags]
- rtadmin --list-users
- rtadmin --queue <queueid> [Queueflags]
- rtadmin --list-queues
- rtadmin --group [groupflags]
- rtadmin --list-groups
- rtadmin --system [SystemFlags]
- rtadmin --keyword [keywordflags]
-
-User configuration for --user <userid>
-
- --disable
- --create
- --display
-
- Core Attributes
- --userid
- --gecos
- --password
- --emailaddress
- --privileged
- --comments
- --signature
- --organization
-
- Names
- --realname
- --nickname
-
- Auth and external info
- --externalcontactinfoid
- --contactinfosystem
- --externalauthid
- --authsystem
-
- Phone numbers
- --pagerphone
- --workphone
- --mobilemphone
- --homephone
-
- Paper address
- --address1
- --address2
- --city
- --state
- --zip
- --country
- --freeformcontactqinfo
-
-
-Group Configuration for --group <groupid>
- --create
- --delete
- --display
-
- --name <new name>
- --description <new description>
-
-
-
- --add-member <userid>
- --delete-member <userid>
- --list-members
-
-Queue Configuration for --queue <queueid>
- --create
- --disable
- --display
-
- --name <name>
- --correspondaddress <email address>
- --commentaddress <email address>
- --initialpriority <int>
- --finalpriority <int>
- --defaultduein <days>
-
- --add-cc <email address>
- --delete-cc <email address>
- --add-admincc <email address>
- --delete-admincc <email address>
- --list-watchers
-
-
-
-$help_acl
-
-$help_keyword_sel
-
-$help_template
-
-$help_scrip
-
-
-System configuration for --system
-
-$help_acl
-
-$help_keyword_sel
-
-$help_template
-
-$help_scrip
-
-
-Keyword configuration for --keyword <fully qualified name>
- --list-children
- --create-child <name>
- --disable
- --name <new name>
- --description <new description>
-
-EOF
-
-
-
-}
-
-# }}}
-
-# {{{ PickMode
-
-sub PickMode {
- my ($user,$group, $queue, $system, $keyword, $listusers,
- $listgroups, $listqueues, $help);
-
-
- GetOptions ('help|h|usage' => \$help,
- 'user=s' => \$user,
- 'queue=s' => \$queue,
- 'group=s' => \$group,
- 'system' => \$system,
- 'keyword=s', => \$keyword,
- 'list-users' => \$listusers,
- 'list-queues' => \$listqueues,
- 'list-groups' => \$listgroups,
- );
-
-
-
- if ($user) { AdminUser($user) }
- elsif ($group) { AdminGroup($group) }
- elsif ($queue) { AdminQueue($queue) }
- elsif ($system) { AdminSystem($system) }
- elsif ($keyword) { AdminKeywords($keyword) }
- elsif ($listusers) { ListUsers() }
- elsif ($listgroups) { ListGroups() }
- elsif ($listqueues) { ListQueues() }
- elsif ($help) { Help()}
- else {
- print "No command found\n";
- }
- exit(0);
-}
-
-# }}}
-
-# {{{ AdminUser
-
-sub AdminUser {
- my $user=shift;
- my %args;
-
- GetOptions(\%args,
- 'create', 'disable|delete', 'display',
- 'Name=s', 'Gecos=s', 'Password=s',
- 'EmailAddress=s', 'Privileged=s', 'Comments=s', 'Signature=s',
- 'Organization=s', 'RealName=s', 'NickName=s',
- 'ExternalContactInfoId=s', 'ContactInfoSystem=s',
- 'ExternalAuthId=s', 'AuthSystem=s',
- 'HomePhone=s', 'WorkPhone=s', 'MobilePhone=s', 'PagerPhone=s',
- 'Address1=s', 'Address2=s', 'City=s', 'State=s', 'Zip=s',
- 'Country=s', 'FreeformContactInfo=s');
-
- my $user_obj = new RT::User($CurrentUser);
-
-
- #Create the user if we need to
- if ($args{'create'}) {
- my ($status, $msg) =
- $user_obj->Create( Name => ($args{'Name'} || $user),
- Gecos => $args{'Gecos'},
- Password => $args{'Password'},
- EmailAddress => $args{'EmailAddress'},
- Privileged => $args{'Privileged'},
- Comments => $args{'Comments'},
- Signature => $args{'Signature'},
- Organization => $args{'Organization'},
- RealName => $args{'RealName'},
- NickName => $args{'NickName'},
- ExternalContactInfoId => $args{'ExternalContactInfoId'},
- ContactInfoSystem => $args{'ContactInfoSystem'},
- ExternalAuthId => $args{'ExternalAuthId'},
- AuthSystem => $args{'AuthSystem'},
- HomePhone => $args{'HomePhone'},
- WorkPhone => $args{'WorkPhone'},
- MobilePhone => $args{'MobilePhone'},
- PagerPhone => $args{'PagerPhone'},
- Address1 => $args{'Address1'},
- Address2 => $args{'Address2'},
- City => $args{'City'},
- State => $args{'State'},
- Zip => $args{'Zip'},
- FreeformContactInfo => $args{'FreeformContactInfo'}
- );
-
- print "$msg\n";
- return();
-
- }
- else {
-
-
- #Load the user
- $user_obj->Load($user);
-
- unless ($user_obj->id) {
- print "User '$user' not found\n";
- return();
- }
-
-
-
- #modify the user if we need to
- my @attributes = ('Name', 'Gecos',
- 'EmailAddress', 'Privileged', 'Comments', 'Signature',
- 'Organization', 'RealName', 'NickName',
- 'ExternalContactInfoId', 'ContactInfoSystem',
- 'ExternalAuthId', 'AuthSystem',
- 'HomePhone', 'WorkPhone', 'MobilePhone', 'PagerPhone',
- 'Address1', 'Address2', 'City', 'State', 'Zip',
- 'Country', 'FreeformContactInfo');
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"$attrib"})) and
- ($user_obj->$attrib() ne $args{"$attrib"})) {
-
- my $method = "Set$attrib";
- my ($val, $msg) = $user_obj->$method($args{"$attrib"});
- print "User ".$user_obj->Name. " $attrib: $msg\n";
-
- }
- }
-
- if (exists ($args{'Password'})) {
- my ($code, $msg);
- ($code, $msg) = $user_obj->SetPassword($args{'Password'});
- print "User ". $user_obj->Name. ' Password: '. $msg . "\n";
- }
-
- #Check if we need to display the user
- if ($args{'display'}) {
- foreach my $attrib (@attributes) {
- next if ($attrib eq 'Password'); #Can't see the password
- printf("%22.22s %-64s\n",$attrib, ($user_obj->$attrib()||'(undefined)'));
-
- }
- }
-
- #Check if we need to delete the user
- if ($args{'disable'}) {
- my ($val, $msg) = $user_obj->SetDisabled(1);
- print "$msg\n";
- }
-
- }
-}
-
-# }}}
-
-# {{{ AdminQueue
-
-sub AdminQueue {
- my $queue=shift;
- my %args;
-
- GetOptions(\%args,
- 'create', 'disable|delete', 'display',
- 'Name=s', 'CorrespondAddress=s', 'Description=s',
- 'CommentAddress=s', 'InitialPriority=n', 'FinalPriority=n',
- 'DefaultDueIn=n',
-
- 'add-cc=s@', 'add-admincc=s@',
- 'delete-cc=s@', 'delete-admincc=s@',
- 'list-watchers', 'create-template'
- );
-
- use RT::Queue;
- my $queue_obj = new RT::Queue($CurrentUser);
-
- #Create the queue if we need to
- if ($args{'create'}) {
- my ($status, $msg) =
- $queue_obj->Create(
- Name => ($args{'Name'} || $queue) ,
- CorrespondAddress => $args{'CorrespondAddress'},
- Description => $args{'Description'},
- CommentAddress => $args{'CommentAddress'},
- InitialPriority => $args{'InitialPriority'},
- FinalPriority => $args{'FinalPriority'},
- DefaultDueIn => $args{'DefaultDueIn'}
- );
-
- print "$msg\n";
- }
- else {
- #Load the queue
- $queue_obj->Load($queue);
-
- unless ($queue_obj->id) {
- print "Queue '$queue' not found\n";
- return();
- }
-
- #modify if we need to
- my @attributes = qw(Name CorrespondAddress Description
- CommentAddress InitialPriority FinalPriority
- DefaultDueIn
- );
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"$attrib"})) and
- ($queue_obj->$attrib() ne $args{"$attrib"})) {
-
- my $method = "Set$attrib";
- my ($val, $msg) = $queue_obj->$method($args{"$attrib"});
- print "Queue ".$queue_obj->Name. " $attrib: $msg\n";
-
- }
- }
-
-
- #Check if we need to display the queue
- if ($args{'display'}) {
- foreach my $attrib (@attributes) {
- printf("%22.22s %-64s\n",$attrib, ($queue_obj->$attrib()||'(undefined)'));
-
- }
- }
-
- foreach my $person (@{$args{'add-cc'}}) {
- my ($val, $msg) = $queue_obj->AddCc(Email => $person);
- print "$msg\n";
- }
- foreach my $person (@{$args{'add-admincc'}}) {
- my ($val, $msg) = $queue_obj->AddAdminCc(Email => $person);
- print "$msg\n";
- }
-
- foreach my $person (@{$args{'delete-cc'}}) {
- my ($val, $msg) = $queue_obj->DeleteCc($person);
- print "$msg\n";
- }
- foreach my $person (@{$args{'delete-admincc'}}) {
- my ($val, $msg) = $queue_obj->DeleteAdminCc($person);
- print "$msg\n";
- }
-
- if ($args{'list-watchers'}) {
- require RT::Watchers;
- my $watchers = new RT::Watchers($CurrentUser);
- $watchers->LimitToQueue($queue_obj->id);
- while (my $watcher = $watchers->Next()) {
- printf("%10s %-60s\n",
- $watcher->Type, $watcher->Email );
- }
- }
-
- AdminTemplates($queue_obj->Id());
- AdminScrips($queue_obj->Id());
- AdminRights($queue_obj->Id());
- AdminKeywordSelects($queue_obj->Id());
-
- #Check if we need to delete the queue
- if ($args{'disable'}) {
- my ($val, $msg) = $queue_obj->SetDisabled(1);
- print "$msg\n";
- }
-
- }
-}
-
-# }}}
-
-# {{{ AdminKeywords
-
-sub AdminKeywords {
- my $keyword = shift;
-
- my %args;
- GetOptions(\%args, 'list-children', 'create-child=s', 'disable|delete', 'Name=s', 'Description=s');
-
- use RT::Keyword;
-
- my $key_obj = new RT::Keyword($CurrentUser);
- my $key_id;
-
- #If we're dealing with the root of the keyword list
- if ($keyword eq '/') {
- $key_id=0;
- }
- else {
- my ($val, $msg) = $key_obj->LoadByPath( $keyword );
- unless ($val) {
- print $msg ."\n";
- }
- $key_id = $key_obj->Id();
- }
-
- if ($args{'create-child'}) {
- my $child = new RT::Keyword($CurrentUser);
-
- my ($val, $msg) = $child->Create( Parent => $key_id,
- Name => $args{'create-child'},
- );
- print $msg ."\n";
- }
-
- elsif ($args{'list-children'}) {
- my $keywords;
- if ($key_obj->id) {
- $keywords = $key_obj->Children();
- }
- #If we didn't actually have a keyword object, we need to create our own Keywords object.
- else {
- $keywords = new RT::Keywords($CurrentUser);
- $keywords->LimitToParent(0);
- }
-
- while (my $key=$keywords->Next) {
- print $key->Name;
- if ($key->Description) {
- print " (" . $key->Description .")";
- }
- print "\n";
- }
-
-
- }
-
- #Else we wanna do some modification.
- else {
-
- #If we didn't load a keyword, get out
- return(undef) unless ($key_obj->Id);
-
-
- my @attributes = qw( Name Description );
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"$attrib"})) and
- ($key_obj->$attrib() ne $args{"$attrib"})) {
-
- my $method = "Set$attrib";
- my ($val, $msg) = $key_obj->$method($args{"$attrib"});
-
- print "Keyword ".$key_obj->Name. " $attrib: $msg\n"; }
- }
-
- if ($args{'disable'}) {
- $key_obj->SetDisabled(1);
-
- }
-
- }
-}
-
-# }}}
-
-# {{{ AdminKeywordSelects
-
-sub AdminKeywordSelects {
- my $queue = shift;
- # O for queue means global
-
- my %args;
- GetOptions(\%args, 'add-keyword-select','disable-keyword-select|delete-keyword-select=s',
- 'modify-keyword-select=s',
- 'keyword-select-Keyword|ks-keyword=s',
- 'keyword-select-Single|ks-single',
- 'keyword-select-Multiple|ks-multiple',
- 'keyword-select-Depth|ks-depth=i',
- 'keyword-select-Name|ks-name=s'
- );
-
- # sanitize single vs multiple.
- if ($args{'keyword-select-Multiple'}) {
- $args{'keyword-select-Single'} = 0;
- }
-
- use RT::KeywordSelect;
- my $keysel_obj = new RT::KeywordSelect($CurrentUser);
- if ($args{'add-keyword-select'}) {
-
- my ($val, $msg) = $keysel_obj->Create( Keyword => $args{'keyword-select-Keyword'},
- Depth => $args{'keyword-select-Depth'},
- Single => $args{'keyword-select-Single'},
- Name => $args{'keyword-select-Name'},
- ObjectType => 'Ticket',
- ObjectField => 'Queue',
- ObjectValue => $queue);
- print $msg ."\n";
- }
- elsif ($args{'modify-keyword-select'}) {
- $keysel_obj->LoadByName(Name => $args{'modify-keyword-select'},
- Queue => $queue
- );
-
- unless ($keysel_obj->Id()) {
- print "Keyword select not found\n";
- return();
- }
- my @attributes = qw( Name Keyword Single Depth );
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"keyword-select-$attrib"})) and
- ($keysel_obj->$attrib() ne $args{"keyword-select-$attrib"})) {
-
- my $method = "Set$attrib";
- my ($val, $msg) = $keysel_obj->$method($args{"keyword-select-$attrib"});
-
- print "Keyword select ".$keysel_obj->Name. " $attrib: $msg\n"; }
- }
-
-
- }
-
-
- elsif ($args{'disable-keyword-select'}) {
- $keysel_obj->LoadByName(Name => $args{'disable-keyword-select'},
- Queue => $queue);
-
- $keysel_obj->SetDisabled(1);
-
- }
-}
-
-# }}}
-
-# {{{ AdminGroup
-
-sub AdminGroup {
- my $group = shift;
-
- my (%args);
-
- GetOptions(\%args,
- 'create', 'delete', 'display',
- 'Name=s', 'Description=s',
-
- 'add-member=s@', 'delete-member=s@',
- 'list-members'
- );
-
-
- use RT::Group;
- my $group_obj = new RT::Group($CurrentUser);
- unless ($group) {
- print "Group not specified.\n";
- return();
- }
-
-
- #Create the group if we need to
- if ($args{'create'}) {
- my ($val, $msg) = $group_obj->Create( Name => ($args{'Name'} || $group),
- Description => $args{'Description'} );
- print $msg ."\n";
- }
- #otherwise we load it
- else {
- $group_obj->Load($group);
- }
-
- #If we have no group object, get the hell out
- unless ($group_obj->Id) {
- print "Group not found.\n";
- }
-
- if ($args{'delete'}) {
- my ($val, $msg) = $group_obj->Delete();
- print $msg ."\n";
- return();
- }
-
-
-
- #modify if we need to
- my @attributes = qw(Name Description
-
- );
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"$attrib"})) and
- ($group_obj->$attrib() ne $args{"$attrib"})) {
-
- my $method = "Set$attrib";
- my ($val, $msg) = $group_obj->$method($args{"$attrib"});
- print "Group ".$group_obj->Name. " $attrib: $msg\n";
-
- }
- }
-
- foreach my $user (@{$args{'add-member'}}) {
- my ($val, $msg) = $group_obj->AddMember($user);
- print $msg. "\n";
- }
- foreach my $user (@{$args{'delete-member'}}) {
- my ($val, $msg) = $group_obj->DeleteMember($user);
- print $msg ."\n";
- }
-
- if ($args{'list-members'}) {
- my $members = $group_obj->MembersObj();
- while (my $member = $members->Next()) {
- print $member->UserObj->Name() ."\n";
- }
- }
-
-}
-
-# }}}
-
-# {{{ AdminSystem
-sub AdminSystem {
- print "In AdminSystem\n";
-
- AdminTemplates(0);
- AdminScrips(0);
- AdminRights(0);
- AdminKeywordSelects(0);
-}
-# }}}
-
-# {{{ sub AdminTemplates
-
-sub AdminTemplates {
- my $queue = shift;
- #Queue = 0 means 'global';
-
- my %args;
-
-
- GetOptions(\%args, 'list-templates', 'create-template','modify-template=s',
- 'delete-template=s', 'display-template=s',
- 'template-Name=s', 'template-Description=s',
- 'template-edit-content!');
-
- # {{{ List templates
- if ($args{'list-templates'}) {
- print "Templates for $queue\n";
- require RT::Templates;
- my $templates = new RT::Templates($CurrentUser);
- if ($queue != 0) {
- $templates->LimitToQueue($queue);
- }
- else {
- $templates->LimitToGlobal();
- }
- while (my $template = $templates->Next) {
- print $template->Id.": ".$template->Name." - " . $template->Description ."\n";
- }
- }
-
- # }}}
-
- require RT::Template;
- my $template = new RT::Template($CurrentUser);
- if ($args{'delete-template'}) {
- $template->Load($args{'delete-template'});
- unless ($template->id) {
- print "Couldn't load template";
- return(undef);
- }
- my ($val, $msg) = $template->Delete();
- print "$msg\n";
- }
- elsif ($args{'create-template'}) {
- #TODO edit the template content
- my $content;
-
- my $linesref = GetMessageContent(CurrentUser => $CurrentUser,
- Edit => 1);
-
- $content = join("\n", @{$linesref});
-
-
- my ($val, $msg) = $template->Create(Name => $args{'template-Name'},
- Description => $args{'template-Description'},
- Content => $content,
- Queue => $queue);
- print "$msg\n";
- }
- elsif ($args{'modify-template'}) {
-
- $template->Load($args{'modify-template'});
- unless ($template->Id()) {
- print "Template not found\n";
- return();
- }
- my @attributes = qw( Name Description );
- foreach my $attrib (@attributes) {
- if ( (exists ($args{"template-$attrib"})) and
- ($template->$attrib() ne $args{"template-$attrib"})) {
-
- my $method = "Set$attrib";
- my $val = $template->$method($args{"template-$attrib"});
-
- }
- }
- if ($args{'template-edit-content'}) {
-
- my $linesref = GetMessageContent(CurrentUser => $CurrentUser,
- Content => $template->Content,
- Edit => 1);
-
- my $content = join("\n", @{$linesref});
- my ($val) = $template->SetContent($content);
- print $val."\n";
- }
-
- }
- if ($args{'display-template'}) {
- $template->Load($args{'display-template'});
- print $template->Name . "\n". $template->Description ."\n". $template->Content."\n";
- }
-}
-
-# }}}
-
-# {{{ sub AdminScrips
-
-sub AdminScrips {
- my $queue = shift;
- #Queue = 0 means 'global';
-
- my %args;
-
-
- GetOptions(\%args, 'list-scrips', 'create-scrip','modify-scrip=s',
- 'scrip-action=s', 'scrip-template=s', 'scrip-condition=s',
- 'delete-scrip=s');
-
-
- # {{{ List entries
- if ($args{'list-scrips'}) {
- print "Scrips for $queue\n";
- require RT::Scrips;
- my $scrips = new RT::Scrips($CurrentUser);
- if ($queue != 0) {
- $scrips->LimitToQueue($queue);
- }
- else {
- $scrips->LimitToGlobal();
- }
- while (my $scrip = $scrips->Next) {
- print $scrip->Id.": If ".
- $scrip->ConditionObj->Name." then " .
- $scrip->ActionObj->Name." with template " .
- $scrip->TemplateObj->Name."\n";
- }
- }
-
- # }}}
-
- require RT::Scrip;
- my $scrip = new RT::Scrip($CurrentUser);
- if ($args{'delete-scrip'}) {
- $scrip->Load($args{'delete-scrip'});
- unless ($scrip->id) {
- print "Couldn't load scrip";
- return(undef);
- }
- my ($val, $msg) = $scrip->Delete();
- print "$msg\n";
- }
- elsif ($args{'create-scrip'}) {
- my ($val, $msg) = $scrip->Create( ScripAction => $args{'scrip-action'},
- ScripCondition => $args{'scrip-condition'},
- Template => $args{'scrip-template'},
- Queue => $queue);
-
- print "$msg\n";
- }
-}
-
-# }}}
-
-# {{{ sub AdminRights
-
-sub AdminRights {
- my $queue = shift;
- #Queue = 0 means 'global';
-
- my ($scope, $appliesto);
- if ($queue == 0) {
- $scope = 'System';
- $appliesto = 0;
- }
- else {
- $scope = 'Queue';
- $appliesto = $queue;
- }
-
- my %args;
- GetOptions(\%args,
- 'grant-right|add-right|new-right|create-right=s@',
- 'revoke-right|del-right|delete-right=s@',
- 'list-rights', 'userid=s@', 'groupid=s@',
- );
-
-
- # {{{ List entries
- if ($args{'list-rights'}) {
- require RT::ACL;
- my $acl = new RT::ACL($CurrentUser);
- if ($queue != 0) {
- $acl->LimitToQueue($queue);
- }
- else {
- $acl->LimitToSystem();
- }
- while (my $ace = $acl->Next) {
- print $ace->RightScope;
-
- #Print the queue name if we have it.
- print " " . $ace->AppliesToObj->Name if (defined $ace->AppliesToObj);
-
- print ": ". $ace->PrincipalType . " " .$ace->PrincipalObj->Name .
- " has right " . $ace->RightName ."\n";
-
- }
- }
-
- # }}}
-
- require RT::ACE;
-
- # {{{ Build up an array of principals
- my (@principals);
- my $i = 0;
- foreach my $group (@{$args{'groupid'}}) {
-
-
- my $princ = new RT::Group($CurrentUser);
- $princ->Load("$group");
- if ($princ->id) {
- $principals[$i]->{'type'} = 'Group';
- $principals[$i]->{'id'} = $princ->id();
- $i++;
- }
- else {
- print "Could not find group $group\n";
- }
- }
-
-
- foreach my $user (@{$args{'userid'}}) {
- my $princ = new RT::User($CurrentUser);
- $princ->Load("$user");
- if ($princ->id) {
- $principals[$i]->{'type'} = 'User';
- $principals[$i]->{'id'} = $princ->id();
- $i++;
- }
- else {
- print "Could not find user $user.\n";
- }
- }
- # }}}
-
-
- foreach my $principal (@principals) {
-
- # {{{ Delete rights that need deleting
- foreach my $right (@{$args{'revoke-right'}}) {
- my $ace = new RT::ACE($CurrentUser);
- $RT::Logger->debug("Trying to delete a right: $right \n");
- my ($val, $msg) = $ace->LoadByValues( RightName => $right,
- RightScope => $scope,
- PrincipalType => $principal->{'type'},
- PrincipalId => $principal->{'id'},
- RightAppliesTo => $appliesto);
-
- unless ($val) {
- print "Right $right not found for" . $principal->{'type'} . " " .
- $principal->{'id'} . " in scope $scope ($appliesto)\n";
- next;
- }
- my ($delval, $delmsg) =$ace->Delete;
- print "$delmsg\n";
-
-
- }
-
- # }}}
-
- # {{{ grant rights that need granting
- foreach my $right (@{$args{'grant-right'}}) {
- my $ace = new RT::ACE($CurrentUser);
- my ($val, $msg) = $ace->Create(RightName => $right,
- PrincipalType => $principal->{'type'},
- PrincipalId => $principal->{'id'},
- RightScope => $scope,
- RightAppliesTo => $appliesto);
-
- print $msg . "\n";
- }
-
- # }}}
- }
-
-}
-
-# }}}
-
-
-sub ListUsers {
- require RT::Users;
- my $users = new RT::Users($CurrentUser);
- $users->UnLimit();
- while (my $user = $users->Next()) {
- printf ("%16s %-16s\n",$user->Name(), $user->EmailAddress());
- }
-}
-sub ListQueues {
- require RT::Queues;
- my $queues = new RT::Queues($CurrentUser);
- $queues->UnLimit();
- while (my $queue = $queues->Next()) {
- printf ("%16s %-16s\n",$queue->Name(), $queue->Description());
- }
-}
-
-sub ListGroups {
- require RT::Groups;
- my $groups = new RT::Groups($CurrentUser);
- $groups->UnLimit();
- while (my $group = $groups->Next()) {
- printf ("%16s %-16s\n",$group->Name(), $group->Description());
- }
-}
diff --git a/rt/bin/webmux.pl b/rt/bin/webmux.pl
index 6e1ae06de..21cb83f5e 100755
--- a/rt/bin/webmux.pl
+++ b/rt/bin/webmux.pl
@@ -1,177 +1,125 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/bin/Attic/webmux.pl,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# RT is (c) 1996-2000 Jesse Vincent (jesse@fsck.com);
+#!/usr/bin/perl
+# 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
use strict;
-$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'};
+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'};
+}
-# We really don't want apache to try to eat all vm
-# see http://perl.apache.org/guide/control.html#Preventing_mod_perl_Processes_Fr
-
+use lib ("/opt/rt3/local/lib", "/opt/rt3/lib");
+use RT;
package RT::Mason;
-use CGI qw(-private_tempfiles); #bring this in before mason, to make sure we
- #set private_tempfiles
-use HTML::Mason::ApacheHandler (args_method => 'CGI');
-use HTML::Mason; # brings in subpackages: Parser, Interp, etc.
-
-use vars qw($VERSION %session $Nobody $SystemUser $r $m);
+use CGI qw(-private_tempfiles); #bring this in before mason, to make sure we
+ #set private_tempfiles
-# List of modules that you want to use from components (see Admin
-# manual for details)
-
-#Clean up our umask...so that the session files aren't world readable, writable or executable
-umask(0077);
+BEGIN {
+ if ($CGI::MOD_PERL) {
+ require HTML::Mason::ApacheHandler;
+ }
+ else {
+ require HTML::Mason::CGIHandler;
+ }
+}
+use HTML::Mason; # brings in subpackages: Parser, Interp, etc.
-
-$VERSION="!!RT_VERSION!!";
+use vars qw($Nobody $SystemUser $r);
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
+#This drags in RT's config.pm
+RT::LoadConfig();
-#This drags in RT's config.pm
-use config;
use Carp;
-{
- package HTML::Mason::Commands;
- use vars qw(%session $m);
-
- use RT;
- use RT::Ticket;
- use RT::Tickets;
- use RT::Transaction;
- use RT::Transactions;
- use RT::User;
- use RT::Users;
- use RT::CurrentUser;
- use RT::Template;
- use RT::Templates;
- use RT::Queue;
- use RT::Queues;
- use RT::ScripAction;
- use RT::ScripActions;
- use RT::ScripCondition;
- use RT::ScripConditions;
- use RT::Scrip;
- use RT::Scrips;
- use RT::Group;
- use RT::Groups;
- use RT::Keyword;
- use RT::Keywords;
- use RT::ObjectKeyword;
- use RT::ObjectKeywords;
- use RT::KeywordSelect;
- use RT::KeywordSelects;
- use RT::GroupMember;
- use RT::GroupMembers;
- use RT::Watcher;
- use RT::Watchers;
- use RT::Handle;
- use RT::Interface::Web;
- use MIME::Entity;
- use Text::Wrapper;
- use Apache::Cookie;
- use Date::Parse;
- use HTML::Entities;
-
- #TODO: make this use DBI
- use Apache::Session::File;
-
- # Set this page's content type to whatever we are called with
- sub SetContentType {
- my $type = shift;
- $RT::Mason::r->content_type($type);
- }
-
- sub CGIObject {
- $m->cgi_object();
- }
-
- }
-my ($parser, $interp, $ah);
-if ($HTML::Mason::VERSION < 1.0902) {
- $parser = &RT::Interface::Web::NewParser(allow_globals => [%session]);
-
- $interp = &RT::Interface::Web::NewInterp(parser=>$parser,
- allow_recursive_autohandlers => 1,
- );
-
- $ah = &RT::Interface::Web::NewApacheHandler($interp);
-} else {
- $ah = &RT::Interface::Web::NewMason11ApacheHandler();
+{
+ package HTML::Mason::Commands;
+ use vars qw(%session);
+
+ use RT::Tickets;
+ use RT::Transactions;
+ use RT::Users;
+ use RT::CurrentUser;
+ use RT::Templates;
+ use RT::Queues;
+ use RT::ScripActions;
+ use RT::ScripConditions;
+ use RT::Scrips;
+ use RT::Groups;
+ use RT::GroupMembers;
+ use RT::CustomFields;
+ use RT::CustomFieldValues;
+ use RT::TicketCustomFieldValues;
+
+ use RT::Interface::Web;
+ use MIME::Entity;
+ use Text::Wrapper;
+ use CGI::Cookie;
+ use Time::ParseDate;
+ use HTML::Entities;
}
-# Activate the following if running httpd as root (the normal case).
-# Resets ownership of all files created by Mason at startup.
-#
-chown (Apache->server->uid, Apache->server->gid,
- [$RT::MasonSessionDir]);
-
-
-chown (Apache->server->uid, Apache->server->gid,
- $ah->interp->files_written);
-# Die if WebSessionDir doesn't exist or we can't write to it
-stat ($RT::MasonSessionDir);
-die "Can't read and write $RT::MasonSessionDir"
- unless (( -d _ ) and ( -r _ ) and ( -w _ ));
+# Activate the following if running httpd as root (the normal case).
+# Resets ownership of all files created by Mason at startup.
+# Note that mysql uses DB for sessions, so there's no need to do this.
+unless ($RT::DatabaseType =~ /(mysql|Pg)/) {
+ # Clean up our umask to protect session files
+ umask(0077);
+
+if ( $CGI::MOD_PERL) {
+ chown( Apache->server->uid, Apache->server->gid, [$RT::MasonSessionDir] )
+ if Apache->server->can('uid');
+ }
+ # Die if WebSessionDir doesn't exist or we can't write to it
+ stat($RT::MasonSessionDir);
+ die "Can't read and write $RT::MasonSessionDir"
+ unless ( ( -d _ ) and ( -r _ ) and ( -w _ ) );
+}
+my $ah = &RT::Interface::Web::NewApacheHandler() if $CGI::MOD_PERL;
sub handler {
($r) = @_;
-
+
RT::Init();
-
+
# We don't need to handle non-text items
- return -1 if defined($r->content_type) && $r->content_type !~ m|^text/|io;
-
- #This is all largely cut and pasted from mason's session_handler.pl
-
- my %cookies = Apache::Cookie::parse($r->header_in('Cookie'));
-
- eval {
- tie %HTML::Mason::Commands::session, 'Apache::Session::File',
- ( $cookies{'AF_SID'} ? $cookies{'AF_SID'}->value() : undef ),
- { Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- } ;
- };
-
- if ( $@ ) {
- # If the session is invalid, create a new session.
- if ( $@ =~ m#^Object does not exist in the data store# ) {
- tie %HTML::Mason::Commands::session, 'Apache::Session::File', undef,
- { Directory => $RT::MasonSessionDir,
- LockDirectory => $RT::MasonSessionDir,
- };
- undef $cookies{'AF_SID'};
- }
- else {
- die "RT Couldn't write to session directory '$RT::MasonSessionDir'. Check that this directory's permissions are correct.";
- }
- }
-
- if ( !$cookies{'AF_SID'} ) {
- my $cookie = new Apache::Cookie
- ($r,
- -name=>'AF_SID',
- -value=>$HTML::Mason::Commands::session{_session_id},
- -path => '/',);
- $cookie->bake;
+ return -1 if defined( $r->content_type ) && $r->content_type !~ m|^text/|io;
- }
+ my %session;
my $status = $ah->handle_request($r);
- untie %HTML::Mason::Commands::session;
-
+ undef (%session);
+
+ $RT::Logger->crit("Transaction not committed. Usually indicates a software fault. Data loss may have occurred") if $RT::Handle->TransactionDepth;
return $status;
-
- }
-1;
+}
+1;
diff --git a/rt/docs/design_docs/acls b/rt/docs/design_docs/acls
index 3b9d8567c..bb093adcb 100644
--- a/rt/docs/design_docs/acls
+++ b/rt/docs/design_docs/acls
@@ -1,206 +1,50 @@
-$Header: /home/cvs/cvsroot/freeside/rt/docs/design_docs/acls,v 1.1 2002-08-12 06:17:07 ivan Exp $
+Does principal baz have right foo for object bar
-# {{{ Requirements
+What rights does user baz have for object bar
-Here's the rough scheme I was thinking of for RT2 acls. Thoughts? I think
-it's a lot more flexible than RT 1.0, but not so crazily complex that
-it will be impossible to implement. One of the "interesting" features
-is the ability to grant acls based on watcher status. This now lives
-in design-docs/acls
+# {{{ Which principals have right foo for object bar
- jesse
-Who can rights be granted to:
+if ($args{'ObjectType'} eq 'Ticket') {
+ $or_check_ticket_roles = " OR ( Groups.Domain = 'TicketRole' AND Groups.Instance = '".$args{'ObjectId'}."') ";
+ # If we're looking at ticket rights, we also want to look at the associated queue rights.
+ # this is a little bit hacky, but basically, now that we've done the ticket roles magic, we load the queue object
+ # and ask all the rest of our questions about the queue.
+ my $tick = RT::Ticket->new($RT::SystemUser);
+ $tick->Load($args{'ObjectId'});
+ $args{'ObjectType'} = 'Queue';
+ $args{'ObjectId'} = $tick->QueueObj->Id();
- users whose id is <foo>
- users who are watchers of type <requestor/cc/admincc> for <queue/ticket> <id>
- users who are watchers of type <requestor/cc/admincc> for <this ticket / this queue>
-
-
-what scope do these rights apply to
- queue <id>
- system
-
-
-What rights can be granted
- Display Ticket
- Manipulate Ticket
- Only users with manipulate ticket level access will see comments
- Maniplulate Ticket Status
- Create Ticket
-
- Admin Queue Watchers
- Admin Ticket Watchers
- Admin user accounts
- Admin scrips
- Admin scripscopes
- Admin Queue ACLS
- Admin System ACLs
-
-# }}}
-
-
-# {{{ Prinicpals These are the entities in your Access Control Element
-#
-
-Principal: What user does this right apply to
-
- Made up of:
- PrincipalScope, PrincipalType and PrincipalId
-
-
- User:
- Scope: User
- Type: null
- Id: A userid or 0
-
- Owner:
- Scope: Owner
- Type: null
- Id: none
-
-
- Watchers:
-
- Scope: Ticket
- Type: Requestors; Cc; AdminCc
- Id: A ticket id or 0 for "this ticket"
-
- Scope: Queue
- Type: Cc; AdminCc
- Id: A queue id or 0 for "this queue"
-
-
-# }}}
-
-# {{{ Object: What object does this right apply to
-
- Object is composed of an ObjectType and an ObjectId
-
- Type: System
- Id: NULL
-
- Type: Queue
- Id: Integer ref to queue id or 0 for all queues
-
-# }}}
-
-# {{{ Right: (What does this entry give the principal the right to do)
-
-
-
- For the Object System:
- System::SetACL
- System::AdminScrips
-
- User::Display
- User::Create
- User::Destroy
- User::Modify
- User::SetPassword
-
-
-
- For the Object "Queue":
- Queue::Admin
- Queue::SetACL
- Queue::Create
- Queue::Display
- Queue::Destroy
- Queue::ModifyWatchers
- Ticket::Create
- Ticket::Destory
- Ticket::Display
- Ticket::Update
- Ticket::UpdateRequestors
- Ticket::UpdateCc
- Ticket::UpdateAdminCc
- Ticket::NotifyWatchers
-
-
- DEFERRED
-
- Ticket::SetStatus: (Values)
- Open
- Resolved
- Stalled
- <null> means any
-
-
-# }}}
-
-
-# {{{ Implementation:
-
-# {{{ SQL Schema
-CREATE TABLE ACL (
- id int not null primary_key autoincrement,
- PrinicpalId INT(11),
- PrincipalType VARCHAR(16),
- PrincipalScope VARCHAR(16),
- ObjectType VARCHAR(16),
- ObjectId INT,
- Right VARCHAR(16)
-);
-
-# }}}
-
-# {{{ perl implementation of rights searches
-
-sub Principals {
-if (defined $Ticket) {
- return "($UserPrincipal) OR ($OwnerPrincipal) OR ($WatchersPrincipal)";
- }
-else {
- return "($UserPrincipal) OR ($WatchersPrincipal)";
- }
}
-
-$Principals = " ($UserPrincipal) OR ($OwnerPrincipal) OR ($WatchersPrincipal)";
-
-$UserPrincipal = " ( ACE.PrincipalScope = 'User') AND
- ( ACE.PrincipalId = $User OR ACE.PrincipalId = 0)";
-
-$OwnerPrincipal = " ( ACE.PrinciaplScope = 'Owner') AND
- ( Tickets.Owner = "$User ) AND
- ( Tickets.Id = $Ticket)";
-
-$WatchersPrincipal = " ( ACE.PrincipalScope = Watchers.Scope ) AND
- ( ACE.PrincipalType = Watchers.Type ) AND
- ( ACL.PrincipalId = Watchers.Value ) AND
- ( Watchers.Owner = $User )";
-
-$QueueObject = "( ACE.ObjectType = 'Queue' and (ACE.ObjectId = $Queue OR ACE.ObjectId = 0)";
-
-$SystemObject = "( ACE.ObjectType = 'System' )";
-
-
-# This select statement would figure out if A user has $Right at the queue level
-
-SELECT ACE.id from ACE, Watchers, Tickets WHERE (
- $QueueObject
- AND ( ACE.Right = $Right)
- AND ($Principals))
+if ($args{'ObjectType'} eq 'Queue') {
+ $or_check_roles = " OR ( ( (Groups.Domain = 'QueueRole' AND Groups.Instance = '".$args{'ObjectId'}."') $or_check_ticket_roles )
+ AND Groups.Type = ACL.PrincipalType AND Groups.Id = Principals.ObjectId AND Principals.PrincipalType = 'Group') ";
+}
-# This select statement would figure outif a user has $Right for the "System"
+if (defined $args{'ObjectType'} ) {
+ $or_look_at_object_rights = " OR (ACL.ObjectType = '".$args{'ObjectType'}."' AND ACL.ObjectId = '".$args{'ObjectId'}."') ";
-SELECT ACE.id from ACE, Watchers, Tickets WHERE (
- ($SystemObject) AND ( ACE.Right = $Right ) AND ($Principals))
+}
-# }}}
+my $query = "SELECT Users.* from ACL, Groups, Users, Principals, Principals UserPrinc, CachedGroupMembers WHERE
+ Users.id = UserPrinc.ObjectId AND UserPrinc.PrincipalType = 'User' AND
+ Principals.Id = CachedGroupMembers.GroupId AND
+ CachedGroupMembers.MemberId = UserPrinc.ObjectId AND
+ UserPrinc.PrincipalType = 'User' AND
+ (ACL.RightName = 'SuperUser' OR ACL.RightName = '$right') AND
+ (ACL.ObjectType = 'System' $or_look_at_object_rights) AND
+ (
+ (ACL.PrincipalId = Principals.Id AND
+ Principals.ObjectId = Groups.Id AND
+ ACL.PrincipalType = 'Group' AND
+ (Groups.Domain = 'SystemInternal' OR Groups.Domain = 'UserDefined' OR Groups.Domain = 'ACLEquivalence')
+ )
+ $or_check_roles
+ )";
# }}}
-# {{{ Examples
-#
-
-# }}}
-
-
-
-Unaddressed issues:
-
- There needs to be a more refined method for grouping users, such that members of the customer service department
-can't change sysadmins' passwords.
+What objects does principal baz have right foo for
+;
diff --git a/rt/docs/design_docs/basic-definitions.txt b/rt/docs/design_docs/basic-definitions.txt
deleted file mode 100644
index 23d2c5748..000000000
--- a/rt/docs/design_docs/basic-definitions.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-(todo ... basically, those are untouched from 1.0)
-Ticket
-Queue
-(...more?)
-
-Requestor
-
- (...definition of a requestor .. blahblah)
-
- I'm often doing a distinction between "Internal Requestors" and "External
- Requestors" (see below). The system doesn't make any difference between
- requestors, but the distinction might be useful to discuss usage patterns,
- templates and configurations.
-
-
-External Requestor
-
- Might be a customer or a potential customer. The External Requestor
- should be treated as a VIP. (S)he shouldn't need to see too much of RT.
- The support (s)he gets should be as personal as possible. The external
- requestor might eventually get access to the Web UI, but only to track
- her/his own requests. If you're not planning to use RT for handling
- external customers, all your requestors are probably "Internal
- Requestors".
-
-
-Watcher
-
- Somebody that are "subscribing" to a queue or a ticket (or something
- differently). Basicly, somebody watching a queue or a ticket should get
- all updates by email. A requestor is a (special) watcher.
-
-
-Regular Watcher
-
- People within the same organization, people that have read access to whole
- queues.
-
- I consider "Regular Watchers" as well as "Internal Requestors" as more
- robust and capable human beeings than the fragile customers. We don't
- mind letting them get entagled with RT, and we let them access the Web UI.
- They can live with beeing just the Cc or Bcc at an email.
-
-
-Internal Requestor
-
- An Internal Requestor is usually internal to the company. He might be 1st
- line support sending matters to tech support or similar. Might be an
- internal employee sending matters to tech support (or even 1st line
- support if he's not sure where to send matters). It might also be that
- "ordinary" requestors actually might be treated as intelligent human
- beeings rather than VIPs, i.e. in open source projects ... we'll still
- call them "Internal Requestors" as they don't need the special VIP
- treatment.
diff --git a/rt/docs/design_docs/cli_spec b/rt/docs/design_docs/cli_spec
index 48a7f34e1..ae5f29f76 100644
--- a/rt/docs/design_docs/cli_spec
+++ b/rt/docs/design_docs/cli_spec
@@ -1,354 +1,31 @@
-Find tickets to operate on:
- --id=<tickets> Find only tickets in the range <tickets>
- synonyms:
- --limit-id, --tickets, --limit-tickets
- --limit-queue=<queue>
- --limit-status=<status>
- --limit-owner=<owner>
- --limit-priority=<priority>
- --limit-requestor=<email>
- --limit-subject=<string> (Subject contains)
- --limit-body=<string> (body contains)
- --limit-created=(before/after) <date>
- --limit-due=(before/after) <date>
- --limit-starts=(before/after) <date>
- --limit-started=(before/after) <date>
+Things the cli must do
+ create ticket
+ comment
+ reply
+ update ticket metadata
+ search for tickets
+ update a bunch of tickets.
+ list tickets
+ login/logout
- --limit-first=<int> Start on the <int>th row returned by the
- database
- --limit-rows=<int> Find only <int> rows
-Display:
- --show shows a ticket history
- --history ditto
+should support multiple rt servers
- --summary default option. shows a ticket summary
- --format Optional format string. If not specified,
- uses the value of ENV{'RT_LISTING_FORMAT'}
- or an internal default
-
+create/edit/update should use EDITOR or take from a file or stdin
-Basic ticket editing:
+should be able to update ticket sttributes from a commandline without invoking an editor or needing to use stdin.
- --status=(open|stall|resolve|kill)
- --subject=<string>
- --owner=<owner>
- --queue=<queue>
- --time-left=<minutes>
+login/logout should store RT session cookies rather than constantly transmitting the username/password combo.
-Watcher-related editing:
+rtserver and rt username should come from env variables. but should be able to be overridden by commandline options.
- --add-requestor=<email>
- --del-requestor=<email>
- --add-cc=<email>
- --del-cc=<email>
- --add-admincc=<email>
- --del-admincc=<email>
+rt password should be able to be specified on the commandline (say from a script) or, failing that be prompted for within the application (as rt's sbin/initdb script does) ...or maybe able to be read from a stash file on disk.
-Priority related editing:
+must be able to dowaload attachments from cli.
+
+ it might also be cool to be able to generate session-length urls for attavhments so you can use a browser. but that's not necessary.
- --priority=<int>
- --final-priority=<int>
-Date related editing:
-
- --due=date
- --starts=date
- --started=date
- --contacted=date
-
-
-
-Ticket updates:
-
- --comment
- --reply | --respond
-
-
-Links
-
- --add-link
- --type=<DependsOn|MemberOf|RelatedTo>
- needs one of:
- --target=<ticketid>
- --base=<ticketid>
-
- --del-link <link-id>
-
-
-
-Condiments:
- any update can take:
-
- --time-taken <minutes>
-
- Ticket updates can take:
-
- --source -- specify a source file to read the content from
- --edit = give me an editor to edit the message
- --no-edit = don't give me an editor to edit the message.
-
-
-
-
------ Forwarded message from deborah kaplan <deborah@curl.com> -----
-
-Date: Fri, 14 Apr 2000 11:43:18 -0400 (EDT)
-From: deborah kaplan <deborah@curl.com>
-To: Jesse <jesse@fsck.com>
-Subject: Re: [rt-devel] RT Projects list
-
-Finally, here is the functional spec for the command line
-interface. This is for the user interface only; if you think
-this is right, I will add the administrative interface as well.
-Should I post to rt-devel, add to the ticket, or just modify
-based on your kibbitzing? When you are happy with it I'll start
-the code.
-
--deborah
-
-
-RT command line interface functional specification
-Author: Deborah Kaplan (Deborah@suberic.net)
-Version:0.1
-
-Requirements:
-
-RT needs a CLI for various reasons. If a user is restricted to a
-dumb terminal, she needs to be able to access the RT database and
-manipulate it fully. The full functionality of both the RT
-database and the RT administrative interface should be available
-from this CLI.
-
-There are two possible types of CLI which I will discuss here.
-The first is a curses-style interface, which allows the user to
-move about a series of menus and choices, usually using arrow
-keys. As RT supplies a Web interface, there is no need for this
-curses-style interface to be written as part of RT. Instead, the
-RT developers should pick one tty-based Web browser (e.g. lynx,
-w3m) and make sure that all of the RT pages are easily readable
-with that tty based browser. Installation of that browser should
-be recommended in the RT installation documentation as a
-supported method of accessing RT from a tty.
-
-The second possible type of CLI is more minimal: a series of
-commands which can be run at a UNIX command prompt which provide
-full functionality to the RT database and administrative
-interface. There are two major benefits to this second type of
-CLI. First of all, in order to use this CLI, you need no extra
-tools (Web browsers, etc.). All that is required is a UNIX
-command line prompt and an installation of RT. Secondly, a user
-of RT who has a very specific command to run and who knows the
-appropriate CLI commands can accomplish her task much more
-quickly with a single command then she could navigating through a
-menu based interface.
-
-In the specification, I will describe the second type of CLI.
-
-Caveats:
-
-This specification draws heavily on the structure of formatting
-command line options for cvs. RT faces a smaller version of the
-same kinds of problems cvs faces: we want to create a very rich
-command set without sacrificing ease-of-use.
-
-I am not wedded to any specific command names if they seem
-impractical; I merely am proposing the command names that seem
-reasonable to me at this moment.
-
-Finally, I am finding the functioning of the web UI from RT 1.
-If the functionality differs greatly in RT 2, I will need to
-modify this specification.
-
-Specification:
-
-There are two commands: "rt", which is the primary interface to
-the database, and "rtadmin", which is the administrative
-interface to the database.
-
-The format of an rt command is as follows:
-
- rt <command>
- <command> is one of:
-
- - help
- print an overview of the commands which can be run
-
- - print <queue> <options>
- with no options, dump to the screen a list of all open
- requests in <queue> -- the equivalent of "Display Queue" in
- the existing Web interface.
-
- <queue> is the name of an RT queue
- <option> is either:
-
- -f <filename> | --filename <filename>
- where <filename> is the name of a file (defaulting to
- ~/.rtrc) in which the options described below can be
- placed in the format "^ <long option name> <option value>
- $".
-
- Or a series of the following options:
-
- -o <owner name> | --owner <owner name>: restrict tickets
- viewed to those owned by <owner name>.
- This option can be used multiple times in one call of
- the rt command in order to produce a list which
- contains tickets owned by multiple owners. Giving the
- empty string ("") as an option to this switch will
- restrict tickets viewed to those which have no owner.
- If this switch is given with no argument, the option
- defaults to the user name of the currently running
- process.
-
- -r <requestor name> | --requestor <requestor name>:
- restrict tickets viewed to those requested by <requestor
- name>.
- This option can be used multiple times in one call of
- the rt command in order to produce a list which
- contains tickets requested by multiple requesters. If
- this switch is given with no arguments, it produces an
- error.
-
- -s <status> | --status <status>: restrict tickets viewed
- to those with the status named in <status>.
- This option can be used multiple times in one call of
- the rt command in order to produce a list which
- contains tickets with multiple statuses (statii?
- Dragon NaturallySpeaking recognizes "statuses" as a
- word). This option defaults to status "open".
-
- -j <subject> | --subject <subject>: restrict tickets
- viewed to those which contain <subject> as a substring in
- the subject field of the ticket.
- This command can be used multiple times in one call of
- the rt command in order to produce a list which
- contains tickets with various subject substrings. If
- the option is called with no argument, the result is
- an error.
-
- -h | --help: print a usage message.
-
- -n | --number: print out a specific ticket.
- This command can be used multiple times to produce a
- list which contains multiple tickets. If the option
- is called with no argument, the result is an error.
-
- This completes all of the print options which are available
- in the Web interface, except the sort options. I maintain
- that this command is already excessively complex, and that
- adding functionality which can be replicated easily by
- standard UNIX tools is unnecessary added complexity. I
- recommend that the man pages and documentation for this
- option contain an example of a command line run (e.g. of rt |
- awk) which replicates the sorting functionality provided by
- the Web interface.
-
- - edit <ticket> <options>
- with no options, or with no <ticket>, produces the same
- output as the --help option.
- Otherwise, edits the ticket with number <ticket> as
- indicated in the options given. All options listed below
- except for --help and --number can be used in conjunction
- with one another to change many features of the same ticket
- all at once.
-
- -h | --help: print usage message
-
- -s <status> | --status <status>: change the status to the
- status listed in <status>.
- No <status> listed, or 1 listed it does not come from
- a list of approve statuses, produces an error.
-
- -o <owner name> | --owner <owner name>: set to the owner
- of the ticket the owner named.
- Follows whatever convention is finally decided on for
- the requirement to steal a ticket that is owned by
- somebody else. No <owner named> listed has the user
- who is running the rt program take the ticket. If
- that user is not a valid owner, or the 1 listed does
- not come from a list of approve names, produces an
- error.
-
- -r <requestor name> | --requestor <requestor name>: sets
- the requestor to <requestor name>.
- Follows any conventions that the Web UI follows to
- make sure that this is a legal name. If not legal, or
- left blank, produces an error.
-
- -j <subject> | --subject <subject>: sets the subject of
- the ticket to <subject>.
- If the option is called with no argument, the result
- is an error.
-
- -n <number one> <number 2> | --number <number one>
- <number 2>: merges ticket number <number one> into ticket
- <number 2>.
- If both arguments are not provided, the result is an
- error.
-
- -q <queue> | --queue <queue>: set the queue to that
- named.
- If <queue> is not listed, or the 1 listed does not
- come from a list of approve queues, produces an
- error.
-
- -a <area> | --area <area>: set the area of the ticket to
- that named.
- If <area> is not listed, or the 1 listed does not come
- from a list of approve areas, produces an error.
-
- -c <time stamp> | --contact <time stamp>: sets the last
- user contact field, and produces an error if the format
- is invalid.
- If the argument is left blank, sets the last user
- contact field to now.
-
- -p <priority> | --priority <priority>: sets the current
- priority to the 1 listed.
- Produces an error if the argument is left blank.
-
- -f <priority> | --final <priority>: sets the final
- priority to the 1 listed.
- Produces an error if the arguments left blank.
-
- -d <date due> | --datedue <date due>: sets the due date
- to the 1 listed.
- Produces an error if the argument is left blank, or if
- the format is invalid.
-
- - comment <options>
- with no options, this command reads from standard input
- until it sees EOF and appends that to the ticket as a
- comment.
-
- -h | --help: print usage message
-
- -c | --comment: append as a comment. This is the default behavior.
-
- -r | --reply: append as a reply.
-
- -f <filename> | --file <filename>: can be used with
- either the comment or reply options. Instead of reading
- from standard input, read the text of the comment or
- reply from the file <filename>.
-
- - report <options>
- this command is a place holder for reporting functionality
- which does not yet exist. It will probably have the
- default behavior to select reports at the command line or
- choose default reports from a .rtrc file. In a future
- version, it can output graphs in some graphical format.
-
-
-
------ End forwarded message -----
-
---
-jesse reed vincent -- root@eruditorum.org -- jesse@fsck.com
-70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
-
-"If IBM _wanted_ to make clones, we could make them cheaper and faster than
-anyone else!" - An IBM Rep. visiting Vassar College's Comp Sci Department.
+I'm envisioning this as similar to the subversion cli, actually.
diff --git a/rt/docs/design_docs/evil_plans b/rt/docs/design_docs/evil_plans
index 34b9f81a2..5b5cc58c1 100644
--- a/rt/docs/design_docs/evil_plans
+++ b/rt/docs/design_docs/evil_plans
@@ -3,8 +3,7 @@ Current planned 2.2 feature list. subject to change.
Core
-Should Make "Owner" a watcher type, rather than a special ticket attribute,
- under the hood. This wins for ACL and code consistency reasons.
+
Web UI
@@ -67,8 +66,6 @@ nice Scrips could apply to a list of queues, rather than just one queue or
Custom fields
-Must "KeywordSelects" become "Custom Fields"
-Should String and multi-string custom fields.
Nice Date custom fields
Nice Some way to order and group custom fields.
Nice Default values
@@ -79,8 +76,6 @@ Nice Make custom fields apply to an enumerated list of queues,
Web infrastructure
-Must Full fastcgi support.
-
Installation
@@ -116,7 +111,7 @@ Nice Export full ticket metadata and history as XML
Note: I currently favor the REST philosophy that GET and POST to specific,
defined URLs provides everything one needs to build comprehensive
web services without the massive added complexity of a SOAP or XML-RPC
- framework.
+ framework. Sadly, the world doesn't agree with me
ACLs:
diff --git a/rt/docs/design_docs/local_hacking b/rt/docs/design_docs/local_hacking
deleted file mode 100644
index c06d1126d..000000000
--- a/rt/docs/design_docs/local_hacking
+++ /dev/null
@@ -1,32 +0,0 @@
-To facilitate local hacking, RT needs a mechanism to allow site administrators
-to easily add HTML templates for the web ui and to replace sections
-of code in RT's core modules _without_ having to modify those modules
-
-We'll use several methods to achieve this goal.
-
- Webui
- HTML::Mason allows users to create multiple
-component hierarchies. RT should ship with a local component root
-defined and available. This root should be configured as the "primary"
-component root.
-
-
- Core modules
-
- This gets a bit trickier. we want to allow people to trivially
-subclass core modules and to use those subclasses throughout the code.
-
-The way we're going to handle this is by setting up a number of subroutines
-in config.pm that look something like this:
-
-sub NewTicketObj {
- eval "require $TicketClass";
- my $object = new $TicketClass;
- return ($object);
-}
-
-# This variable is used for ref type checking
-$TicketClass = "RT::Ticket";
-
-we could use an eval around the require and thus completely avoid specifying
-the object in two places. which feels like a win. but i'm worried about perf.
diff --git a/rt/docs/rt.gif b/rt/docs/rt.gif
deleted file mode 100755
index 693b06238..000000000
--- a/rt/docs/rt.gif
+++ /dev/null
Binary files differ
diff --git a/rt/etc/acl.Oracle b/rt/etc/acl.Oracle
index 59d35a028..c8667c031 100644
--- a/rt/etc/acl.Oracle
+++ b/rt/etc/acl.Oracle
@@ -1,9 +1,10 @@
-CREATE USER !!DB_RT_USER!! identified by !!DB_RT_PASS!!
-temporary tablespace TEMP
-default tablespace USERS
-quota unlimited on USERS;
-
-grant connect, resource to !!DB_RT_USER!!;
-
-exit;
-
+sub acl {
+return (
+"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 13ac41dcf..16ea71b2d 100755
--- a/rt/etc/acl.Pg
+++ b/rt/etc/acl.Pg
@@ -1,39 +1,63 @@
-drop user !!DB_RT_USER!!;
-create user !!DB_RT_USER!! with password '!!DB_RT_PASS!!' NOCREATEDB NOCREATEUSER;
+sub acl {
+ my $dbh = shift;
-grant select, insert, update, delete on Groups to !!DB_RT_USER!!;
-grant select, insert, update, delete on Groups_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on ACL to !!DB_RT_USER!!;
-grant select, insert, update, delete on ACL_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Watchers to !!DB_RT_USER!!;
-grant select, insert, update, delete on Watchers_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Links to !!DB_RT_USER!!;
-grant select, insert, update, delete on Links_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Users to !!DB_RT_USER!!;
-grant select, insert, update, delete on Users_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Tickets to !!DB_RT_USER!!;
-grant select, insert, update, delete on Tickets_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on GroupMembers to !!DB_RT_USER!!;
-grant select, insert, update, delete on GroupMembers_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Queues to !!DB_RT_USER!!;
-grant select, insert, update, delete on Queues_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Transactions to !!DB_RT_USER!!;
-grant select, insert, update, delete on Transactions_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on ScripActions to !!DB_RT_USER!!;
-grant select, insert, update, delete on ScripActions_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on ScripConditions to !!DB_RT_USER!!;
-grant select, insert, update, delete on ScripConditions_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Scrips to !!DB_RT_USER!!;
-grant select, insert, update, delete on Scrips_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Attachments to !!DB_RT_USER!!;
-grant select, insert, update, delete on Attachments_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Templates to !!DB_RT_USER!!;
-grant select, insert, update, delete on Templates_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on Keywords to !!DB_RT_USER!!;
-grant select, insert, update, delete on Keywords_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on ObjectKeywords to !!DB_RT_USER!!;
-grant select, insert, update, delete on ObjectKeywords_id_seq to !!DB_RT_USER!!;
-grant select, insert, update, delete on KeywordSelects to !!DB_RT_USER!!;
-grant select, insert, update, delete on KeywordSelects_id_seq to !!DB_RT_USER!!;
+ my @acls;
+ my @tables = qw (
+ attachments_id_seq
+ Attachments
+ queues_id_seq
+ Queues
+ links_id_seq
+ Links
+ principals_id_seq
+ Principals
+ groups_id_seq
+ Groups
+ scripconditions_id_seq
+ ScripConditions
+ transactions_id_seq
+ Transactions
+ scrips_id_seq
+ Scrips
+ acl_id_seq
+ ACL
+ groupmembers_id_seq
+ GroupMembers
+ cachedgroupmembers_id_seq
+ CachedGroupMembers
+ users_id_seq
+ Users
+ tickets_id_seq
+ Tickets
+ scripactions_id_seq
+ ScripActions
+ templates_id_seq
+ Templates
+ ticketcustomfieldvalues_id_s
+ TicketCustomFieldValues
+ customfields_id_seq
+ CustomFields
+ customfieldvalues_id_seq
+ CustomFieldValues
+ sessions
+ );
+
+ # if there's already an rt_user, drop it.
+ my @row =
+ $dbh->selectrow_array( "select usename from pg_user where usename = '" . $RT::DatabaseUser."'" );
+ if ( $row[0] ) {
+ push @acls, "drop user ${RT::DatabaseUser};",;
+ }
+
+ push @acls, "create user ${RT::DatabaseUser} with password '${RT::DatabasePassword}' NOCREATEDB NOCREATEUSER;";
+ foreach my $table (@tables) {
+ push @acls,
+ "GRANT SELECT, INSERT, UPDATE, DELETE ON $table to "
+ . $RT::DatabaseUser . ";";
+
+ }
+ return (@acls);
+}
+1;
diff --git a/rt/etc/acl.mysql b/rt/etc/acl.mysql
index 7feb376f5..0ecaa3b15 100755
--- a/rt/etc/acl.mysql
+++ b/rt/etc/acl.mysql
@@ -1,4 +1,8 @@
-
-DELETE FROM user WHERE user like '!!DB_RT_USER!!';
-DELETE FROM db where db LIKE '!!DB_DATABASE!!';
-GRANT SELECT,INSERT,CREATE,INDEX,UPDATE,DELETE ON !!DB_DATABASE!!.* TO !!DB_RT_USER!!@!!DB_RT_HOST!! IDENTIFIED BY '!!DB_RT_PASS!!';
+sub acl {
+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}';");
+}
+1;
diff --git a/rt/etc/config.pm b/rt/etc/config.pm
deleted file mode 100755
index 52b1a0b25..000000000
--- a/rt/etc/config.pm
+++ /dev/null
@@ -1,473 +0,0 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/etc/Attic/config.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-package RT;
-
-# {{{ Base Configuration
-
-# $rtname the string that RT will look for in mail messages to
-# figure out what ticket a new piece of mail belongs to
-
-# Your domain name is recommended, so as not to pollute the namespace.
-# once you start using a given tag, you should probably never change it.
-# (otherwise, mail for existing tickets won't get put in the right place
-
-$rtname="example.com";
-
-# You should set this to your organization's DNS domain. For example,
-# fsck.com or asylum.arkham.ma.us. It's used by the linking interface to
-# guarantee that ticket URIs are unique and easy to construct.
-
-$Organization = "example.com";
-
-# $user_passwd_min defines the minimum length for user passwords. Setting
-# it to 0 disables this check
-$MinimumPasswordLength = "5";
-
-# $Timezone is used to convert times entered by users into GMT and back again
-# It should be set to a timezone recognized by your local unix box.
-$Timezone = 'US/Eastern';
-
-# LogDir is where RT writes its logfiles.
-# This directory should be writable by your rt group
-$LogDir = "!!RT_LOG_PATH!!";
-
-# }}}
-
-# {{{ Database Configuration
-
-# Database driver beeing used - i.e. MySQL.
-$DatabaseType="!!DB_TYPE!!";
-
-# The domain name of your database server
-# If you're running mysql and it's on localhost,
-# leave it blank for enhanced performance
-$DatabaseHost="!!DB_HOST!!";
-
-# The port that your database server is running on. Ignored unless it's
-# a positive integer. It's usually safe to leave this blank
-$DatabasePort="!!DB_PORT!!";
-
-
-#The name of the database user (inside the database)
-$DatabaseUser='!!DB_RT_USER!!';
-
-# Password the DatabaseUser should use to access the database
-$DatabasePassword='!!DB_RT_PASS!!';
-
-
-# The name of the RT's database on your database server
-$DatabaseName='!!DB_DATABASE!!';
-
-# If you're using Postgres and have compiled in SSL support,
-# set DatabaseRequireSSL to 1 to turn on SSL communication
-$DatabaseRequireSSL=undef;
-
-# }}}
-
-# {{{ Incoming mail gateway configuration
-
-
-# OwnerEmail is the address of a human who manages RT. RT will send
-# errors generated by the mail gateway to this address. This address
-# should _not_ be an address that's managed by your RT instance.
-
-$OwnerEmail = 'root';
-
-# If $LoopsToRTOwner is defined, RT will send mail that it believes
-# might be a loop to $RT::OwnerEmail
-
-$LoopsToRTOwner = 1;
-
-# If $StoreLoopss is defined, RT will record messages that it believes
-# to be part of mail loops.
-# As it does this, it will try to be careful not to send mail to the
-# sender of these messages
-
-$StoreLoops = undef;
-
-
-# $MaxAttachmentSize sets the maximum size (in bytes) of attachments stored
-# in the database.
-
-# For mysql and oracle, we set this size at 10 megabytes.
-# If you're running a postgres version earlier than 7.1, you will need
-# to drop this to 8192. (8k)
-
-$MaxAttachmentSize = 10000000;
-
-# $TruncateLongAttachments: if this is set to a non-undef value,
-# RT will truncate attachments longer than MaxAttachmentLength.
-
-$TruncateLongAttachments = undef;
-
-
-# $DropLongAttachments: if this is set to a non-undef value,
-# RT will silently drop attachments longer than MaxAttachmentLength.
-
-$DropLongAttachments = undef;
-
-# If $ParseNewMessageForTicketCcs is true, RT will attempt to divine
-# Ticket 'Cc' watchers from the To and Cc lines of incoming messages
-# Be forewarned that if you have _any_ addresses which forward mail to
-# RT automatically and you enable this option without modifying
-# "IsRTAddress" below, you will get yourself into a heap of trouble.
-# And well, this is free software, so there isn't a warrantee, but
-# I disclaim all ability to help you if you do enable this without
-# modifying IsRTAddress below.
-
-$ParseNewMessageForTicketCcs = undef;
-
-# IsRTAddress is used to make sure RT doesn't add itself as a ticket CC if
-# the setting above is enabled.
-
-sub IsRTAddress {
- my $address = shift;
-
- # Example: the following rule would tell RT not to Cc
- # "tickets@noc.example.com"
- # return(1) if ($address =~ /^tickets\@noc.example.com$/i);
-
- return(undef)
-}
-
-# CanonicalizeAddress converts email addresses into canonical form.
-# it takes one email address in and returns the proper canonical
-# form. You can dump whatever your proper local config is in here
-
-sub CanonicalizeAddress {
- my $email = shift;
- # Example: the following rule would treat all email
- # coming from a subdomain as coming from second level domain
- # foo.com
- #$email =~ s/\@(.*).foo.com/\@foo.com/;
- return ($email)
-}
-
-# If $LookupSenderInExternalDatabase is defined, RT will attempt to
-# verify the incoming message sender with a known source, using the
-# LookupExternalUserInfo routine below
-
-$LookupSenderInExternalDatabase = undef;
-
-# If $SenderMustExistInExternalDatabase is true, RT will refuse to
-# create non-privileged accounts for unknown users if you are using
-# the "LookupSenderInExternalDatabase" option.
-# Instead, an error message will be mailed and RT will forward the
-# message to $RTOwner.
-#
-# If you are not using $LookupSenderInExternalDatabase, this option
-# has no effect.
-#
-# If you define an AutoRejectRequest template, RT will use this
-# template for the rejection message.
-
-$SenderMustExistInExternalDatabase = undef;
-
-# LookupExternalUserInfo is a site-definable method for synchronizing
-# incoming users with an external data source.
-#
-# This routine takes a tuple of EmailAddress and FriendlyName
-# EmailAddress is the user's email address, ususally taken from
-# an email message's From: header.
-# FriendlyName is a freeform string, ususally taken from the "comment"
-# portion of an email message's From: header.
-#
-# It returns (FoundInExternalDatabase, ParamHash);
-#
-# FoundInExternalDatabase must be set to 1 before return if the user was
-# found in the external database.
-#
-# ParamHash is a Perl parameter hash which can contain at least the following
-# fields. These fields are used to populate RT's users database when the user
-# is created
-#
-# EmailAddress is the email address that RT should use for this user.
-# Name is the 'Name' attribute RT should use for this user.
-# 'Name' is used for things like access control and user lookups.
-# RealName is what RT should display as the user's name when displaying
-# 'friendly' names
-
-sub LookupExternalUserInfo {
- my ($EmailAddress, $RealName) = @_;
-
- my $FoundInExternalDatabase = 1;
- my %params = {};
-
- #Name is the RT username you want to use for this user.
- $params{'Name'} = $EmailAddress;
- $params{'EmailAddress'} = $EmailAddress;
- $params{'RealName'} = $RealName;
-
- # See RT's contributed code for examples.
- # http://www.fsck.com/pub/rt/contrib/
- return ($FoundInExternalDatabase, %params);
-}
-
-# }}}
-
-# {{{ Outgoing mail configuration
-
-# RT is designed such that any mail which already has a ticket-id associated
-# with it will get to the right place automatically.
-
-# $CorrespondAddress and $CommentAddress are the default addresses
-# that will be listed in From: and Reply-To: headers of correspondence
-# and comment mail tracked by RT, unless overridden by a queue-specific
-# address.
-
-$CorrespondAddress='RT::CorrespondAddress.not.set';
-
-$CommentAddress='RT::CommentAddress.not.set';
-
-
-#Sendmail Configuration
-
-# $MailCommand defines which method RT will use to try to send mail
-# We know that 'sendmailpipe' works fairly well.
-# If 'sendmailpipe' doesn't work well for you, try 'sendmail'
-#
-# Note that you should remove the '-t' from $SendmailArguments
-# if you use 'sendmail rather than 'sendmailpipe'
-
-$MailCommand = 'sendmailpipe';
-
-# $SendmailArguments defines what flags to pass to $Sendmail
-# assuming you picked 'sendmail' or 'sendmailpipe' as the $MailCommand above.
-# If you picked 'sendmailpipe', you MUST add a -t flag to $SendmailArguments
-
-# These options are good for most sendmail wrappers and workalikes
-$SendmailArguments="-oi -t";
-
-# These arguments are good for sendmail brand sendmail 8 and newer
-#$SendmailArguments="-oi -t -ODeliveryMode=b -OErrorMode=m";
-
-# If you selected 'sendmailpipe' above, you MUST specify the path
-# to your sendmail binary in $SendmailPath.
-# !! If you did not # select 'sendmailpipe' above, this has no effect!!
-$SendmailPath = "/usr/sbin/sendmail";
-
-# RT can optionally set a "Friendly" 'To:' header when sending messages to
-# Ccs or AdminCcs (rather than having a blank 'To:' header.
-
-# This feature DOES NOT WORK WITH SENDMAIL[tm] BRAND SENDMAIL
-# If you are using sendmail, rather than postfix, qmail, exim or some other MTA,
-# you _must_ disable this option.
-
-$UseFriendlyToLine = 0;
-
-
-# }}}
-
-# {{{ Logging
-
-# Logging. The default is to log anything except debugging
-# information to a logfile. Check the Log::Dispatch POD for
-# information about how to get things by syslog, mail or anything
-# else, get debugging info in the log, etc.
-
-# It might generally make
-# sense to send error and higher by email to some administrator.
-# If you do this, be careful that this email isn't sent to this RT instance.
-
-
-# the minimum level error that will be logged to the specific device.
-# levels from lowest to highest:
-# debug info notice warning error critical alert emergency
-
-
-# Mail loops will generate a critical log message.
-
-$LogToScreen = 'error';
-$LogToFile = 'error';
-#$LogToFileNamed = "$LogDir/rt.log.".$$.".".$<; #log to rt.log.<pid>.<user>
-$LogToFileNamed = "$LogDir/rt.log".$<; #log to rt.log.user;
-
-# }}}
-
-# {{{ Web interface configuration
-
-
-
-# Define the directory name to be used for images in rt web
-# documents.
-
-# If you're putting the web ui somewhere other than at the root of
-# your server
-# $WebPath requires a leading / but no trailing /
-
-$WebPath = "";
-
-# This is the Scheme, server and port for constructing urls to webrt
-# $WebBaseURL doesn't need a trailing /
-
-$WebBaseURL = "http://RT::WebBaseURL.not.configured:80";
-
-$WebURL = $WebBaseURL . $WebPath . "/";
-
-
-
-# $WebImagesURL points to the base URL where RT can find its images.
-# If you're running the FastCGI version of the RT web interface,
-# you should make RT's WebRT/html/NoAuth/images directory available on
-# a static web server and supply that URL as $WebImagesURL.
-
-$WebImagesURL = $WebURL."NoAuth/images/";
-
-# $RTLogoURL points to the URL of the RT logo displayed in the web UI
-
-$LogoURL = $WebImagesURL."rt.jpg";
-
-# If $WebExternalAuth is defined, RT will defer to the environment's
-# REMOTE_USER variable.
-
-$WebExternalAuth = undef;
-
-# $MasonComponentRoot is where your rt instance keeps its mason html files
-# (this should be autoconfigured during 'make install' or 'make upgrade')
-
-$MasonComponentRoot = "!!MASON_HTML_PATH!!";
-
-# $MasonLocalComponentRoot is where your rt instance keeps its site-local
-# mason html files.
-# (this should be autoconfigured during 'make install' or 'make upgrade')
-
-$MasonLocalComponentRoot = "!!MASON_LOCAL_HTML_PATH!!";
-
-# $MasonDataDir Where mason keeps its datafiles
-# (this should be autoconfigured during 'make install' or 'make upgrade')
-
-$MasonDataDir = "!!MASON_DATA_PATH!!";
-
-# RT needs to put session data (for preserving state between connections
-# via the web interface)
-$MasonSessionDir = "!!MASON_SESSION_PATH!!";
-
-
-
-#This is from tobias' prototype web search UI. it may stay and it may go.
-%WebOptions=
- (
- # This is for putting in more user-actions at the Transaction
- # bar. I will typically add "Enter bug in Bugzilla" here.:
- ExtraTransactionActions => sub { return ""; },
-
- # Here you can modify the list view. Be aware that the web
- # interface might crash if TicketAttribute is wrongly set.
-
- QueueListingCols =>
- [
- { Header => 'Id',
- TicketLink => 1,
- TicketAttribute => 'Id'
- },
-
- { Header => 'Subject',
- TicketAttribute => 'Subject'
- },
- { Header => 'Requestor(s)',
- TicketAttribute => 'RequestorsAsString'
- },
- { Header => 'Status',
- TicketAttribute => 'Status'
- },
-
-
- { Header => 'Queue',
- TicketAttribute => 'QueueObj->Name'
- },
-
-
-
- { Header => 'Told',
- TicketAttribute => 'ToldObj->AgeAsString'
- },
-
- { Header => 'Age',
- TicketAttribute => 'CreatedObj->AgeAsString'
- },
-
- { Header => 'Last',
- TicketAttribute => 'LastUpdatedObj->AgeAsString'
- },
-
- # TODO: It would be nice with a link here to the Owner and all
- # other request owned by this Owner.
- { Header => 'Owner',
- TicketAttribute => 'OwnerObj->Name'
- },
-
-
- { Header => 'Take',
- TicketLink => 1,
- Constant => 'Take',
- ExtraLinks => '&Action=Take'
- },
-
- ]
- );
-
-# }}}
-
-# {{{ RT Linking Interface
-
-# $TicketBaseURI is the Base path of the URI for local tickets
-
-# You shouldn't need to touch this. it's used to link tickets both locally
-# and remotely
-
-$TicketBaseURI = "fsck.com-rt://$Organization/$rtname/ticket/";
-
-# A hash table of conversion subs to be used for transforming RT Link
-# URIs to URLs in the web interface. If you want to use RT towards
-# locally installed databases, this is the right place to configure it.
-
-%URI2HTTP=
- (
- 'http' => sub {return @_;},
- 'https' => sub {return @_;},
- 'ftp' => sub {return @_;},
- 'fsck.com-rt' => sub {warn "stub!";},
- 'mozilla.org-bugzilla' => sub {warn "stub!"},
- 'fsck.com-kb' => sub {warn "stub!"}
- );
-
-
-# A hash table of subs for fetching content from an URI
-%ContentFromURI=
- (
- 'fsck.com-rt' => sub {warn "stub!";},
- 'mozilla.org-bugzilla' => sub {warn "stub!"},
- 'fsck.com-kb' => sub {warn "stub!"}
- );
-
-# }}}
-
-# {{{ No User servicable parts inside
-
-############################################
-############################################
-############################################
-#
-# Don't edit anything below this line unless you really know
-# what you're doing
-#
-#
-############################################
-############################################
-
-# TODO: get this stuff out of the config file and into RT.pm
-
-#Set up us the timezone
-$ENV{'TZ'} = $Timezone; #TODO: Bogus hack to deal with Date::Manip whining
-
-# Configure sendmail if we're using Entity->send('sendmail')
-if ($MailCommand eq 'sendmail') {
- $MailParams = $SendmailArguments;
-}
-
-
-
-# }}}
-
-
-1;
diff --git a/rt/etc/schema.Oracle b/rt/etc/schema.Oracle
deleted file mode 100644
index 0c14cb39d..000000000
--- a/rt/etc/schema.Oracle
+++ /dev/null
@@ -1,287 +0,0 @@
-CREATE SEQUENCE KEYWORDSELECTS_seq;
-CREATE TABLE KeywordSelects (
- id NUMBER(11, 0) PRIMARY KEY,
- Name VARCHAR2(255),
- Keyword NUMBER(11, 0),
- Single NUMBER(11, 0),
- Depth NUMBER(11, 0) DEFAULT 0,
- ObjectType VARCHAR2(32) NOT NULL,
- ObjectField VARCHAR2(32),
- ObjectValue VARCHAR2(255),
- Disabled NUMBER(11, 0) DEFAULT 0
-);
-
-CREATE INDEX KeywordSelects1 ON KeywordSelects (Keyword);
-CREATE INDEX KeywordSelects2 ON
- KeywordSelects(ObjectType, ObjectField, ObjectValue);
-
-
-CREATE SEQUENCE ATTACHMENTS_seq;
-CREATE TABLE Attachments (
- id NUMBER(11,0) PRIMARY KEY,
- TransactionId NUMBER(11,0) NOT NULL,
- Parent NUMBER(11,0),
- MessageId VARCHAR2(160),
- Subject VARCHAR2(255),
- Filename VARCHAR2(255),
- ContentType VARCHAR2(80),
- ContentEncoding VARCHAR2(80),
- Content CLOB,
- Headers CLOB,
- Creator NUMBER(11,0),
- Created DATE,
- Disabled NUMBER(11,0) DEFAULT 0
-);
-
-CREATE SEQUENCE QUEUES_seq;
-CREATE TABLE Queues (
- id NUMBER(11, 0) PRIMARY KEY,
- Name VARCHAR2(40) NOT NULL UNIQUE,
- Description VARCHAR2(120),
- CorrespondAddress VARCHAR2(40),
- CommentAddress VARCHAR2(40),
- InitialPriority NUMBER(11, 0),
- FinalPriority NUMBER(11, 0),
- DefaultDueIn NUMBER(11, 0),
- Creator NUMBER(11, 0),
- Created DATE,
- LastUpdatedBy NUMBER(11, 0),
- LastUpdated DATE,
- Disabled NUMBER(11,0) DEFAULT 0
-);
-
-CREATE SEQUENCE LINKS_seq;
-CREATE TABLE Links (
- id NUMBER(11,0) PRIMARY KEY,
- Base VARCHAR2(255),
- Target VARCHAR2(255),
- Type VARCHAR2(20) NOT NULL,
- LocalTarget NUMBER(11,0),
- LocalBase NUMBER(11,0),
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE,
- Creator NUMBER(11,0),
- Created DATE
-);
-
-CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type);
-
-
-
-CREATE SEQUENCE GROUPS_seq;
-CREATE TABLE Groups (
- id NUMBER(11,0) PRIMARY KEY,
- Name VARCHAR2(16) UNIQUE,
- Description VARCHAR(64),
- Pseudo NUMBER(11,0) DEFAULT 0
-);
-
-CREATE SEQUENCE WATCHERS_seq;
-CREATE TABLE Watchers (
- id NUMBER(11,0) PRIMARY KEY,
- Type VARCHAR2(16),
- Scope VARCHAR2(16),
- Value NUMBER(11,0),
- Email VARCHAR2(255),
- Quiet NUMBER(11,0),
- Owner NUMBER(11,0),
- Creator NUMBER(11,0),
- Created DATE,
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE
-);
-
-
-
-CREATE SEQUENCE SCRIPCONDITIONS_seq;
-CREATE TABLE ScripConditions (
- id NUMBER(11, 0) PRIMARY KEY,
- Name VARCHAR2(255),
- Description VARCHAR2(255),
- ExecModule VARCHAR2(60),
- Argument VARCHAR2(255),
- ApplicableTransTypes VARCHAR2(60),
- Creator NUMBER(11, 0),
- Created DATE,
- LastUpdatedBy NUMBER(11, 0),
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE TRANSACTIONS_seq;
-CREATE TABLE Transactions (
- id NUMBER(11,0) PRIMARY KEY,
- EffectiveTicket NUMBER(11,0),
- Ticket NUMBER(11,0),
- TimeTaken NUMBER(11,0),
- Type VARCHAR2(20),
- Field VARCHAR2(40),
- OldValue VARCHAR2(255),
- NewValue VARCHAR2(255),
- Data VARCHAR2(100),
- Creator NUMBER(11,0),
- Created DATE,
- Disabled NUMBER(11,0) DEFAULT 0
-);
-
-CREATE SEQUENCE SCRIPS_seq;
-CREATE TABLE Scrips (
- id NUMBER(11,0) PRIMARY KEY,
- ScripCondition NUMBER(11,0),
- ScripAction NUMBER(11,0),
- Stage VARCHAR2(32),
- Queue NUMBER(11,0),
- Template NUMBER(11,0),
- Creator NUMBER(11,0),
- Created DATE,
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE
-);
-
-
-
-
-CREATE SEQUENCE ACL_seq;
-CREATE TABLE ACL (
- id NUMBER(11,0) PRIMARY KEY,
- PrincipalId NUMBER(11,0),
- PrincipalType VARCHAR2(25),
- RightName VARCHAR2(25),
- RightScope VARCHAR2(25),
- RightAppliesTo NUMBER(11,0)
-);
-
-CREATE SEQUENCE GROUPMEMBERS_seq;
-CREATE TABLE GroupMembers (
- id NUMBER(11,0) PRIMARY KEY,
- GroupId NUMBER(11,0),
- UserId NUMBER(11,0)
-);
-
-CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, UserId);
-
-
-CREATE SEQUENCE OBJECTKEYWORDS_seq;
-CREATE TABLE ObjectKeywords (
- id NUMBER(11,0) PRIMARY KEY,
- Keyword NUMBER(11,0) NOT NULL,
- KeywordSelect NUMBER(11,0) NOT NULL,
- ObjectType VARCHAR2(32) NOT NULL,
- ObjectId NUMBER(11,0) NOT NULL
-);
-
-CREATE UNIQUE INDEX ObjectKeywords1 ON ObjectKeywords
- (ObjectId, ObjectType, KeywordSelect, Keyword);
-CREATE INDEX ObjectKeywords3 ON ObjectKeywords (Keyword);
-
-CREATE SEQUENCE KEYWORDS_seq;
-CREATE TABLE Keywords (
- id NUMBER(11, 0) PRIMARY KEY,
- Name VARCHAR2(255) NOT NULL,
- Description VARCHAR2(255),
- Parent NUMBER(11, 0),
- Disabled NUMBER(11, 0) DEFAULT 0
-);
-
-CREATE UNIQUE INDEX Keywords1 ON Keywords (Name, Parent);
-CREATE INDEX Keywords3 ON Keywords (Parent);
-
-CREATE SEQUENCE USERS_seq;
-CREATE TABLE Users (
- id NUMBER(11,0) PRIMARY KEY,
- Name VARCHAR2(120) NOT NULL UNIQUE,
- Password VARCHAR2(40),
- Comments CLOB,
- Signature CLOB,
- EmailAddress VARCHAR2(120),
- FreeFormContactInfo CLOB,
- Organization VARCHAR2(200),
- Privileged NUMBER(11,0),
- 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),
- Creator NUMBER(11,0),
- Created DATE,
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE,
- Disabled NUMBER(11,0) DEFAULT 0
-);
-
-
-
-
-CREATE SEQUENCE TICKETS_seq;
-CREATE TABLE Tickets (
- id NUMBER(11, 0) PRIMARY KEY,
- EffectiveId NUMBER(11, 0),
- Queue NUMBER(11,0),
- Type VARCHAR2(16),
- IssueStatement NUMBER(11,0),
- Resolution NUMBER(11,0),
- Owner NUMBER(11,0),
- Subject VARCHAR2(200) DEFAULT '',
- InitialPriority NUMBER(11,0) DEFAULT 0,
- FinalPriority NUMBER(11,0) DEFAULT 0,
- Priority NUMBER(11,0) DEFAULT 0,
- Status VARCHAR2(10),
- TimeWorked NUMBER(11,0) DEFAULT 0,
- TimeLeft NUMBER(11,0) DEFAULT 0,
- Told DATE,
- Starts DATE,
- Started DATE,
- Due DATE,
- Resolved DATE,
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE,
- Creator NUMBER(11,0),
- Created DATE,
- Disabled NUMBER(11,0) DEFAULT 0
-);
-
-CREATE SEQUENCE SCRIPACTIONS_seq;
-CREATE TABLE ScripActions (
- id NUMBER(11,0) PRIMARY KEY,
- Name VARCHAR2(255),
- Description VARCHAR2(255),
- ExecModule VARCHAR2(60),
- Argument VARCHAR2(255),
- Creator NUMBER(11,0),
- Created DATE,
- LastUpdatedBy NUMBER(11,0),
- LastUpdated DATE
-);
-
-
-CREATE SEQUENCE TEMPLATES_seq;
-CREATE TABLE Templates (
- id NUMBER(11,0) PRIMARY KEY,
- Queue NUMBER(11,0) DEFAULT 0 NOT NULL,
- Name VARCHAR2(40) NOT NULL UNIQUE,
- Description VARCHAR2(120),
- Type VARCHAR2(16),
- Language VARCHAR2(16),
- TranslationOf NUMBER(11,0),
- Content CLOB,
- LastUpdated DATE,
- LastUpdatedBy NUMBER(11,0),
- Creator NUMBER(11,0),
- Created DATE
-);
-
diff --git a/rt/etc/schema.Pg b/rt/etc/schema.Pg
index 21d981b4a..ba0d6fc6c 100755
--- a/rt/etc/schema.Pg
+++ b/rt/etc/schema.Pg
@@ -1,267 +1,578 @@
-CREATE TABLE KeywordSelects (
- id serial NOT NULL ,
- Name varchar(255) ,
- Keyword integer ,
- Single integer ,
- Depth integer NOT NULL DEFAULT 0 ,
- ObjectType varchar(32) NOT NULL ,
- ObjectField varchar(32) ,
- ObjectValue varchar(255) ,
- Disabled int2 NOT NULL DEFAULT 0 ,
- PRIMARY KEY (id)
-);
-CREATE INDEX KeywordSelects1 ON KeywordSelects (Keyword);
-CREATE INDEX KeywordSelects2 ON KeywordSelects (ObjectType, ObjectField, ObjectValue);
+------------------------------------------------------------------
+-- My2Pg 1.23 translated dump
+--
+------------------------------------------------------------------
+
+BEGIN;
+
+
+
+
+--
+-- Sequences for table ATTACHMENTS
+--
+
+CREATE SEQUENCE attachments_id_seq;
+
+-- {{{ Attachments
+
CREATE TABLE Attachments (
- id serial NOT NULL ,
+ id INTEGER DEFAULT nextval('attachments_id_seq'),
TransactionId integer NOT NULL ,
- Parent integer ,
- MessageId varchar(160) ,
- Subject varchar(255) ,
- Filename varchar(255) ,
- ContentType varchar(80) ,
- ContentEncoding varchar(80) ,
- Content TEXT ,
- Headers TEXT ,
- Creator integer ,
- Created timestamp ,
+ Parent integer NOT NULL DEFAULT 0 ,
+ MessageId varchar(160) NULL ,
+ Subject varchar(255) NULL ,
+ Filename varchar(255) NULL ,
+ ContentType varchar(80) NULL ,
+ ContentEncoding varchar(80) NULL ,
+ Content text NULL ,
+ Headers text NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
-CREATE INDEX Attachments1 ON Attachments (Parent);
-CREATE INDEX Attachments2 ON Attachments (TransactionId);
-CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId);
+
+CREATE INDEX Attachments1 ON Attachments (Parent) ;
+CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
+CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
+-- }}}
+
+-- {{{ Queues
+
+
+--
+-- Sequences for table QUEUES
+--
+
+CREATE SEQUENCE queues_id_seq;
+
CREATE TABLE Queues (
- id serial NOT NULL ,
- Name varchar(120) NOT NULL ,
- Description varchar(120) ,
- CorrespondAddress varchar(120) ,
- CommentAddress varchar(120) ,
- InitialPriority integer ,
- FinalPriority integer ,
- DefaultDueIn integer ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
+ id INTEGER DEFAULT nextval('queues_id_seq'),
+ Name varchar(200) NOT NULL ,
+ Description varchar(255) NULL ,
+ CorrespondAddress varchar(120) NULL ,
+ CommentAddress varchar(120) NULL ,
+ InitialPriority integer NOT NULL DEFAULT 0 ,
+ FinalPriority integer NOT NULL DEFAULT 0 ,
+ DefaultDueIn integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX Queues1 ON Queues (Name);
+CREATE UNIQUE INDEX Queues1 ON Queues (Name) ;
+
+-- }}}
+
+-- {{{ Links
+
+
+
+--
+-- Sequences for table LINKS
+--
+
+CREATE SEQUENCE links_id_seq;
+
CREATE TABLE Links (
- id serial NOT NULL ,
- Base varchar(240) ,
- Target varchar(240) ,
+ id INTEGER DEFAULT nextval('links_id_seq'),
+ Base varchar(240) NULL ,
+ Target varchar(240) NULL ,
Type varchar(20) NOT NULL ,
- LocalTarget integer ,
- LocalBase integer ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
- Creator integer ,
- Created timestamp ,
+ LocalTarget integer NOT NULL DEFAULT 0 ,
+ LocalBase integer NOT NULL DEFAULT 0 ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type);
-CREATE TABLE Groups (
- id serial NOT NULL ,
- Name varchar(16) ,
- Description varchar(64) ,
- Pseudo integer NOT NULL DEFAULT 0 ,
- PRIMARY KEY (id)
+CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type) ;
+
+-- }}}
+
+-- {{{ Principals
+
+
+
+--
+-- Sequences for table PRINCIPALS
+--
+
+CREATE SEQUENCE principals_id_seq;
+
+CREATE TABLE Principals (
+ id INTEGER DEFAULT nextval('principals_id_seq') not null,
+ PrincipalType VARCHAR(16) not null,
+ ObjectId integer,
+ Disabled int2 NOT NULL DEFAULT 0 ,
+ PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX Groups1 ON Groups (Name);
-CREATE TABLE Watchers (
- id serial NOT NULL ,
- Type varchar(16) ,
- Scope varchar(16) ,
- Value integer ,
- Email varchar(255) ,
- Quiet integer ,
- Owner integer ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
+
+CREATE INDEX Principals2 ON Principals (ObjectId);
+
+
+-- }}}
+
+-- {{{ Groups
+
+
+
+--
+-- Sequences for table GROUPS
+--
+
+CREATE SEQUENCE groups_id_seq;
+
+CREATE TABLE Groups (
+ id INTEGER DEFAULT nextval('groups_id_seq'),
+ Name varchar(200) NULL ,
+ Description varchar(255) NULL ,
+ Domain varchar(64),
+ Type varchar(64),
+ Instance varchar(64),
PRIMARY KEY (id)
+
);
-CREATE INDEX Watchers1 ON Watchers (Scope, Value, Type, Owner);
+CREATE UNIQUE INDEX Groups1 ON Groups (Domain,Instance,Type,id, Name);
+CREATE INDEX Groups2 On Groups (Type, Instance, Domain);
+
+
+-- }}}
+
+-- {{{ ScripConditions
+
+
+
+--
+-- Sequences for table SCRIPCONDITIONS
+--
+
+CREATE SEQUENCE scripconditions_id_seq;
+
CREATE TABLE ScripConditions (
- id serial NOT NULL ,
- Name varchar(255) ,
- Description varchar(255) ,
- ExecModule varchar(60) ,
- Argument varchar(255) ,
- ApplicableTransTypes varchar(60) ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
+ id INTEGER DEFAULT nextval('scripconditions_id_seq'),
+ Name varchar(200) NULL ,
+ Description varchar(255) NULL ,
+ ExecModule varchar(60) NULL ,
+ Argument varchar(255) NULL ,
+ ApplicableTransTypes varchar(60) NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
+
+-- }}}
+
+-- {{{ Transactions
+
+
+--
+-- Sequences for table TRANSACTIONS
+--
+
+CREATE SEQUENCE transactions_id_seq;
+
CREATE TABLE Transactions (
- id serial NOT NULL ,
- EffectiveTicket integer ,
- Ticket integer ,
- TimeTaken integer ,
- Type varchar(20) ,
- Field varchar(40) ,
- OldValue varchar(255) ,
- NewValue varchar(255) ,
- Data varchar(100) ,
- Creator integer ,
- Created timestamp ,
+ id INTEGER DEFAULT nextval('transactions_id_seq'),
+ 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 ,
+ Data varchar(100) NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
CREATE INDEX Transactions1 ON Transactions (Ticket);
CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
+
+-- }}}
+
+-- {{{ Scrips
+
+
+
+--
+-- Sequences for table SCRIPS
+--
+
+CREATE SEQUENCE scrips_id_seq;
+
CREATE TABLE Scrips (
- id serial NOT NULL ,
- ScripCondition integer ,
- ScripAction integer ,
- Stage varchar(32) ,
- Queue integer ,
- Template integer ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
+ id INTEGER DEFAULT nextval('scrips_id_seq'),
+ Description varchar(255),
+ ScripCondition integer NOT NULL DEFAULT 0 ,
+ ScripAction integer NOT NULL DEFAULT 0 ,
+ ConditionRules text NULL ,
+ ActionRules text NULL ,
+ CustomIsApplicableCode text NULL ,
+ CustomPrepareCode text NULL ,
+ CustomCommitCode text NULL ,
+ Stage varchar(32) NULL ,
+ Queue integer NOT NULL DEFAULT 0 ,
+ Template integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
+
+-- }}}
+
+-- {{{ ACL
+
+
+--
+-- Sequences for table ACL
+--
+
+CREATE SEQUENCE acl_id_seq;
+
CREATE TABLE ACL (
- id serial NOT NULL ,
- PrincipalId integer ,
- PrincipalType varchar(25) ,
- RightName varchar(25) ,
- RightScope varchar(25) ,
- RightAppliesTo integer ,
+ id INTEGER DEFAULT nextval('acl_id_seq'),
+ PrincipalType varchar(25) NOT NULL,
+
+ PrincipalId integer NOT NULL ,
+ RightName varchar(25) NOT NULL ,
+ ObjectType varchar(25) NOT NULL ,
+ ObjectId integer NOT NULL DEFAULT 0,
+ DelegatedBy integer NOT NULL DEFAULT 0,
+ DelegatedFrom integer NOT NULL DEFAULT 0,
PRIMARY KEY (id)
+
);
-CREATE INDEX ACL1 ON ACL (RightScope, PrincipalId);
-CREATE INDEX ACL2 ON ACL (RightScope, RightAppliesTo, RightName, PrincipalType, PrincipalId);
+
+CREATE INDEX ACL1 on ACL(RightName, ObjectType, ObjectId,PrincipalType,PrincipalId);
+
+
+-- }}}
+
+-- {{{ GroupMembers
+
+
+
+--
+-- Sequences for table GROUPMEMBERS
+--
+
+CREATE SEQUENCE groupmembers_id_seq;
+
CREATE TABLE GroupMembers (
- id serial NOT NULL ,
- GroupId integer ,
- UserId integer ,
- PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, UserId);
-CREATE TABLE ObjectKeywords (
- id serial NOT NULL ,
- Keyword integer NOT NULL ,
- KeywordSelect integer NOT NULL ,
- ObjectType varchar(32) NOT NULL ,
- ObjectId integer NOT NULL ,
+ id INTEGER DEFAULT nextval('groupmembers_id_seq'),
+ GroupId integer NOT NULL DEFAULT 0,
+ MemberId integer NOT NULL DEFAULT 0,
PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX ObjectKeywords1 ON ObjectKeywords (ObjectId, ObjectType, KeywordSelect, Keyword);
-CREATE INDEX ObjectKeywords2 ON ObjectKeywords (ObjectId, ObjectType);
-CREATE INDEX ObjectKeywords3 ON ObjectKeywords (Keyword);
-CREATE TABLE Keywords (
- id serial NOT NULL ,
- Name varchar(255) NOT NULL ,
- Description varchar(255) ,
- Parent integer ,
- Disabled int2 NOT NULL DEFAULT 0 ,
- PRIMARY KEY (id)
+
+-- }}}
+
+-- {{{ GroupMembersCache
+
+
+
+--
+-- Sequences for table CACHEDGROUPMEMBERS
+--
+
+CREATE SEQUENCE cachedgroupmembers_id_seq;
+
+CREATE TABLE CachedGroupMembers (
+ id int DEFAULT nextval('cachedgroupmembers_id_seq'),
+ GroupId int,
+ MemberId int,
+ Via int,
+ ImmediateParentId int,
+ Disabled int2 NOT NULL DEFAULT 0 ,
+ PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX Keywords1 ON Keywords (Name, Parent);
-CREATE INDEX Keywords2 ON Keywords (Name);
-CREATE INDEX Keywords3 ON Keywords (Parent);
+
+CREATE INDEX CachedGroupMembers2 on CachedGroupMembers (MemberId);
+CREATE INDEX CachedGroupMembers3 on CachedGroupMembers (GroupId);
+CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled);
+
+-- }}}
+
+-- {{{ Users
+
+
+
+--
+-- Sequences for table USERS
+--
+
+CREATE SEQUENCE users_id_seq;
+
CREATE TABLE Users (
- id serial NOT NULL ,
- Name varchar(120) NOT NULL ,
- Password varchar(40) ,
- Comments TEXT ,
- Signature TEXT ,
- EmailAddress varchar(120) ,
- FreeformContactInfo TEXT ,
- Organization varchar(200) ,
- Privileged integer ,
- RealName varchar(120) ,
- Nickname varchar(16) ,
- Lang varchar(16) ,
- EmailEncoding varchar(16) ,
- WebEncoding varchar(16) ,
- ExternalContactInfoId varchar(100) ,
- ContactInfoSystem varchar(30) ,
- ExternalAuthId varchar(100) ,
- AuthSystem varchar(30) ,
- Gecos varchar(16) ,
- HomePhone varchar(30) ,
- WorkPhone varchar(30) ,
- MobilePhone varchar(30) ,
- PagerPhone varchar(30) ,
- Address1 varchar(200) ,
- Address2 varchar(200) ,
- City varchar(100) ,
- State varchar(100) ,
- Zip varchar(16) ,
- Country varchar(50) ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
- Disabled int2 NOT NULL DEFAULT 0 ,
+ id INTEGER DEFAULT nextval('users_id_seq'),
+ Name varchar(200) NOT NULL ,
+ Password varchar(40) NULL ,
+ Comments text NULL ,
+ Signature text NULL ,
+ EmailAddress varchar(120) NULL ,
+ FreeformContactInfo text NULL ,
+ Organization varchar(200) NULL ,
+ RealName varchar(120) NULL ,
+ NickName varchar(16) NULL ,
+ Lang varchar(16) NULL ,
+ EmailEncoding varchar(16) NULL ,
+ WebEncoding varchar(16) NULL ,
+ ExternalContactInfoId varchar(100) NULL ,
+ ContactInfoSystem varchar(30) NULL ,
+ ExternalAuthId varchar(100) NULL ,
+ AuthSystem varchar(30) NULL ,
+ Gecos varchar(16) NULL ,
+ HomePhone varchar(30) NULL ,
+ WorkPhone varchar(30) NULL ,
+ MobilePhone varchar(30) NULL ,
+ PagerPhone varchar(30) NULL ,
+ Address1 varchar(200) NULL ,
+ Address2 varchar(200) NULL ,
+ City varchar(100) NULL ,
+ State varchar(100) NULL ,
+ Zip varchar(16) NULL ,
+ Country varchar(50) NULL ,
+ Timezone varchar(50) NULL ,
+ PGPKey text NULL,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
-CREATE UNIQUE INDEX Users1 ON Users (Name);
+
+
+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);
+
+
+-- }}}
+
+-- {{{ Tickets
+
+
+
+--
+-- Sequences for table TICKETS
+--
+
+CREATE SEQUENCE tickets_id_seq;
+
CREATE TABLE Tickets (
- id serial NOT NULL ,
- EffectiveId integer ,
- Queue integer ,
- Type varchar(16) ,
- IssueStatement integer ,
- Resolution integer ,
- Owner integer ,
- Subject varchar(200) DEFAULT '[no subject]' ,
- InitialPriority integer ,
- FinalPriority integer ,
- Priority integer ,
- Status varchar(10) ,
- TimeWorked integer ,
- TimeLeft integer ,
- Told timestamp ,
- Starts timestamp ,
- Started timestamp ,
- Due timestamp ,
- Resolved timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
- Creator integer ,
- Created timestamp ,
+ id INTEGER DEFAULT nextval('tickets_id_seq'),
+ EffectiveId integer NOT NULL DEFAULT 0 ,
+ Queue integer NOT NULL DEFAULT 0 ,
+ Type varchar(16) NULL ,
+ IssueStatement integer NOT NULL DEFAULT 0 ,
+ Resolution integer NOT NULL DEFAULT 0 ,
+ Owner integer NOT NULL DEFAULT 0 ,
+ Subject varchar(200) NULL DEFAULT '[no subject]' ,
+ InitialPriority integer NOT NULL DEFAULT 0 ,
+ FinalPriority integer NOT NULL DEFAULT 0 ,
+ Priority integer NOT NULL DEFAULT 0 ,
+ TimeEstimated integer NOT NULL DEFAULT 0 ,
+ TimeWorked integer NOT NULL DEFAULT 0 ,
+ Status varchar(10) NULL ,
+ TimeLeft integer NOT NULL DEFAULT 0 ,
+ Told TIMESTAMP NULL ,
+ Starts TIMESTAMP NULL ,
+ Started TIMESTAMP NULL ,
+ Due TIMESTAMP NULL ,
+ Resolved TIMESTAMP NULL ,
+
+
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
+
);
-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 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) ;
+
+-- }}}
+
+-- {{{ ScripActions
+
+
+
+--
+-- Sequences for table SCRIPACTIONS
+--
+
+CREATE SEQUENCE scripactions_id_seq;
+
CREATE TABLE ScripActions (
- id serial NOT NULL ,
- Name varchar(255) ,
- Description varchar(255) ,
- ExecModule varchar(60) ,
- Argument varchar(255) ,
- Creator integer ,
- Created timestamp ,
- LastUpdatedBy integer ,
- LastUpdated timestamp ,
+ id INTEGER DEFAULT nextval('scripactions_id_seq'),
+ Name varchar(200) NULL ,
+ Description varchar(255) NULL ,
+ ExecModule varchar(60) NULL ,
+ Argument varchar(255) NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
PRIMARY KEY (id)
+
);
+
+-- }}}
+
+-- {{{ Templates
+
+
+
+--
+-- Sequences for table TEMPLATES
+--
+
+CREATE SEQUENCE templates_id_seq;
+
CREATE TABLE Templates (
- id serial NOT NULL ,
+ id INTEGER DEFAULT nextval('templates_id_seq'),
+ Queue integer NOT NULL DEFAULT 0 ,
+ Name varchar(200) NOT NULL ,
+ Description varchar(255) NULL ,
+ Type varchar(16) NULL ,
+ Language varchar(16) NULL ,
+ TranslationOf integer NOT NULL DEFAULT 0 ,
+ Content text NULL ,
+ LastUpdated TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ PRIMARY KEY (id)
+
+);
+
+-- }}}
+
+-- {{{ TicketCustomFieldValues
+
+
+
+--
+-- Sequences for table TICKETCUSTOMFIELDVALUES
+--
+
+CREATE SEQUENCE ticketcustomfieldvalues_id_s;
+
+CREATE TABLE TicketCustomFieldValues (
+ id INTEGER DEFAULT nextval('ticketcustomfieldvalues_id_s'),
+ Ticket int NOT NULL ,
+ CustomField int NOT NULL ,
+ Content varchar(255) NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
+ PRIMARY KEY (id)
+
+);
+
+-- }}}
+
+-- {{{ CustomFields
+
+
+
+--
+-- Sequences for table CUSTOMFIELDS
+--
+
+CREATE SEQUENCE customfields_id_seq;
+
+CREATE TABLE CustomFields (
+ id INTEGER DEFAULT nextval('customfields_id_seq'),
+ Name varchar(200) NULL ,
+ Type varchar(200) NULL ,
Queue integer NOT NULL DEFAULT 0 ,
- Name varchar(40) NOT NULL ,
- Description varchar(120) ,
- Type varchar(16) ,
- Language varchar(16) ,
- TranslationOf integer ,
- Content TEXT ,
- LastUpdated timestamp ,
- LastUpdatedBy integer ,
- Creator integer ,
- Created timestamp ,
+ Description varchar(255) NULL ,
+ SortOrder integer NOT NULL DEFAULT 0 ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
+
+);
+
+-- }}}
+
+-- {{{ CustomFieldValues
+
+
+
+--
+-- Sequences for table CUSTOMFIELDVALUES
+--
+
+CREATE SEQUENCE customfieldvalues_id_seq;
+
+CREATE TABLE CustomFieldValues (
+ id INTEGER DEFAULT nextval('customfieldvalues_id_seq'),
+ CustomField int NOT NULL ,
+ Name varchar(200) NULL ,
+ Description varchar(255) NULL ,
+ SortOrder integer NOT NULL DEFAULT 0 ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created TIMESTAMP NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated TIMESTAMP NULL ,
+ PRIMARY KEY (id)
+
+);
+
+-- }}}
+
+-- {{{ Sessions
+
+-- sessions is used by Apache::Session to keep sessions in the database.
+-- We should have a reaper script somewhere.
+
+CREATE TABLE sessions (
+ id char(32) NOT NULL,
+ a_session bytea,
+ LastUpdated TIMESTAMP not null default current_timestamp,
+ PRIMARY KEY (id)
+
);
+
+-- }}}
+
+
+
+COMMIT;
diff --git a/rt/etc/schema.mysql b/rt/etc/schema.mysql
index 7e715c201..46f8ec562 100755
--- a/rt/etc/schema.mysql
+++ b/rt/etc/schema.mysql
@@ -1,21 +1,9 @@
-CREATE TABLE KeywordSelects (
- id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(255) NULL ,
- Keyword integer NULL ,
- Single integer NULL ,
- Depth integer NOT NULL DEFAULT 0 ,
- ObjectType varchar(32) NOT NULL ,
- ObjectField varchar(32) NULL ,
- ObjectValue varchar(255) NULL ,
- Disabled int2 NOT NULL DEFAULT 0 ,
- PRIMARY KEY (id)
-);
-CREATE INDEX KeywordSelects1 ON KeywordSelects (Keyword);
-CREATE INDEX KeywordSelects2 ON KeywordSelects (ObjectType, ObjectField, ObjectValue);
+# {{{ Attachments
+
CREATE TABLE Attachments (
id INTEGER NOT NULL AUTO_INCREMENT,
TransactionId integer NOT NULL ,
- Parent integer NULL ,
+ Parent integer NOT NULL DEFAULT 0 ,
MessageId varchar(160) NULL ,
Subject varchar(255) NULL ,
Filename varchar(255) NULL ,
@@ -23,161 +11,222 @@ CREATE TABLE Attachments (
ContentEncoding varchar(80) NULL ,
Content LONGTEXT NULL ,
Headers LONGTEXT NULL ,
- Creator integer NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-);
-CREATE INDEX Attachments1 ON Attachments (Parent);
-CREATE INDEX Attachments2 ON Attachments (TransactionId);
-CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId);
+) TYPE=InnoDB;
+
+CREATE INDEX Attachments1 ON Attachments (Parent) ;
+CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
+CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
+# }}}
+
+# {{{ Queues
CREATE TABLE Queues (
id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(120) NOT NULL ,
- Description varchar(120) NULL ,
+ Name varchar(200) NOT NULL ,
+ Description varchar(255) NULL ,
CorrespondAddress varchar(120) NULL ,
CommentAddress varchar(120) NULL ,
- InitialPriority integer NULL ,
- FinalPriority integer NULL ,
- DefaultDueIn integer NULL ,
- Creator integer NULL ,
+ InitialPriority integer NOT NULL DEFAULT 0 ,
+ FinalPriority integer NOT NULL DEFAULT 0 ,
+ DefaultDueIn integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX Queues1 ON Queues (Name);
+) TYPE=InnoDB;
+CREATE UNIQUE INDEX Queues1 ON Queues (Name) ;
+CREATE INDEX Queues2 ON Queues (Disabled) ;
+
+# }}}
+
+# {{{ Links
+
CREATE TABLE Links (
id INTEGER NOT NULL AUTO_INCREMENT,
Base varchar(240) NULL ,
Target varchar(240) NULL ,
Type varchar(20) NOT NULL ,
- LocalTarget integer NULL ,
- LocalBase integer NULL ,
- LastUpdatedBy integer NULL ,
+ LocalTarget integer NOT NULL DEFAULT 0 ,
+ LocalBase integer NOT NULL DEFAULT 0 ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
- Creator integer NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type);
+) 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) ;
+
+# }}}
+
+# {{{ Principals
+
+CREATE TABLE Principals (
+ id INTEGER AUTO_INCREMENT not null,
+ PrincipalType VARCHAR(16) not null,
+ ObjectId integer, # foreign key to Users or Groups, depending
+ Disabled int2 NOT NULL DEFAULT 0 ,
+ PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+CREATE INDEX Principals2 ON Principals (ObjectId);
+
+# }}}
+
+# {{{ Groups
+
CREATE TABLE Groups (
id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(16) NULL ,
- Description varchar(64) NULL ,
- Pseudo integer NOT NULL DEFAULT 0 ,
- PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX Groups1 ON Groups (Name);
-CREATE TABLE Watchers (
- id INTEGER NOT NULL AUTO_INCREMENT,
- Type varchar(16) NULL ,
- Scope varchar(16) NULL ,
- Value integer NULL ,
- Email varchar(255) NULL ,
- Quiet integer NULL ,
- Owner integer NULL ,
- Creator integer NULL ,
- Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
- LastUpdated DATETIME NULL ,
+ Name varchar(200) NULL ,
+ Description varchar(255) NULL ,
+ Domain varchar(64),
+ Type varchar(64),
+ Instance varchar(64),
PRIMARY KEY (id)
-);
-CREATE INDEX Watchers1 ON Watchers (Scope, Value, Type, Owner);
+) TYPE=InnoDB;
+
+CREATE INDEX Groups1 ON Groups (Domain,Instance,Type,id);
+CREATE INDEX Groups2 On Groups (Type, Instance, Domain);
+
+# }}}
+
+# {{{ ScripConditions
+
CREATE TABLE ScripConditions (
id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(255) NULL ,
+ Name varchar(200) NULL ,
Description varchar(255) NULL ,
ExecModule varchar(60) NULL ,
Argument varchar(255) NULL ,
ApplicableTransTypes varchar(60) NULL ,
- Creator integer NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-);
+) TYPE=InnoDB;
+
+# }}}
+
+# {{{ Transactions
CREATE TABLE Transactions (
id INTEGER NOT NULL AUTO_INCREMENT,
- EffectiveTicket integer NULL ,
- Ticket integer NULL ,
- TimeTaken integer NULL ,
+ 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 ,
Data varchar(100) NULL ,
- Creator integer NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
PRIMARY KEY (id)
-);
+) TYPE=InnoDB;
CREATE INDEX Transactions1 ON Transactions (Ticket);
CREATE INDEX Transactions2 ON Transactions (EffectiveTicket);
+
+# }}}
+
+# {{{ Scrips
+
CREATE TABLE Scrips (
id INTEGER NOT NULL AUTO_INCREMENT,
- ScripCondition integer NULL ,
- ScripAction integer NULL ,
+ Description varchar(255),
+ ScripCondition integer NOT NULL DEFAULT 0 ,
+ ScripAction integer NOT NULL DEFAULT 0 ,
+ ConditionRules text NULL ,
+ ActionRules text NULL ,
+ CustomIsApplicableCode text NULL ,
+ CustomPrepareCode text NULL ,
+ CustomCommitCode text NULL ,
Stage varchar(32) NULL ,
- Queue integer NULL ,
- Template integer NULL ,
- Creator integer NULL ,
+ Queue integer NOT NULL DEFAULT 0 ,
+ Template integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-);
+) TYPE=InnoDB;
+
+# }}}
+
+# {{{ ACL
CREATE TABLE ACL (
id INTEGER NOT NULL AUTO_INCREMENT,
- PrincipalId integer NULL ,
- PrincipalType varchar(25) NULL ,
- RightName varchar(25) NULL ,
- RightScope varchar(25) NULL ,
- RightAppliesTo integer NULL ,
+ PrincipalType varchar(25) NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor", "Requestor"
+
+ PrincipalId integer NOT NULL , #Foreign key to principals
+ RightName varchar(25) NOT NULL ,
+ ObjectType varchar(25) NOT NULL ,
+ ObjectId integer NOT NULL default 0,
+ DelegatedBy integer NOT NULL default 0, #foreign key to principals with a userid
+ DelegatedFrom integer NOT NULL default 0, #foreign key to ACL
PRIMARY KEY (id)
-);
-CREATE INDEX ACL1 ON ACL (RightScope, PrincipalId);
-CREATE INDEX ACL2 ON ACL (RightScope, RightAppliesTo, RightName, PrincipalType, PrincipalId);
+) TYPE=InnoDB;
+
+CREATE INDEX ACL1 on ACL(RightName, ObjectType, ObjectId,PrincipalType,PrincipalId);
+
+# }}}
+
+# {{{ GroupMembers
+
CREATE TABLE GroupMembers (
id INTEGER NOT NULL AUTO_INCREMENT,
- GroupId integer NULL ,
- UserId integer NULL ,
- PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, UserId);
-CREATE TABLE ObjectKeywords (
- id INTEGER NOT NULL AUTO_INCREMENT,
- Keyword integer NOT NULL ,
- KeywordSelect integer NOT NULL ,
- ObjectType varchar(32) NOT NULL ,
- ObjectId integer NOT NULL ,
- PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX ObjectKeywords1 ON ObjectKeywords (ObjectId, ObjectType, KeywordSelect, Keyword);
-CREATE INDEX ObjectKeywords2 ON ObjectKeywords (ObjectId, ObjectType);
-CREATE INDEX ObjectKeywords3 ON ObjectKeywords (Keyword);
-CREATE TABLE Keywords (
- id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(255) NOT NULL ,
- Description varchar(255) NULL ,
- Parent integer NULL ,
- Disabled int2 NOT NULL DEFAULT 0 ,
+ GroupId integer NOT NULL DEFAULT 0,
+ MemberId integer NOT NULL DEFAULT 0, #Foreign key to Principals
PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX Keywords1 ON Keywords (Name, Parent);
-CREATE INDEX Keywords2 ON Keywords (Name);
-CREATE INDEX Keywords3 ON Keywords (Parent);
+) TYPE=InnoDB;
+CREATE UNIQUE INDEX GroupMembers1 on GroupMembers (GroupId, MemberId);
+
+
+# }}}
+
+# {{{ GroupMembersCache
+
+create table CachedGroupMembers (
+ id int auto_increment,
+ GroupId int, # foreign key to Principals
+ MemberId int, # foreign key to Principals
+ Via int, #foreign key to CachedGroupMembers. (may point to $self->id)
+ ImmediateParentId int, #foreign key to prinicpals.
+ # this points to the group that the member is
+ # a member of, for ease of deletes.
+ Disabled int2 NOT NULL DEFAULT 0 , # if this cached group member is a member of this group by way of a disabled
+ # group or this group is disabled, this will be set to 1
+ # this allows us to not find members of disabled subgroups when listing off
+ # group members recursively.
+ # Also, this allows us to have the ACL system elide members of disabled groups
+ PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+CREATE INDEX DisGrouMem on CachedGroupMembers (GroupId,MemberId,Disabled);
+CREATE INDEX GrouMem on CachedGroupMembers (GroupId,MemberId);
+
+# }}}
+
+# {{{ Users
+
CREATE TABLE Users (
id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(120) NOT NULL ,
+ Name varchar(200) NOT NULL ,
Password varchar(40) NULL ,
Comments blob NULL ,
Signature blob NULL ,
EmailAddress varchar(120) NULL ,
FreeformContactInfo blob NULL ,
Organization varchar(200) NULL ,
- Privileged integer NULL ,
RealName varchar(120) NULL ,
- Nickname varchar(16) NULL ,
+ NickName varchar(16) NULL ,
Lang varchar(16) NULL ,
EmailEncoding varchar(16) NULL ,
WebEncoding varchar(16) NULL ,
@@ -196,72 +245,172 @@ CREATE TABLE Users (
State varchar(100) NULL ,
Zip varchar(16) NULL ,
Country varchar(50) NULL ,
- Creator integer NULL ,
+ Timezone varchar(50) NULL ,
+ PGPKey text NULL,
+
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
- Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-);
-CREATE UNIQUE INDEX Users1 ON Users (Name);
+) TYPE=InnoDB;
+
+
+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);
+
+
+# }}}
+
+# {{{ Tickets
+
CREATE TABLE Tickets (
id INTEGER NOT NULL AUTO_INCREMENT,
- EffectiveId integer NULL ,
- Queue integer NULL ,
+ EffectiveId integer NOT NULL DEFAULT 0 ,
+ Queue integer NOT NULL DEFAULT 0 ,
Type varchar(16) NULL ,
- IssueStatement integer NULL ,
- Resolution integer NULL ,
- Owner integer NULL ,
+ IssueStatement integer NOT NULL DEFAULT 0 ,
+ Resolution integer NOT NULL DEFAULT 0 ,
+ Owner integer NOT NULL DEFAULT 0 ,
Subject varchar(200) NULL DEFAULT '[no subject]' ,
- InitialPriority integer NULL ,
- FinalPriority integer NULL ,
- Priority integer NULL ,
+ InitialPriority integer NOT NULL DEFAULT 0 ,
+ FinalPriority integer NOT NULL DEFAULT 0 ,
+ Priority integer NOT NULL DEFAULT 0 ,
+ TimeEstimated integer NOT NULL DEFAULT 0 ,
+ TimeWorked integer NOT NULL DEFAULT 0 ,
Status varchar(10) NULL ,
- TimeWorked integer NULL ,
- TimeLeft integer NULL ,
+ TimeLeft integer NOT NULL DEFAULT 0 ,
Told DATETIME NULL ,
Starts DATETIME NULL ,
Started DATETIME NULL ,
Due DATETIME NULL ,
Resolved DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+
+
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
- Creator integer NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
Disabled int2 NOT NULL DEFAULT 0 ,
PRIMARY KEY (id)
-);
-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);
+) TYPE=InnoDB;
+
+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) ;
+
+# }}}
+
+# {{{ ScripActions
+
CREATE TABLE ScripActions (
id INTEGER NOT NULL AUTO_INCREMENT,
- Name varchar(255) NULL ,
+ Name varchar(200) NULL ,
Description varchar(255) NULL ,
ExecModule varchar(60) NULL ,
Argument varchar(255) NULL ,
- Creator integer NULL ,
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
- LastUpdatedBy integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
LastUpdated DATETIME NULL ,
PRIMARY KEY (id)
-);
+) TYPE=InnoDB;
+
+# }}}
+
+# {{{ Templates
+
CREATE TABLE Templates (
id INTEGER NOT NULL AUTO_INCREMENT,
Queue integer NOT NULL DEFAULT 0 ,
- Name varchar(40) NOT NULL ,
- Description varchar(120) NULL ,
+ Name varchar(200) NOT NULL ,
+ Description varchar(255) NULL ,
Type varchar(16) NULL ,
Language varchar(16) NULL ,
- TranslationOf integer NULL ,
+ TranslationOf integer NOT NULL DEFAULT 0 ,
Content blob NULL ,
LastUpdated DATETIME NULL ,
- LastUpdatedBy integer NULL ,
- Creator integer NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ Creator integer NOT NULL DEFAULT 0 ,
+ Created DATETIME NULL ,
+ PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+# }}}
+
+# {{{ TicketCustomFieldValues
+
+CREATE TABLE TicketCustomFieldValues (
+ id INTEGER NOT NULL AUTO_INCREMENT,
+ Ticket int NOT NULL ,
+ CustomField int NOT NULL ,
+ Content varchar(255) NULL ,
+
+ Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,
+ LastUpdatedBy integer NOT NULL DEFAULT 0 ,
+ LastUpdated DATETIME NULL ,
+ PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+# }}}
+
+# {{{ CustomFields
+
+CREATE TABLE CustomFields (
+ id INTEGER NOT NULL AUTO_INCREMENT,
+ Name varchar(200) NULL ,
+ Type varchar(200) NULL ,
+ Queue integer NOT NULL DEFAULT 0 ,
+ Description varchar(255) 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 ,
+ Disabled int2 NOT NULL DEFAULT 0 ,
+ PRIMARY KEY (id)
+) TYPE=InnoDB;
+
+CREATE INDEX CustomFields1 on CustomFields (Disabled, Queue);
+
+
+# }}}
+
+# {{{ CustomFieldValues
+
+CREATE TABLE CustomFieldValues (
+ id INTEGER NOT NULL AUTO_INCREMENT,
+ CustomField int NOT NULL ,
+ Name varchar(200) NULL ,
+ Description varchar(255) 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;
+
+# }}}
+
+# {{{ Sessions
+
+# sessions is used by Apache::Session to keep sessions in the database.
+# We should have a reaper script somewhere.
+
+CREATE TABLE sessions (
+ id char(32) NOT NULL,
+ a_session LONGTEXT,
+ LastUpdated TIMESTAMP,
+ PRIMARY KEY (id)
);
+
+# }}}
diff --git a/rt/etc/schema.pm b/rt/etc/schema.pm
deleted file mode 100644
index 44e143ecd..000000000
--- a/rt/etc/schema.pm
+++ /dev/null
@@ -1,349 +0,0 @@
-# column, type, nullability, length, default, database-local
-
-my $gratuitous = {
-
-'Groups' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', 'NULL', '16', '', '',
- 'Description', 'varchar', 'NULL', '64', '', '',
- 'Pseudo', 'integer', '', '', '0', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ['Name'] ],
- 'index' => [ ],
-},
-
-'ACL' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'PrincipalId', 'integer', 'NULL', '', '', '',
- 'PrincipalType', 'varchar', 'NULL', '25', '', '',
- 'RightName', 'varchar', 'NULL', '25', '', '',
- 'RightScope', 'varchar', 'NULL', '25', '', '',
- 'RightAppliesTo', 'integer', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ['RightScope', 'PrincipalId'],
- ['RightScope','RightAppliesTo','RightName','PrincipalType','PrincipalId'] ],
-},
-
-'Watchers' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Type', 'varchar', 'NULL', '16', '', '',
- 'Scope', 'varchar', 'NULL', '16', '', '',
- 'Value', 'integer', 'NULL', '', '', '',
- 'Email', 'varchar', 'NULL', '255', '', '',
- 'Quiet', 'integer', 'NULL', '', '', '',
- 'Owner', 'integer', 'NULL', '', '', '',
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ['Scope','Value','Type','Owner'] ],
-},
-
-'Links' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Base', 'varchar', 'NULL', '240', '', '',
- 'Target', 'varchar', 'NULL', '240', '', '',
- 'Type', 'varchar', '', '20', '', '',
- 'LocalTarget', 'integer', 'NULL', '', '', '',
- 'LocalBase', 'integer', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ['Base', 'Target', 'Type'] ],
- 'index' => [ ],
-},
-
-'Users' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', '', '120', '', '',
- 'Password', 'varchar', 'NULL', '40', '', '',
- 'Comments', 'blob', 'NULL', '', '', '',
- 'Signature', 'blob', 'NULL', '', '', '',
- 'EmailAddress', 'varchar', 'NULL', '120', '', '',
- 'FreeformContactInfo', 'blob', 'NULL', '', '', '',
- 'Organization', 'varchar', 'NULL', '200', '', '',
- 'Privileged', 'integer', 'NULL', '', '', '',
- 'RealName', 'varchar', 'NULL', '120', '', '',
- 'Nickname', 'varchar', 'NULL', '16', '', '',
- 'Lang', 'varchar', 'NULL', '16', '', '',
- 'EmailEncoding', 'varchar', 'NULL', '16', '', '',
- 'WebEncoding', 'varchar', 'NULL', '16', '', '',
- 'ExternalContactInfoId', 'varchar', 'NULL', '100', '', '',
- 'ContactInfoSystem', 'varchar', 'NULL', '30', '', '',
- 'ExternalAuthId', 'varchar', 'NULL', '100', '', '',
- 'AuthSystem', 'varchar', 'NULL', '30', '', '',
- 'Gecos', 'varchar', 'NULL', '16', '', '',
- 'HomePhone', 'varchar', 'NULL', '30', '', '',
- 'WorkPhone', 'varchar', 'NULL', '30', '', '',
- 'MobilePhone', 'varchar', 'NULL', '30', '', '',
- 'PagerPhone', 'varchar', 'NULL', '30', '', '',
- 'Address1', 'varchar', 'NULL', '200', '', '',
- 'Address2', 'varchar', 'NULL', '200', '', '',
- 'City', 'varchar', 'NULL', '100', '', '',
- 'State', 'varchar', 'NULL', '100', '', '',
- 'Zip', 'varchar', 'NULL', '16', '', '',
- 'Country', 'varchar', 'NULL', '50', '', '',
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- 'Disabled', 'int2', '','','0','',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ['Name'] ],
- 'index' => [ ['Name'],
- ['id', 'EmailAddress'],
- ['EmailAddress'] ],
-},
-
-'Tickets' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'EffectiveId', 'integer', 'NULL', '', '', '',
- 'Queue', 'integer', 'NULL', '', '', '',
- 'Type', 'varchar', 'NULL', '16', '', '',
- 'IssueStatement', 'integer', 'NULL', '', '', '',
- 'Resolution', 'integer', 'NULL', '', '', '',
- 'Owner', 'integer', 'NULL', '', '', '',
- 'Subject', 'varchar', 'NULL', '200', '[no subject]', '',
- 'InitialPriority', 'integer', 'NULL', '', '', '',
- 'FinalPriority', 'integer', 'NULL', '', '', '',
- 'Priority', 'integer', 'NULL', '', '', '',
- 'Status', 'varchar', 'NULL', '10', '', '',
- 'TimeWorked', 'integer', 'NULL', '', '', '',
- 'TimeLeft', 'integer', 'NULL', '', '', '',
- 'Told', 'timestamp', 'NULL', '', '', '',
- 'Starts', 'timestamp', 'NULL', '', '', '',
- 'Started', 'timestamp', 'NULL', '', '', '',
- 'Due', 'timestamp', 'NULL', '', '', '',
- 'Resolved', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'Disabled', 'int2', '','','0','',
- ],
- 'primary_key' => 'id',
- 'unique' => [ [] ],
- 'index' => [ ['Queue', 'Status'],
- ['Owner'],
- ['EffectiveId'],
- ['id', 'Status'],
- ['id', 'EffectiveId'] ],
-},
-
-'GroupMembers' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'GroupId', 'integer', 'NULL', '', '', '', #foreign key, Groups::id
- 'UserId', 'integer', 'NULL', '', '', '', #foreign key, Users::id
- ],
- 'primary_key' => 'id',
- 'unique' => [ ['GroupId', 'UserId'] ],
- 'index' => [ ],
-},
-
-'Queues' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', '', '120', '', '', #Textual 'name' for this queue
- 'Description', 'varchar', 'NULL', '120', '', '', #Textual descr. of this
- #queue
- 'CorrespondAddress', 'varchar', 'NULL', '120', '', '',
- 'CommentAddress', 'varchar', 'NULL', '120', '', '',
- 'InitialPriority', 'integer', 'NULL', '', '', '',
- 'FinalPriority', 'integer', 'NULL', '', '', '',
- 'DefaultDueIn', 'integer', 'NULL', '', '', '',
-
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- 'Disabled', 'int2', '','','0','',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ['Name'] ],
- 'index' => [ ],
-},
-
-'Transactions' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'EffectiveTicket', 'integer', 'NULL', '', '', '',
- 'Ticket', 'integer', 'NULL', '', '', '', #Foreign key Ticket::id
- 'TimeTaken', 'integer', 'NULL', '', '', '', #Time spent on this trans in min
- 'Type', 'varchar', 'NULL', '20', '', '',
- 'Field', 'varchar', 'NULL', '40', '', '', #If it's a "Set" transaction, what
- #field was set.
- 'OldValue', 'varchar', 'NULL', '255', '', '',
- 'NewValue', 'varchar', 'NULL', '255', '', '',
- 'Data', 'varchar', 'NULL', '100', '', '',
-
-
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
-
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ['Ticket'], ['EffectiveTicket'] ],
-},
-
-'ScripActions' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', 'NULL', '255', '', '', # Alias
- 'Description', 'varchar', 'NULL', '255', '', '', #Textual description
- 'ExecModule', 'varchar', 'NULL', '60', '', '', #This calles RT::Action::___
- 'Argument', 'varchar', 'NULL', '255', '', '', #We can pass a single argument
- #to the scrip. sometimes, it's who to send mail to.
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ],
-},
-
-'ScripConditions' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', 'NULL', '255', '', '', # Alias
- 'Description', 'varchar', 'NULL', '255', '', '', #Textual description
- 'ExecModule', 'varchar', 'NULL', '60', '', '', #This calles RT::Condition::
- 'Argument', 'varchar', 'NULL', '255', '', '', #We can pass a single argument
- #to the scrip. sometimes, it's who to send mail to.
- 'ApplicableTransTypes', 'varchar', 'NULL', '60', '', '',#Transaction types this scrip
- # acts on. comma or / delimited is just great.
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ],
-},
-'Scrips' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'ScripCondition', 'integer', 'NULL', '', '', '', #Foreign key ScripConditions::id
- 'ScripAction', 'integer', 'NULL', '', '', '', #Foreign key ScripActions::id
- 'Stage', 'varchar', 'NULL', '32','','', #What stage does this scrip
- #Happen in. for now, everything is 'TransactionCreate',
- 'Queue', 'integer', 'NULL', '', '', '', #Foreign key Queues::id
- 'Template', 'integer', 'NULL', '', '', '', #Foreign key Templates::id
-
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ],
-},
-
-'Attachments' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'TransactionId', 'integer', '', '', '', '', #Foreign key Transactions::Id
- 'Parent', 'integer', 'NULL', '', '', '', # Attachments::Id
- 'MessageId', 'varchar', 'NULL', '160', '', '', #RFC822 messageid, if any
- 'Subject', 'varchar', 'NULL', '255', '', '',
- 'Filename', 'varchar', 'NULL', '255', '', '',
- 'ContentType', 'varchar', 'NULL', '80', '', '',
- 'ContentEncoding', 'varchar', 'NULL', '80', '', '',
- 'Content', 'long varbinary', 'NULL', '', '', '',
- 'Headers', 'long varbinary', 'NULL', '', '', '',
-
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
-
- ],
- 'primary_key' => 'id',
- 'unique' => [ ],
- 'index' => [ ['Parent'], ['TransactionId'], ['Parent', 'TransactionId'] ],
-},
-
-'Templates' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Queue', 'integer', 'NOT NULL', '', '0', '',
- 'Name', 'varchar', '', '40', '', '',
- 'Description', 'varchar', 'NULL', '120', '', '',
- 'Type', 'varchar', 'NULL', '16', '','',
- 'Language', 'varchar', 'NULL', '16', '', '',
- 'TranslationOf', 'integer', 'NULL', '', '', '',
- 'Content', 'blob', 'NULL', '', '', '',
- 'LastUpdated', 'timestamp', 'NULL', '', '', '',
- 'LastUpdatedBy', 'integer', 'NULL', '', '', '',
- 'Creator', 'integer', 'NULL', '', '', '',
- 'Created', 'timestamp', 'NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ [''] ],
- 'index' => [ ],
-},
-
-'Keywords' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name', 'varchar', 'NOT NULL', '255', '', '',
- 'Description', 'varchar', 'NULL', '255', '', '',
- 'Parent', 'integer', 'NULL', '', '', '',
- 'Disabled', 'int2', '','','0','',
-],
- 'primary_key' => 'id',
- 'unique' => [ [ 'Name', 'Parent' ] ],
- 'index' => [ [ 'Name', ], [ 'Parent' ] ],
-},
-
-'ObjectKeywords' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Keyword', 'integer', 'NOT NULL', '', '', '',
- 'KeywordSelect', 'integer', 'NOT NULL', '', '', '',
- 'ObjectType', 'varchar', 'NOT NULL', '32', '', '',
- 'ObjectId', 'integer', 'NOT NULL', '', '', '',
- ],
- 'primary_key' => 'id',
- 'unique' => [ [ 'ObjectId', 'ObjectType','KeywordSelect', 'Keyword' ] ],
- 'index' => [ [ 'ObjectId', 'ObjectType' ] , ['Keyword'] ],
-
-},
-
-'KeywordSelects' => {
- 'columns' => [
- 'id', 'serial', '', '', '', '',
- 'Name','varchar','NULL','255','','',
- 'Keyword', 'integer', 'NULL', '', '', '',
- 'Single', 'integer', 'NULL', '', '', '',
- 'Depth', 'integer', 'NOT NULL', '', 0, '',
- 'ObjectType', 'varchar', 'NOT NULL', '32', '', '',
- 'ObjectField', 'varchar', 'NULL', '32', '', '',
- 'ObjectValue', 'varchar', 'NULL', '255', '', '',
- 'Disabled', 'int2', '','','0','',
- ],
- 'primary_key' => 'id',
- 'unique' => [ [ ] ],
- 'index' => [ [ 'Keyword' ], [ 'ObjectType', 'ObjectField', 'ObjectValue'] ],
-},
-
-};
diff --git a/rt/lib/MANIFEST b/rt/lib/MANIFEST
deleted file mode 100644
index cda386be5..000000000
--- a/rt/lib/MANIFEST
+++ /dev/null
@@ -1,57 +0,0 @@
-MANIFEST
-MANIFEST.SKIP
-Makefile.PL
-RT.pm
-test.pl
-RT/ACE.pm
-RT/ACL.pm
-RT/Action/Generic.pm
-RT/Action/NotifyAsComment.pm
-RT/Action/OpenDependent.pm
-RT/Action/SendEmail.pm
-RT/Action/StallDependent.pm
-RT/Action/Notify.pm
-RT/Action/ResolveMembers.pm
-RT/Attachment.pm
-RT/Attachments.pm
-RT/Condition/AnyTransaction.pm
-RT/Condition/Generic.pm
-RT/Condition/NewDependency.pm
-RT/CurrentUser.pm
-RT/Date.pm
-RT/EasySearch.pm
-RT/Group.pm
-RT/GroupMember.pm
-RT/GroupMembers.pm
-RT/Groups.pm
-RT/Handle.pm
-RT/Interface/CLI.pm
-RT/Interface/Email.pm
-RT/Interface/Web.pm
-RT/Keyword.pm
-RT/Keywords.pm
-RT/KeywordSelect.pm
-RT/KeywordSelects.pm
-RT/Link.pm
-RT/Links.pm
-RT/ObjectKeyword.pm
-RT/ObjectKeywords.pm
-RT/Queue.pm
-RT/Queues.pm
-RT/Record.pm
-RT/Scrip.pm
-RT/Scrips.pm
-RT/ScripAction.pm
-RT/ScripActions.pm
-RT/ScripCondition.pm
-RT/ScripConditions.pm
-RT/Template.pm
-RT/Templates.pm
-RT/Ticket.pm
-RT/Tickets.pm
-RT/Transaction.pm
-RT/Transactions.pm
-RT/User.pm
-RT/Users.pm
-RT/Watcher.pm
-RT/Watchers.pm
diff --git a/rt/lib/MANIFEST.SKIP b/rt/lib/MANIFEST.SKIP
deleted file mode 100644
index ae335e78a..000000000
--- a/rt/lib/MANIFEST.SKIP
+++ /dev/null
@@ -1 +0,0 @@
-CVS/
diff --git a/rt/lib/Makefile.PL b/rt/lib/Makefile.PL
deleted file mode 100644
index c0e1af28c..000000000
--- a/rt/lib/Makefile.PL
+++ /dev/null
@@ -1,49 +0,0 @@
-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
- 'NAME' => 'RT',
- 'VERSION_FROM' => 'RT.pm', # finds $VERSION
- 'PREREQ_PM' => {
- 'DBI' => 1.16,
- 'DBIx::SearchBuilder' => '0.48',
- 'Date::Parse' => 0,
- 'Date::Format' => 0,
- 'MIME::Entity' => 5.108,
- 'Mail::Mailer' => '1.20',
- 'Log::Dispatch' => 1.6,
- 'HTML::Entities' => 0,
- 'Text::Wrapper' => 0,
- 'Text::Template' => 0,
- 'Getopt::Long' => 2.24,
- },
-);
-
- {
- package MY;
- sub top_targets {
- my($self) = @_;
- my $out = "POD2TEST_EXE = pod2test\n";
-
- $out .= $self->SUPER::top_targets(@_);
- # $out =~ s/^(pure_all\b.*)/$1 testifypods/m;
-
- $out .= "\n\ntestifypods : \n";
-
- my @pods = (keys %{$self->{MAN1PODS}},
- keys %{$self->{MAN3PODS}});
-
- foreach my $pod (@pods) {
- (my $test = $pod) =~ s/\.(pm|pod)$//;
- $test =~ s/^lib\W//;
- $test =~ s/\W/-/;
- $test =~ s/\//__/g;
- $test = "autogen-$test.t";
- $out .= "\t$self->{NOECHO}\$(POD2TEST_EXE) ".
- "$pod t/$test \n";
- }
-
- return $out;
- }
- }
-
diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm
index 1cfc428ee..90c332bc0 100644
--- a/rt/lib/RT.pm
+++ b/rt/lib/RT.pm
@@ -1,11 +1,82 @@
+# BEGIN LICENSE BLOCK
+#
+# Copyright (c) 1996-2002 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;
-use RT::Handle;
-use RT::CurrentUser;
use strict;
+use RT::I18N;
+use RT::CurrentUser;
+use RT::System;
+
+use vars qw($VERSION $System $SystemUser $Nobody $Handle $Logger
+ $CORE_CONFIG_FILE
+ $SITE_CONFIG_FILE
+ $VENDOR_CONFIG_FILE
+ $BasePath
+ $EtcPath
+ $VarPath
+ $LocalPath
+ $LocalEtcPath
+ $LocalLexiconPath
+ $LogDir
+ $MasonComponentRoot
+ $MasonLocalComponentRoot
+ $MasonDataDir
+ $MasonSessionDir
+);
+
+$VERSION = '3.0.4';
+$CORE_CONFIG_FILE = "/opt/rt3/etc/RT_Config.pm";
+$SITE_CONFIG_FILE = "/opt/rt3/etc/RT_SiteConfig.pm";
+
+$BasePath = '/opt/rt3';
+
+$EtcPath = '/opt/rt3/etc';
+$VarPath = '/opt/rt3/var';
+$LocalPath = '/opt/rt3/local';
+$LocalEtcPath = '/opt/rt3/local/etc';
+$LocalLexiconPath = '/opt/rt3/local/po';
+
+# $MasonComponentRoot is where your rt instance keeps its mason html files
+
+$MasonComponentRoot = '/opt/rt3/share/html';
+
+# $MasonLocalComponentRoot is where your rt instance keeps its site-local
+# mason html files.
+
+$MasonLocalComponentRoot = '/opt/rt3/local/html';
+
+# $MasonDataDir Where mason keeps its datafiles
+
+$MasonDataDir = '/opt/rt3/var/mason_data';
+
+# RT needs to put session data (for preserving state between connections
+# via the web interface)
+$MasonSessionDir = '/opt/rt3/var/session_data';
-use vars qw($VERSION $SystemUser $Nobody $Handle $Logger);
-$VERSION = '!!RT_VERSION!!';
=head1 NAME
@@ -14,19 +85,45 @@ $VERSION = '!!RT_VERSION!!';
=head1 SYNOPSIS
A fully featured request tracker package
-
=head1 DESCRIPTION
=cut
+=item LoadConfig
+
+Load RT's config file. First, go after the core config file.
+After that, try to load the vendor config.
+After that, go after the site config.
+
+=cut
+
+sub LoadConfig {
+ local *Set = sub { $_[0] = $_[1] unless defined $_[0] };
+ if ( -f "$SITE_CONFIG_FILE" ) {
+ require $SITE_CONFIG_FILE
+ || die ("Couldn't load RT config file '$SITE_CONFIG_FILE'\n$@");
+ }
+ require $CORE_CONFIG_FILE
+ || die ("Couldn't load RT config file '$CORE_CONFIG_FILE'\n$@");
+ RT::I18N->Init;
+}
+
+=item Init
+
+ Conenct to the database, set up logging.
+
+=cut
+
sub Init {
+ require RT::Handle;
#Get a database connection
- $Handle = new RT::Handle($RT::DatabaseType);
+ unless ($Handle && $Handle->dbh->ping) {
+ $Handle = RT::Handle->new();
+ }
$Handle->Connect();
-
#RT's system user is a genuine database user. its id lives here
$SystemUser = new RT::CurrentUser();
$SystemUser->LoadByName('RT_System');
@@ -34,7 +131,9 @@ sub Init {
#RT's "nobody user" is a genuine database user. its ID lives here.
$Nobody = new RT::CurrentUser();
$Nobody->LoadByName('Nobody');
-
+
+ $System = RT::System->new();
+
InitLogging();
}
@@ -51,30 +150,81 @@ sub InitLogging {
$, = '';
use Log::Dispatch 1.6;
- use Log::Dispatch::File;
- use Log::Dispatch::Screen;
- $Logger=Log::Dispatch->new();
+ unless ($RT::Logger) {
+
+ $RT::Logger=Log::Dispatch->new();
if ($RT::LogToFile) {
- my $filename = $RT::LogToFileNamed || "$RT::LogDir/rt.log";
- $Logger->add(Log::Dispatch::File->new
+ unless (-d $RT::LogDir && -w $RT::LogDir) {
+ # localizing here would be hard when we don't have a current user yet
+ # die $self->loc("Log directory [_1] not found or couldn't be written.\n RT can't run.", $RT::LogDir);
+ die ("Log directory $RT::LogDir not found or couldn't be written.\n RT can't run.");
+ }
+
+ my $filename;
+ if ($RT::LogToFileNamed =~ m![/\\]!) {
+ # looks like an absolute path.
+ $filename = $RT::LogToFileNamed;
+ }
+ else {
+ $filename = "$RT::LogDir/$RT::LogToFileNamed";
+ }
+ require Log::Dispatch::File;
+
+
+ $RT::Logger->add(Log::Dispatch::File->new
( name=>'rtlog',
min_level=> $RT::LogToFile,
filename=> $filename,
mode=>'append',
- callbacks => sub {my %p=@_; return "[".gmtime(time)."] [".$p{level}."]: $p{message}\n"}
-
+ callbacks => sub { my %p = @_;
+ my ($package, $filename, $line) = caller(5);
+ return "[".gmtime(time)."] [".$p{level}."]: $p{message} ($filename:$line)\n"}
+
+
+
));
}
if ($RT::LogToScreen) {
- $Logger->add(Log::Dispatch::Screen->new
+ require Log::Dispatch::Screen;
+ $RT::Logger->add(Log::Dispatch::Screen->new
( name => 'screen',
min_level => $RT::LogToScreen,
+ callbacks => sub { my %p = @_;
+ my ($package, $filename, $line) = caller(5);
+ return "[".gmtime(time)."] [".$p{level}."]: $p{message} ($filename:$line)\n"
+ },
+
+ stderr => 1
+ ));
+ }
+ if ($RT::LogToSyslog) {
+ require Log::Dispatch::Syslog;
+ $RT::Logger->add(Log::Dispatch::Syslog->new
+ ( name => 'syslog',
+ ident => 'RT',
+ min_level => $RT::LogToSyslog,
+ callbacks => sub { my %p = @_;
+ my ($package, $filename, $line) = caller(5);
+
+ # syswrite() cannot take utf8; turn it off here.
+ Encode::_utf8_off($p{message});
+
+ if ($p{level} eq 'debug') {
+
+ return "$p{message}\n" }
+ else {
+ return "$p{message} ($filename:$line)\n"}
+ },
+
stderr => 1
));
}
+
+ }
+
# {{{ Signal handlers
## This is the default handling of warnings and die'ings in the code
@@ -88,6 +238,7 @@ $SIG{__WARN__} = sub {$RT::Logger->warning($_[0])};
$SIG{__DIE__} = sub {
unless ($^S || !defined $^S ) {
+ $RT::Handle->Rollback();
$RT::Logger->crit("$_[0]");
exit(-1);
}
@@ -127,10 +278,6 @@ sub DropSetGIDPermissions {
}
-=head1 NAME
-
-RT - Request Tracker
-
=head1 SYNOPSIS
=head1 BUGS
@@ -140,7 +287,6 @@ RT - Request Tracker
=begin testing
-ok (require RT::TestHarness);
ok ($RT::Nobody->Name() eq 'Nobody', "Nobody is nobody");
ok ($RT::Nobody->Name() ne 'root', "Nobody isn't named root");
@@ -152,4 +298,7 @@ ok ($RT::SystemUser->Name() ne 'noname', "The system user isn't noname");
=cut
+eval "require RT_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT_Local.pm});
+
1;
diff --git a/rt/lib/RT/ACE.pm b/rt/lib/RT/ACE.pm
index d4681cf44..1501a125e 100755
--- a/rt/lib/RT/ACE.pm
+++ b/rt/lib/RT/ACE.pm
@@ -1,774 +1,304 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ACE.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::ACE - RT\'s ACE object
+=head1 NAME
-=head1 SYNOPSIS
+RT::ACE
- use RT::ACE;
- my $ace = new RT::ACE($CurrentUser);
+=head1 SYNOPSIS
=head1 DESCRIPTION
-
=head1 METHODS
-=begin testing
-
-ok(require RT::TestHarness);
-ok(require RT::ACE);
-
-=end testing
-
=cut
package RT::ACE;
-use RT::Record;
-@ISA= qw(RT::Record);
-
-use vars qw (%SCOPES
- %QUEUERIGHTS
- %SYSTEMRIGHTS
- %LOWERCASERIGHTNAMES
- );
-
-%SCOPES = (
- System => 'System-level right',
- Queue => 'Queue-level right'
- );
-
-# {{{ Descriptions of rights
-
-# Queue rights are the sort of queue rights that can only be granted
-# to real people or groups
-%QUEUERIGHTS = (
- SeeQueue => 'Can this principal see this queue',
- AdminQueue => 'Create, delete and modify queues',
- ShowACL => 'Display Access Control List',
- ModifyACL => 'Modify Access Control List',
- ModifyQueueWatchers => 'Modify the queue watchers',
- AdminKeywordSelects => 'Create, delete and modify keyword selections',
-
-
- ModifyTemplate => 'Modify email templates for this queue',
- ShowTemplate => 'Display email templates for this queue',
- ModifyScrips => 'Modify Scrips for this queue',
- ShowScrips => 'Display Scrips for this queue',
-
- ShowTicket => 'Show ticket summaries',
- ShowTicketComments => 'Show ticket private commentary',
+use RT::Record;
- Watch => 'Sign up as a ticket Requestor or ticket or queue Cc',
- WatchAsAdminCc => 'Sign up as a ticket or queue AdminCc',
- CreateTicket => 'Create tickets in this queue',
- ReplyToTicket => 'Reply to tickets',
- CommentOnTicket => 'Comment on tickets',
- OwnTicket => 'Own tickets',
- ModifyTicket => 'Modify tickets',
- DeleteTicket => 'Delete tickets'
- );
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+sub _Init {
+ my $self = shift;
-# System rights are rights granted to the whole system
-%SYSTEMRIGHTS = (
- SuperUser => 'Do anything and everything',
- AdminKeywords => 'Creatte, delete and modify keywords',
- AdminGroups => 'Create, delete and modify groups',
- AdminUsers => 'Create, Delete and Modify users',
- ModifySelf => 'Modify one\'s own RT account',
-
- );
-
-# }}}
-
-# {{{ Descriptions of principals
-
-%TICKET_METAPRINCIPALS = ( Owner => 'The owner of a ticket',
- Requestor => 'The requestor of a ticket',
- Cc => 'The CC of a ticket',
- AdminCc => 'The administrative CC of a ticket',
- );
-
-# }}}
-
-# {{{ We need to build a hash of all rights, keyed by lower case names
-
-#since you can't do case insensitive hash lookups
-
-foreach $right (keys %QUEUERIGHTS) {
- $LOWERCASERIGHTNAMES{lc $right}=$right;
-}
-foreach $right (keys %SYSTEMRIGHTS) {
- $LOWERCASERIGHTNAMES{lc $right}=$right;
+ $self->Table('ACL');
+ $self->SUPER::_Init(@_);
}
-# }}}
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ACL";
- return($self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub LoadByValues
-=head2 LoadByValues PARAMHASH
-Load an ACE by specifying a paramhash with the following fields:
- PrincipalId => undef,
- PrincipalType => undef,
- RightName => undef,
- RightScope => undef,
- RightAppliesTo => undef,
+=item Create PARAMHASH
-=cut
+Create takes a hash of values and creates a row in the database:
-sub LoadByValues {
- my $self = shift;
- my %args = (PrincipalId => undef,
- PrincipalType => undef,
- RightName => undef,
- RightScope => undef,
- RightAppliesTo => undef,
- @_);
-
- $self->LoadByCols (PrincipalId => $args{'PrincipalId'},
- PrincipalType => $args{'PrincipalType'},
- RightName => $args{'RightName'},
- RightScope => $args{'RightScope'},
- RightAppliesTo => $args{'RightAppliesTo'}
- );
-
- #If we couldn't load it.
- unless ($self->Id) {
- return (0, "ACE not found");
- }
- # if we could
- return ($self->Id, "ACE Loaded");
-
-}
+ varchar(25) 'PrincipalType'.
+ int(11) 'PrincipalId'.
+ varchar(25) 'RightName'.
+ varchar(25) 'ObjectType'.
+ int(11) 'ObjectId'.
+ int(11) 'DelegatedBy'.
+ int(11) 'DelegatedFrom'.
-# }}}
-
-# {{{ sub Create
-
-=head2 Create <PARAMS>
+=cut
-PARAMS is a parameter hash with the following elements:
- PrincipalType => "Queue"|"User"
- PrincipalId => an intentifier you can use to ->Load a user or group
- RightName => the name of a right. in any case
- RightScope => "System" | "Queue"
- RightAppliesTo => a queue id or undef
-=cut
sub Create {
my $self = shift;
- my %args = ( PrincipalId => undef,
- PrincipalType => undef,
- RightName => undef,
- RightScope => undef,
- RightAppliesTo => undef,
- @_
- );
-
- # {{{ Validate the principal
- my ($princ_obj);
- if ($args{'PrincipalType'} eq 'User') {
- $princ_obj = new RT::User($RT::SystemUser);
-
- }
- elsif ($args{'PrincipalType'} eq 'Group') {
- require RT::Group;
- $princ_obj = new RT::Group($RT::SystemUser);
- }
- else {
- return (0, 'Principal type '.$args{'PrincipalType'} . ' is invalid.');
- }
-
- $princ_obj->Load($args{'PrincipalId'});
- my $princ_id = $princ_obj->Id();
-
- unless ($princ_id) {
- return (0, 'Principal '.$args{'PrincipalId'}.' not found.');
- }
-
- # }}}
-
- #TODO allow loading of queues by name.
-
- # {{{ Check the ACL
- if ($args{'RightScope'} eq 'System') {
-
- unless ($self->CurrentUserHasSystemRight('ModifyACL')) {
- $RT::Logger->error("Permission Denied.");
- return(undef);
- }
- }
-
- elsif ($args{'RightScope'} eq 'Queue') {
- unless ($self->CurrentUserHasQueueRight( Queue => $args{'RightAppliesTo'},
- Right => 'ModifyACL')) {
- return (0, 'Permission Denied.');
- }
-
-
-
-
- }
- #If it's not a scope we recognise, something scary is happening.
- else {
- $RT::Logger->err("RT::ACE->Create got a scope it didn't recognize: ".
- $args{'RightScope'}." Bailing. \n");
- return(0,"System error. Unable to grant rights.");
- }
-
- # }}}
-
- # {{{ Canonicalize and check the right name
- $args{'RightName'} = $self->CanonicalizeRightName($args{'RightName'});
-
- #check if it's a valid RightName
- if ($args{'RightScope'} eq 'Queue') {
- unless (exists $QUEUERIGHTS{$args{'RightName'}}) {
- return(0, 'Invalid right');
- }
- }
- elsif ($args{'RightScope' eq 'System'}) {
- unless (exists $SYSTEMRIGHTS{$args{'RightName'}}) {
- return(0, 'Invalid right');
- }
- }
- # }}}
-
- # Make sure the right doesn't already exist.
- $self->LoadByCols (PrincipalId => $princ_id,
- PrincipalType => $args{'PrincipalType'},
- RightName => $args{'RightName'},
- RightScope => $args {'RightScope'},
- RightAppliesTo => $args{'RightAppliesTo'}
- );
- if ($self->Id) {
- return (0, 'That user already has that right');
- }
-
- my $id = $self->SUPER::Create( PrincipalId => $princ_id,
- PrincipalType => $args{'PrincipalType'},
- RightName => $args{'RightName'},
- RightScope => $args {'RightScope'},
- RightAppliesTo => $args{'RightAppliesTo'}
- );
-
-
- if ($id > 0 ) {
- return ($id, 'Right Granted');
- }
- else {
- $RT::Logger->err('System error. right not granted.');
- return(0, 'System Error. right not granted');
- }
-}
-
-# }}}
-
+ my %args = (
+ PrincipalType => '',
+ PrincipalId => '0',
+ RightName => '',
+ ObjectType => '',
+ ObjectId => '0',
+ DelegatedBy => '0',
+ DelegatedFrom => '0',
+
+ @_);
+ $self->SUPER::Create(
+ PrincipalType => $args{'PrincipalType'},
+ PrincipalId => $args{'PrincipalId'},
+ RightName => $args{'RightName'},
+ ObjectType => $args{'ObjectType'},
+ ObjectId => $args{'ObjectId'},
+ DelegatedBy => $args{'DelegatedBy'},
+ DelegatedFrom => $args{'DelegatedFrom'},
+);
-# {{{ sub Delete
-
-=head2 Delete
-
-Delete this object.
-
-=cut
-
-sub Delete {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ModifyACL')) {
- return (0, 'Permission Denied');
- }
-
-
- my ($val,$msg) = $self->SUPER::Delete(@_);
- if ($val) {
- return ($val, 'ACE Deleted');
- }
- else {
- return (0, 'ACE could not be deleted');
- }
}
-# }}}
-# {{{ sub _BootstrapRight
-=head2 _BootstrapRight
+=item id
-Grant a right with no error checking and no ACL. this is _only_ for
-installation. If you use this routine without jesse@fsck.com's explicit
-written approval, he will hunt you down and make you spend eternity
-translating mozilla's code into FORTRAN or intercal.
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-=cut
-
-sub _BootstrapRight {
- my $self = shift;
- my %args = @_;
-
- my $id = $self->SUPER::Create( PrincipalId => $args{'PrincipalId'},
- PrincipalType => $args{'PrincipalType'},
- RightName => $args{'RightName'},
- RightScope => $args {'RightScope'},
- RightAppliesTo => $args{'RightAppliesTo'}
- );
-
- if ($id > 0 ) {
- return ($id);
- }
- else {
- $RT::Logger->err('System error. right not granted.');
- return(undef);
- }
-
-}
-
-# }}}
-
-# {{{ sub CanonicalizeRightName
-
-=head2 CanonicalizeRightName <RIGHT>
-
-Takes a queue or system right name in any case and returns it in
-the correct case. If it's not found, will return undef.
=cut
-sub CanonicalizeRightName {
- my $self = shift;
- my $right = shift;
- $right = lc $right;
- if (exists $LOWERCASERIGHTNAMES{"$right"}) {
- return ($LOWERCASERIGHTNAMES{"$right"});
- }
- else {
- return (undef);
- }
-}
-
-# }}}
-# {{{ sub QueueRights
+=item PrincipalType
-=head2 QueueRights
+Returns the current value of PrincipalType.
+(In the database, PrincipalType is stored as varchar(25).)
-Returns a hash of all the possible rights at the queue scope
-=cut
-sub QueueRights {
- return (%QUEUERIGHTS);
-}
+=item SetPrincipalType VALUE
-# }}}
-# {{{ sub SystemRights
+Set PrincipalType to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, PrincipalType will be stored as a varchar(25).)
-=head2 SystemRights
-
-Returns a hash of all the possible rights at the system scope
=cut
-sub SystemRights {
- return (%SYSTEMRIGHTS);
-}
+=item PrincipalId
-# }}}
+Returns the current value of PrincipalId.
+(In the database, PrincipalId is stored as int(11).)
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- PrincipalId => 'read/write',
- PrincipalType => 'read/write',
- RightName => 'read/write',
- RightScope => 'read/write',
- RightAppliesTo => 'read/write'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-# }}}
-# {{{ sub AppliesToObj
+=item SetPrincipalId VALUE
-=head2 AppliesToObj
-If the AppliesTo is a queue, returns the queue object. If it's
-the system object, returns undef. If the user has no rights, returns undef.
+Set PrincipalId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, PrincipalId will be stored as a int(11).)
-=cut
-
-sub AppliesToObj {
- my $self = shift;
- if ($self->RightScope eq 'Queue') {
- my $appliesto_obj = new RT::Queue($self->CurrentUser);
- $appliesto_obj->Load($self->RightAppliesTo);
- return($appliesto_obj);
- }
- elsif ($self->RightScope eq 'System') {
- return (undef);
- }
- else {
- $RT::Logger->warning("$self -> AppliesToObj called for an object ".
- "of an unknown scope:" . $self->RightScope);
- return(undef);
- }
-}
-
-# }}}
-
-# {{{ sub PrincipalObj
-
-=head2 PrincipalObj
-
-If the AppliesTo is a group, returns the group object.
-If the AppliesTo is a user, returns the user object.
-Otherwise, it logs a warning and returns undef.
=cut
-sub PrincipalObj {
- my $self = shift;
- my ($princ_obj);
-
- if ($self->PrincipalType eq 'Group') {
- use RT::Group;
- $princ_obj = new RT::Group($self->CurrentUser);
- }
- elsif ($self->PrincipalType eq 'User') {
- $princ_obj = new RT::User($self->CurrentUser);
- }
- else {
- $RT::Logger->warning("$self -> PrincipalObj called for an object ".
- "of an unknown principal type:" .
- $self->PrincipalType ."\n");
- return(undef);
- }
-
- $princ_obj->Load($self->PrincipalId);
- return($princ_obj);
-
-}
-
-# }}}
-
-# {{{ ACL related methods
-
-# {{{ sub _Set
-
-sub _Set {
- my $self = shift;
- return (0, "ACEs can only be created and deleted.");
-}
-
-# }}}
-
-# {{{ sub _Value
-
-sub _Value {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ShowACL')) {
- return (undef);
- }
- return ($self->__Value(@_));
-}
-
-# }}}
+=item RightName
+Returns the current value of RightName.
+(In the database, RightName is stored as varchar(25).)
-# {{{ sub CurrentUserHasQueueRight
-=head2 CurrentUserHasQueueRight ( Queue => QUEUEID, Right => RIGHTNANAME )
-Check to see whether the current user has the specified right for the specified queue.
-
-=cut
-
-sub CurrentUserHasQueueRight {
- my $self = shift;
- my %args = (Queue => undef,
- Right => undef,
- @_
- );
- return ($self->HasRight( Right => $args{'Right'},
- Principal => $self->CurrentUser->UserObj,
- Queue => $args{'Queue'}));
-}
+=item SetRightName VALUE
-# }}}
-# {{{ sub CurrentUserHasSystemRight
-=head2 CurrentUserHasSystemRight RIGHTNAME
+Set RightName to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, RightName will be stored as a varchar(25).)
-Check to see whether the current user has the specified right for the 'system' scope.
=cut
-sub CurrentUserHasSystemRight {
- my $self = shift;
- my $right = shift;
- return ($self->HasRight( Right => $right,
- Principal => $self->CurrentUser->UserObj,
- System => 1
- ));
-}
-
-# }}}
+=item ObjectType
-# {{{ sub CurrentUserHasRight
+Returns the current value of ObjectType.
+(In the database, ObjectType is stored as varchar(25).)
-=item CurrentUserHasRight RIGHT
-Takes a rightname as a string.
-
-Helper menthod for HasRight. Presets Principal to CurrentUser then
-calls HasRight.
-
-=cut
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
- return ($self->HasRight( Principal => $self->CurrentUser->UserObj,
- Right => $right,
- ));
-}
-# }}}
+=item SetObjectType VALUE
-# {{{ sub HasRight
-=item HasRight
+Set ObjectType to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ObjectType will be stored as a varchar(25).)
-Takes a param-hash consisting of "Right" and "Principal" Principal is
-an RT::User object or an RT::CurrentUser object. "Right" is a textual
-Right string that applies to KeywordSelects
=cut
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => undef,
- Queue => undef,
- System => undef,
- @_ );
-
- #If we're explicitly specifying a queue, as we need to do on create
- if (defined $args{'Queue'}) {
- return ($args{'Principal'}->HasQueueRight(Right => $args{'Right'},
- Queue => $args{'Queue'}));
- }
- #else if we're specifying to check a system right
- elsif ((defined $args{'System'}) and (defined $args{'Right'})) {
- return( $args{'Principal'}->HasSystemRight( $args{'Right'} ));
- }
-
- elsif ($self->__Value('RightScope') eq 'System') {
- return $args{'Principal'}->HasSystemRight($args{'Right'});
- }
- elsif ($self->__Value('RightScope') eq 'Queue') {
- return $args{'Principal'}->HasQueueRight( Queue => $self->__Value('RightAppliesTo'),
- Right => $args{'Right'} );
- }
- else {
- $RT::Logger->warning("$self: Trying to check an acl for a scope we ".
- "don't understand:" . $self->__Value('RightScope') ."\n");
- return undef;
- }
-
-
-
-}
-# }}}
-
-# }}}
-
-1;
-
-__DATA__
-
-# {{{ POD
-
-=head1 Out of date docs
-=head2 Table Structure
+=item ObjectId
-PrincipalType, PrincipalId, Right,Scope,AppliesTo
+Returns the current value of ObjectId.
+(In the database, ObjectId is stored as int(11).)
-=head1 The docs are out of date. so you know.
-=head1 Scopes
-Scope is the scope of the right granted, not the granularity of the grant.
-For example, Queue and Ticket rights are both granted for a "queue."
-Rights with a scope of 'System' don't have an AppliesTo. (They're global).
-Rights with a scope of "Queue" are rights that act on a queue.
-Rights with a scope of "System" are rights that act on some other aspect
-of the system.
+=item SetObjectId VALUE
-=item Queue
-=item System
+Set ObjectId 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).)
-=head1 Rights
-
-=head2 Scope: Queue
-
-=head2 Queue rights that apply to a ticket within a queue
-
-Create Ticket in <queue>
-
- Name: Create
- Principals: <user> <group>
-Display Ticket Summary in <queue>
-
- Name: Show
- Principals: <user> <group> Owner Requestor Cc AdminCc
-
-Display Ticket History <queue>
-
- Name: ShowHistory
- Principals: <user> <group> Owner Requestor Cc AdminCc
-
-Display Ticket Private Comments <queue>
+=cut
- Name: ShowComments
- Principals: <user> <group> Owner Requestor Cc AdminCc
-Reply to Ticket in <queue>
+=item DelegatedBy
- Name: Reply
- Principals: <user> <group> Owner Requestor Cc AdminCc
+Returns the current value of DelegatedBy.
+(In the database, DelegatedBy is stored as int(11).)
-Comment on Ticket in <queue>
- Name: Comment
- Principals: <user> <group> Owner Requestor Cc AdminCc
-Modify Ticket in <queue>
+=item SetDelegatedBy VALUE
- Name: Modify
- Principals: <user> <group> Owner Requestor Cc AdminCc
-Delete Tickets in <queue>
+Set DelegatedBy to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, DelegatedBy will be stored as a int(11).)
- Name: Delete
- Principals: <user> <group> Owner Requestor Cc AdminCc
+=cut
-=head2 Queue Rights that apply to a whole queue
-These rights can only be granted to "real people"
+=item DelegatedFrom
-List Tickets in <queue>
+Returns the current value of DelegatedFrom.
+(In the database, DelegatedFrom is stored as int(11).)
- Name: ListQueue
- Principals: <user> <group>
-Know that <queue> exists
-
- Name: See
- Principals: <user> <group>
-Display queue settings
+=item SetDelegatedFrom VALUE
- Name: Explore
- Principals: <user> <group>
-Modify Queue Watchers for <queue>
+Set DelegatedFrom to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, DelegatedFrom will be stored as a int(11).)
- Name: ModifyQueueWatchers
- Principals: <user> <group>
-Modify Queue Attributes for <queue>
+=cut
- Name: ModifyQueue
- Principals: <user> <group>
-Modify Queue ACL for queue <queue>
- Name: ModifyACL
- Principals: <user> <group>
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ PrincipalType =>
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
+ PrincipalId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ RightName =>
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
+ ObjectType =>
+ {read => 1, write => 1, type => 'varchar(25)', default => ''},
+ ObjectId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ DelegatedBy =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ DelegatedFrom =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ }
+};
-=head2 Rights that apply to the System scope
-=head2 SystemRights
+ eval "require RT::ACE_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACE_Overlay.pm}) {
+ die $@;
+ };
-Create Queue
-
- Name: CreateQueue
- Principals: <user> <group>
-Delete Queue
-
- Name: DeleteQueue
- Principals: <user> <group>
+ eval "require RT::ACE_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACE_Vendor.pm}) {
+ die $@;
+ };
-Create Users
-
- Name: CreateUser
- Principals: <user> <group>
+ eval "require RT::ACE_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACE_Local.pm}) {
+ die $@;
+ };
-Delete Users
-
- Name: DeleteUser
- Principals: <user> <group>
-
-Modify Users
-
- Name: ModifyUser
- Principals: <user> <group>
-Modify Self
- Name: ModifySelf
- Principals: <user> <group>
-Browse Users
- Name: BrowseUsers (NOT IMPLEMENTED in 2.0)
- Principals: <user> <group>
+=head1 SEE ALSO
-Modify Self
-
- Name: ModifySelf
- Principals: <user> <group>
+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.
-Modify System ACL
+These overlay files can contain new subs or subs to replace existing subs in this module.
- Name: ModifyACL
- Principals: <user> <group>
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-=head1 The Principal Side of the ACE
+ no warnings qw(redefine);
-=head2 PrincipalTypes,PrincipalIds in our Neighborhood
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
- User,<userid>
- Group,<groupip>
- Everyone,NULL
+RT::ACE_Overlay, RT::ACE_Vendor, RT::ACE_Local
=cut
-# }}}
+
+1;
diff --git a/rt/lib/RT/ACL.pm b/rt/lib/RT/ACL.pm
index 444a4c2af..81f59c6d0 100755
--- a/rt/lib/RT/ACL.pm
+++ b/rt/lib/RT/ACL.pm
@@ -1,308 +1,115 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ACL.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Distributed under the terms of the GNU GPL
-# Copyright (c) 2000 Jesse Vincent <jesse@fsck.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
+# 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::ACL - collection of RT ACE objects
+=head1 NAME
+ RT::ACL -- Class Description
+
=head1 SYNOPSIS
- use RT::ACL;
-my $ACL = new RT::ACL($CurrentUser);
+ use RT::ACL
=head1 DESCRIPTION
=head1 METHODS
-=begin testing
-
-ok(require RT::TestHarness);
-ok(require RT::ACL);
-
-=end testing
-
=cut
package RT::ACL;
-use RT::EasySearch;
-use RT::ACE;
-@ISA= qw(RT::EasySearch);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ACL";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_));
-
-}
-# }}}
-
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return(RT::ACE->new($self->CurrentUser));
-}
-# }}}
-
-=head2 Next
-
-Hand out the next ACE that was found
-
-=cut
-
-# {{{ sub Next
-sub Next {
- my $self = shift;
-
- my $ACE = $self->SUPER::Next();
- if ((defined($ACE)) and (ref($ACE))) {
-
- if ( $ACE->CurrentUserHasRight('ShowACL') or
- $ACE->CurrentUserHasRight('ModifyACL')
- ) {
- return($ACE);
- }
-
- #If the user doesn't have the right to show this ACE
- else {
- return($self->Next());
- }
- }
- #if there never was any ACE
- else {
- return(undef);
- }
-
-}
-# }}}
-
-
-=head1 Limit the ACL to a specific scope
-
-There are two real scopes right now:
-
-=item Queue is for rights that apply to a single queue
-
-=item System is for rights that apply to the System (rights that aren't queue related)
-
-
-=head2 LimitToQueue
-
-Takes a single queueid as its argument.
+use RT::SearchBuilder;
+use RT::ACE;
-Limit the ACL to just a given queue when supplied with an integer queue id.
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-=cut
-sub LimitToQueue {
+sub _Init {
my $self = shift;
- my $queue = shift;
-
-
-
- $self->Limit( FIELD =>'RightScope',
- ENTRYAGGREGATOR => 'OR',
- VALUE => 'Queue');
- $self->Limit( FIELD =>'RightScope',
- ENTRYAGGREGATOR => 'OR',
- VALUE => 'Ticket');
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'RightAppliesTo',
- VALUE => $queue );
-
-}
-
-
-=head2 LimitToSystem()
-
-Limit the ACL to system rights
-
-=cut
-
-sub LimitToSystem {
- my $self = shift;
-
- $self->Limit( FIELD =>'RightScope',
- VALUE => 'System');
-}
-
-
-=head2 LimitRightTo
-
-Takes a single RightName as its only argument.
-Limits the search to the right $right.
-$right is a right listed in perldoc RT::ACE
-
-=cut
-
-sub LimitRightTo {
- my $self = shift;
- my $right = shift;
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'RightName',
- VALUE => $right );
-
-}
-
-=head1 Limit to a specifc set of principals
-
-=head2 LimitPrincipalToUser
-
-Takes a single userid as its only argument.
-Limit the ACL to a just a specific user.
-
-=cut
-
-sub LimitPrincipalToUser {
- my $self = shift;
- my $user = shift;
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalType',
- VALUE => 'User' );
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalId',
- VALUE => $user );
-
-}
-
+ $self->{'table'} = 'ACL';
+ $self->{'primary_key'} = 'id';
-=head2 LimitPrincipalToGroup
-
-Takes a single group as its only argument.
-Limit the ACL to just a specific group.
-
-=cut
-
-sub LimitPrincipalToGroup {
- my $self = shift;
- my $group = shift;
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalType',
- VALUE => 'Group' );
-
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalId',
- VALUE => $group );
+ return ( $self->SUPER::_Init(@_) );
}
-=head2 LimitPrincipalToType($type)
-Takes a single argument, $type.
-Limit the ACL to just a specific principal type
+=item NewItem
-$type is one of:
- TicketOwner
- TicketRequestor
- TicketCc
- TicketAdminCc
- Everyone
- User
- Group
+Returns an empty new RT::ACE item
=cut
-sub LimitPrincipalToType {
- my $self=shift;
- my $type=shift;
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalType',
- VALUE => $type );
+sub NewItem {
+ my $self = shift;
+ return(RT::ACE->new($self->CurrentUser));
}
+ eval "require RT::ACL_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACL_Overlay.pm}) {
+ die $@;
+ };
-=head2 LimitPrincipalToId
+ eval "require RT::ACL_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACL_Vendor.pm}) {
+ die $@;
+ };
-Takes a single argument, the numeric Id of the principal to limit this ACL to. Repeated calls to this
-function will broaden the scope of the search to include all principals listed.
-
-=cut
-
-sub LimitPrincipalToId {
- my $self = shift;
- my $id = shift;
-
- if ($id =~ /^\d+$/) {
- $self->Limit(ENTRYAGGREGATOR => 'OR',
- FIELD => 'PrincipalId',
- VALUE => $id );
- }
- else {
- $RT::Logger->warn($self."->LimitPrincipalToId called with '$id' as an id");
- return undef;
- }
-}
+ eval "require RT::ACL_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ACL_Local.pm}) {
+ die $@;
+ };
-#wrap around _DoSearch so that we can build the hash of returned
-#values
-sub _DoSearch {
- my $self = shift;
- # $RT::Logger->debug("Now in ".$self."->_DoSearch");
- my $return = $self->SUPER::_DoSearch(@_);
- # $RT::Logger->debug("In $self ->_DoSearch. return from SUPER::_DoSearch was $return\n");
- $self->_BuildHash();
- return ($return);
-}
-#Build a hash of this ACL's entries.
-sub _BuildHash {
- my $self = shift;
+=head1 SEE ALSO
- while (my $entry = $self->Next) {
- my $hashkey = $entry->RightScope . "-" .
- $entry->RightAppliesTo . "-" .
- $entry->RightName . "-" .
- $entry->PrincipalId . "-" .
- $entry->PrincipalType;
+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.
- $self->{'as_hash'}->{"$hashkey"} =1;
+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);
-# {{{ HasEntry
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-=head2 HasEntry
+RT::ACL_Overlay, RT::ACL_Vendor, RT::ACL_Local
=cut
-sub HasEntry {
-
- my $self = shift;
- my %args = ( RightScope => undef,
- RightAppliesTo => undef,
- RightName => undef,
- PrincipalId => undef,
- PrincipalType => undef,
- @_ );
-
- #if we haven't done the search yet, do it now.
- $self->_DoSearch();
-
- if ($self->{'as_hash'}->{ $args{'RightScope'} . "-" .
- $args{'RightAppliesTo'} . "-" .
- $args{'RightName'} . "-" .
- $args{'PrincipalId'} . "-" .
- $args{'PrincipalType'}
- } == 1) {
- return(1);
- }
- else {
- return(undef);
- }
-}
-# }}}
1;
diff --git a/rt/lib/RT/Action/Autoreply.pm b/rt/lib/RT/Action/Autoreply.pm
index 624888e94..81f7bddfa 100755
--- a/rt/lib/RT/Action/Autoreply.pm
+++ b/rt/lib/RT/Action/Autoreply.pm
@@ -1,7 +1,31 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Autoreply.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
+# 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
package RT::Action::Autoreply;
require RT::Action::SendEmail;
+
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
@@ -17,7 +41,7 @@ Sets the recipients of this message to this ticket's Requestor.
sub SetRecipients {
my $self=shift;
- push(@{$self->{'To'}}, @{$self->TicketObj->Requestors->Emails});
+ push(@{$self->{'To'}}, $self->TicketObj->Requestors->MemberEmailAddresses);
return(1);
}
@@ -39,6 +63,7 @@ sub SetReturnAddress {
@_
);
+ my $replyto;
if ($args{'is_comment'}) {
$replyto = $self->TicketObj->QueueObj->CommentAddress ||
$RT::CommentAddress;
@@ -49,7 +74,9 @@ sub SetReturnAddress {
}
unless ($self->TemplateObj->MIMEObj->head->get('From')) {
- my $friendly_name=$self->TicketObj->QueueObj->Name;
+ my $friendly_name = $self->TicketObj->QueueObj->Description ||
+ $self->TicketObj->QueueObj->Name;
+ $friendly_name =~ s/"/\\"/g;
$self->SetHeader('From', "\"$friendly_name\" <$replyto>");
}
@@ -61,4 +88,9 @@ sub SetReturnAddress {
# }}}
+eval "require RT::Action::Autoreply_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Autoreply_Vendor.pm});
+eval "require RT::Action::Autoreply_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Autoreply_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/Generic.pm b/rt/lib/RT/Action/Generic.pm
index ecfd4ab1a..007d299c7 100755
--- a/rt/lib/RT/Action/Generic.pm
+++ b/rt/lib/RT/Action/Generic.pm
@@ -1,7 +1,26 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Generic.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
+# 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
=head1 NAME
RT::Action::Generic - a generic baseclass for RT Actions
@@ -16,7 +35,6 @@
=begin testing
-ok (require RT::TestHarness);
ok (require RT::Action::Generic);
=end testing
@@ -25,6 +43,8 @@ ok (require RT::Action::Generic);
package RT::Action::Generic;
+use strict;
+
# {{{ sub new
sub new {
my $proto = shift;
@@ -36,6 +56,13 @@ sub new {
}
# }}}
+# {{{ sub new
+sub loc {
+ my $self = shift;
+ return $self->{'ScripObj'}->loc(@_);
+}
+# }}}
+
# {{{ sub _Init
sub _Init {
my $self = shift;
@@ -87,6 +114,13 @@ sub TemplateObj {
}
# }}}
+# {{{ sub ScripObj
+sub ScripObj {
+ my $self = shift;
+ return($self->{'ScripObj'});
+}
+# }}}
+
# {{{ sub Type
sub Type {
my $self = shift;
@@ -102,7 +136,7 @@ sub Type {
# {{{ sub Commit
sub Commit {
my $self = shift;
- return(0,"Commit Stubbed");
+ return(0, $self->loc("Commit Stubbed"));
}
# }}}
@@ -112,7 +146,7 @@ sub Commit {
# {{{ sub Describe
sub Describe {
my $self = shift;
- return ("No description for " . ref $self);
+ return $self->loc("No description for [_1]", ref $self);
}
# }}}
@@ -122,7 +156,7 @@ sub Describe {
# {{{ sub Prepare
sub Prepare {
my $self = shift;
- return (0,"Prepare Stubbed");
+ return (0, $self->loc("Prepare Stubbed"));
}
# }}}
@@ -152,4 +186,10 @@ sub DESTROY {
}
# }}}
+
+eval "require RT::Action::Generic_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Generic_Vendor.pm});
+eval "require RT::Action::Generic_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Generic_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/Notify.pm b/rt/lib/RT/Action/Notify.pm
index 6dca4fd41..1e4e4c073 100755
--- a/rt/lib/RT/Action/Notify.pm
+++ b/rt/lib/RT/Action/Notify.pm
@@ -1,7 +1,31 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Notify.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
+# 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
package RT::Action::Notify;
require RT::Action::SendEmail;
+
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
# {{{ sub SetRecipients
@@ -9,14 +33,14 @@ require RT::Action::SendEmail;
=head2 SetRecipients
Sets the recipients of this meesage to Owner, Requestor, AdminCc, Cc or All.
-Explicitly B<does not> notify the creator of the transaction.
+Explicitly B<does not> notify the creator of the transaction by default
=cut
sub SetRecipients {
my $self = shift;
- $arg = $self->Argument;
+ my $arg = $self->Argument;
$arg =~ s/\bAll\b/Owner,Requestor,AdminCc,Cc/;
@@ -24,14 +48,14 @@ sub SetRecipients {
if ($arg =~ /\bOtherRecipients\b/) {
- if ($self->TransactionObj->Message->First) {
- push (@Cc, $self->TransactionObj->Message->First->GetHeader('RT-Send-Cc'));
- push (@Bcc, $self->TransactionObj->Message->First->GetHeader('RT-Send-Bcc'));
+ 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'));
}
}
if ( $arg =~ /\bRequestor\b/ ) {
- push ( @To, @{ $self->TicketObj->Requestors->Emails } );
+ push ( @To, $self->TicketObj->Requestors->MemberEmailAddresses );
}
@@ -40,12 +64,12 @@ sub SetRecipients {
#If we have a To, make the Ccs, Ccs, otherwise, promote them to To
if (@To) {
- push ( @Cc, @{ $self->TicketObj->Cc->Emails } );
- push ( @Cc, @{ $self->TicketObj->QueueObj->Cc->Emails } );
+ push ( @Cc, $self->TicketObj->Cc->MemberEmailAddresses );
+ push ( @Cc, $self->TicketObj->QueueObj->Cc->MemberEmailAddresses );
}
else {
- push ( @Cc, @{ $self->TicketObj->Cc->Emails } );
- push ( @To, @{ $self->TicketObj->QueueObj->Cc->Emails } );
+ push ( @Cc, $self->TicketObj->Cc->MemberEmailAddresses );
+ push ( @To, $self->TicketObj->QueueObj->Cc->MemberEmailAddresses );
}
}
@@ -65,15 +89,16 @@ sub SetRecipients {
}
if ( $arg =~ /\bAdminCc\b/ ) {
- push ( @Bcc, @{ $self->TicketObj->AdminCc->Emails } );
- push ( @Bcc, @{ $self->TicketObj->QueueObj->AdminCc->Emails } );
+ push ( @Bcc, $self->TicketObj->AdminCc->MemberEmailAddresses );
+ push ( @Bcc, $self->TicketObj->QueueObj->AdminCc->MemberEmailAddresses );
}
if ($RT::UseFriendlyToLine) {
unless (@To) {
- push ( @PseudoTo,
- "\"$arg of $RT::rtname Ticket #"
- . $self->TicketObj->id . "\":;" );
+ push (
+ @PseudoTo,
+ sprintf($RT::FriendlyToLineFormat, $arg, $self->TicketObj->id),
+ );
}
}
@@ -81,14 +106,17 @@ sub SetRecipients {
#Strip the sender out of the To, Cc and AdminCc and set the
# recipients fields used to build the message by the superclass.
-
- $RT::Logger->debug("$self: To is ".join(",",@To));
- $RT::Logger->debug("$self: Cc is ".join(",",@Cc));
- $RT::Logger->debug("$self: Bcc is ".join(",",@Bcc));
-
- @{ $self->{'To'} } = grep ( !/^$creator$/, @To );
- @{ $self->{'Cc'} } = grep ( !/^$creator$/, @Cc );
- @{ $self->{'Bcc'} } = grep ( !/^$creator$/, @Bcc );
+ # unless a flag is set
+ if ($RT::NotifyActor) {
+ @{ $self->{'To'} } = @To;
+ @{ $self->{'Cc'} } = @Cc;
+ @{ $self->{'Bcc'} } = @Bcc;
+ }
+ else {
+ @{ $self->{'To'} } = grep ( !/^$creator$/, @To );
+ @{ $self->{'Cc'} } = grep ( !/^$creator$/, @Cc );
+ @{ $self->{'Bcc'} } = grep ( !/^$creator$/, @Bcc );
+ }
@{ $self->{'PseudoTo'} } = @PseudoTo;
return (1);
@@ -96,4 +124,9 @@ sub SetRecipients {
# }}}
+eval "require RT::Action::Notify_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Notify_Vendor.pm});
+eval "require RT::Action::Notify_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/Notify_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/NotifyAsComment.pm b/rt/lib/RT/Action/NotifyAsComment.pm
index c72bfff13..210e4ab15 100755
--- a/rt/lib/RT/Action/NotifyAsComment.pm
+++ b/rt/lib/RT/Action/NotifyAsComment.pm
@@ -1,7 +1,31 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/NotifyAsComment.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
+# 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
package RT::Action::NotifyAsComment;
require RT::Action::Notify;
+
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Action::Notify);
@@ -21,5 +45,11 @@ sub SetReturnAddress {
return($self->SUPER::SetReturnAddress(is_comment => 1));
}
+
+eval "require RT::Action::NotifyAsComment_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/NotifyAsComment_Vendor.pm});
+eval "require RT::Action::NotifyAsComment_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/NotifyAsComment_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/OpenDependent.pm b/rt/lib/RT/Action/OpenDependent.pm
deleted file mode 100644
index b271e4709..000000000
--- a/rt/lib/RT/Action/OpenDependent.pm
+++ /dev/null
@@ -1,55 +0,0 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Attic/OpenDependent.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# This Action will open the BASE if a dependent is resolved.
-
-package RT::Action::OpenDependent;
-require RT::Action::Generic;
-require RT::Links;
-@ISA=qw(RT::Action::Generic);
-
-#Do what we need to do and send it out.
-
-#What does this type of Action does
-
-# {{{ sub Describe
-sub Describe {
- my $self = shift;
- return (ref $self . " will stall a [local] BASE if it's open and a dependency link is created.");
-}
-# }}}
-
-
-# {{{ sub Prepare
-sub Prepare {
- # nothing to prepare
- return 1;
-}
-# }}}
-
-sub Commit {
- my $self = shift;
-
- my $Links=RT::Links->new($RT::SystemUser);
- $Links->Limit(FIELD => 'Type', VALUE => 'DependsOn');
- $Links->Limit(FIELD => 'Target', VALUE => $self->TicketObj->id);
-
- while (my $Link=$Links->Next()) {
- next unless $Link->BaseIsLocal;
- my $base=RT::Ticket->new($self->TicketObj->CurrentUser);
- # Todo: Only work if Base is a plain ticket num:
- $base->Load($Link->Base);
- $base->Open if $base->Status eq 'stalled';
- }
-}
-
-
-# Applicability checked in Commit.
-
-# {{{ sub IsApplicable
-sub IsApplicable {
- my $self = shift;
- 1;
- return 1;
-}
-# }}}
-
-1;
diff --git a/rt/lib/RT/Action/ResolveMembers.pm b/rt/lib/RT/Action/ResolveMembers.pm
index 00547ebe8..02ff3a58c 100644
--- a/rt/lib/RT/Action/ResolveMembers.pm
+++ b/rt/lib/RT/Action/ResolveMembers.pm
@@ -1,8 +1,34 @@
+# 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
# This Action will resolve all members of a resolved group ticket
package RT::Action::ResolveMembers;
require RT::Action::Generic;
require RT::Links;
+
+use strict;
+use vars qw/@ISA/;
@ISA=qw(RT::Action::Generic);
#Do what we need to do and send it out.
@@ -12,7 +38,7 @@ require RT::Links;
# {{{ sub Describe
sub Describe {
my $self = shift;
- return (ref $self . " will resolve all members of a resolved group ticket.");
+ return $self->loc("[_1] will resolve all members of a resolved group ticket.", ref $self);
}
# }}}
@@ -33,7 +59,7 @@ sub Commit {
while (my $Link=$Links->Next()) {
# Todo: Try to deal with remote URIs as well
- next unless $Link->BaseIsLocal;
+ next unless $Link->BaseURI->IsLocal;
my $base=RT::Ticket->new($self->TicketObj->CurrentUser);
# Todo: Only work if Base is a plain ticket num:
$base->Load($Link->Base);
@@ -53,5 +79,10 @@ sub IsApplicable {
}
# }}}
+eval "require RT::Action::ResolveMembers_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/ResolveMembers_Vendor.pm});
+eval "require RT::Action::ResolveMembers_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/ResolveMembers_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/SendEmail.pm b/rt/lib/RT/Action/SendEmail.pm
index e3abb1154..dac8fc8e7 100755
--- a/rt/lib/RT/Action/SendEmail.pm
+++ b/rt/lib/RT/Action/SendEmail.pm
@@ -1,20 +1,44 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/SendEmail.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 1996-2002 Jesse Vincent <jesse@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
# Portions Copyright 2000 Tobias Brox <tobix@cpan.org>
-# Released under the terms of version 2 of the GNU Public License
package RT::Action::SendEmail;
require RT::Action::Generic;
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Action::Generic);
+use MIME::Words qw(encode_mimeword);
-=head1 NAME
+use RT::EmailParser;
- RT::Action::SendEmail - An Action which users can use to send mail
- or can subclassed for more specialized mail sending behavior.
- RT::Action::AutoReply is a good example subclass.
+=head1 NAME
+RT::Action::SendEmail - An Action which users can use to send mail
+or can subclassed for more specialized mail sending behavior.
+RT::Action::AutoReply is a good example subclass.
=head1 SYNOPSIS
@@ -36,7 +60,6 @@ the comments for the SetRecipients sub).
=begin testing
-ok (require RT::TestHarness);
ok (require RT::Action::SendEmail);
=end testing
@@ -54,158 +77,266 @@ perl(1).
# {{{ Scrip methods (_Init, Commit, Prepare, IsApplicable)
-# {{{ sub _Init
+# {{{ sub _Init
# We use _Init from RT::Action
# }}}
-# {{{ sub Commit
+# {{{ sub Commit
#Do what we need to do and send it out.
-sub Commit {
+sub Commit {
my $self = shift;
+
+ 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
-
+
+ # 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->Message->First()) {
- my $headers = $self->TransactionObj->Message->First->Headers();
-
- if ($headers =~ /^RT-Squelch-Replies-To: (.*?)$/si) {
- my @blacklist = split(/,/,$1);
-
- # 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'}});
- }
- }
+
+ if ( defined $self->TransactionObj->Attachments->First() ) {
+
+ my $squelch = $self->TransactionObj->Attachments->First->GetHeader( 'RT-Squelch-Replies-To');
+
+ 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
+
+ # 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.
-
- $self->SetHeader('To', join(',', @{$self->{'To'}}))
- if (@{$self->{'To'}});
- $self->SetHeader('Cc', join(',' , @{$self->{'Cc'}}))
- if (@{$self->{'Cc'}});
- $self->SetHeader('Bcc', join(',', @{$self->{'Bcc'}}))
- if (@{$self->{'Bcc'}});;
-
- my $MIMEObj = $self->TemplateObj->MIMEObj;
-
- $MIMEObj->make_singlepart;
-
-
+ $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('MIME-Version', '1.0');
+
+ # try to convert message body from utf-8 to $RT::EmailOutputEncoding
+ $self->SetHeader( 'Content-Type', 'text/plain; charset="utf-8"' );
+
+ RT::I18N::SetMIMEEntityToEncoding( $MIMEObj, $RT::EmailOutputEncoding, 'mime_words_ok' );
+ $self->SetHeader( 'Content-Type', 'text/plain; charset="' . $RT::EmailOutputEncoding . '"' );
+
+
+ # Build up a MIME::Entity that looks like the original message.
+
+ my $do_attach = $self->TemplateObj->MIMEObj->head->get('RT-Attach-Message');
+
+ if ($do_attach) {
+ $self->TemplateObj->MIMEObj->head->delete('RT-Attach-Message');
+
+ 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');
+ }
+
+ }
+
+
+ my $retval = $self->SendMessage($MIMEObj);
+
+
+ return ($retval);
+}
+
+# }}}
+
+# {{{ sub Prepare
+
+sub Prepare {
+ my $self = shift;
+
+ # This actually populates the MIME::Entity fields in the Template Object
+
+ unless ( $self->TemplateObj ) {
+ $RT::Logger->warning("No template object handed to $self\n");
+ }
+
+ unless ( $self->TransactionObj ) {
+ $RT::Logger->warning("No transaction object handed to $self\n");
+
+ }
+
+ unless ( $self->TicketObj ) {
+ $RT::Logger->warning("No ticket object handed to $self\n");
+
+ }
+
+ 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;
+
+}
+
+# }}}
+
+# }}}
+
+# {{{ SendMessage
+=head2 SendMessage MIMEObj
+
+sends the message using RT's preferred API.
+TODO: Break this out to a seperate module
+
+=cut
+
+sub SendMessage {
+ my $self = shift;
+ my $MIMEObj = shift;
+
+ my $msgid = $MIMEObj->head->get('Message-Id');
+
+
#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->debug("$self: No recipients found. Not sending.\n");
- return(1);
+ 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'}}) and (! $MIMEObj->head->get('To')));
-
- if ($RT::MailCommand eq 'sendmailpipe') {
- open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
- print MAIL $MIMEObj->as_string;
- close(MAIL);
+ $self->SetHeader( 'To', join ( ',', @{ $self->{'PseudoTo'} } ) )
+ if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )
+ and ( !$MIMEObj->head->get('To') ) );
+ if ( $RT::MailCommand eq 'sendmailpipe' ) {
+ eval {
+ open( MAIL, "|$RT::SendmailPath $RT::SendmailArguments" );
+ print MAIL $MIMEObj->as_string;
+ close(MAIL);
+ };
+ if ($@) {
+ $RT::Logger->crit($msgid. "Could not send mail. -".$@ );
+ }
}
else {
- unless ($MIMEObj->send($RT::MailCommand, $RT::MailParams)) {
- $RT::Logger->crit("$self: Could not send mail for ".
- $self->TransactionObj . "\n");
- return(0);
+ my @mailer_args = ($RT::MailCommand);
+ local $ENV{MAILADDRESS};
+
+ if ( $RT::MailCommand eq 'sendmail' ) {
+ push @mailer_args, $RT::SendmailArguments;
+ }
+ elsif ( $RT::MailCommand eq 'smtp' ) {
+ $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->send( @mailer_args ) ) {
+ $RT::Logger->crit($msgid. "Could not send mail." );
+ return (0);
+ }
}
-
- return (1);
-
-}
-# }}}
-# {{{ sub Prepare
-sub Prepare {
- my $self = shift;
-
- # This actually populates the MIME::Entity fields in the Template Object
-
- unless ($self->TemplateObj) {
- $RT::Logger->warning("No template object handed to $self\n");
- }
-
- unless ($self->TransactionObj) {
- $RT::Logger->warning("No transaction object handed to $self\n");
-
- }
-
- unless ($self->TicketObj) {
- $RT::Logger->warning("No ticket object handed to $self\n");
-
- }
-
-
- $self->TemplateObj->Parse(Argument => $self->Argument,
- TicketObj => $self->TicketObj,
- TransactionObj => $self->TransactionObj);
-
- # Header
-
- $self->SetSubject();
-
- $self->SetSubjectToken();
-
- $self->SetRecipients();
-
- $self->SetReturnAddress();
+ 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);
- $self->SetRTSpecialHeaders();
-
- return 1;
-
+ return (1);
}
# }}}
-# }}}
-
# {{{ Deal with message headers (Set* subs, designed for easy overriding)
# {{{ sub SetRTSpecialHeaders
-# This routine adds all the random headers that RT wants in a mail message
-# that don't matter much to anybody else.
+=head2 SetRTSpecialHeaders
+
+This routine adds all the random headers that RT wants in a mail message
+that don't matter much to anybody else.
+
+=cut
sub SetRTSpecialHeaders {
my $self = shift;
-
+
$self->SetReferences();
$self->SetMessageID();
-
+
$self->SetPrecedence();
- $self->SetHeader('X-RT-Loop-Prevention', $RT::rtname);
- $self->SetHeader('RT-Ticket', $RT::rtname. " #".$self->TicketObj->id());
- $self->SetHeader
- ('Managed-by',"RT $RT::VERSION (http://bestpractical.com/rt/)");
-
- $self->SetHeader('RT-Originator', $self->TransactionObj->CreatorObj->EmailAddress);
- return();
-
-}
+ $self->SetHeader( 'X-RT-Loop-Prevention', $RT::rtname );
+ $self->SetHeader( 'RT-Ticket',
+ $RT::rtname . " #" . $self->TicketObj->id() );
+ $self->SetHeader( 'Managed-by',
+ "RT $RT::VERSION (http://www.bestpractical.com/rt/)" );
+ $self->SetHeader( 'RT-Originator',
+ $self->TransactionObj->CreatorObj->EmailAddress );
+ return ();
+}
# {{{ sub SetReferences
@@ -218,105 +349,126 @@ sub SetRTSpecialHeaders {
=cut
sub SetReferences {
- my $self = shift;
-
- # 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 $self = shift;
- $self->SetHeader
- ('In-Reply-To', "<rt-".$self->TicketObj->id().
- "\@".$RT::rtname.">");
+ # 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.
+ $self->SetHeader( 'In-Reply-To',
+ "<rt-" . $self->TicketObj->id() . "\@" . $RT::rtname . ">" );
- # TODO We should always add References headers for all message-ids
- # of previous messages related to this ticket.
+ # TODO We should always add References headers for all message-ids
+ # of previous messages related to this ticket.
}
# }}}
# {{{ sub SetMessageID
-# 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.
+=head2 SetMessageID
-sub SetMessageID {
- my $self = shift;
+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.
- # 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#"
+=cut
+
+sub SetMessageID {
+ my $self = shift;
- $self->SetHeader
- ('Message-ID', "<rt-".$self->TicketObj->id().
- "-".
- $self->TransactionObj->id()."." .rand(20) . "\@".$RT::Organization.">")
+ # 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
+# {{{ sub SetReturnAddress
+
+=head2 SetReturnAddress is_comment => BOOLEAN
+
+Calculate and set From and Reply-To headers based on the is_comment flag.
+
+=cut
sub SetReturnAddress {
- my $self = shift;
- my %args = ( is_comment => 0,
- @_ );
-
- # From and Reply-To
- # $args{is_comment} should be set if the comment address is to be used.
- my $replyto;
-
- if ($args{'is_comment'}) {
- $replyto = $self->TicketObj->QueueObj->CommentAddress ||
- $RT::CommentAddress;
- }
- else {
- $replyto = $self->TicketObj->QueueObj->CorrespondAddress ||
- $RT::CorrespondAddress;
- }
-
- unless ($self->TemplateObj->MIMEObj->head->get('From')) {
- my $friendly_name=$self->TransactionObj->CreatorObj->RealName;
-
- if ($friendly_name =~ /^\S+\@\S+$/) { # A "bare" mail address
- $friendly_name =~ s/"/\\"/g;
- $friendly_name = qq|"$friendly_name"|;
- }
-
-
- # TODO: this "via RT" should really be site-configurable.
- $self->SetHeader('From', "\"$friendly_name via RT\" <$replyto>");
- }
-
- unless ($self->TemplateObj->MIMEObj->head->get('Reply-To')) {
- $self->SetHeader('Reply-To', "$replyto");
- }
-
+ my $self = shift;
+ my %args = ( is_comment => 0,
+ @_ );
+
+ # From and Reply-To
+ # $args{is_comment} should be set if the comment address is to be used.
+ my $replyto;
+
+ if ( $args{'is_comment'} ) {
+ $replyto = $self->TicketObj->QueueObj->CommentAddress
+ || $RT::CommentAddress;
+ }
+ else {
+ $replyto = $self->TicketObj->QueueObj->CorrespondAddress
+ || $RT::CorrespondAddress;
+ }
+
+ unless ( $self->TemplateObj->MIMEObj->head->get('From') ) {
+ 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') ) {
+ $self->SetHeader( 'Reply-To', "$replyto" );
+ }
+
}
# }}}
# {{{ sub SetHeader
+=head2 SetHeader FIELD, VALUE
+
+Set the FIELD of the current MIME object into VALUE.
+
+=cut
+
sub SetHeader {
- my $self = shift;
- my $field = shift;
- my $val = shift;
-
- chomp $val;
- chomp $field;
- $self->TemplateObj->MIMEObj->head->fold_length($field,10000);
- $self->TemplateObj->MIMEObj->head->add($field, $val);
- return $self->TemplateObj->MIMEObj->head->get($field);
+ my $self = shift;
+ my $field = shift;
+ my $val = shift;
+
+ chomp $val;
+ chomp $field;
+ $self->TemplateObj->MIMEObj->head->fold_length( $field, 10000 );
+ $self->TemplateObj->MIMEObj->head->replace( $field, $val );
+ return $self->TemplateObj->MIMEObj->head->get($field);
}
# }}}
@@ -331,21 +483,29 @@ Dummy method to be overriden by subclasses which want to set the recipients.
sub SetRecipients {
my $self = shift;
- return();
+ return ();
}
# }}}
# {{{ sub SetTo
+=head2 SetTo
+
+Takes a string that is the addresses you want to send mail to
+
+=cut
+
sub SetTo {
- my $self=shift;
+ my $self = shift;
my $addresses = shift;
- return $self->SetHeader('To',$addresses);
+ return $self->SetHeader( 'To', $addresses );
}
+
# }}}
# {{{ sub SetCc
+
=head2 SetCc
Takes a string that is the addresses you want to Cc
@@ -353,11 +513,12 @@ Takes a string that is the addresses you want to Cc
=cut
sub SetCc {
- my $self=shift;
+ my $self = shift;
my $addresses = shift;
- return $self->SetHeader('Cc', $addresses);
+ return $self->SetHeader( 'Cc', $addresses );
}
+
# }}}
# {{{ sub SetBcc
@@ -367,23 +528,24 @@ sub SetCc {
Takes a string that is the addresses you want to Bcc
=cut
+
sub SetBcc {
- my $self=shift;
+ my $self = shift;
my $addresses = shift;
- return $self->SetHeader('Bcc', $addresses);
+ return $self->SetHeader( 'Bcc', $addresses );
}
# }}}
-# {{{ sub SetPrecedence
+# {{{ sub SetPrecedence
sub SetPrecedence {
- my $self = shift;
+ my $self = shift;
- unless ($self->TemplateObj->MIMEObj->head->get("Precedence")) {
- $self->SetHeader('Precedence', "bulk");
- }
+ unless ( $self->TemplateObj->MIMEObj->head->get("Precedence") ) {
+ $self->SetHeader( 'Precedence', "bulk" );
+ }
}
# }}}
@@ -399,70 +561,125 @@ the transaction's subject.
=cut
sub SetSubject {
- my $self = shift;
- unless ($self->TemplateObj->MIMEObj->head->get('Subject')) {
- my $message=$self->TransactionObj->Message;
- my $ticket=$self->TicketObj->Id;
-
+ my $self = shift;
my $subject;
-
- if ($self->{'Subject'}) {
- $subject = $self->{'Subject'};
- }
- elsif (($message->First()) &&
- ($message->First->Headers)) {
- $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();
- }
-
- $subject =~ s/(\r\n|\n|\s)/ /gi;
- chomp $subject;
- $self->SetHeader('Subject',$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();
+ }
+
+ $subject =~ s/(\r\n|\n|\s)/ /gi;
+
+ chomp $subject;
+ $self->SetHeader( 'Subject', $subject );
+
}
- return($subject);
+ return ($subject);
}
+
# }}}
# {{{ sub SetSubjectToken
=head2 SetSubjectToken
- This routine fixes the RT tag in the subject. It's unlikely that you want to overwrite this.
+This routine fixes the RT tag in the subject. It's unlikely that you want to overwrite this.
=cut
sub SetSubjectToken {
- my $self=shift;
- 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");
- }
+ my $self = shift;
+ 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" );
+ }
}
# }}}
# }}}
-__END__
+# {{{
+
+=head2 SetHeaderAsEncoding($field_name, $charset_encoding)
+
+This routine converts the field into specified charset encoding.
+
+=cut
+
+sub SetHeaderAsEncoding {
+ my $self = shift;
+ my ( $field, $enc ) = ( shift, shift );
+
+ if ($field eq 'From' and $RT::SMTPFrom) {
+ $self->TemplateObj->MIMEObj->head->replace( $field, $RT::SMTPFrom );
+ return;
+ }
+
+ 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 );
+
+
+}
+# }}}
+
+# {{{ MIMENcodeString
+
+=head2 MIMEEncodeString STRING ENCODING
+
+Takes a string and a possible encoding and returns the string wrapped in MIME goo.
+
+=cut
+
+sub MIMEEncodeString {
+ my $self = shift;
+ my $value = shift;
+ my $enc = shift;
-# {{{ POD
+ chomp $value;
+ return ($value) unless $value =~ /[^\x20-\x7e]/;
+
+ $value =~ s/\s*$//;
+ Encode::_utf8_off($value);
+ my $res = Encode::from_to( $value, "utf-8", $enc );
+ $value = encode_mimeword( $value, 'B', $enc );
+}
# }}}
+eval "require RT::Action::SendEmail_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/SendEmail_Vendor.pm});
+eval "require RT::Action::SendEmail_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Action/SendEmail_Local.pm});
+
1;
diff --git a/rt/lib/RT/Action/SendPasswordEmail.pm b/rt/lib/RT/Action/SendPasswordEmail.pm
deleted file mode 100755
index 91bb3c1cb..000000000
--- a/rt/lib/RT/Action/SendPasswordEmail.pm
+++ /dev/null
@@ -1,170 +0,0 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Action/Attic/SendPasswordEmail.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 2001 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
-
-package RT::Action::SendPasswordEmail;
-require RT::Action::Generic;
-
-@ISA = qw(RT::Action::Generic);
-
-
-=head1 NAME
-
- RT::Action::SendGenericEmail - An Action which users can use to send mail
- or can subclassed for more specialized mail sending behavior.
-
-
-
-=head1 SYNOPSIS
-
- require RT::Action::SendPasswordEmail;
-
-
-=head1 DESCRIPTION
-
-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::TestHarness);
-ok (require RT::Action::SendPasswordEmail);
-
-=end testing
-
-
-=head1 AUTHOR
-
-Jesse Vincent <jesse@bestpractical.com>
-
-=head1 SEE ALSO
-
-perl(1).
-
-=cut
-
-# {{{ Scrip methods (_Init, Commit, Prepare, IsApplicable)
-
-# {{{ sub Commit
-
-#Do what we need to do and send it out.
-
-sub Commit {
- my $self = shift;
- #send the email
-
-
-
-
-
- my $MIMEObj = $self->TemplateObj->MIMEObj;
-
-
- $MIMEObj->make_singlepart;
-
- #If we don\'t have any recipients to send to, don\'t send a message;
- unless ($MIMEObj->head->get('To')) {
- $RT::Logger->debug("$self: No recipients found. Not sending.\n");
- return(1);
- }
-
- if ($RT::MailCommand eq 'sendmailpipe') {
- open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
- print MAIL $MIMEObj->as_string;
- close(MAIL);
- }
- else {
- unless ($MIMEObj->send($RT::MailCommand, $RT::MailParams)) {
- $RT::Logger->crit("$self: Could not send mail for ".
- $self->TransactionObj . "\n");
- return(0);
- }
- }
-
- return (1);
-
-}
-# }}}
-
-# {{{ sub Prepare
-
-sub Prepare {
- my $self = shift;
-
- # This actually populates the MIME::Entity fields in the Template Object
-
- unless ($self->TemplateObj) {
- $RT::Logger->warning("No template object handed to $self\n");
- }
-
-
- unless ($self->TemplateObj->MIMEObj->head->get('Reply-To')) {
- $self->SetHeader('Reply-To',$RT::CorrespondAddress );
- }
-
-
- $self->SetHeader('Precedence', "bulk");
- $self->SetHeader('X-RT-Loop-Prevention', $RT::rtname);
- $self->SetHeader
- ('Managed-by',"Request Tracker $RT::VERSION (http://www.fsck.com/projects/rt/)");
-
- $self->TemplateObj->Parse(Argument => $self->Argument);
-
-
- return 1;
-}
-
-# }}}
-
-# }}}
-
-
-# {{{ sub SetTo
-
-=head2 SetTo EMAIL
-
-Sets this message's "To" field to EMAIL
-
-=cut
-
-sub SetTo {
- my $self = shift;
- my $to = shift;
- $self->SetHeader('To',$to);
-}
-
-# }}}
-
-# {{{ sub SetHeader
-
-sub SetHeader {
- my $self = shift;
- my $field = shift;
- my $val = shift;
-
- chomp $val;
- chomp $field;
- $self->TemplateObj->MIMEObj->head->fold_length($field,10000);
- $self->TemplateObj->MIMEObj->head->add($field, $val);
- return $self->TemplateObj->MIMEObj->head->get($field);
-}
-
-# }}}
-
-
-
-__END__
-
-# {{{ POD
-
-# }}}
-
-1;
-
diff --git a/rt/lib/RT/Action/StallDependent.pm b/rt/lib/RT/Action/StallDependent.pm
deleted file mode 100644
index 09d3448a8..000000000
--- a/rt/lib/RT/Action/StallDependent.pm
+++ /dev/null
@@ -1,68 +0,0 @@
-# This Action will stall the BASE if a dependency or membership link
-# (according to argument) is created and if BASE is open.
-
-# TODO: Rename this .pm
-
-package RT::Action::StallDependent;
-require RT::Action::Generic;
-@ISA=qw|RT::Action::Generic|;
-
-# {{{ sub Describe
-sub Describe {
- my $self = shift;
- return (ref $self . " will stall a [local] BASE if it's dependent [or member] of a linked up request.");
-}
-# }}}
-
-
-# {{{ sub Prepare
-sub Prepare {
- # nothing to prepare
- return 1;
-}
-# }}}
-
-sub Commit {
- my $self = shift;
- # Find all Dependent
- my $arg=$self->Argument || "DependsOn";
- unless ($self->TransactionObj->Data =~ /^([^ ]+) $arg /) {
- warn; return 0;
- }
- my $base_id=$1;
- my $base;
- if ($1 eq "THIS") {
- $base=$self->TicketObj;
- } else {
- $base_id=&RT::Link::_IsLocal(undef, $base_id) || return 0;
- $base=RT::Ticket->new($self->TicketObj->CurrentUser);
- $base->Load($base_id);
- }
- $base->Stall if $base->Status eq 'open';
- return 0;
-}
-
-
-# {{{ sub IsApplicable
-
-# Only applicable if:
-# 1. the link action is a dependency
-# 2. BASE is a local ticket
-
-sub IsApplicable {
- my $self = shift;
-
- my $arg=$self->Argument || "DependsOn";
-
- # 1:
- $self->TransactionObj->Data =~ /^([^ ]*) $arg / || return 0;
-
- # 2:
- # (dirty!)
- &RT::Link::_IsLocal(undef,$1) || return 0;
-
- return 1;
-}
-# }}}
-
-1;
diff --git a/rt/lib/RT/Attachment.pm b/rt/lib/RT/Attachment.pm
index 916ac355e..2ed520162 100755
--- a/rt/lib/RT/Attachment.pm
+++ b/rt/lib/RT/Attachment.pm
@@ -1,423 +1,372 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attachment.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 2000 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
+# 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
+# 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::Attachment -- an RT attachment object
+RT::Attachment
+
=head1 SYNOPSIS
- use RT::Attachment;
+=head1 DESCRIPTION
+=head1 METHODS
-=head1 DESCRIPTION
+=cut
-This module should never be instantiated directly by client code. it's an internal
-module which should only be instantiated through exported APIs in Ticket, Queue and other
-similar objects.
+package RT::Attachment;
+use RT::Record;
+
+
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+
+sub _Init {
+ my $self = shift;
+
+ $self->Table('Attachments');
+ $self->SUPER::_Init(@_);
+}
-=head1 METHODS
-=begin testing
-ok (require RT::TestHarness);
-ok (require RT::Attachment);
+=item Create PARAMHASH
-=end testing
+Create takes a hash of values and creates a row in the database:
+
+ int(11) 'TransactionId'.
+ int(11) 'Parent'.
+ varchar(160) 'MessageId'.
+ varchar(255) 'Subject'.
+ varchar(255) 'Filename'.
+ varchar(80) 'ContentType'.
+ varchar(80) 'ContentEncoding'.
+ longtext 'Content'.
+ longtext 'Headers'.
=cut
-package RT::Attachment;
-use RT::Record;
-use MIME::Base64;
-use vars qw|@ISA|;
-@ISA= qw(RT::Record);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Attachments";
- return($self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub _ClassAccessible
-sub _ClassAccessible {
- {
- TransactionId => { 'read'=>1, 'public'=>1, },
- MessageId => { 'read'=>1, },
- Parent => { 'read'=>1, },
- ContentType => { 'read'=>1, },
- Subject => { 'read'=>1, },
- Content => { 'read'=>1, },
- ContentEncoding => { 'read'=>1, },
- Headers => { 'read'=>1, },
- Filename => { 'read'=>1, },
- Creator => { 'read'=>1, 'auto'=>1, },
- Created => { 'read'=>1, 'auto'=>1, },
- };
+
+
+sub Create {
+ my $self = shift;
+ my %args = (
+ TransactionId => '0',
+ Parent => '0',
+ MessageId => '',
+ Subject => '',
+ Filename => '',
+ ContentType => '',
+ ContentEncoding => '',
+ Content => '',
+ Headers => '',
+
+ @_);
+ $self->SUPER::Create(
+ TransactionId => $args{'TransactionId'},
+ Parent => $args{'Parent'},
+ MessageId => $args{'MessageId'},
+ Subject => $args{'Subject'},
+ Filename => $args{'Filename'},
+ ContentType => $args{'ContentType'},
+ ContentEncoding => $args{'ContentEncoding'},
+ Content => $args{'Content'},
+ Headers => $args{'Headers'},
+);
+
}
-# }}}
-# {{{ sub TransactionObj
-=head2 TransactionObj
-Returns the transaction object asscoiated with this attachment.
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
+
=cut
-sub TransactionObj {
- require RT::Transaction;
- my $self=shift;
- unless (exists $self->{_TransactionObj}) {
- $self->{_TransactionObj}=RT::Transaction->new($self->CurrentUser);
- $self->{_TransactionObj}->Load($self->TransactionId);
- }
- return $self->{_TransactionObj};
-}
-# }}}
+=item TransactionId
+
+Returns the current value of TransactionId.
+(In the database, TransactionId is stored as int(11).)
-# {{{ sub Create
-=head2 Create
-Create a new attachment. Takes a paramhash:
-
- 'Attachment' Should be a single MIME body with optional subparts
- 'Parent' is an optional Parent RT::Attachment object
- 'TransactionId' is the mandatory id of the Transaction this attachment is associated with.;
+=item SetTransactionId VALUE
+
+
+Set TransactionId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TransactionId will be stored as a int(11).)
+
=cut
-sub Create {
- my $self = shift;
- my ($id);
- my %args = ( id => 0,
- TransactionId => 0,
- Parent => 0,
- Attachment => undef,
- @_
- );
-
-
- #For ease of reference
- my $Attachment = $args{'Attachment'};
-
- #if we didn't specify a ticket, we need to bail
- if ( $args{'TransactionId'} == 0) {
- $RT::Logger->crit("RT::Attachment->Create couldn't, as you didn't specify a transaction\n");
- return (0);
-
- }
-
- #If we possibly can, collapse it to a singlepart
- $Attachment->make_singlepart;
-
- #Get the subject
- my $Subject = $Attachment->head->get('subject',0);
- defined($Subject) or $Subject = '';
- chomp($Subject);
-
- #Get the filename
- my $Filename = $Attachment->head->recommended_filename;
-
- if ($Attachment->parts) {
- $id = $self->SUPER::Create(TransactionId => $args{'TransactionId'},
- Parent => 0,
- ContentType => $Attachment->mime_type,
- Headers => $Attachment->head->as_string,
- Subject => $Subject,
-
- );
- foreach my $part ($Attachment->parts) {
- my $SubAttachment = new RT::Attachment($self->CurrentUser);
- $SubAttachment->Create(TransactionId => $args{'TransactionId'},
- Parent => $id,
- Attachment => $part,
- ContentType => $Attachment->mime_type,
- Headers => $Attachment->head->as_string(),
-
- );
- }
- return ($id);
- }
-
-
- #If it's not multipart
- else {
-
- my $ContentEncoding = 'none';
-
- my $Body = $Attachment->bodyhandle->as_string;
-
- #get the max attachment length from RT
- my $MaxSize = $RT::MaxAttachmentSize;
-
- #if the current attachment contains nulls and the
- #database doesn't support embedded nulls
-
- if ( (! $RT::Handle->BinarySafeBLOBs) &&
- ( $Body =~ /\x00/ ) ) {
- # set a flag telling us to mimencode the attachment
- $ContentEncoding = 'base64';
-
- #cut the max attchment size by 25% (for mime-encoding overhead.
- $RT::Logger->debug("Max size is $MaxSize\n");
- $MaxSize = $MaxSize * 3/4;
- }
-
- #if the attachment is larger than the maximum size
- if (($MaxSize) and ($MaxSize < length($Body))) {
- # if we're supposed to truncate large attachments
- if ($RT::TruncateLongAttachments) {
- # truncate the attachment to that length.
- $Body = substr ($Body, 0, $MaxSize);
-
- }
-
- # elsif we're supposed to drop large attachments on the floor,
- elsif ($RT::DropLongAttachments) {
- # drop the attachment on the floor
- $RT::Logger->info("$self: Dropped an attachment of size ". length($Body).
- "\n". "It started: ". substr($Body, 0, 60) . "\n");
- return(undef);
- }
- }
- # if we need to mimencode the attachment
- if ($ContentEncoding eq 'base64') {
- # base64 encode the attachment
- $Body = MIME::Base64::encode_base64($Body);
-
- }
-
- my $id = $self->SUPER::Create(TransactionId => $args{'TransactionId'},
- ContentType => $Attachment->mime_type,
- ContentEncoding => $ContentEncoding,
- Parent => $args{'Parent'},
- Content => $Body,
- Headers => $Attachment->head->as_string,
- Subject => $Subject,
- Filename => $Filename,
- );
- return ($id);
- }
-}
-# }}}
+=item Parent
+
+Returns the current value of Parent.
+(In the database, Parent is stored as int(11).)
+
-# {{{ sub Content
+=item SetParent VALUE
-=head2 Content
-Returns the attachment's content. if it's base64 encoded, decode it
-before returning it.
+Set Parent to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Parent will be stored as a int(11).)
+
=cut
-sub Content {
- my $self = shift;
- if ( $self->ContentEncoding eq 'none' || ! $self->ContentEncoding ) {
- return $self->_Value('Content');
- } elsif ( $self->ContentEncoding eq 'base64' ) {
- return MIME::Base64::decode_base64($self->_Value('Content'));
- } else {
- return( "Unknown ContentEncoding ". $self->ContentEncoding);
- }
-}
+=item MessageId
+
+Returns the current value of MessageId.
+(In the database, MessageId is stored as varchar(160).)
-# }}}
-# {{{ sub Children
-=head2 Children
+=item SetMessageId VALUE
+
+
+Set MessageId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, MessageId will be stored as a varchar(160).)
- Returns an RT::Attachments object which is preloaded with all Attachments objects with this Attachment\'s Id as their 'Parent'
=cut
-sub Children {
- my $self = shift;
-
- my $kids = new RT::Attachments($self->CurrentUser);
- $kids->ChildrenOf($self->Id);
- return($kids);
-}
-# }}}
+=item Subject
-# {{{ UTILITIES
+Returns the current value of Subject.
+(In the database, Subject is stored as varchar(255).)
-# {{{ sub Quote
+=item SetSubject VALUE
-sub Quote {
- my $self=shift;
- my %args=(Reply=>undef, # Prefilled reply (i.e. from the KB/FAQ system)
- @_);
- my ($quoted_content, $body, $headers);
- my $max=0;
+Set Subject to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Subject will be stored as a varchar(255).)
- # TODO: Handle Multipart/Mixed (eventually fix the link in the
- # ShowHistory web template?)
- if ($self->ContentType =~ m{^(text/plain|message)}i) {
- $body=$self->Content;
- # Do we need any preformatting (wrapping, that is) of the message?
+=cut
- # Remove quoted signature.
- $body =~ s/\n-- \n(.*)$//s;
- # What's the longest line like?
- foreach (split (/\n/,$body)) {
- $max=length if ( length > $max);
- }
+=item Filename
- if ($max>76) {
- require Text::Wrapper;
- my $wrapper=new Text::Wrapper
- (
- columns => 70,
- body_start => ($max > 70*3 ? ' ' : ''),
- par_start => ''
- );
- $body=$wrapper->wrap($body);
- }
+Returns the current value of Filename.
+(In the database, Filename is stored as varchar(255).)
- $body =~ s/^/> /gm;
- $body = '[' . $self->TransactionObj->CreatorObj->Name() . ' - ' . $self->TransactionObj->CreatedAsString()
- . "]:\n\n"
- . $body . "\n\n";
- } else {
- $body = "[Non-text message not quoted]\n\n";
- }
-
- $max=60 if $max<60;
- $max=70 if $max>78;
- $max+=2;
+=item SetFilename VALUE
+
+
+Set Filename to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Filename will be stored as a varchar(255).)
+
+
+=cut
+
+
+=item ContentType
+
+Returns the current value of ContentType.
+(In the database, ContentType is stored as varchar(80).)
+
- return (\$body, $max);
-}
-# }}}
-# {{{ sub NiceHeaders - pulls out only the most relevant headers
+=item SetContentType VALUE
-=head2 NiceHeaders
-Returns the To, From, Cc, Date and Subject headers.
+Set ContentType to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ContentType will be stored as a varchar(80).)
-It is a known issue that this breaks if any of these headers are not
-properly unfolded.
=cut
-sub NiceHeaders {
- my $self=shift;
- my $hdrs="";
- for (split(/\n/,$self->Headers)) {
- $hdrs.="$_\n" if /^(To|From|RT-Send-Cc|Cc|Date|Subject): /i
- }
- return $hdrs;
-}
-# }}}
-# {{{ sub Headers
+=item ContentEncoding
+
+Returns the current value of ContentEncoding.
+(In the database, ContentEncoding is stored as varchar(80).)
+
+
-=head2 Headers
+=item SetContentEncoding VALUE
+
+
+Set ContentEncoding to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ContentEncoding will be stored as a varchar(80).)
-Returns this object's headers as a string. This method specifically
-removes the RT-Send-Bcc: header, so as to never reveal to whom RT sent a Bcc.
-We need to record the RT-Send-Cc and RT-Send-Bcc values so that we can actually send
-out mail. (The mailing rules are seperated from the ticket update code by
-an abstraction barrier that makes it impossible to pass this data directly
=cut
-sub Headers {
- my $self = shift;
- my $hdrs="";
- for (split(/\n/,$self->SUPER::Headers)) {
- $hdrs.="$_\n" unless /^(RT-Send-Bcc): /i
- }
- return $hdrs;
-}
+
+=item Content
+
+Returns the current value of Content.
+(In the database, Content is stored as longtext.)
-# }}}
-# {{{ sub GetHeader
+=item SetContent VALUE
-=head2 GetHeader ( 'Tag')
-Returns the value of the header Tag as a string. This bypasses the weeding out
-done in Headers() above.
+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 longtext.)
+
=cut
-sub GetHeader {
- my $self = shift;
- my $tag = shift;
- foreach my $line (split(/\n/,$self->SUPER::Headers)) {
- $RT::Logger->debug( "Does $line match $tag\n");
- if ($line =~ /^$tag:\s+(.*)$/i) { #if we find the header, return its value
- return ($1);
- }
- }
-
- # we found no header. return an empty string
- return undef;
-}
-# }}}
-# {{{ sub _Value
+=item Headers
-=head2 _Value
+Returns the current value of Headers.
+(In the database, Headers is stored as longtext.)
+
+
+
+=item SetHeaders VALUE
+
+
+Set Headers to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Headers will be stored as a longtext.)
-Takes the name of a table column.
-Returns its value as a string, if the user passes an ACL check
=cut
-sub _Value {
- my $self = shift;
- my $field = shift;
-
-
- #if the field is public, return it.
- if ($self->_Accessible($field, 'public')) {
- #$RT::Logger->debug("Skipping ACL check for $field\n");
- return($self->__Value($field));
-
- }
-
- #If it's a comment, we need to be extra special careful
- elsif ( (($self->TransactionObj->CurrentUserHasRight('ShowTicketComments')) and
- ($self->TransactionObj->Type eq 'Comment') ) or
- ($self->TransactionObj->CurrentUserHasRight('ShowTicket'))) {
-
- return($self->__Value($field));
- }
- #if they ain't got rights to see, don't let em
- else {
- return(undef);
- }
-
-
-}
+=item Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
+
+
+=cut
+
+
+=item Created
-# }}}
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+
+=cut
+
+
+
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ TransactionId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Parent =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ MessageId =>
+ {read => 1, write => 1, type => 'varchar(160)', default => ''},
+ Subject =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ Filename =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ ContentType =>
+ {read => 1, write => 1, type => 'varchar(80)', default => ''},
+ ContentEncoding =>
+ {read => 1, write => 1, type => 'varchar(80)', default => ''},
+ Content =>
+ {read => 1, write => 1, type => 'longtext', default => ''},
+ Headers =>
+ {read => 1, write => 1, type => 'longtext', default => ''},
+ Creator =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Created =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+
+ }
+};
+
+
+ eval "require RT::Attachment_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachment_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Attachment_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachment_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Attachment_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachment_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::Attachment_Overlay, RT::Attachment_Vendor, RT::Attachment_Local
+
+=cut
-# }}}
1;
diff --git a/rt/lib/RT/Attachments.pm b/rt/lib/RT/Attachments.pm
index 73cd350a4..177cdd094 100755
--- a/rt/lib/RT/Attachments.pm
+++ b/rt/lib/RT/Attachments.pm
@@ -1,99 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attachments.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Attachments - a collection of RT::Attachment objects
+=head1 NAME
+ RT::Attachments -- Class Description
+
=head1 SYNOPSIS
- use RT::Attachments;
+ use RT::Attachments
=head1 DESCRIPTION
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in Ticket, Queue and other similar objects.
-
=head1 METHODS
+=cut
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Attachments);
+package RT::Attachments;
-=end testing
+use RT::SearchBuilder;
+use RT::Attachment;
-=cut
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-package RT::Attachments;
-use RT::EasySearch;
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Attachments';
+ $self->{'primary_key'} = 'id';
-@ISA= qw(RT::EasySearch);
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "Attachments";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_));
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub ContentType
+=item NewItem
-=head2 ContentType (VALUE => 'text/plain', ENTRYAGGREGATOR => 'OR', OPERATOR => '=' )
-
-Limit result set to attachments of ContentType 'TYPE'...
+Returns an empty new RT::Attachment item
=cut
+sub NewItem {
+ my $self = shift;
+ return(RT::Attachment->new($self->CurrentUser));
+}
-sub ContentType {
- my $self = shift;
- my %args = ( VALUE => 'text/plain',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- @_);
+ eval "require RT::Attachments_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachments_Overlay.pm}) {
+ die $@;
+ };
- $self->Limit ( FIELD => 'ContentType',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- ENTRYAGGREGATOR => $args{'ENTRYAGGREGATOR'});
-}
-# }}}
+ eval "require RT::Attachments_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachments_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub ChildrenOf
+ eval "require RT::Attachments_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Attachments_Local.pm}) {
+ die $@;
+ };
-=head2 ChildrenOf ID
-Limit result set to children of Attachment ID
-=cut
+=head1 SEE ALSO
-sub ChildrenOf {
- my $self = shift;
- my $attachment = shift;
- $self->Limit ( FIELD => 'Parent',
- VALUE => $attachment);
-}
-# }}}
+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.
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
+These overlay files can contain new subs or subs to replace existing subs in this module.
- use RT::Attachment;
- my $item = new RT::Attachment($self->CurrentUser);
- return($item);
-}
-# }}}
- 1;
+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::Attachments_Overlay, RT::Attachments_Vendor, RT::Attachments_Local
+
+=cut
+1;
diff --git a/rt/lib/RT/Condition/AnyTransaction.pm b/rt/lib/RT/Condition/AnyTransaction.pm
index 83e5de6ce..4519fcf5a 100644
--- a/rt/lib/RT/Condition/AnyTransaction.pm
+++ b/rt/lib/RT/Condition/AnyTransaction.pm
@@ -1,10 +1,33 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Condition/AnyTransaction.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU General Public License
+# 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
+
package RT::Condition::AnyTransaction;
require RT::Condition::Generic;
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Condition::Generic);
@@ -19,5 +42,10 @@ sub IsApplicable {
return(1);
}
+eval "require RT::Condition::AnyTransaction_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/AnyTransaction_Vendor.pm});
+eval "require RT::Condition::AnyTransaction_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/AnyTransaction_Local.pm});
+
1;
diff --git a/rt/lib/RT/Condition/Generic.pm b/rt/lib/RT/Condition/Generic.pm
index 393f4b786..bd269315e 100755
--- a/rt/lib/RT/Condition/Generic.pm
+++ b/rt/lib/RT/Condition/Generic.pm
@@ -1,7 +1,26 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Condition/Generic.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
+# 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
=head1 NAME
RT::Condition::Generic - ;
@@ -29,7 +48,6 @@
=begin testing
-ok (require RT::TestHarness);
ok (require RT::Condition::Generic);
=end testing
@@ -39,6 +57,11 @@ ok (require RT::Condition::Generic);
package RT::Condition::Generic;
+use RT::Base;
+use strict;
+use vars qw/@ISA/;
+@ISA = qw(RT::Base);
+
# {{{ sub new
sub new {
my $proto = shift;
@@ -61,7 +84,6 @@ sub _Init {
ApplicableTransTypes => undef,
@_ );
-
$self->{'Argument'} = $args{'Argument'};
$self->{'ScripObj'} = $args{'ScripObj'};
$self->{'TicketObj'} = $args{'TicketObj'};
@@ -100,6 +122,19 @@ sub TicketObj {
}
# }}}
+# {{{ sub ScripObj
+
+=head2 ScripObj
+
+Return the Scrip object we're talking about
+
+=cut
+
+sub ScripObj {
+ my $self = shift;
+ return($self->{'ScripObj'});
+}
+# }}}
# {{{ sub TransactionObj
=head2 TransactionObj
@@ -137,7 +172,7 @@ sub ApplicableTransTypes {
# {{{ sub Describe
sub Describe {
my $self = shift;
- return ("No description for " . ref $self);
+ return ($self->loc("No description for [_1]", ref $self));
}
# }}}
@@ -167,4 +202,10 @@ sub DESTROY {
}
# }}}
+
+eval "require RT::Condition::Generic_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/Generic_Vendor.pm});
+eval "require RT::Condition::Generic_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/Generic_Local.pm});
+
1;
diff --git a/rt/lib/RT/Condition/NewDependency.pm b/rt/lib/RT/Condition/NewDependency.pm
deleted file mode 100644
index e69de29bb..000000000
--- a/rt/lib/RT/Condition/NewDependency.pm
+++ /dev/null
diff --git a/rt/lib/RT/Condition/StatusChange.pm b/rt/lib/RT/Condition/StatusChange.pm
index 56419b2c7..8afabcda0 100644
--- a/rt/lib/RT/Condition/StatusChange.pm
+++ b/rt/lib/RT/Condition/StatusChange.pm
@@ -1,10 +1,34 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Condition/StatusChange.pm,v 1.1 2002-08-12 06:17:08 ivan Exp $
-# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU General Public License
+# 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
+
+
package RT::Condition::StatusChange;
require RT::Condition::Generic;
+use strict;
+use vars qw/@ISA/;
@ISA = qw(RT::Condition::Generic);
@@ -26,5 +50,10 @@ sub IsApplicable {
}
}
+eval "require RT::Condition::StatusChange_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/StatusChange_Vendor.pm});
+eval "require RT::Condition::StatusChange_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/StatusChange_Local.pm});
+
1;
diff --git a/rt/lib/RT/CurrentUser.pm b/rt/lib/RT/CurrentUser.pm
index 6997ddbac..4ca2f9891 100755
--- a/rt/lib/RT/CurrentUser.pm
+++ b/rt/lib/RT/CurrentUser.pm
@@ -1,7 +1,26 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/CurrentUser.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-1999 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
+# 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
=head1 NAME
RT::CurrentUser - an RT object representing the current user
@@ -19,7 +38,6 @@
=begin testing
-ok (require RT::TestHarness);
ok (require RT::CurrentUser);
=end testing
@@ -28,9 +46,13 @@ ok (require RT::CurrentUser);
package RT::CurrentUser;
+
use RT::Record;
-@ISA= qw(RT::Record);
+use RT::I18N;
+use strict;
+use vars qw/@ISA/;
+@ISA= qw(RT::Record);
# {{{ sub _Init
@@ -48,7 +70,7 @@ sub _Init {
$self->Load($Name);
}
- $self->_MyCurrentUser($self);
+ $self->CurrentUser($self);
}
# }}}
@@ -56,7 +78,8 @@ sub _Init {
# {{{ sub Create
sub Create {
- return (0, 'Permission Denied');
+ my $self = shift;
+ return (0, $self->loc('Permission Denied'));
}
# }}}
@@ -64,7 +87,8 @@ sub Create {
# {{{ sub Delete
sub Delete {
- return (0, 'Permission Denied');
+ my $self = shift;
+ return (0, $self->loc('Permission Denied'));
}
# }}}
@@ -84,7 +108,7 @@ sub UserObj {
use RT::User;
$self->{'UserObj'} = RT::User->new($self);
unless ($self->{'UserObj'}->Load($self->Id)) {
- $RT::Logger->err("Couldn't load ".$self->Id. "from the users database.\n");
+ $RT::Logger->err($self->loc("Couldn't load [_1] from the users database.\n", $self->Id));
}
}
@@ -92,6 +116,42 @@ sub UserObj {
}
# }}}
+# {{{ sub PrincipalObj
+
+=head2 PrincipalObj
+
+ Returns this user's principal object. this is just a helper routine for
+ $self->UserObj->PrincipalObj
+
+=cut
+
+sub PrincipalObj {
+ my $self = shift;
+ return($self->UserObj->PrincipalObj);
+}
+
+
+# }}}
+
+
+# {{{ sub PrincipalId
+
+=head2 PrincipalId
+
+ Returns this user's principal Id. this is just a helper routine for
+ $self->UserObj->PrincipalId
+
+=cut
+
+sub PrincipalId {
+ my $self = shift;
+ return($self->UserObj->PrincipalId);
+}
+
+
+# }}}
+
+
# {{{ sub _Accessible
sub _Accessible {
my $self = shift;
@@ -120,6 +180,8 @@ Takes the email address of the user to load.
sub LoadByEmail {
my $self = shift;
my $identifier = shift;
+
+ $identifier = RT::User::CanonicalizeEmailAddress(undef, $identifier);
$self->LoadByCol("EmailAddress",$identifier);
@@ -225,46 +287,88 @@ sub Privileged {
# }}}
-# {{{ Convenient ACL methods
-=head2 HasQueueRight
+# {{{ sub HasRight
-calls $self->UserObj->HasQueueRight with the arguments passed in
+=head2 HasRight
+
+calls $self->UserObj->HasRight with the arguments passed in
=cut
-sub HasQueueRight {
- my $self = shift;
- return ($self->UserObj->HasQueueRight(@_));
+sub HasRight {
+ my $self = shift;
+ return ($self->UserObj->HasRight(@_));
}
-=head2 HasSystemRight
+# }}}
-calls $self->UserObj->HasSystemRight with the arguments passed in
+# {{{ Localization
-=cut
+=head2 LanguageHandle
+Returns this current user's langauge handle. Should take a language
+specification. but currently doesn't
-sub HasSystemRight {
- my $self = shift;
- return ($self->UserObj->HasSystemRight(@_));
-}
-# }}}
+=begin testing
-# {{{ sub HasRight
+ok (my $cu = RT::CurrentUser->new('root'));
+ok (my $lh = $cu->LanguageHandle);
+ok ($lh != undef);
+ok ($lh->isa('Locale::Maketext'));
+ok ($cu->loc('TEST_STRING') eq "Concrete Mixer", "Localized TEST_STRING into English");
+ok ($lh = $cu->LanguageHandle('fr'));
+ok ($cu->loc('Before') eq "Avant", "Localized TEST_STRING into Frenc");
-=head2 HasSystemRight
+=end testing
-calls $self->UserObj->HasRight with the arguments passed in
+=cut
-=cut
+sub LanguageHandle {
+ my $self = shift;
+ if ((!defined $self->{'LangHandle'}) ||
+ (!UNIVERSAL::can($self->{'LangHandle'}, 'maketext')) ||
+ (@_)) {
+ $self->{'LangHandle'} = RT::I18N->get_handle(@_);
+ }
+ # Fall back to english.
+ unless ($self->{'LangHandle'}) {
+ die "We couldn't get a dictionary. Nye mogu naidti slovar. No puedo encontrar dictionario.";
+ }
+ return ($self->{'LangHandle'});
+}
-sub HasRight {
- my $self = shift;
- return ($self->UserObj->HasRight(@_));
+sub loc {
+ my $self = shift;
+ return '' if $_[0] eq '';
+
+ my $handle = $self->LanguageHandle;
+
+ if (@_ == 1) {
+ # pre-scan the lexicon hashes to return _AUTO keys verbatim,
+ # to keep locstrings containing '[' and '~' from tripping over Maketext
+ return $_[0] unless grep { exists $_->{$_[0]} } @{ $handle->_lex_refs };
+ }
+
+ return $handle->maketext(@_);
}
+sub loc_fuzzy {
+ my $self = shift;
+ return '' if $_[0] eq '';
+
+ # XXX: work around perl's deficiency when matching utf8 data
+ return $_[0] if Encode::is_utf8($_[0]);
+ my $result = $self->LanguageHandle->maketext_fuzzy(@_);
+
+ return($result);
+}
# }}}
+eval "require RT::CurrentUser_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Vendor.pm});
+eval "require RT::CurrentUser_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Local.pm});
+
1;
diff --git a/rt/lib/RT/Date.pm b/rt/lib/RT/Date.pm
index d56997174..355370ada 100644
--- a/rt/lib/RT/Date.pm
+++ b/rt/lib/RT/Date.pm
@@ -1,7 +1,26 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Date.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
+# 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
=head1 NAME
RT::Date - a simple Object Oriented date.
@@ -28,7 +47,15 @@ ok (require RT::Date);
package RT::Date;
+
use Time::Local;
+
+use RT::Base;
+
+use strict;
+use vars qw/@ISA/;
+@ISA = qw/RT::Base/;
+
use vars qw($MINUTE $HOUR $DAY $WEEK $MONTH $YEAR);
$MINUTE = 60;
@@ -45,6 +72,7 @@ sub new {
my $class = ref($proto) || $proto;
my $self = {};
bless ($self, $class);
+ $self->CurrentUser(@_);
$self->Unix(0);
return $self;
}
@@ -61,91 +89,114 @@ if $args->{'Format'} is 'unix', takes the number of seconds since the epoch
If $args->{'Format'} is ISO, tries to parse an ISO date.
-If $args->{'Format'} is 'unknown', require Date::Parse and make it figure things
-out. This is a heavyweight operation that should never be called from within
-RT's core. But it's really useful for something like the textbox date entry
-where we let the user do whatever they want.
+If $args->{'Format'} is 'unknown', require Time::ParseDate and make it figure
+things out. This is a heavyweight operation that should never be called from
+within RT's core. But it's really useful for something like the textbox date
+entry where we let the user do whatever they want.
If $args->{'Value'} is 0, assumes you mean never.
+=begin testing
+
+use_ok(RT::Date);
+my $date = RT::Date->new($RT::SystemUser);
+$date->Set(Format => 'unix', Value => '0');
+ok ($date->ISO eq '1970-01-01 00:00:00', "Set a date to midnight 1/1/1970 GMT");
+
+=end testing
=cut
sub Set {
my $self = shift;
my %args = ( Format => 'unix',
- Value => time,
- @_);
- if (($args{'Value'} =~ /^\d*$/) and ($args{'Value'} == 0)) {
- $self->Unix(-1);
- return($self->Unix());
+ Value => time,
+ @_ );
+ if ( !$args{'Value'}
+ || ( ( $args{'Value'} =~ /^\d*$/ ) and ( $args{'Value'} == 0 ) ) ) {
+ $self->Unix(-1);
+ return ( $self->Unix() );
}
- if ($args{'Format'} =~ /^unix$/i) {
- $self->Unix($args{'Value'});
+ if ( $args{'Format'} =~ /^unix$/i ) {
+ $self->Unix( $args{'Value'} );
}
-
- elsif ($args{'Format'} =~ /^(sql|datemanip|iso)$/i) {
-
- if (($args{'Value'} =~ /^(\d{4}?)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) ||
- ($args{'Value'} =~ /^(\d{4}?)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)$/) ||
- ($args{'Value'} =~ /^(\d{4}?)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)\+00$/) ||
- ($args{'Value'} =~ /^(\d{4}?)(\d\d)(\d\d)(\d\d):(\d\d):(\d\d)$/)) {
-
- my $year = $1;
- my $mon = $2;
- my $mday = $3;
- my $hours = $4;
- my $min = $5;
- my $sec = $6;
-
- #timegm expects month as 0->11
- $mon--;
-
- #now that we've parsed it, deal with the case where everything
- #was 0
- if ($mon == -1) {
- $self->Unix(-1);
- } else {
-
- #Dateamnip strings aren't in GMT.
- if ($args{'Format'} =~ /^datemanip$/i) {
- $self->Unix(timelocal($sec,$min,$hours,$mday,$mon,$year));
- }
- #ISO and SQL dates are in GMT
- else {
- $self->Unix(timegm($sec,$min,$hours,$mday,$mon,$year));
- }
-
- $self->Unix(-1) unless $self->Unix;
- }
- }
- else {
- use Carp;
- Carp::cluck;
- $RT::Logger->debug( "Couldn't parse date $args{'Value'} as a $args{'Format'}");
-
- }
+
+ elsif ( $args{'Format'} =~ /^(sql|datemanip|iso)$/i ) {
+ $args{'Value'} =~ s!/!-!g;
+
+ if (( $args{'Value'} =~ /^(\d{4}?)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/ )
+ || ( $args{'Value'} =~
+ /^(\d{4}?)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)$/ )
+ || ( $args{'Value'} =~
+ /^(\d{4}?)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)\+00$/ )
+ || ($args{'Value'} =~ /^(\d{4}?)(\d\d)(\d\d)(\d\d):(\d\d):(\d\d)$/ )
+ ) {
+
+ my $year = $1;
+ my $mon = $2;
+ my $mday = $3;
+ my $hours = $4;
+ my $min = $5;
+ my $sec = $6;
+
+ #timegm expects month as 0->11
+ $mon--;
+
+ #now that we've parsed it, deal with the case where everything
+ #was 0
+ if ( $mon == -1 ) {
+ $self->Unix(-1);
+ }
+ else {
+
+ #Dateamnip strings aren't in GMT.
+ if ( $args{'Format'} =~ /^datemanip$/i ) {
+ $self->Unix(
+ timelocal( $sec, $min, $hours, $mday, $mon, $year ) );
+ }
+
+ #ISO and SQL dates are in GMT
+ else {
+ $self->Unix(
+ timegm( $sec, $min, $hours, $mday, $mon, $year ) );
+ }
+
+ $self->Unix(-1) unless $self->Unix;
+ }
+ }
+ else {
+ use Carp;
+ Carp::cluck;
+ $RT::Logger->debug(
+ "Couldn't parse date $args{'Value'} as a $args{'Format'}");
+
+ }
+ }
+ elsif ( $args{'Format'} =~ /^unknown$/i ) {
+ require Time::ParseDate;
+
+ #Convert it to an ISO format string
+
+ my $date = Time::ParseDate::parsedate($args{'Value'},
+ UK => $RT::DateDayBeforeMonth,
+ PREFER_PAST => $RT::AmbiguousDayInPast,
+ PREFER_FUTURE => !($RT::AmbiguousDayInPast));
+
+ #This date has now been set to a date in the _local_ timezone.
+ #since ISO dates are known to be in GMT (for RT's purposes);
+
+ $RT::Logger->debug( "RT::Date used date::parse to make "
+ . $args{'Value'}
+ . " $date\n" );
+
+ return ( $self->Set( Format => 'unix', Value => "$date" ) );
}
- elsif ($args{'Format'} =~ /^unknown$/i) {
- require Date::Parse;
- #Convert it to an ISO format string
-
- my $date = Date::Parse::str2time($args{'Value'});
-
- #This date has now been set to a date in the _local_ timezone.
- #since ISO dates are known to be in GMT (for RT's purposes);
-
- $RT::Logger->debug("RT::Date used date::parse to make ".$args{'Value'} . " $date\n");
-
-
- return ($self->Set( Format => 'unix', Value => "$date"));
- }
else {
- die "Unknown Date format: ".$args{'Format'}."\n";
+ die "Unknown Date format: " . $args{'Format'} . "\n";
}
-
- return($self->Unix());
+
+ return ( $self->Unix() );
}
# }}}
@@ -232,47 +283,59 @@ sub DiffAsString {
# {{{ sub DurationAsString
+
=head2 DurationAsString
Takes a number of seconds. returns a string describing that duration
=cut
-sub DurationAsString{
+sub DurationAsString {
- my $self=shift;
+ my $self = shift;
my $duration = shift;
-
- my ($negative, $s);
-
- $negative = 'ago' if ($duration < 0);
+
+ my ( $negative, $s );
+
+ $negative = 1 if ( $duration < 0 );
$duration = abs($duration);
- if($duration < $MINUTE) {
- $s=$duration;
- $string="sec";
- } elsif($duration < (2 * $HOUR)) {
- $s = int($duration/$MINUTE);
- $string="min";
- } elsif($duration < (2 * $DAY)) {
- $s = int($duration/$HOUR);
- $string="hours";
- } elsif($duration < (2 * $WEEK)) {
- $s = int($duration/$DAY);
- $string="days";
- } elsif($duration < (2 * $MONTH)) {
- $s = int($duration/$WEEK);
- $string="weeks";
- } elsif($duration < $YEAR) {
- $s = int($duration/$MONTH);
- $string="months";
- } else {
- $s = int($duration/$YEAR);
- $string="years";
+ my $time_unit;
+ if ( $duration < $MINUTE ) {
+ $s = $duration;
+ $time_unit = $self->loc("sec");
+ }
+ elsif ( $duration < ( 2 * $HOUR ) ) {
+ $s = int( $duration / $MINUTE );
+ $time_unit = $self->loc("min");
+ }
+ elsif ( $duration < ( 2 * $DAY ) ) {
+ $s = int( $duration / $HOUR );
+ $time_unit = $self->loc("hours");
+ }
+ elsif ( $duration < ( 2 * $WEEK ) ) {
+ $s = int( $duration / $DAY );
+ $time_unit = $self->loc("days");
+ }
+ elsif ( $duration < ( 2 * $MONTH ) ) {
+ $s = int( $duration / $WEEK );
+ $time_unit = $self->loc("weeks");
+ }
+ elsif ( $duration < $YEAR ) {
+ $s = int( $duration / $MONTH );
+ $time_unit = $self->loc("months");
+ }
+ else {
+ $s = int( $duration / $YEAR );
+ $time_unit = $self->loc("years");
+ }
+ if (0) { # For now, never display the "AGO" # $negative) {
+ return $self->loc( "[_1] [_2] ago", $s, $time_unit );
+ }
+ else {
+ return $self->loc( "[_1] [_2]", $s, $time_unit );
}
-
- return ("$s $string $negative");
}
# }}}
@@ -303,12 +366,64 @@ Returns the object\'s time as a string with the current timezone.
sub AsString {
my $self = shift;
- return ("Not set") if ($self->Unix <= 0);
+ return ($self->loc("Not set")) if ($self->Unix <= 0);
+
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($self->Unix);
- return (scalar(localtime($self->Unix)));
+ return $self->loc("[_1] [_2] [_3] [_4]:[_5]:[_6] [_7]", $self->GetWeekday($wday), $self->GetMonth($mon), map {sprintf "%02d", $_} ($mday, $hour, $min, $sec), ($year+1900));
}
# }}}
+# {{{ GetWeekday
+=head2 GetWeekday DAY
+
+Takes an integer day of week and returns a localized string for that day of week
+
+=cut
+
+sub GetWeekday {
+ my $self = shift;
+ my $dow = shift;
+
+ return $self->loc('Mon.') if ($dow == 1);
+ return $self->loc('Tue.') if ($dow == 2);
+ return $self->loc('Wed.') if ($dow == 3);
+ return $self->loc('Thu.') if ($dow == 4);
+ return $self->loc('Fri.') if ($dow == 5);
+ return $self->loc('Sat.') if ($dow == 6);
+ return $self->loc('Sun.') if ($dow == 0);
+}
+
+# }}}
+
+# {{{ GetMonth
+=head2 GetMonth DAY
+
+Takes an integer month and returns a localized string for that month
+
+=cut
+
+sub GetMonth {
+ my $self = shift;
+ my $mon = shift;
+
+ # We do this rather than an array so that we don't call localize 12x what we need to
+ return $self->loc('Jan.') if ($mon == 0);
+ return $self->loc('Feb.') if ($mon == 1);
+ return $self->loc('Mar.') if ($mon == 2);
+ return $self->loc('Apr.') if ($mon == 3);
+ return $self->loc('May.') if ($mon == 4);
+ return $self->loc('Jun.') if ($mon == 5);
+ return $self->loc('Jul.') if ($mon == 6);
+ return $self->loc('Aug.') if ($mon == 7);
+ return $self->loc('Sep.') if ($mon == 8);
+ return $self->loc('Oct.') if ($mon == 9);
+ return $self->loc('Nov.') if ($mon == 10);
+ return $self->loc('Dec.') if ($mon == 11);
+}
+
+# }}}
+
# {{{ sub AddSeconds
=head2 sub AddSeconds
@@ -425,12 +540,18 @@ pull from a 'Timezone' attribute of the CurrentUser
sub LocalTimezone {
my $self = shift;
-
+
+ return $self->CurrentUser->Timezone
+ if $self->CurrentUser and $self->CurrentUser->can('Timezone');
+
return ($RT::Timezone);
}
# }}}
-
+eval "require RT::Date_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Date_Vendor.pm});
+eval "require RT::Date_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Date_Local.pm});
1;
diff --git a/rt/lib/RT/EasySearch.pm b/rt/lib/RT/EasySearch.pm
deleted file mode 100755
index bcbfa01b2..000000000
--- a/rt/lib/RT/EasySearch.pm
+++ /dev/null
@@ -1,115 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/EasySearch.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-=head1 NAME
-
- RT::EasySearch - a baseclass for RT collection objects
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-
-=head1 METHODS
-
-
-=begin testing
-
-ok (require RT::EasySearch);
-
-=end testing
-
-
-=cut
-
-package RT::EasySearch;
-use DBIx::SearchBuilder;
-@ISA= qw(DBIx::SearchBuilder);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'user'} = shift;
- unless(defined($self->CurrentUser)) {
- use Carp;
- Carp::confess("$self was created without a CurrentUser");
- $RT::Logger->err("$self was created without a CurrentUser\n");
- return(0);
- }
- $self->SUPER::_Init( 'Handle' => $RT::Handle);
-}
-# }}}
-
-# {{{ sub LimitToEnabled
-
-=head2 LimitToEnabled
-
-Only find items that haven\'t been disabled
-
-=cut
-
-sub LimitToEnabled {
- my $self = shift;
-
- $self->Limit( FIELD => 'Disabled',
- VALUE => '0',
- OPERATOR => '=' );
-}
-# }}}
-
-# {{{ sub LimitToDisabled
-
-=head2 LimitToDeleted
-
-Only find items that have been deleted.
-
-=cut
-
-sub LimitToDeleted {
- my $self = shift;
-
- $self->{'find_disabled_rows'} = 1;
- $self->Limit( FIELD => 'Disabled',
- OPERATOR => '=',
- VALUE => '1'
- );
-}
-# }}}
-
-
-# {{{ sub Limit
-
-=head2 Limit PARAMHASH
-
-This Limit sub calls SUPER::Limit, but defaults "CASESENSITIVE" to 1, thus
-making sure that by default lots of things don't do extra work trying to
-match lower(colname) agaist lc($val);
-
-=cut
-
-sub Limit {
- my $self = shift;
- my %args = ( CASESENSITIVE => 1,
- @_ );
-
- return $self->SUPER::Limit(%args);
-}
-
-# {{{ sub CurrentUser
-
-=head2 CurrentUser
-
- Returns the current user as an RT::User object.
-
-=cut
-
-sub CurrentUser {
- my $self = shift;
- return ($self->{'user'});
-}
-# }}}
-
-
-1;
-
-
diff --git a/rt/lib/RT/Group.pm b/rt/lib/RT/Group.pm
index 005601f5e..4dcef3f07 100755
--- a/rt/lib/RT/Group.pm
+++ b/rt/lib/RT/Group.pm
@@ -1,364 +1,258 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Group.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 2000 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
-#
+# 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
+# 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::Group - RT\'s group object
+RT::Group
-=head1 SYNOPSIS
- use RT::Group;
-my $group = new RT::Group($CurrentUser);
+=head1 SYNOPSIS
=head1 DESCRIPTION
-An RT group object.
+=head1 METHODS
-=head1 AUTHOR
+=cut
-Jesse Vincent, jesse@fsck.com
+package RT::Group;
+use RT::Record;
-=head1 SEE ALSO
-RT
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-=head1 METHODS
+sub _Init {
+ my $self = shift;
+ $self->Table('Groups');
+ $self->SUPER::_Init(@_);
+}
-=begin testing
-ok (require RT::TestHarness);
-ok (require RT::Group);
-=end testing
-=cut
+=item Create PARAMHASH
-package RT::Group;
-use RT::Record;
-use RT::GroupMember;
-use RT::ACE;
+Create takes a hash of values and creates a row in the database:
-use vars qw|@ISA|;
-@ISA= qw(RT::Record);
+ varchar(200) 'Name'.
+ varchar(255) 'Description'.
+ varchar(64) 'Domain'.
+ varchar(64) 'Type'.
+ varchar(64) 'Instance'.
+
+=cut
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Groups";
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub _Accessible
-sub _Accessible {
+
+sub Create {
my $self = shift;
- my %Cols = (
- Name => 'read/write',
- Description => 'read/write',
- Pseudo => 'read'
- );
- return $self->SUPER::_Accessible(@_, %Cols);
+ my %args = (
+ Name => '',
+ Description => '',
+ Domain => '',
+ Type => '',
+ Instance => '',
+
+ @_);
+ $self->SUPER::Create(
+ Name => $args{'Name'},
+ Description => $args{'Description'},
+ Domain => $args{'Domain'},
+ Type => $args{'Type'},
+ Instance => $args{'Instance'},
+);
+
}
-# }}}
-# {{{ sub Load
-=head2 Load
-Load a group object from the database. Takes a single argument.
-If the argument is numerical, load by the column 'id'. Otherwise, load by
-the "Name" column which is the group's textual name
+=item id
-=cut
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-sub Load {
- my $self = shift;
- my $identifier = shift || return undef;
-
- #if it's an int, load by id. otherwise, load by name.
- if ($identifier !~ /\D/) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- $self->LoadByCol("Name",$identifier);
- }
-}
-# }}}
+=cut
-# {{{ sub Create
-=head2 Create
+=item Name
-Takes a paramhash with three named arguments: Name, Description and Pseudo.
-Pseudo is used internally by RT for certain special ACL decisions.
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
-=cut
-sub Create {
- my $self = shift;
- my %args = ( Name => undef,
- Description => undef,
- Pseudo => 0,
- @_);
-
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- $RT::Logger->warning($self->CurrentUser->Name ." Tried to create a group without permission.");
- return(0, 'Permission Denied');
- }
-
- my $retval = $self->SUPER::Create(Name => $args{'Name'},
- Description => $args{'Description'},
- Pseudo => $args{'Pseudo'});
-
- return ($retval);
-}
-# }}}
+=item SetName VALUE
-# {{{ sub Delete
-=head2 Delete
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
-Delete this object
=cut
-sub Delete {
- my $self = shift;
-
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- return (0, 'Permission Denied');
- }
-
- return($self->SUPER::Delete(@_));
-}
-# }}}
+=item Description
-# {{{ MembersObj
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
-=head2 MembersObj
-Returns an RT::GroupMembers object of this group's members.
+
+=item SetDescription VALUE
+
+
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
+
=cut
-sub MembersObj {
- my $self = shift;
- unless (defined $self->{'members_obj'}) {
- use RT::GroupMembers;
- $self->{'members_obj'} = new RT::GroupMembers($self->CurrentUser);
-
- #If we don't have rights, don't include any results
- $self->{'members_obj'}->LimitToGroup($self->id);
-
- }
- return ($self->{'members_obj'});
-
-}
-# }}}
+=item Domain
+
+Returns the current value of Domain.
+(In the database, Domain is stored as varchar(64).)
+
-# {{{ AddMember
-=head2 AddMember
+=item SetDomain VALUE
+
+
+Set Domain to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Domain will be stored as a varchar(64).)
-AddMember adds a user to this group. It takes a user id.
-Returns a two value array. the first value is true on successful
-addition or 0 on failure. The second value is a textual status msg.
=cut
-sub AddMember {
- my $self = shift;
- my $new_member = shift;
-
- my $new_member_obj = new RT::User($self->CurrentUser);
- $new_member_obj->Load($new_member);
-
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- #User has no permission to be doing this
- return(0, "Permission Denied");
- }
-
- unless ($new_member_obj->Id) {
- $RT::Logger->debug("Couldn't find user $new_member");
- return(0, "Couldn't find user");
- }
-
- if ($self->HasMember($new_member_obj->Id)) {
- #User is already a member of this group. no need to add it
- return(0, "Group already has member");
- }
-
- my $member_object = new RT::GroupMember($self->CurrentUser);
- $member_object->Create( UserId => $new_member_obj->Id,
- GroupId => $self->id );
- return(1, "Member added");
-}
-# }}}
+=item Type
+
+Returns the current value of Type.
+(In the database, Type is stored as varchar(64).)
+
+
+
+=item SetType VALUE
-# {{{ HasMember
-=head2 HasMember
+Set Type to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Type will be stored as a varchar(64).)
-Takes a user Id and returns a GroupMember Id if that user is a member of
-this group.
-Returns undef if the user isn't a member of the group or if the current
-user doesn't have permission to find out. Arguably, it should differentiate
-between ACL failure and non membership.
=cut
-sub HasMember {
- my $self = shift;
- my $user_id = shift;
- #Try to cons up a member object using "LoadByCols"
+=item Instance
- my $member_obj = new RT::GroupMember($self->CurrentUser);
- $member_obj->LoadByCols( UserId => $user_id, GroupId => $self->id);
+Returns the current value of Instance.
+(In the database, Instance is stored as varchar(64).)
- #If we have a member object
- if (defined $member_obj->id) {
- return ($member_obj->id);
- }
- #If Load returns no objects, we have an undef id.
- else {
- return(undef);
- }
-}
-# }}}
+=item SetInstance VALUE
-# {{{ DeleteMember
-=head2 DeleteMember
+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 varchar(64).)
-Takes the user id of a member.
-If the current user has apropriate rights,
-removes that GroupMember from this group.
-Returns a two value array. the first value is true on successful
-addition or 0 on failure. The second value is a textual status msg.
=cut
-sub DeleteMember {
- my $self = shift;
- my $member = shift;
-
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- #User has no permission to be doing this
- return(0,"Permission Denied");
- }
-
- my $member_user_obj = new RT::User($self->CurrentUser);
- $member_user_obj->Load($member);
-
- unless ($member_user_obj->Id) {
- $RT::Logger->debug("Couldn't find user $member");
- return(0, "User not found");
- }
-
- my $member_obj = new RT::GroupMember($self->CurrentUser);
- unless ($member_obj->LoadByCols ( UserId => $member_user_obj->Id,
- GroupId => $self->Id )) {
- return(0, "Couldn\'t load member"); #couldn\'t load member object
- }
-
- #If we couldn't load it, return undef.
- unless ($member_obj->Id()) {
- return (0, "Group has no such member");
- }
-
- #Now that we've checked ACLs and sanity, delete the groupmember
- my $val = $member_obj->Delete();
- if ($val) {
- return ($val, "Member deleted");
- }
- else {
- return (0, "Member not deleted");
- }
-}
-# }}}
-# {{{ ACL Related routines
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ Domain =>
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
+ Type =>
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
+ Instance =>
+ {read => 1, write => 1, type => 'varchar(64)', default => ''},
-# {{{ GrantQueueRight
+ }
+};
-=head2 GrantQueueRight
-Grant a queue right to this group. Takes a paramhash of which the elements
-RightAppliesTo and RightName are important.
+ eval "require RT::Group_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Group_Overlay.pm}) {
+ die $@;
+ };
-=cut
+ eval "require RT::Group_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Group_Vendor.pm}) {
+ die $@;
+ };
-sub GrantQueueRight {
-
- my $self = shift;
- my %args = ( RightScope => 'Queue',
- RightName => undef,
- RightAppliesTo => undef,
- PrincipalType => 'Group',
- PrincipalId => $self->Id,
- @_);
-
- #ACLs get checked in ACE.pm
-
- my $ace = new RT::ACE($self->CurrentUser);
-
- return ($ace->Create(%args));
-}
+ eval "require RT::Group_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Group_Local.pm}) {
+ die $@;
+ };
-# }}}
-# {{{ GrantSystemRight
-=head2 GrantSystemRight
-Grant a system right to this group.
-The only element that's important to set is RightName.
+=head1 SEE ALSO
-=cut
-sub GrantSystemRight {
-
- my $self = shift;
- my %args = ( RightScope => 'System',
- RightName => undef,
- RightAppliesTo => 0,
- PrincipalType => 'Group',
- PrincipalId => $self->Id,
- @_);
-
- # ACLS get checked in ACE.pm
-
- my $ace = new RT::ACE($self->CurrentUser);
- return ($ace->Create(%args));
-}
+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);
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- return (0, 'Permission Denied');
- }
+RT::Group_Overlay, RT::Group_Vendor, RT::Group_Local
- return ($self->SUPER::_Set(@_));
+=cut
-}
-# }}}
+
+1;
diff --git a/rt/lib/RT/GroupMember.pm b/rt/lib/RT/GroupMember.pm
index 69de50b42..8de1a73fe 100755
--- a/rt/lib/RT/GroupMember.pm
+++ b/rt/lib/RT/GroupMember.pm
@@ -1,136 +1,189 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/GroupMember.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 2000 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
+# 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
+# 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::GroupMember - a member of an RT Group
+RT::GroupMember
-=head1 SYNOPSIS
-RT::GroupMember should never be called directly. It should generally
-only be accessed through the helper functions in RT::Group;
+=head1 SYNOPSIS
=head1 DESCRIPTION
+=head1 METHODS
+=cut
+package RT::GroupMember;
+use RT::Record;
-=head1 METHODS
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-=begin testing
+sub _Init {
+ my $self = shift;
-ok (require RT::TestHarness);
-ok (require RT::GroupMember);
+ $self->Table('GroupMembers');
+ $self->SUPER::_Init(@_);
+}
-=end testing
-=cut
-package RT::GroupMember;
-use RT::Record;
-use vars qw|@ISA|;
-@ISA= qw(RT::Record);
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "GroupMembers";
- return($self->SUPER::_Init(@_));
-}
-# }}}
+=item Create PARAMHASH
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- GroupId => 'read',
- UserId => 'read'
- );
+Create takes a hash of values and creates a row in the database:
+
+ int(11) 'GroupId'.
+ int(11) 'MemberId'.
+
+=cut
- return $self->SUPER::_Accessible(@_, %Cols);
-}
-# }}}
-# {{{ sub Create
-# a helper method for Add
sub Create {
my $self = shift;
- my %args = ( GroupId => undef,
- UserId => undef,
- @_
- );
-
- unless( $self->CurrentUser->HasSystemRight('AdminGroups')) {
- return (0, 'Permission Denied');
- }
-
- return ($self->SUPER::Create(GroupId => $args{'GroupId'},
- UserId => $args{'UserId'}))
+ my %args = (
+ GroupId => '0',
+ MemberId => '0',
+
+ @_);
+ $self->SUPER::Create(
+ GroupId => $args{'GroupId'},
+ MemberId => $args{'MemberId'},
+);
+
}
-# }}}
-# {{{ sub Add
-=head2 Add
-Takes a paramhash of UserId and GroupId. makes that user a memeber
-of that group
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
+
=cut
-sub Add {
- my $self = shift;
- return ($self->Create(@_));
-}
-# }}}
-# {{{ sub Delete
+=item GroupId
+
+Returns the current value of GroupId.
+(In the database, GroupId is stored as int(11).)
+
+
+
+=item SetGroupId VALUE
+
-=head2 Delete
+Set GroupId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, GroupId will be stored as a int(11).)
-Takes no arguments. deletes the currently loaded member from the
-group in question.
=cut
-sub Delete {
- my $self = shift;
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- return (0, 'Permission Denied');
- }
- return($self->SUPER::Delete(@_));
-}
-# }}}
+=item MemberId
+
+Returns the current value of MemberId.
+(In the database, MemberId is stored as int(11).)
+
-# {{{ sub UserObj
-=head2 UserObj
+=item SetMemberId VALUE
+
+
+Set MemberId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, MemberId will be stored as a int(11).)
-Returns an RT::User object for the user specified by $self->UserId
=cut
-sub UserObj {
- my $self = shift;
- unless (defined ($self->{'user_obj'})) {
- $self->{'user_obj'} = new RT::User($self->CurrentUser);
- $self->{'user_obj'}->Load($self->UserId);
- }
- return($self->{'user_obj'});
-}
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
- unless ($self->CurrentUser->HasSystemRight('AdminGroups')) {
- return (0, 'Permission Denied');
- }
- return($self->SUPER::_Set(@_));
-}
-# }}}
+
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ GroupId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ MemberId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+
+ }
+};
+
+
+ eval "require RT::GroupMember_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMember_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::GroupMember_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMember_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::GroupMember_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMember_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::GroupMember_Overlay, RT::GroupMember_Vendor, RT::GroupMember_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/GroupMembers.pm b/rt/lib/RT/GroupMembers.pm
index a90a2a899..31cb9536f 100755
--- a/rt/lib/RT/GroupMembers.pm
+++ b/rt/lib/RT/GroupMembers.pm
@@ -1,73 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/GroupMembers.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::GroupMembers - a collection of RT::GroupMember objects
+=head1 NAME
+ RT::GroupMembers -- Class Description
+
=head1 SYNOPSIS
- use RT::GroupMembers;
+ use RT::GroupMembers
=head1 DESCRIPTION
=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::GroupMembers);
-
-=end testing
-
=cut
package RT::GroupMembers;
-use RT::EasySearch;
+
+use RT::SearchBuilder;
use RT::GroupMember;
-@ISA= qw(RT::EasySearch);
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "GroupMembers";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_) );
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'GroupMembers';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub LimitToGroup
-=head2 LimitToGroup
+=item NewItem
-Takes a group id as its only argument. Limits the current search to that
-group object
+Returns an empty new RT::GroupMember item
=cut
-sub LimitToGroup {
+sub NewItem {
my $self = shift;
- my $group = shift;
+ return(RT::GroupMember->new($self->CurrentUser));
+}
- return ($self->Limit(
- VALUE => "$group",
- FIELD => 'GroupId',
- ENTRYAGGREGATOR => 'OR',
- ));
+ eval "require RT::GroupMembers_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMembers_Overlay.pm}) {
+ die $@;
+ };
-}
-# }}}
+ eval "require RT::GroupMembers_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMembers_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub NewItem
+ eval "require RT::GroupMembers_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/GroupMembers_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::GroupMembers_Overlay, RT::GroupMembers_Vendor, RT::GroupMembers_Local
+
+=cut
-sub NewItem {
- my $self = shift;
- return(RT::GroupMember->new($self->CurrentUser))
-}
-# }}}
1;
diff --git a/rt/lib/RT/Groups.pm b/rt/lib/RT/Groups.pm
index f44f1fdb3..29f12a5a0 100755
--- a/rt/lib/RT/Groups.pm
+++ b/rt/lib/RT/Groups.pm
@@ -1,100 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Groups.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Groups - a collection of RT::Group objects
+=head1 NAME
+ RT::Groups -- Class Description
+
=head1 SYNOPSIS
- use RT::Groups;
- my $groups = $RT::Groups->new($CurrentUser);
- $groups->LimitToReal();
- while (my $group = $groups->Next()) {
- print $group->Id ." is a group id\n";
- }
+ use RT::Groups
=head1 DESCRIPTION
=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Groups);
-
-=end testing
-
=cut
package RT::Groups;
-use RT::EasySearch;
-use RT::Groups;
-@ISA= qw(RT::EasySearch);
+use RT::SearchBuilder;
+use RT::Group;
-# {{{ sub _Init
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Groups";
- $self->{'primary_key'} = "id";
- $self->OrderBy( ALIAS => 'main',
- FIELD => 'Name',
- ORDER => 'ASC');
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Groups';
+ $self->{'primary_key'} = 'id';
- return ( $self->SUPER::_Init(@_));
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ LimitToReal
-=head2 LimitToReal
+=item NewItem
-Make this groups object return only "real" groups, which can be
-granted rights and have members assigned to them
+Returns an empty new RT::Group item
=cut
-sub LimitToReal {
+sub NewItem {
my $self = shift;
+ return(RT::Group->new($self->CurrentUser));
+}
- return ($self->Limit( FIELD => 'Pseudo',
- VALUE => '0',
- OPERATOR => '='));
+ eval "require RT::Groups_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Groups_Overlay.pm}) {
+ die $@;
+ };
-}
-# }}}
+ eval "require RT::Groups_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Groups_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub LimitToPseudo
+ eval "require RT::Groups_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Groups_Local.pm}) {
+ die $@;
+ };
-=head2 LimitToPseudo
-Make this groups object return only "pseudo" groups, which can be
-granted rights but whose membership lists are determined dynamically.
-=cut
-
- sub LimitToPseudo {
- my $self = shift;
- return ($self->Limit( FIELD => 'Pseudo',
- VALUE => '1',
- OPERATOR => '='));
+=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.
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return (RT::Group->new($self->CurrentUser));
-}
-# }}}
+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
-1;
+ no warnings qw(redefine);
+
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
+RT::Groups_Overlay, RT::Groups_Vendor, RT::Groups_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/Handle.pm b/rt/lib/RT/Handle.pm
index 6b74f361b..5cdb65e5b 100644
--- a/rt/lib/RT/Handle.pm
+++ b/rt/lib/RT/Handle.pm
@@ -1,5 +1,26 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Handle.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
+# 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
=head1 NAME
RT::Handle - RT's database handle
@@ -22,14 +43,16 @@ ok(require RT::Handle);
package RT::Handle;
-eval "use DBIx::SearchBuilder::Handle::$RT::DatabaseType;
+use strict;
+use vars qw/@ISA/;
+eval "use DBIx::SearchBuilder::Handle::$RT::DatabaseType;
\@ISA= qw(DBIx::SearchBuilder::Handle::$RT::DatabaseType);";
-
#TODO check for errors here.
=head2 Connect
+Connects to RT's database handle.
Takes nothing. Calls SUPER::Connect with the needed args
=cut
@@ -38,16 +61,41 @@ sub Connect {
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+)$/);
-$self->SUPER::Connect(Host => $RT::DatabaseHost,
- Database => $RT::DatabaseName,
+$self->SUPER::Connect(
User => $RT::DatabaseUser,
Password => $RT::DatabasePassword,
+ );
+
+}
+
+=item BuildDSN
+
+Build the DSN for the RT database. doesn't take any parameters, draws all that
+from the config file.
+
+=cut
+
+
+sub BuildDSN {
+ my $self = shift;
+$RT::DatabasePort = undef unless (defined $RT::DatabasePort && $RT::DatabasePort =~ /^(\d+)$/);
+$RT::DatabaseHost = undef unless (defined $RT::DatabaseHost && $RT::DatabaseHost ne '');
+
+ $self->SUPER::BuildDSN(Host => $RT::DatabaseHost,
+ Database => $RT::DatabaseName,
Port => $RT::DatabasePort,
Driver => $RT::DatabaseType,
RequireSSL => $RT::DatabaseRequireSSL,
+ DisconnectHandleOnDestroy => 1
);
+
}
+
+eval "require RT::Handle_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Handle_Vendor.pm});
+eval "require RT::Handle_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Handle_Local.pm});
+
1;
diff --git a/rt/lib/RT/Interface/CLI.pm b/rt/lib/RT/Interface/CLI.pm
index a3bf92d5f..ec0e877b4 100644
--- a/rt/lib/RT/Interface/CLI.pm
+++ b/rt/lib/RT/Interface/CLI.pm
@@ -1,9 +1,31 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Interface/CLI.pm,v 1.1 2002-08-12 06:17:08 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent <jesse@fsck.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
+use strict;
+use RT;
package RT::Interface::CLI;
-use strict;
BEGIN {
@@ -11,14 +33,14 @@ 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 $ =~ /\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);
# your exported package globals go here,
# as well as any optionally exported functions
- @EXPORT_OK = qw(&CleanEnv &LoadConfig &DBConnect
- &GetCurrentUser &GetMessageContent &debug);
+ @EXPORT_OK = qw(&CleanEnv
+ &GetCurrentUser &GetMessageContent &debug &loc);
}
=head1 NAME
@@ -27,25 +49,28 @@ BEGIN {
=head1 SYNOPSIS
- use lib "!!RT_LIB_PATH!!";
- use lib "!!RT_ETC_PATH!!";
+ use lib "/path/to/rt/libraries/";
- use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser GetMessageContent);
+ use RT::Interface::CLI qw(CleanEnv
+ GetCurrentUser GetMessageContent loc);
#Clean out all the nasties from the environment
CleanEnv();
- #Load etc/config.pm and drop privs
- LoadConfig();
+ #let's talk to RT'
+ use RT;
- #Connect to the database and get RT::SystemUser and RT::Nobody loaded
- DBConnect();
+ #Load RT's config file
+ RT::LoadConfig();
+ # Connect to the database. set up loggign
+ RT::Init();
#Get the current user all loaded
my $CurrentUser = GetCurrentUser();
+ print loc('Hello!'); # Synonym of $CuurentUser->loc('Hello!');
+
=head1 DESCRIPTION
@@ -53,7 +78,6 @@ BEGIN {
=begin testing
-ok(require RT::TestHarness);
ok(require RT::Interface::CLI);
=end testing
@@ -77,35 +101,10 @@ sub CleanEnv {
-=head2 LoadConfig
-
-Loads RT's config file and then drops setgid privileges.
-
-=cut
-
-sub LoadConfig {
-
- #This drags in RT's config.pm
- use config;
-
-}
-
-
-
-=head2 DBConnect
-
- Calls RT::Init, which creates a database connection and then creates $RT::Nobody
- and $RT::SystemUser
-
-=cut
-
-
-sub DBConnect {
- use RT;
- RT::Init();
-}
+{
+ my $CurrentUser; # shared betwen GetCurrentUser and loc
# {{{ sub GetCurrentUser
@@ -115,15 +114,14 @@ sub DBConnect {
loaded with that user. if the current user isn't found, returns a copy of RT::Nobody.
=cut
+
sub GetCurrentUser {
- my ($Gecos, $CurrentUser);
-
require RT::CurrentUser;
#Instantiate a user object
- $Gecos=(getpwuid($<))[0];
+ my $Gecos= ($^O eq 'MSWin32') ? Win32::LoginName() : (getpwuid($<))[0];
#If the current user is 0, then RT will assume that the User object
#is that of the currentuser.
@@ -134,10 +132,29 @@ sub GetCurrentUser {
unless ($CurrentUser->Id) {
$RT::Logger->debug("No user with a unix login of '$Gecos' was found. ");
}
+
return($CurrentUser);
}
# }}}
+
+# {{{ sub loc
+
+=head2 loc
+
+ Synonym of $CurrentUser->loc().
+
+=cut
+
+sub loc {
+ die "No current user yet" unless $CurrentUser ||= RT::CurrentUser->new;
+ return $CurrentUser->loc(@_);
+}
+# }}}
+
+}
+
+
# {{{ sub GetMessageContent
=head2 GetMessageContent
@@ -221,4 +238,9 @@ sub debug {
# }}}
+eval "require RT::Interface::CLI_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/CLI_Vendor.pm});
+eval "require RT::Interface::CLI_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/CLI_Local.pm});
+
1;
diff --git a/rt/lib/RT/Interface/Email.pm b/rt/lib/RT/Interface/Email.pm
index e95436091..7eec0502f 100755
--- a/rt/lib/RT/Interface/Email.pm
+++ b/rt/lib/RT/Interface/Email.pm
@@ -1,41 +1,58 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Interface/Email.pm,v 1.1 2002-08-12 06:17:08 ivan Exp $
-# RT is (c) 1996-2001 Jesse Vincent <jesse@fsck.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
package RT::Interface::Email;
use strict;
use Mail::Address;
use MIME::Entity;
+use RT::EmailParser;
+
BEGIN {
use Exporter ();
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
- $VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\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);
# your exported package globals go here,
# as well as any optionally exported functions
- @EXPORT_OK = qw(&CleanEnv
- &LoadConfig
- &DBConnect
- &GetCurrentUser
+ @EXPORT_OK = qw(
+ &CreateUser
&GetMessageContent
&CheckForLoops
&CheckForSuspiciousSender
&CheckForAutoGenerated
- &ParseMIMEEntityFromSTDIN
- &ParseTicketId
&MailError
&ParseCcAddressesFromHead
&ParseSenderAddressFromHead
- &ParseErrorsToAddressFromHead
- &ParseAddressFromHeader
-
+ &ParseErrorsToAddressFromHead
+ &ParseAddressFromHeader
+ &Gateway);
- &debug);
}
=head1 NAME
@@ -47,28 +64,13 @@ BEGIN {
use lib "!!RT_LIB_PATH!!";
use lib "!!RT_ETC_PATH!!";
- use RT::Interface::Email qw(CleanEnv LoadConfig DBConnect
- );
-
- #Clean out all the nasties from the environment
- CleanEnv();
-
- #Load etc/config.pm and drop privs
- LoadConfig();
-
- #Connect to the database and get RT::SystemUser and RT::Nobody loaded
- DBConnect();
-
-
- #Get the current user all loaded
- my $CurrentUser = GetCurrentUser();
+ use RT::Interface::Email qw(Gateway CreateUser);
=head1 DESCRIPTION
=begin testing
-ok(require RT::TestHarness);
ok(require RT::Interface::Email);
=end testing
@@ -79,71 +81,6 @@ ok(require RT::Interface::Email);
=cut
-=head2 CleanEnv
-
-Removes some of the nastiest nasties from the user\'s environment.
-
-=cut
-
-sub CleanEnv {
- $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'};
-}
-
-
-
-=head2 LoadConfig
-
-Loads RT's config file and then drops setgid privileges.
-
-=cut
-
-sub LoadConfig {
-
- #This drags in RT's config.pm
- use config;
-
-}
-
-
-
-=head2 DBConnect
-
- Calls RT::Init, which creates a database connection and then creates $RT::Nobody
- and $RT::SystemUser
-
-=cut
-
-
-sub DBConnect {
- use RT;
- RT::Init();
-}
-
-
-
-# {{{ sub debug
-
-sub debug {
- my $val = shift;
- my ($debug);
- if ($val) {
- $RT::Logger->debug($val."\n");
- if ($debug) {
- print STDERR "$val\n";
- }
- }
- if ($debug) {
- return(1);
- }
-}
-
-# }}}
-
-
# {{{ sub CheckForLoops
sub CheckForLoops {
@@ -207,82 +144,6 @@ sub CheckForAutoGenerated {
# }}}
-# {{{ sub ParseMIMEEntityFromSTDIN
-
-sub ParseMIMEEntityFromSTDIN {
-
- # Create a new parser object:
-
- my $parser = new MIME::Parser;
-
- # {{{ Config $parser to store large attacments in temp dir
-
- ## TODO: Does it make sense storing to disk at all? After all, we
- ## need to put each msg as an in-core scalar before saving it to
- ## the database, don't we?
-
- ## At the same time, we should make sure that we nuke attachments
- ## Over max size and return them
-
- ## TODO: Remove the temp dir when we don't need it any more.
-
- my $AttachmentDir = File::Temp::tempdir (TMPDIR => 1, CLEANUP => 1);
-
- # Set up output directory for files:
- $parser->output_dir("$AttachmentDir");
-
- #If someone includes a message, don't extract it
- $parser->extract_nested_messages(0);
-
-
- # Set up the prefix for files with auto-generated names:
- $parser->output_prefix("part");
-
- # If content length is <= 20000 bytes, store each msg as in-core scalar;
- # Else, write to a disk file (the default action):
-
- $parser->output_to_core(20000);
-
- # }}} (temporary directory)
-
- #Ok. now that we're set up, let's get the stdin.
- my $entity;
- unless ($entity = $parser->read(\*STDIN)) {
- die "couldn't parse MIME stream";
- }
- #Now we've got a parsed mime object.
-
- # Get the head, a MIME::Head:
- my $head = $entity->head;
-
-
- # Unfold headers that are have embedded newlines
- $head->unfold;
-
- # TODO - information about the charset is lost here!
- $head->decode;
-
- return ($entity, $head);
-
-}
-# }}}
-
-# {{{ sub ParseTicketId
-
-sub ParseTicketId {
- my $Subject = shift;
- my ($Id);
-
- if ($Subject =~ s/\[$RT::rtname \#(\d+)\]//i) {
- $Id = $1;
- $RT::Logger->debug("Found a ticket ID. It's $Id");
- return($Id);
- }
- else {
- return(undef);
- }
-}
-# }}}
# {{{ sub MailError
sub MailError {
@@ -313,8 +174,8 @@ sub MailError {
if ($mimeobj) {
$mimeobj->sync_headers();
$entity->add_part($mimeobj);
- }
-
+ }
+
if ($RT::MailCommand eq 'sendmailpipe') {
open (MAIL, "|$RT::SendmailPath $RT::SendmailArguments") || return(0);
print MAIL $entity->as_string;
@@ -327,144 +188,66 @@ sub MailError {
# }}}
-# {{{ sub GetCurrentUser
-
-sub GetCurrentUser {
- my $head = shift;
- my $entity = shift;
- my $ErrorsTo = shift;
+# {{{ Create User
- my %UserInfo = ();
+sub CreateUser {
+ my ($Username, $Address, $Name, $ErrorsTo, $entity) = @_;
+ my $NewUser = RT::User->new($RT::SystemUser);
- #Suck the address of the sender out of the header
- my ($Address, $Name) = ParseSenderAddressFromHead($head);
-
- #This will apply local address canonicalization rules
- $Address = RT::CanonicalizeAddress($Address);
-
- #If desired, synchronize with an external database
-
- my $UserFoundInExternalDatabase = 0;
-
- # Username is the 'Name' attribute of the user that RT uses for things
- # like authentication
- my $Username = undef;
- if ($RT::LookupSenderInExternalDatabase) {
- ($UserFoundInExternalDatabase, %UserInfo) =
- RT::LookupExternalUserInfo($Address, $Name);
-
- $Address = $UserInfo{'EmailAddress'};
- $Username = $UserInfo{'Name'};
- }
-
- my $CurrentUser = RT::CurrentUser->new();
+ # 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;
- # First try looking up by a username, if we got one from the external
- # db lookup. Next, try looking up by email address. Failing that,
- # try looking up by users who have this user's email address as their
- # username.
-
- if ($Username) {
- $CurrentUser->LoadByName($Username);
- }
+ my ($Val, $Message) =
+ $NewUser->Create(Name => ($Username || $Address),
+ EmailAddress => $Address,
+ RealName => $Name,
+ Password => undef,
+ Privileged => 0,
+ Comments => 'Autocreated on ticket submission'
+ );
- unless ($CurrentUser->Id) {
- $CurrentUser->LoadByEmail($Address);
- }
-
- #If we can't get it by email address, try by name.
- unless ($CurrentUser->Id) {
- $CurrentUser->LoadByName($Address);
+ unless ($Val) {
+
+ # Deal with the race condition of two account creations at once
+ #
+ if ($Username) {
+ $NewUser->LoadByName($Username);
+ }
+
+ 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 ($CurrentUser->Id) {
- #If we couldn't load a user, determine whether to create a user
-
- # {{{ If we require an incoming address to be found in the external
- # user database, reject the incoming message appropriately
- if ( $RT::LookupSenderInExternalDatabase &&
- $RT::SenderMustExistInExternalDatabase &&
- !$UserFoundInExternalDatabase) {
-
- my $Message = "Sender's email address was not found in the user database.";
-
- # {{{ This code useful only if you've defined an AutoRejectRequest template
-
- require RT::Template;
- my $template = new RT::Template($RT::Nobody);
- $template->Load('AutoRejectRequest');
- $Message = $template->Content || $Message;
-
- # }}}
-
- MailError( To => $ErrorsTo,
- Subject => "Ticket Creation failed: user could not be created",
- Explanation => $Message,
- MIMEObj => $entity,
- LogLevel => 'notice'
- );
-
- return($CurrentUser);
-
- }
- # }}}
-
- else {
- 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'
- );
-
- unless ($Val) {
-
- # Deal with the race condition of two account creations at once
- #
- if ($Username) {
- $NewUser->LoadByName($Username);
- }
-
- 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'
- );
- }
- }
- }
-
- #Load the new user object
- $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'
- );
-
- }
+
+ #Load the new user object
+ 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'
+ );
}
-
- return ($CurrentUser);
-
-}
-# }}}
+ return $CurrentUser;
+}
+# }}}
# {{{ ParseCcAddressesFromHead
=head2 ParseCcAddressesFromHead HASHREF
@@ -489,11 +272,11 @@ sub ParseCcAddressesFromHead {
foreach my $AddrObj (@ToObjs, @CcObjs) {
my $Address = $AddrObj->address;
- $Address = RT::CanonicalizeAddress($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::IsRTAddress($Address));
+ next if (RT::EmailParser::IsRTAddress(undef, $Address));
push (@Addresses, $Address);
}
@@ -568,8 +351,7 @@ sub ParseAddressFromHeader{
}
my $Name = ($AddrObj->phrase || $AddrObj->comment || $AddrObj->address);
-
-
+
#Lets take the from and load a user object.
my $Address = $AddrObj->address;
@@ -578,4 +360,289 @@ sub ParseAddressFromHeader{
# }}}
+
+=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.
+
+=cut
+
+sub Gateway {
+ my %args = ( message => undef,
+ queue => 1,
+ action => 'correspond',
+ ticket => undef,
+ @_ );
+
+ # Validate the action
+ 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->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>";
+
+ #Pull apart the subject line
+ my $Subject = $head->get('Subject') || '';
+ chomp $Subject;
+
+
+ $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 ( $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
+ # -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
+
+ push @RT::MailPlugins, "Auth::MailFrom" unless @RT::MailPlugins;
+ # Since this needs loading, no matter what
+
+ for (@RT::MailPlugins) {
+ my $Code;
+ my $NewAuthStat;
+ if ( ref($_) eq "CODE" ) {
+ $Code = $_;
+ }
+ else {
+ $_ = "RT::Interface::Email::$_" unless /^RT::Interface::Email::/;
+ eval "require $_;";
+ if ($@) {
+ die ("Couldn't load module $_: $@");
+ next;
+ }
+ no strict 'refs';
+ if ( !defined( $Code = *{ $_ . "::GetCurrentUser" }{CODE} ) ) {
+ die ("No GetCurrentUser code found in $_ module");
+ next;
+ }
+ }
+
+ ( $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 or !$CurrentUser->Id or $AuthStat == -1 ) {
+
+ # If the plugins refused to create one, they lose.
+ MailError(
+ 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.
+
+EOT
+ MIMEObj => $Message,
+ LogLevel => 'error' )
+ unless $AuthStat == -1;
+ return ( 0, "Could not load a valid user", undef );
+ }
+
+ # }}}
+
+ # {{{ Lets check for mail loops of various sorts.
+ my $IsAutoGenerated = CheckForAutoGenerated($head);
+
+ my $IsSuspiciousSender = CheckForSuspiciousSender($head);
+
+ 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 ( $IsSuspiciousSender || $IsAutoGenerated || $IsALoop ) {
+ $SquelchReplies = 1;
+ $ErrorsTo = $RT::OwnerEmail;
+ }
+
+ # }}}
+
+ # {{{ 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 );
+ }
+
+ # }}}
+ # {{{ Warn someone if it's a loop
+
+ # 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.");
+
+ #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);
+ }
+ }
+
+ # }}}
+
+ # {{{ 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');
+ }
+
+ if ($SquelchReplies) {
+ ## TODO: This is a hack. It should be some other way to
+ ## indicate that the transaction should be "silent".
+
+ my ( $Sender, $junk ) = ParseSenderAddressFromHead($head);
+ $head->add( 'RT-Squelch-Replies-To', $Sender );
+ }
+
+ # }}}
+
+ my $Ticket = RT::Ticket->new($CurrentUser);
+
+ # {{{ If we don't have a ticket Id, we're creating a new ticket
+ if ( !$args{'ticket'} ) {
+
+ # {{{ Create a new ticket
+
+ my @Cc;
+ my @Requestors = ( $CurrentUser->id );
+
+ if ($RT::ParseNewMessageForTicketCcs) {
+ @Cc = ParseCcAddressesFromHead( Head => $head,
+ CurrentUser => $CurrentUser,
+ QueueObj => $SystemQueueObj );
+ }
+
+ 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 );
+ }
+
+ # }}}
+ }
+
+ # }}}
+
+ # 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 );
+
+ return ( 0, $message);
+ }
+
+ my ( $status, $msg );
+ if ( $args{'action'} =~ /^correspond$/ ) {
+ ( $status, $msg ) = $Ticket->Correspond( MIMEObj => $Message );
+ }
+ else {
+ ( $status, $msg ) = $Ticket->Comment( MIMEObj => $Message );
+ }
+ unless ($status) {
+
+ #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 );
+ }
+ }
+
+ else {
+
+ #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 );
+
+ }
+
+
+return ( 1, "Success", $Ticket );
+}
+
+eval "require RT::Interface::Email_Vendor";
+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});
+
1;
diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm
index 6b5272848..5097f54a4 100644
--- a/rt/lib/RT/Interface/Web.pm
+++ b/rt/lib/RT/Interface/Web.pm
@@ -1,129 +1,214 @@
-## $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Interface/Web.pm,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
+# 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
## Portions Copyright 2000 Tobias Brox <tobix@fsck.com>
-## Copyright 1996-2002 Jesse Vincent <jesse@bestpractical.com>
## This is a library of static subs to be used by the Mason web
## interface to RT
+
+=head1 NAME
+
+RT::Interface::Web
+
+=begin testing
+
+use_ok(RT::Interface::Web);
+
+=end testing
+
+=cut
+
+
package RT::Interface::Web;
+use strict;
-# {{{ sub NewParser
-=head2 NewParser
- Returns a new Mason::Parser object. Takes a param hash of things
- that get passed to HTML::Mason::Parser. Currently hard coded to only
- take the parameter 'allow_globals'.
+
+
+# {{{ sub NewApacheHandler
+
+=head2 NewApacheHandler
+
+ Takes extra options to pass to HTML::Mason::ApacheHandler->new
+ Returns a new Mason::ApacheHandler object
=cut
-sub NewParser {
- my %args = (
- allow_globals => undef,
+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",
@_
);
- my $parser = new HTML::Mason::Parser(
- default_escape_flags => 'h',
- allow_globals => $args{'allow_globals'}
- );
- return ($parser);
+ $ah->interp->set_escape( h => \&RT::Interface::Web::EscapeUTF8 );
+
+ return ($ah);
}
# }}}
-# {{{ sub NewInterp
+# {{{ sub NewCGIHandler
-=head2 NewInterp
+=head2 NewCGIHandler
- Takes a paremeter hash. Needs a param called 'parser' which is a reference
- to an HTML::Mason::Parser.
- returns a new Mason::Interp object
+ Returns a new Mason::CGIHandler object
=cut
-sub NewInterp {
- my %params = (
+sub NewCGIHandler {
+ my %args = (
+ @_
+ );
+
+ 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)]
);
+
- #We allow recursive autohandlers to allow for RT auth.
+ $handler->interp->set_escape( h => \&RT::Interface::Web::EscapeUTF8 );
- use HTML::Mason::Interp;
- my $interp = new HTML::Mason::Interp(%params);
-}
+ return ($handler);
+}
# }}}
-# {{{ sub NewApacheHandler
-=head2 NewApacheHandler
+# {{{ EscapeUTF8
- Takes a Mason::Interp object
- Returns a new Mason::ApacheHandler object
+=head2 EscapeUTF8 SCALARREF
+
+does a css-busting but minimalist escaping of whatever html you're passing in.
=cut
-sub NewApacheHandler {
- my $interp = shift;
- my $ah = new HTML::Mason::ApacheHandler( interp => $interp );
- return ($ah);
+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 NewMason11ApacheHandler
+package HTML::Mason::Commands;
+use strict;
+use vars qw/$r $m %session/;
-=head2 NewMason11ApacheHandler
- Returns a new Mason::ApacheHandler object
+# {{{ loc
+
+=head2 loc ARRAY
+
+loc is a nice clean global routine which calls $session{'CurrentUser'}->loc()
+with whatever it's called with. If there is no $session{'CurrentUser'},
+it creates a temporary user, so we have something to get a localisation handle
+through
=cut
-sub NewMason11ApacheHandler {
- my %args = ( default_escape_flags => 'h',
- allow_globals => [%session],
- comp_root => [
- [ local => $RT::MasonLocalComponentRoot ],
- [ standard => $RT::MasonComponentRoot ]
- ],
- data_dir => "$RT::MasonDataDir",
- args_method => 'CGI'
- );
- my $ah = new HTML::Mason::ApacheHandler(%args);
- return ($ah);
+sub loc {
+
+ if ($session{'CurrentUser'} &&
+ UNIVERSAL::can($session{'CurrentUser'}, 'loc')){
+ return($session{'CurrentUser'}->loc(@_));
+ }
+ else {
+ my $u = RT::CurrentUser->new($RT::SystemUser);
+ return ($u->loc(@_));
+ }
}
# }}}
+# {{{ loc_fuzzy
+
+=head2 loc_fuzzy STRING
+loc_fuzzy is for handling localizations of messages that may already
+contain interpolated variables, typically returned from libraries
+outside RT's control. It takes the message string and extracts the
+variable array automatically by matching against the candidate entries
+inside the lexicon file.
+
+=cut
+sub loc_fuzzy {
+ my $msg = shift;
+
+ if ($session{'CurrentUser'} &&
+ UNIVERSAL::can($session{'CurrentUser'}, 'loc')){
+ return($session{'CurrentUser'}->loc_fuzzy($msg));
+ }
+ else {
+ my $u = RT::CurrentUser->new($RT::SystemUser);
+ return ($u->loc_fuzzy($msg));
+ }
+}
# }}}
-package HTML::Mason::Commands;
# {{{ sub Abort
# Error - calls Error and aborts
sub Abort {
- if ( $session{'ErrorDocument'} && $session{'ErrorDocumentType'} ) {
- SetContentType( $session{'ErrorDocumentType'} );
- $m->comp( $session{'ErrorDocument'}, Why => shift );
+ if ($session{'ErrorDocument'} &&
+ $session{'ErrorDocumentType'}) {
+ $r->content_type($session{'ErrorDocumentType'});
+ $m->comp($session{'ErrorDocument'} , Why => shift);
$m->abort;
- }
- else {
- SetContentType('text/html');
- $m->comp( "/Elements/Error", Why => shift );
+ }
+ else {
+ $m->comp("/Elements/Error" , Why => shift);
$m->abort;
}
}
@@ -135,6 +220,7 @@ sub Abort {
=head2 CreateTicket ARGS
Create a new ticket, using Mason's %ARGS. returns @results.
+
=cut
sub CreateTicket {
@@ -158,38 +244,45 @@ sub CreateTicket {
my $starts = new RT::Date( $session{'CurrentUser'} );
$starts->Set( Format => 'unknown', Value => $ARGS{'Starts'} );
- my @Requestors = split ( /,/, $ARGS{'Requestors'} );
- my @Cc = split ( /,/, $ARGS{'Cc'} );
- my @AdminCc = split ( /,/, $ARGS{'AdminCc'} );
+ 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'},
- AttachmentFieldName => 'Attach'
);
+ if ($ARGS{'Attachments'}) {
+ $MIMEObj->make_multipart;
+ $MIMEObj->add_part($_) foreach values %{$ARGS{'Attachments'}};
+ }
+
my %create_args = (
- Queue => $ARGS{Queue},
- Owner => $ARGS{Owner},
- InitialPriority => $ARGS{InitialPriority},
- FinalPriority => $ARGS{FinalPriority},
- TimeLeft => $ARGS{TimeLeft},
- TimeWorked => $ARGS{TimeWorked},
+ Queue => $ARGS{'Queue'},
+ Owner => $ARGS{'Owner'},
+ InitialPriority => $ARGS{'InitialPriority'},
+ FinalPriority => $ARGS{'FinalPriority'},
+ TimeLeft => $ARGS{'TimeLeft'},
+ TimeEstimated => $ARGS{'TimeEstimated'},
+ TimeWorked => $ARGS{'TimeWorked'},
Requestor => \@Requestors,
Cc => \@Cc,
AdminCc => \@AdminCc,
- Subject => $ARGS{Subject},
- Status => $ARGS{Status},
+ Subject => $ARGS{'Subject'},
+ Status => $ARGS{'Status'},
Due => $due->ISO,
Starts => $starts->ISO,
MIMEObj => $MIMEObj
);
-
- # we need to get any KeywordSelect-<integer> fields into %create_args..
- grep { $_ =~ /^KeywordSelect-/ &&{ $create_args{$_} = $ARGS{$_} } } %ARGS;
-
+ foreach my $arg (%ARGS) {
+ if ($arg =~ /^CustomField-(\d+)(.*?)$/) {
+ next if ($arg =~ /-Magic$/);
+ $create_args{"CustomField-".$1} = $ARGS{"$arg"};
+ }
+ }
my ( $id, $Trans, $ErrMsg ) = $Ticket->Create(%create_args);
unless ( $id && $Trans ) {
Abort($ErrMsg);
@@ -216,7 +309,7 @@ sub CreateTicket {
}
}
- push ( @Actions, $ErrMsg );
+ push ( @Actions, split("\n", $ErrMsg) );
unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
Abort( "No permission to view newly created ticket #"
. $Ticket->id . "." );
@@ -283,80 +376,38 @@ sub ProcessUpdateMessage {
my $Message = MakeMIMEEntity(
Subject => $args{ARGSRef}->{'UpdateSubject'},
Body => $args{ARGSRef}->{'UpdateContent'},
- AttachmentFieldName => 'UpdateAttachment'
);
- ## Check whether this was a refresh or not.
-
- # Match Correspondence or Comments.
- my $trans_flag = -2;
- my $trans_type = undef;
- my $orig_trans = $args{ARGSRef}->{'UpdateType'};
- if ( $orig_trans =~ /^(private|public)$/ ) {
- $trans_type = "Comment";
- }elsif ( $orig_trans eq 'response' ) {
- $trans_type = "Correspond";
- }
-
- # Do we have a transaction that we need to update on? session
- if( defined( $trans_type ) ){
- $trans_flag = 0;
-
- # Prepare a checksum.
- # See perldoc -f unpack for example of this.
- my $this_checksum = unpack("%32C*", $Message->body_as_string ) % 65535;
-
- # The above *could* generate duplicate checksums. Crosscheck with
- # the length.
- my $this_length = length( $Message->body_as_string );
-
- # Don't forget the ticket id.
- my $this_id = $args{TicketObj}->id;
-
- # Check whether the previous transaction in the
- # ticket is the same as the current transaction.
- if( defined( $session{'prev_trans_type'} ) && defined( $session{'prev_trans_chksum'} ) && defined( $session{'prev_trans_length'} ) && defined( $session{'prev_trans_tickid'} ) ){
- if( $session{'prev_trans_type'} eq $orig_trans && $session{'prev_trans_chksum'} == $this_checksum && $session{'prev_trans_length'} == $this_length && $session{'prev_trans_tickid'} == $this_id ){
- # Its the same as the previous transaction for this user.
- $trans_flag = -1;
- }
- }
-
- # Store them for next time.
- $session{'prev_trans_type'} = $orig_trans;
- $session{'prev_trans_chksum'} = $this_checksum;
- $session{'prev_trans_length'} = $this_length;
- $session{'prev_trans_tickid'} = $this_id;
-
- if( $trans_flag == -1 ){
- push ( @{ $args{'Actions'} },
-"This appears to be a duplicate of your previous update (please do not refresh this page)" );
- }
-
-
- if ( $trans_type eq 'Comment' && $trans_flag >= 0 ) {
- 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 ( $trans_type eq 'Correspond' && $trans_flag >= 0 ) {
- my ( $Transaction, $Description ) = $args{TicketObj}->Correspond(
- CcMessageTo => $args{ARGSRef}->{'UpdateCc'},
- BccMessageTo => $args{ARGSRef}->{'UpdateBcc'},
- MIMEObj => $Message,
- TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
- );
- push ( @{ $args{Actions} }, $Description );
- }
- }
+ 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 ) = $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'} },
- "Update type was neither correspondence nor comment. Update not recorded"
- );
+ loc("Update type was neither correspondence nor comment.").
+ " ".
+ loc("Update not recorded.")
+ );
}
}
}
@@ -382,61 +433,66 @@ sub MakeMIMEEntity {
Cc => undef,
Body => undef,
AttachmentFieldName => undef,
- @_
+ map Encode::encode_utf8($_), @_,
);
#Make the update content have no 'weird' newlines in it
$args{'Body'} =~ s/\r\n/\n/gs;
- my $Message = MIME::Entity->build(
- Subject => $args{'Subject'} || "",
- From => $args{'From'},
- Cc => $args{'Cc'},
- Data => [ $args{'Body'} ]
- );
+ my $Message;
+ {
+ # MIME::Head is not happy in utf-8 domain. This only happens
+ # when processing an incoming email (so far observed).
+ no utf8;
+ use bytes;
+ $Message = MIME::Entity->build(
+ Subject => $args{'Subject'} || "",
+ From => $args{'From'},
+ Cc => $args{'Cc'},
+ Data => [ $args{'Body'} ]
+ );
+ }
- my $cgi_object = CGIObject();
- if ( $cgi_object->param( $args{'AttachmentFieldName'} ) ) {
+ my $cgi_object = $m->cgi_object;
- my $cgi_filehandle =
- $cgi_object->upload( $args{'AttachmentFieldName'} );
+ if (my $filehandle = $cgi_object->upload( $args{'AttachmentFieldName'} ) ) {
- use File::Temp qw(tempfile tempdir);
- #foreach my $filehandle (@filenames) {
- # my ( $fh, $temp_file ) = tempfile();
+ use File::Temp qw(tempfile tempdir);
- #$binmode $fh; #thank you, windows
+ #foreach my $filehandle (@filenames) {
- # We're having trouble with tempfiles not getting created. Let's try it with
- # a scalar instead
+ my ( $fh, $temp_file ) = tempfile();
- my ( $buffer, @file );
+ binmode $fh; #thank you, windows
+ my ($buffer);
+ while ( my $bytesread = read( $filehandle, $buffer, 4096 ) ) {
+ print $fh $buffer;
+ }
- while ( my $bytesread = read( $cgi_filehandle, $buffer, 4096 ) ) {
- push ( @file, $buffer );
- }
+ my $uploadinfo = $cgi_object->uploadInfo($filehandle);
- $RT::Logger->debug($file);
- my $filename = "$cgi_filehandle";
- $filename =~ s#^(.*)/##;
- $filename =~ s#^(.*)\\##;
- my $uploadinfo = $cgi_object->uploadInfo($cgi_filehandle);
- $Message->attach(
- Data => \@file,
-
- #Path => $temp_file,
- Filename => $filename,
- Type => $uploadinfo->{'Content-Type'}
- );
+ # Prefer the cached name first over CGI.pm stringification.
+ my $filename = $RT::Mason::CGI::Filename;
+ $filename = "$filehandle" unless defined($filename);
+
+ $filename =~ s#^.*[\\/]##;
+
+ $Message->attach(
+ Path => $temp_file,
+ Filename => $filename,
+ Type => $uploadinfo->{'Content-Type'},
+ );
+ close($fh);
- #close($fh);
- #unlink($temp_file);
+ # }
- # }
}
+
$Message->make_singlepart();
+ RT::I18N::SetMIMEEntityToUTF8($Message); # convert text parts into utf-8
+
return ($Message);
}
@@ -485,6 +541,9 @@ sub ProcessSearchQuery {
elsif ( $args{ARGS}->{'GotoPage'} eq 'Prev' ) {
$session{'tickets'}->PrevPage;
}
+ elsif ( $args{ARGS}->{'GotoPage'} > 0 ) {
+ $session{'tickets'}->GotoPage( $args{ARGS}->{GotoPage} - 1 );
+ }
# }}}
@@ -576,8 +635,12 @@ sub ProcessSearchQuery {
# }}}
# {{{ Limit Subject
if ( $args{ARGS}->{'ValueOfSubject'} ne '' ) {
+ my $val = $args{ARGS}->{'ValueOfSubject'};
+ if ($args{ARGS}->{'SubjectOp'} =~ /like/) {
+ $val = "%".$val."%";
+ }
$session{'tickets'}->LimitSubject(
- VALUE => $args{ARGS}->{'ValueOfSubject'},
+ VALUE => $val,
OPERATOR => $args{ARGS}->{'SubjectOp'},
);
}
@@ -585,40 +648,59 @@ sub ProcessSearchQuery {
# }}}
# {{{ Limit Dates
if ( $args{ARGS}->{'ValueOfDate'} ne '' ) {
-
my $date = ParseDateToISO( $args{ARGS}->{'ValueOfDate'} );
$args{ARGS}->{'DateType'} =~ s/_Date$//;
- $session{'tickets'}->LimitDate(
- FIELD => $args{ARGS}->{'DateType'},
- VALUE => $date,
- OPERATOR => $args{ARGS}->{'DateOp'},
- );
+ if ( $args{ARGS}->{'DateType'} eq 'Updated' ) {
+ $session{'tickets'}->LimitTransactionDate(
+ VALUE => $date,
+ OPERATOR => $args{ARGS}->{'DateOp'},
+ );
+ }
+ else {
+ $session{'tickets'}->LimitDate( FIELD => $args{ARGS}->{'DateType'},
+ VALUE => $date,
+ OPERATOR => $args{ARGS}->{'DateOp'},
+ );
+ }
}
# }}}
# {{{ Limit Content
- if ( $args{ARGS}->{'ValueOfContent'} ne '' ) {
- $session{'tickets'}->LimitContent(
- VALUE => $args{ARGS}->{'ValueOfContent'},
- OPERATOR => $args{ARGS}->{'ContentOp'},
+ if ( $args{ARGS}->{'ValueOfAttachmentField'} ne '' ) {
+ my $val = $args{ARGS}->{'ValueOfAttachmentField'};
+ if ($args{ARGS}->{'AttachmentFieldOp'} =~ /like/) {
+ $val = "%".$val."%";
+ }
+ $session{'tickets'}->Limit(
+ FIELD => $args{ARGS}->{'AttachmentField'},
+ VALUE => $val,
+ OPERATOR => $args{ARGS}->{'AttachmentFieldOp'},
);
}
# }}}
- # {{{ Limit KeywordSelects
- foreach my $KeywordSelectId (
- map { /^KeywordSelect(\d+)$/; $1 }
- grep { /^KeywordSelect(\d+)$/; } keys %{ $args{ARGS} }
- )
- {
- my $form = $args{ARGS}->{"KeywordSelect$KeywordSelectId"};
- my $oper = $args{ARGS}->{"KeywordSelectOp$KeywordSelectId"};
- foreach my $KeywordId ( ref($form) ? @{$form} : ($form) ) {
- next unless ($KeywordId);
+ # {{{ Limit CustomFields
+
+ foreach my $arg ( keys %{ $args{ARGS} } ) {
+ my $id;
+ if ( $arg =~ /^CustomField(\d+)$/ ) {
+ $id = $1;
+ }
+ else {
+ next;
+ }
+ next unless ( $args{ARGS}->{$arg} );
+
+ my $form = $args{ARGS}->{$arg};
+ my $oper = $args{ARGS}->{ "CustomFieldOp" . $id };
+ foreach my $value ( ref($form) ? @{$form} : ($form) ) {
my $quote = 1;
- if ( $KeywordId =~ /^null$/i ) {
+ if ($oper =~ /like/i) {
+ $value = "%".$value."%";
+ }
+ if ( $value =~ /^null$/i ) {
#Don't quote the string 'null'
$quote = 0;
@@ -627,17 +709,16 @@ sub ProcessSearchQuery {
$oper = 'IS' if ( $oper eq '=' );
$oper = 'IS NOT' if ( $oper eq '!=' );
}
- $session{'tickets'}->LimitKeyword(
- KEYWORDSELECT => $KeywordSelectId,
- OPERATOR => $oper,
- QUOTEVALUE => $quote,
- KEYWORD => $KeywordId
- );
+ $session{'tickets'}->LimitCustomField( CUSTOMFIELD => $id,
+ OPERATOR => $oper,
+ QUOTEVALUE => $quote,
+ VALUE => $value );
}
}
# }}}
+
}
# }}}
@@ -654,7 +735,7 @@ Returns an ISO date and time in GMT
sub ParseDateToISO {
my $date = shift;
- my $date_obj = new RT::Date($CurrentUser);
+ my $date_obj = RT::Date->new($session{'CurrentUser'});
$date_obj->Set(
Format => 'unknown',
Value => $date
@@ -680,172 +761,82 @@ sub Config {
# {{{ sub ProcessACLChanges
sub ProcessACLChanges {
- my $ACLref = shift;
my $ARGSref = shift;
- my @CheckACL = @$ACLref;
my %ARGS = %$ARGSref;
my ( $ACL, @results );
- # {{{ Add rights
- foreach $ACL (@CheckACL) {
- my ($Principal);
- next unless ($ACL);
+ foreach my $arg (keys %ARGS) {
+ if ($arg =~ /GrantRight-(\d+)-(.*?)-(\d+)$/) {
+ my $principal_id = $1;
+ my $object_type = $2;
+ my $object_id = $3;
+ my $rights = $ARGS{$arg};
- # Parse out what we're really talking about.
- if ( $ACL =~ /^(.*?)-(\d+)-(.*?)-(\d+)/ ) {
- my $PrincipalType = $1;
- my $PrincipalId = $2;
- my $Scope = $3;
- my $AppliesTo = $4;
+ my $principal = RT::Principal->new($session{'CurrentUser'});
+ $principal->Load($principal_id);
- # {{{ Create an object called Principal
- # so we can do rights operations
+ my $obj;
- if ( $PrincipalType eq 'User' ) {
- $Principal = new RT::User( $session{'CurrentUser'} );
- }
- elsif ( $PrincipalType eq 'Group' ) {
- $Principal = new RT::Group( $session{'CurrentUser'} );
- }
- else {
- Abort("$PrincipalType unknown principal type");
- }
+ 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);
- $Principal->Load($PrincipalId)
- || Abort("$PrincipalType $PrincipalId couldn't be loaded");
-
- # }}}
-
- # {{{ load up an RT::ACL object with the same current vals of this ACL
-
- my $CurrentACL = new RT::ACL( $session{'CurrentUser'} );
- if ( $Scope eq 'Queue' ) {
- $CurrentACL->LimitToQueue($AppliesTo);
+ } elsif ($object_type eq 'RT::System') {
+ $obj = $RT::System;
+ } else {
+ push (@results, loc("System Error").
+ loc("Rights could not be granted for [_1]", $object_type));
+ next;
}
- elsif ( $Scope eq 'System' ) {
- $CurrentACL->LimitToSystem();
- }
-
- $CurrentACL->LimitPrincipalToType($PrincipalType);
- $CurrentACL->LimitPrincipalToId($PrincipalId);
-
- # }}}
-
- # {{{ Get the values of the select we're working with
- # into an array. it will contain all the new rights that have
- # been granted
- #Hack to turn the ACL returned into an array
- my @rights =
- ref( $ARGS{"GrantACE-$ACL"} ) eq 'ARRAY'
- ? @{ $ARGS{"GrantACE-$ACL"} }
- : ( $ARGS{"GrantACE-$ACL"} );
-
- # }}}
-
- # {{{ Add any rights we need.
+ my @rights = ref($ARGS{$arg}) eq 'ARRAY' ? @{$ARGS{$arg}} : ($ARGS{$arg});
foreach my $right (@rights) {
next unless ($right);
-
- #if the right that's been selected wasn't there before, add it.
- unless (
- $CurrentACL->HasEntry(
- RightScope => "$Scope",
- RightName => "$right",
- RightAppliesTo => "$AppliesTo",
- PrincipalType => $PrincipalType,
- PrincipalId => $Principal->Id
- )
- )
- {
-
- #Add new entry to list of rights.
- if ( $Scope eq 'Queue' ) {
- my $Queue = new RT::Queue( $session{'CurrentUser'} );
- $Queue->Load($AppliesTo);
- unless ( $Queue->id ) {
- Abort("Couldn't find a queue called $AppliesTo");
- }
-
- my ( $val, $msg ) = $Principal->GrantQueueRight(
- RightAppliesTo => $Queue->id,
- RightName => "$right"
- );
-
- if ($val) {
- push ( @results,
- "Granted right $right to "
- . $Principal->Name
- . " for queue "
- . $Queue->Name );
- }
- else {
- push ( @results, $msg );
- }
- }
- elsif ( $Scope eq 'System' ) {
- my ( $val, $msg ) = $Principal->GrantSystemRight(
- RightAppliesTo => $AppliesTo,
- RightName => "$right"
- );
- if ($val) {
- push ( @results, "Granted system right '$right' to "
- . $Principal->Name );
- }
- else {
- push ( @results, $msg );
- }
- }
- }
+ my ($val, $msg) = $principal->GrantRight(Object => $obj, Right => $right);
+ push (@results, $msg);
}
-
- # }}}
}
- }
-
- # }}} Add rights
-
- # {{{ remove any rights that have been deleted
-
- my @RevokeACE =
- ref( $ARGS{"RevokeACE"} ) eq 'ARRAY'
- ? @{ $ARGS{"RevokeACE"} }
- : ( $ARGS{"RevokeACE"} );
-
- foreach my $aceid (@RevokeACE) {
-
- my $right = new RT::ACE( $session{'CurrentUser'} );
- $right->Load($aceid);
- next unless ( $right->id );
+ elsif ($arg =~ /RevokeRight-(\d+)-(.*?)-(\d+)-(.*?)$/) {
+ my $principal_id = $1;
+ my $object_type = $2;
+ my $object_id = $3;
+ my $right = $4;
+
+ my $principal = RT::Principal->new($session{'CurrentUser'});
+ $principal->Load($principal_id);
+ next unless ($right);
+ my $obj;
+
+ 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").
+ loc("Rights could not be revoked for [_1]", $object_type));
+ next;
+ }
+ my ($val, $msg) = $principal->RevokeRight(Object => $obj, Right => $right);
+ push (@results, $msg);
+ }
- my $phrase = "Revoked "
- . $right->PrincipalType . " "
- . $right->PrincipalObj->Name
- . "'s right to "
- . $right->RightName;
- if ( $right->RightScope eq 'System' ) {
- $phrase .= ' across all queues.';
- }
- else {
- $phrase .= ' for the queue ' . $right->AppliesToObj->Name . '.';
- }
- my ( $val, $msg ) = $right->Delete();
- if ($val) {
- push ( @results, $phrase );
- }
- else {
- push ( @results, $msg );
- }
}
- # }}}
-
return (@results);
-}
+
+ }
# }}}
@@ -864,6 +855,7 @@ sub UpdateRecordObject {
ARGSRef => undef,
AttributesRef => undef,
Object => undef,
+ AttributePrefix => undef,
@_
);
@@ -872,17 +864,94 @@ sub UpdateRecordObject {
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;
+ }
- foreach $attribute (@$attributes) {
- if ( ( defined $ARGSRef->{"$attribute"} )
- and ( $ARGSRef->{"$attribute"} ne $object->$attribute() ) )
- {
- $ARGSRef->{"$attribute"} =~ s/\r\n/\n/gs;
+ $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);
+}
- my $method = "Set$attribute";
- my ( $code, $msg ) = $object->$method( $ARGSRef->{"$attribute"} );
- push @results, "$attribute: $msg";
- }
+# }}}
+
+# {{{ Sub ProcessCustomFieldUpdates
+
+sub ProcessCustomFieldUpdates {
+ my %args = (
+ CustomFieldObj => undef,
+ ARGSRef => undef,
+ @_
+ );
+
+ my $Object = $args{'CustomFieldObj'};
+ my $ARGSRef = $args{'ARGSRef'};
+
+ my @attribs = qw( Name Type Description Queue SortOrder);
+ my @results = UpdateRecordObject(
+ AttributesRef => \@attribs,
+ Object => $Object,
+ ARGSRef => $ARGSRef
+ );
+
+ if ( $ARGSRef->{ "CustomField-" . $Object->Id . "-AddValue-Name" } ) {
+
+ my ( $addval, $addmsg ) = $Object->AddValue(
+ Name =>
+ $ARGSRef->{ "CustomField-" . $Object->Id . "-AddValue-Name" },
+ Description => $ARGSRef->{ "CustomField-"
+ . $Object->Id
+ . "-AddValue-Description" },
+ SortOrder => $ARGSRef->{ "CustomField-"
+ . $Object->Id
+ . "-AddValue-SortOrder" },
+ );
+ push ( @results, $addmsg );
+ }
+ my @delete_values = (
+ ref $ARGSRef->{ 'CustomField-' . $Object->Id . '-DeleteValue' } eq
+ 'ARRAY' )
+ ? @{ $ARGSRef->{ 'CustomField-' . $Object->Id . '-DeleteValue' } }
+ : ( $ARGSRef->{ 'CustomField-' . $Object->Id . '-DeleteValue' } );
+ foreach my $id (@delete_values) {
+ next unless defined $id;
+ my ( $err, $msg ) = $Object->DeleteValue($id);
+ push ( @results, $msg );
}
return (@results);
}
@@ -913,6 +982,7 @@ sub ProcessTicketBasics {
Subject
FinalPriority
Priority
+ TimeEstimated
TimeWorked
TimeLeft
Status
@@ -934,7 +1004,7 @@ sub ProcessTicketBasics {
);
# We special case owner changing, so we can use ForceOwnerChange
- if ( $ARGSRef->{'Owner'} && ( $TicketObj->Owner ne $ARGSRef->{'Owner'} ) ) {
+ if ( $ARGSRef->{'Owner'} && ( $TicketObj->Owner != $ARGSRef->{'Owner'} ) ) {
my ($ChownType);
if ( $ARGSRef->{'ForceOwnerChange'} ) {
$ChownType = "Force";
@@ -945,7 +1015,7 @@ sub ProcessTicketBasics {
my ( $val, $msg ) =
$TicketObj->SetOwner( $ARGSRef->{'Owner'}, $ChownType );
- push ( @results, "$msg" );
+ push ( @results, $msg );
}
# }}}
@@ -955,6 +1025,142 @@ sub ProcessTicketBasics {
# }}}
+# {{{ Sub ProcessTicketCustomFieldUpdates
+
+sub ProcessTicketCustomFieldUpdates {
+ my %args = (
+ ARGSRef => undef,
+ @_
+ );
+
+ my @results;
+
+ my $ARGSRef = $args{'ARGSRef'};
+
+ # 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} ) {
+ if ( $arg =~ /^Ticket-(\d+)-CustomField-(\d+)-/ ) {
+
+ # For each of those tickets, find out what custom fields we want to work with.
+ $custom_fields_to_mod{$1}{$2} = 1;
+ }
+ }
+
+ # For each of those tickets
+ foreach my $tick ( keys %custom_fields_to_mod ) {
+ my $Ticket = RT::Ticket->new( $session{'CurrentUser'} );
+ $Ticket->Load($tick);
+
+ # For each custom field
+ foreach my $cf ( keys %{ $custom_fields_to_mod{$tick} } ) {
+
+ my $CustomFieldObj = RT::CustomField->new($session{'CurrentUser'});
+ $CustomFieldObj->LoadById($cf);
+
+ 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'}) ;
+
+ $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 );
+ }
+ }
+ }
+ return (@results);
+ }
+}
+
+# }}}
+
# {{{ sub ProcessTicketWatchers
=head2 ProcessTicketWatchers ( TicketObj => $Ticket, ARGSRef => \%ARGS );
@@ -978,18 +1184,22 @@ sub ProcessTicketWatchers {
foreach my $key ( keys %$ARGSRef ) {
- # Delete deletable watchers
- if ( ( $key =~ /^DelWatcher(\d*)$/ ) and ( $ARGSRef->{$key} ) ) {
- my ( $code, $msg ) = $Ticket->DeleteWatcher($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( $ARGSRef->{$key}, $1 );
+ my ( $code, $msg ) = $Ticket->DeleteWatcher( Type => $ARGSRef->{$key}, PrincipalId => $1 );
push @results, $msg;
}
+ # }}}
+
# Add new wathchers by email address
elsif ( ( $ARGSRef->{$key} =~ /^(AdminCc|Cc|Requestor)$/ )
and ( $key =~ /^WatcherTypeEmail(\d*)$/ ) )
@@ -1014,12 +1224,11 @@ sub ProcessTicketWatchers {
# Add new watchers by owner
elsif ( ( $ARGSRef->{$key} =~ /^(AdminCc|Cc|Requestor)$/ )
- and ( $key =~ /^WatcherTypeUser(\d*)$/ ) )
- {
+ and ( $key =~ /^Ticket-AddWatcher-Principal-(\d*)$/ ) ) {
#They're in this order because otherwise $1 gets clobbered :/
my ( $code, $msg ) =
- $Ticket->AddWatcher( Type => $ARGSRef->{$key}, Owner => $1 );
+ $Ticket->AddWatcher( Type => $ARGSRef->{$key}, PrincipalId => $1 );
push @results, $msg;
}
}
@@ -1061,7 +1270,7 @@ sub ProcessTicketDates {
);
#Run through each field in this list. update the value if apropriate
- foreach $field (@date_fields) {
+ foreach my $field (@date_fields) {
my ( $code, $msg );
my $DateObj = RT::Date->new( $session{'CurrentUser'} );
@@ -1098,11 +1307,9 @@ Returns an array of results messages.
=cut
sub ProcessTicketLinks {
- my %args = (
- TicketObj => undef,
- ARGSRef => undef,
- @_
- );
+ my %args = ( TicketObj => undef,
+ ARGSRef => undef,
+ @_ );
my $Ticket = $args{'TicketObj'};
my $ARGSRef = $args{'ARGSRef'};
@@ -1118,11 +1325,9 @@ sub ProcessTicketLinks {
push @results,
"Trying to delete: Base: $base Target: $target Type $type";
- my ( $val, $msg ) = $Ticket->DeleteLink(
- Base => $base,
- Type => $type,
- Target => $target
- );
+ my ( $val, $msg ) = $Ticket->DeleteLink( Base => $base,
+ Type => $type,
+ Target => $target );
push @results, $msg;
@@ -1133,26 +1338,23 @@ sub ProcessTicketLinks {
my @linktypes = qw( DependsOn MemberOf RefersTo );
foreach my $linktype (@linktypes) {
-
- for my $luri ( split ( / /, $ARGSRef->{ $Ticket->Id . "-$linktype" } ) )
- {
- $luri =~ s/\s*$//; # Strip trailing whitespace
- my ( $val, $msg ) = $Ticket->AddLink(
- Target => $luri,
- Type => $linktype
- );
- push @results, $msg;
+ if ( $ARGSRef->{ $Ticket->Id . "-$linktype" } ) {
+ for my $luri ( split ( / /, $ARGSRef->{ $Ticket->Id . "-$linktype" } ) ) {
+ $luri =~ s/\s*$//; # Strip trailing whitespace
+ my ( $val, $msg ) = $Ticket->AddLink( Target => $luri,
+ Type => $linktype );
+ push @results, $msg;
+ }
}
+ if ( $ARGSRef->{ "$linktype-" . $Ticket->Id } ) {
- for my $luri ( split ( / /, $ARGSRef->{ "$linktype-" . $Ticket->Id } ) )
- {
- my ( $val, $msg ) = $Ticket->AddLink(
- Base => $luri,
- Type => $linktype
- );
+ for my $luri ( split ( / /, $ARGSRef->{ "$linktype-" . $Ticket->Id } ) ) {
+ my ( $val, $msg ) = $Ticket->AddLink( Base => $luri,
+ Type => $linktype );
- push @results, $msg;
- }
+ push @results, $msg;
+ }
+ }
}
#Merge if we need to
@@ -1167,121 +1369,9 @@ sub ProcessTicketLinks {
# }}}
-# {{{ sub ProcessTicketObjectKeywords
-
-=head2 ProcessTicketObjectKeywords ( TicketObj => $Ticket, ARGSRef => \%ARGS );
-
-Returns an array of results messages.
-
-=cut
-
-sub ProcessTicketObjectKeywords {
- my %args = (
- TicketObj => undef,
- ARGSRef => undef,
- @_
- );
-
- my $TicketObj = $args{'TicketObj'};
- my $ARGSRef = $args{'ARGSRef'};
-
- my (@results);
-
- # {{{ set ObjectKeywords.
-
- my $KeywordSelects = $TicketObj->QueueObj->KeywordSelects;
-
- # iterate through all the keyword selects for this queue
- while ( my $KeywordSelect = $KeywordSelects->Next ) {
-
- # {{{ do some setup
-
- # if we have KeywordSelectMagic for this keywordselect:
- next
- unless
- defined $ARGSRef->{ 'KeywordSelectMagic' . $KeywordSelect->id };
-
- # Lets get a hash of the possible values to work with
- my $value = $ARGSRef->{ 'KeywordSelect' . $KeywordSelect->id } || [];
-
- #lets get all those values in a hash. regardless of # of entries
- #we'll use this for adding and deleting keywords from this object.
- my %values = map { $_ => 1 } ref($value) ? @{$value} : ($value);
-
- # Load up the ObjectKeywords for this KeywordSelect for this ticket
- my $ObjectKeys = $TicketObj->KeywordsObj( $KeywordSelect->id );
-
- # }}}
- # {{{ add new keywords
-
- foreach my $key ( keys %values ) {
-
- #unless the ticket has that keyword for that keyword select,
- unless ( $ObjectKeys->HasEntry($key) ) {
-
- #Add the keyword
- my ( $result, $msg ) = $TicketObj->AddKeyword(
- Keyword => $key,
- KeywordSelect => $KeywordSelect->id
- );
- push ( @results, $msg );
- }
- }
-
- # }}}
- # {{{ Delete unused keywords
-
- #redo this search, so we don't ask it to delete things that are already gone
- # such as when a single keyword select gets its value changed.
- $ObjectKeys = $TicketObj->KeywordsObj( $KeywordSelect->id );
-
- while ( my $TicketKey = $ObjectKeys->Next ) {
-
- # if the hash defined above doesn\'t contain the keyword mentioned,
- unless ( $values{ $TicketKey->Keyword } ) {
-
- #I'd really love to just call $keyword->Delete, but then
- # we wouldn't get a transaction recorded
- my ( $result, $msg ) = $TicketObj->DeleteKeyword(
- Keyword => $TicketKey->Keyword,
- KeywordSelect => $KeywordSelect->id
- );
- push ( @results, $msg );
- }
- }
-
- # }}}
- }
-
- #Iterate through the keyword selects for BulkManipulator style access
- while ( my $KeywordSelect = $KeywordSelects->Next ) {
- if ( $ARGSRef->{ "AddToKeywordSelect" . $KeywordSelect->Id } ) {
-
- #Add the keyword
- my ( $result, $msg ) = $TicketObj->AddKeyword(
- Keyword =>
- $ARGSRef->{ "AddToKeywordSelect" . $KeywordSelect->Id },
- KeywordSelect => $KeywordSelect->id
- );
- push ( @results, $msg );
- }
- if ( $ARGSRef->{ "DeleteFromKeywordSelect" . $KeywordSelect->Id } ) {
-
- #Delete the keyword
- my ( $result, $msg ) = $TicketObj->DeleteKeyword(
- Keyword =>
- $ARGSRef->{ "DeleteFromKeywordSelect" . $KeywordSelect->Id },
- KeywordSelect => $KeywordSelect->id
- );
- push ( @results, $msg );
- }
- }
-
- # }}}
-
- 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";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Interface/Web_Local.pm});
1;
diff --git a/rt/lib/RT/Keyword.pm b/rt/lib/RT/Keyword.pm
deleted file mode 100644
index a41e0a585..000000000
--- a/rt/lib/RT/Keyword.pm
+++ /dev/null
@@ -1,446 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/Keyword.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-=head1 NAME
-
- RT::Keyword - Manipulate an RT::Keyword record
-
-=head1 SYNOPSIS
-
- use RT::Keyword;
-
- my $keyword = RT::Keyword->new($CurrentUser);
- $keyword->Create( Name => 'tofu',
- Description => 'fermented soy beans',
- );
-
-
- my $keyword2 = RT::Keyword->new($CurrentUser);
- $keyword2->Create( Name => 'beast',
- Description => 'a wild animal',
- Parent => $keyword->id(),
- );
-
-=head1 DESCRIPTION
-
-An B<RT::Keyword> object is an arbitrary string.
-
-=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Scrip);
-
-=end testing
-
-
-=cut
-package RT::Keyword;
-
-use strict;
-use vars qw(@ISA);
-use Tie::IxHash;
-use RT::Record;
-use RT::Keywords;
-
-@ISA = qw(RT::Record);
-
-# {{{ Core methods
-
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Keywords";
- $self->SUPER::_Init(@_);
-}
-
-sub _Accessible {
- my $self = shift;
- my %cols = (
- Name => 'read/write', #the keyword itself
- Description => 'read/write', #a description of the keyword
- Parent => 'read/write', #optional id of another B<RT::Keyword>, allowing keywords to be arranged hierarchically
- Disabled => 'read/write'
- );
- return ($self->SUPER::_Accessible( @_, %cols));
-
-}
-
-# }}}
-
-
-=over 4
-
-=item new CURRENT_USER
-
-Takes a single argument, an RT::CurrentUser object. Instantiates a new
-(uncreated) RT::Keyword object.
-
-=cut
-
-# {{{ sub Create
-
-=item Create KEY => VALUE, ...
-
-Takes a list of key/value pairs and creates a the object. Returns the id of
-the newly created record, or false if there was an error.
-
-Keys are:
-
-Name - the keyword itself
-Description - (not yet used)
-Parent - optional link to another B<RT::Keyword>, allowing keyword to be arranged in a hierarchical fashion. Can be specified by id or Name.
-
-=cut
-
-sub Create {
- my $self = shift;
- my %args = (Name => undef,
- Description => undef,
- Parent => 0,
- @_);
-
- unless ($self->CurrentUserHasRight('AdminKeywords')) {
- return (0, 'Permission Denied');
- }
-
- if ( $args{'Parent'} && $args{'Parent'} !~ /^\d+$/ ) {
- $RT::Logger->err( "can't yet specify parents by name, sorry: ". $args{'Parent'});
- return(0,'Parent must be specified by id');
- }
-
- my $val = $self->SUPER::Create(Name => $args{'Name'},
- Description => $args{'Description'},
- Parent => $args{'Parent'}
- );
- if ($val) {
- return ($val, 'Keyword created');
- }
- else {
- return(0,'Could not create keyword');
- }
-}
-
-# }}}
-
-# {{{ sub Delete
-
-sub Delete {
- my $self = shift;
-
- return (0, 'Deleting this object would break referential integrity.');
-}
-
-# }}}
-
-# {{{ sub LoadByPath
-
-=head2 LoadByPath STRING
-
-LoadByPath takes a string. Whatever character starts the string is assumed to be a delimter. The routine parses the keyword path description and tries to load the keyword
-described by that path. It returns a numerical status and a textual message.
-A non-zero status means 'Success'.
-
-=cut
-
-sub LoadByPath {
- my $self = shift;
-
- my $path = shift;
-
- my $delimiter = substr($path,0,1);
- my @path_elements = split($delimiter, $path);
-
- #throw awya the first bogus path element
- shift @path_elements;
-
- my $parent = 0;
- my ($tempkey);
- #iterate through all the path elements loading up a
- #keyword object. when we're done, this object becomes
- #whatever the last tempkey object was.
- while (my $name = shift @path_elements) {
-
- $tempkey = new RT::Keyword($self->CurrentUser);
-
- my $loaded = $tempkey->LoadByNameAndParentId($name, $parent);
-
- #Set the new parent for loading its child.
- $parent = $tempkey->Id;
-
- #If the parent Id is 0, then we're not recursing through the tree
- # time to bail
- return (0, "Couldn't find keyword") unless ($tempkey->id());
-
- }
- #Now that we're through with the loop, the last keyword loaded
- # is the the one we wanted.
- # we shouldn't need to explicitly load it like this. but we do. Thanks SQL
-
- $self->Load($tempkey->Id);
-
- return (1, 'Keyword loaded');
-}
-
-
-# }}}
-
-# {{{ sub LoadByNameAndParentId
-
-=head2 LoadByNameAndParentId NAME PARENT_ID
-
-Takes two arguments, a keyword name and a parent id. Loads a keyword into
- the current object.
-
-=cut
-
-sub LoadByNameAndParentId {
- my $self = shift;
- my $name = shift;
- my $parentid = shift;
-
- my $val = $self->LoadByCols( Name => $name, Parent => $parentid);
- if ($self->Id) {
- return ($self->Id, 'Keyword loaded');
- }
- else {
- return (0, 'Keyword could not be found');
- }
- }
-
-# }}}
-
-
-# {{{ sub Load
-
-=head2 Load KEYWORD
-
-Loads KEYWORD, either by id if it's an integer or by Path, otherwise
-
-=cut
-
-sub Load {
- my $self = shift;
- my $id = shift;
-
- if (!$id) {
- return (0, 'No keyword defined');
- }
- if ($id =~ /^(\d+)$/) {
- return ($self->SUPER::Load($id));
- }
- else {
- return($self->LoadByPath($id));
- }
-}
-
-
-# }}}
-
-# {{{ sub Path
-
-=item Path
-
- Returns this Keyword's full path going back to the root. (eg /OS/Unix/Linux/Redhat if
-this keyword is "Redhat" )
-
-=cut
-
-sub Path {
- my $self = shift;
-
- if ($self->Parent == 0) {
- return ("/".$self->Name);
- }
- else {
- return ( $self->ParentObj->Path . "/" . $self->Name);
- }
-
-}
-
-# }}}
-
-# {{{ sub RelativePath
-
-=head2 RelativePath KEYWORD_OBJ
-
-Takes a keyword object. Returns this keyword's path relative to that
-keyword.
-
-=item Bugs
-
-Currently assumes that the "other" keyword is a predecessor of this keyword
-
-=cut
-
-sub RelativePath {
- my $self = shift;
- my $OtherKey = shift;
-
- my $OtherPath = $OtherKey->Path();
- my $MyPath = $self->Path;
- $MyPath =~ s/^$OtherPath\///g;
- return ($MyPath);
-}
-
-
-# }}}
-
-# {{{ sub ParentObj
-
-=item ParentObj
-
- Returns an RT::Keyword object of this Keyword's 'parents'
-
-=cut
-
-sub ParentObj {
- my $self = shift;
-
- my $ParentObj = new RT::Keyword($self->CurrentUser);
- $ParentObj->Load($self->Parent);
- return ($ParentObj);
-}
-
-# }}}
-
-# {{{ sub Children
-
-=item Children
-
-Return an RT::Keywords object this Object's children.
-
-=cut
-
-sub Children {
- my $self = shift;
-
- my $Children = new RT::Keywords($self->CurrentUser);
- $Children->LimitToParent($self->id);
- return ($Children);
-}
-
-# }}}
-
-# {{{ sub Descendents
-
-=item Descendents [ NUM_GENERATIONS [ EXCLUDE_HASHREF ] ]
-
-Returns an ordered (see L<Tie::IxHash>) hash reference of the descendents of
-this keyword, possibly limited to a given number of generations. The keys
-are B<RT::Keyword> I<id>s, and the values are strings containing the I<Name>s
-of those B<RT::Keyword>s.
-
-=cut
-
-sub Descendents {
- my $self = shift;
- my $generations = shift || 0;
- my $exclude = shift || {};
- my %results;
-
-
- tie %results, 'Tie::IxHash';
- my $Keywords = new RT::Keywords($self->CurrentUser);
- $Keywords->LimitToParent($self->id || 0 ); #If we have no id, start at the top
-
- while ( my $Keyword = $Keywords->Next ) {
-
- next if defined $exclude->{ $Keyword->id };
- $results{ $Keyword->id } = $Keyword->Name;
-
- if ( $generations == 0 || $generations > 1 ) {
- #if we're limiting to some number of generations,
- # decrement the number of generations
-
- my $nextgen = $generations;
- $nextgen-- if ( $nextgen > 1 );
-
- my $kids = $Keyword->Descendents($nextgen, \%results);
-
- foreach my $kid ( keys %{$kids}) {
- $results{"$kid"} = $Keyword->Name. "/". $kids->{"$kid"};
- }
- }
- }
- return(\%results);
-}
-
-# }}}
-
-# {{{ ACL related methods
-
-# {{{ sub _Set
-
-# does an acl check and then passes off the call
-sub _Set {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('AdminKeywords')) {
- return (0,'Permission Denied');
- }
- return $self->SUPER::_Set(@_);
-}
-
-# }}}
-
-# {{{ sub CurrentUserHasRight
-
-=head2 CurrentUserHasRight
-
-Helper menthod for HasRight. Presets Principal to CurrentUser then
-calls HasRight.
-
-=cut
-
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
- return ($self->HasRight( Principal => $self->CurrentUser->UserObj,
- Right => $right ));
-
-}
-
-# }}}
-
-# {{{ sub HasRight
-
-=head2 HasRight
-
-Takes a param-hash consisting of "Right" and "Principal" Principal is
-an RT::User object or an RT::CurrentUser object. "Right" is a textual
-Right string that applies to Keywords.
-
-=cut
-
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => undef,
- @_ );
-
- return( $args{'Principal'}->HasSystemRight( $args{'Right'}) );
-
-}
-# }}}
-
-# }}}
-
-=back
-
-=head1 AUTHOR
-
-Ivan Kohler <ivan-rt@420.am>
-
-=head1 BUGS
-
-Yes.
-
-=head1 SEE ALSO
-
-L<RT::Keywords>, L<RT::ObjectKeyword>, L<RT::ObjectKeywords>, L<RT::Ticket>,
-L<RT::Record>
-
-[A=cut
-
-1;
-
diff --git a/rt/lib/RT/KeywordSelect.pm b/rt/lib/RT/KeywordSelect.pm
deleted file mode 100644
index 6865216fd..000000000
--- a/rt/lib/RT/KeywordSelect.pm
+++ /dev/null
@@ -1,452 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/KeywordSelect.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-package RT::KeywordSelect;
-
-use strict;
-use vars qw(@ISA);
-use RT::Record;
-use RT::Keyword;
-
-@ISA = qw(RT::Record);
-
-# {{{ POD
-
-=head1 NAME
-
- RT::KeywordSelect - Manipulate an RT::KeywordSelect record
-
-=head1 SYNOPSIS
-
- use RT::KeywordSelect;
-
- my $keyword_select = RT::KeywordSelect->new($CurrentUser);
- $keyword_select->Create(
- Keyword => 20,
- ObjectType => 'Ticket',
- Name => 'Choices'
- );
-
- my $keyword_select = RT::KeywordSelect->new($CurrentUser);
- $keyword_select->Create(
- Name => 'Choices',
- Keyword => 20,
- ObjectType => 'Ticket',
- ObjectField => 'Queue',
- ObjectValue => 1,
- Single => 1,
- Depth => 4,
- );
-
-=head1 DESCRIPTION
-
-An B<RT::KeywordSelect> object is a link between a Keyword and a object
-type (one of: Ticket), titled by the I<Name> field of the B<RT::Keyword> such
-that:
-
-=over 4
-
-=item Object display will contain a field, titled with the I<Name> field and
- showing any descendent keywords which are related to this object via the
- B<RT::ObjectKeywords> table.
-
-=item Object creation for this object will contain a field titled with the
- I<Name> field and containing the descendents of the B<RT::Keyword> as
- choices. If the I<Single> field of this B<RT::KeywordSelect> is true, each
- object must be associated (via an B<RT::ObjectKeywords> record) to a single
- descendent. If the I<Single> field is false, each object may be connect to
- zero, one, or many descendents.
-
-=item Searches for this object type will contain a selection field titled with
- the I<Name> field and containing the descendents of the B<RT::Keyword> as
- choices.
-
-=item If I<ObjectField> is defined (one of: Queue), all of the above apply only
- when the value of I<ObjectField> (Queue) in B<ObjectType> (Ticket) matches
- I<ObjectValue>.
-
-=back
-
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::KeywordSelects);
-
-=end testing
-
-
-=head1 METHODS
-
-
-=cut
-
-
-=over 4
-
-=item new CURRENT_USER
-
-Takes a single argument, an RT::CurrentUser object. Instantiates a new
-(uncreated) RT::KeywordSelect object.
-
-=cut
-# }}}
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "KeywordSelects";
- $self->SUPER::_Init(@_);
-}
-# }}}
-
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- Name => 'read/write',
- Keyword => 'read/write', # link to Keywords. Can be specified by id
- Single => 'read/write', # bool (described below)
-
- Depth => 'read/write', #- If non-zero, limits the descendents to this number of levels deep.
- ObjectType => 'read/write', # currently only C<Ticket>
- ObjectField => 'read/write', #optional, currently only C<Queue>
- ObjectValue => 'read/write', #constrains KeywordSelect function to when B<ObjectType>.I<ObjectField> equals I<ObjectValue>
- Disabled => 'read/write'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-# }}}
-
-# {{{ sub LoadByName
-
-=head2 LoadByName( Name => [NAME], Queue => [QUEUE_ID])
-. Takes a queue id and a keyword select name.
- tries to load the keyword select for that queue. if that fails, it tries to load it
- without a queue specified.
-
-=cut
-
-
-sub LoadByName {
- my $self = shift;
- my %args = ( Name => undef,
- Queue => undef,
- @_
- );
- if ($args{'Queue'}) {
- #Try to get the keyword select for this queue
- $self->LoadByCols( Name => $args{'Name'},
- ObjectType => 'Ticket',
- ObjectField => 'Queue',
- ObjectValue => $args{'Queue'});
- }
- unless ($self->Id) { #if that failed to load an object
- #Try to get the keyword select of that name that's global
- $self->LoadByCols( Name => $args{'Name'},
- ObjectType => 'Ticket',
- ObjectField => 'Queue',
- ObjectValue => '0');
- }
-
- return($self->Id);
-
-}
-
-# }}}
-
-# {{{ sub Create
-=item Create KEY => VALUE, ...
-
-Takes a list of key/value pairs and creates a the object. Returns the id of
-the newly created record, or false if there was an error.
-
-Keys are:
-
-Keyword - link to Keywords. Can be specified by id.
-Name - A name for this KeywordSelect
-Single - bool (described above)
-Depth - If non-zero, limits the descendents to this number of levels deep.
-ObjectType - currently only C<Ticket>
-ObjectField - optional, currently only C<Queue>
-ObjectValue - constrains KeywordSelect function to when B<ObjectType>.I<ObjectField> equals I<ObjectValue>
-
-=cut
-
-sub Create {
- my $self = shift;
- my %args = ( Keyword => undef,
- Single => 1,
- Depth => 0,
- Name => undef,
- ObjectType => undef,
- ObjectField => undef,
- ObjectValue => undef,
- @_);
-
- #If we're talking about a keyword select based on a ticket's 'Queue' field
- if ( ($args{'ObjectField'} eq 'Queue') and
- ($args{'ObjectType'} eq 'Ticket')) {
-
- #If we're talking about a keywordselect for all queues
- if ($args{'ObjectValue'} == 0) {
- unless( $self->CurrentUserHasSystemRight('AdminKeywordSelects')) {
- return (0, 'Permission Denied');
- }
- }
- #otherwise, we're talking about a keywordselect for a specific queue
- else {
- unless ($self->CurrentUserHasQueueRight( Right => 'AdminKeywordSelects',
- Queue => $args{'ObjectValue'})) {
- return (0, 'Permission Denied');
- }
- }
- }
- else {
- return (0, "Can't create a KeywordSelect for that object/field combo");
- }
-
- my $Keyword = new RT::Keyword($self->CurrentUser);
-
- if ( $args{'Keyword'} && $args{'Keyword'} !~ /^\d+$/ ) {
- $Keyword->LoadByPath($args{'Keyword'});
- }
- else {
- $Keyword->Load($args{'Keyword'});
- }
-
- unless ($Keyword->Id) {
- $RT::Logger->debug("Keyword ".$args{'Keyword'} ." not found\n");
- return(0, 'Keyword not found');
- }
-
- $args{'Name'} = $Keyword->Name if (!$args{'Name'});
-
- my $val = $self->SUPER::Create( Name => $args{'Name'},
- Keyword => $Keyword->Id,
- Single => $args{'Single'},
- Depth => $args{'Depth'},
- ObjectType => $args{'ObjectType'},
- ObjectField => $args{'ObjectField'},
- ObjectValue => $args{'ObjectValue'});
- if ($val) {
- return ($val, 'KeywordSelect Created');
- }
- else {
- return (0, 'System error. KeywordSelect not created');
-
- }
-}
-# }}}
-
-# {{{ sub Delete
-
-sub Delete {
- my $self = shift;
-
- return (0, 'Deleting this object would break referential integrity.');
-}
-
-# }}}
-
-
-# {{{ sub SetDisabled
-
-=head2 Sub SetDisabled
-
-Toggles the KeywordSelect's disabled flag.
-
-
-=cut
-
-sub SetDisabled {
- my $self = shift;
- my $value = shift;
-
- unless ($self->CurrentUserHasRight('AdminKeywordSelects')) {
- return (0, "Permission Denied");
- }
- return($self->_Set(Field => 'Disabled', Value => $value));
-}
-
-# }}}
-
-# {{{ sub KeywordObj
-
-=item KeywordObj
-
-Returns the B<RT::Keyword> referenced by the I<Keyword> field.
-
-=cut
-
-sub KeywordObj {
- my $self = shift;
-
- my $Keyword = new RT::Keyword($self->CurrentUser);
- $Keyword->Load( $self->Keyword ); #or ?
- return($Keyword);
-}
-# }}}
-
-# {{{ sub Object
-
-=item Object
-
-Returns the object (currently only RT::Queue) specified by ObjectField and ObjectValue.
-
-=cut
-
-sub Object {
- my $self = shift;
- if ( $self->ObjectField eq 'Queue' ) {
- my $Queue = new RT::Queue($self->CurrentUser);
- $Queue->Load( $self->ObjectValue );
- return ($Queue);
- } else {
- $RT::Logger->error("$self trying to load an object value for a non-queue object");
- return (undef);
- }
-}
-
-# }}}
-
-# {{{ sub _Set
-
-# does an acl check, then passes off the call
-sub _Set {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('AdminKeywordSelects')) {
- return (0, "Permission Denied");
- }
-
- return ($self->SUPER::_Set(@_));
-
-}
-
-# }}}
-
-
-# {{{ sub CurrentUserHasQueueRight
-
-=head2 CurrentUserHasQueueRight ( Queue => QUEUEID, Right => RIGHTNANAME )
-
-Check to see whether the current user has the specified right for the specified queue.
-
-=cut
-
-sub CurrentUserHasQueueRight {
- my $self = shift;
- my %args = (Queue => undef,
- Right => undef,
- @_
- );
- return ($self->HasRight( Right => $args{'Right'},
- Principal => $self->CurrentUser->UserObj,
- Queue => $args{'Queue'}));
-}
-
-# }}}
-
-# {{{ sub CurrentUserHasSystemRight
-
-=head2 CurrentUserHasSystemRight RIGHTNAME
-
-Check to see whether the current user has the specified right for the 'system' scope.
-
-=cut
-
-sub CurrentUserHasSystemRight {
- my $self = shift;
- my $right = shift;
- $RT::Logger->debug("$self in hashsysright for right $right\n");
- return ($self->HasRight( Right => $right,
- System => 1,
- Principal => $self->CurrentUser->UserObj));
-}
-
-# }}}
-
-# {{{ sub CurrentUserHasRight
-
-=item CurrentUserHasRight RIGHT [QUEUEID]
-
-Takes a rightname as a string. Can take a queue id as a second
-optional parameter, which can be useful to a routine like create.
-Helper menthod for HasRight. Presets Principal to CurrentUser then
-calls HasRight.
-
-=cut
-
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
- return ($self->HasRight( Principal => $self->CurrentUser->UserObj,
- Right => $right,
- ));
-}
-
-# }}}
-
-# {{{ sub HasRight
-
-=item HasRight
-
-Takes a param-hash consisting of "Right" and "Principal" Principal is
-an RT::User object or an RT::CurrentUser object. "Right" is a textual
-Right string that applies to KeywordSelects
-
-=cut
-
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => undef,
- Queue => undef,
- System => undef,
- @_ );
-
- #If we're explicitly specifying a queue, as we need to do on create
- if ($args{'Queue'}) {
- return ($args{'Principal'}->HasQueueRight(Right => $args{'Right'},
- Queue => $args{'Queue'}));
- }
- #else if we're specifying to check a system right
- elsif ($args{'System'}) {
- return( $args{'Principal'}->HasSystemRight( $args{'Right'} ));
- }
-
- #else if we 're using the object's queue
- elsif (($self->__Value('ObjectField') eq 'Queue') and
- ($self->__Value('ObjectValue') > 0 )) {
- return ($args{'Principal'}->HasQueueRight(Right => $args{'Right'},
- Queue => $self->__Value('ObjectValue') ));
- }
-
- #If the object is system scoped.
- else {
- return( $args{'Principal'}->HasSystemRight( $args{'Right'} ));
- }
-}
-
-# }}}
-
-=back
-
-=head1 AUTHORS
-
-Ivan Kohler <ivan-rt@420.am>, Jesse Vincent <jesse@fsck.com>
-
-=head1 BUGS
-
-The ACL system for this object is more byzantine than it should be. reworking it eventually
-would be a good thing.
-
-=head1 SEE ALSO
-
-L<RT::KeywordSelects>, L<RT::Keyword>, L<RT::Keywords>, L<RT::ObjectKeyword>,
-L<RT::ObjectKeywords>, L<RT::Record>
-
-=cut
-
-1;
-
diff --git a/rt/lib/RT/KeywordSelects.pm b/rt/lib/RT/KeywordSelects.pm
deleted file mode 100644
index c220b39f9..000000000
--- a/rt/lib/RT/KeywordSelects.pm
+++ /dev/null
@@ -1,143 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/KeywordSelects.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Scrip);
-
-=end testing
-
-=cut
-
-
-package RT::KeywordSelects;
-
-use strict;
-use vars qw( @ISA );
-use RT::EasySearch;
-use RT::KeywordSelect;
-
-@ISA = qw( RT::EasySearch );
-
-# {{{ _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = 'KeywordSelects';
- $self->{'primary_key'} = 'id';
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub _DoSearch
-
-=head2 _DoSearch
-
- A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
-we're explicitly trying to see them.
-
-=cut
-
-sub _DoSearch {
- my $self = shift;
-
- #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
- unless($self->{'find_disabled_rows'}) {
- $self->LimitToEnabled();
- }
-
- return($self->SUPER::_DoSearch(@_));
-
-}
-
-# }}}
-
-# {{{ sub LimitToQueue
-=head2 LimitToQueue
-
-Takes a queue id. Limits the returned set to KeywordSelects for that queue.
-Repeated calls will be OR'd together.
-
-=cut
-
-sub LimitToQueue {
- my $self = shift;
- my $queue = shift;
-
- $self->Limit( FIELD => 'ObjectValue',
- VALUE => $queue,
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR'
- );
-
- $self->Limit( FIELD => 'ObjectType',
- VALUE => 'Ticket',
- OPERATOR => '=');
-
- $self->Limit( FIELD => 'ObjectField',
- VALUE => 'Queue',
- OPERATOR => '=');
-
-
-}
-# }}}
-
-# {{{ sub LimitToGlobals
-
-=head2 LimitToGlobals
-
-Limits the returned set to KeywordSelects for all queues.
-Repeated calls will be OR'd together.
-
-=cut
-
-sub LimitToGlobals {
- my $self = shift;
-
- $self->Limit( FIELD => 'ObjectType',
- VALUE => 'Ticket',
- OPERATOR => '=');
-
- $self->Limit( FIELD => 'ObjectField',
- VALUE => 'Queue',
- OPERATOR => '=');
-
- $self->Limit( FIELD => 'ObjectValue',
- VALUE => '0',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR'
- );
-
-}
-# }}}
-
-# {{{ sub IncludeGlobals
-=head2 IncludeGlobals
-
-Include KeywordSelects which apply globally in the set of returned results
-
-=cut
-
-
-sub IncludeGlobals {
- my $self = shift;
- $self->Limit( FIELD => 'ObjectValue',
- VALUE => '0',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR'
- );
-
-
-}
-# }}}
-
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- #my $Handle = shift;
- return (new RT::KeywordSelect($self->CurrentUser));
-}
-# }}}
-1;
-
diff --git a/rt/lib/RT/Keywords.pm b/rt/lib/RT/Keywords.pm
deleted file mode 100644
index a9ecda2bc..000000000
--- a/rt/lib/RT/Keywords.pm
+++ /dev/null
@@ -1,106 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/Keywords.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-=head1 NAME
-
- RT::Keywords - a collection of RT::Keyword objects
-
-=head1 SYNOPSIS
-
- use RT::Keywords;
- my $keywords = RT::Keywords->new($user);
- $keywords->LimitToParent(0);
- while my ($keyword = $keywords->Next()) {
- print $keyword->Name ."\n";
- }
-
-
-=head1 DESCRIPTION
-
-
-=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Keywords);
-
-=end testing
-
-=cut
-
-package RT::Keywords;
-
-use strict;
-use vars qw( @ISA );
-use RT::EasySearch;
-use RT::Keyword;
-
-@ISA = qw( RT::EasySearch );
-
-
-# {{{ sub _Init
-
-sub _Init {
- my $self = shift;
- $self->{'table'} = 'Keywords';
- $self->{'primary_key'} = 'id';
-
- # By default, order by name
- $self->OrderBy( ALIAS => 'main',
- FIELD => 'Name',
- ORDER => 'ASC');
-
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub _DoSearch
-
-=head2 _DoSearch
-
- A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
-we're explicitly trying to see them.
-
-=cut
-
-sub _DoSearch {
- my $self = shift;
-
- #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
- unless($self->{'find_disabled_rows'}) {
- $self->LimitToEnabled();
- }
-
- return($self->SUPER::_DoSearch(@_));
-
-}
-
-# }}}
-
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return (RT::Keyword->new($self->CurrentUser));
-}
-# }}}
-
-# {{{ sub LimitToParent
-
-=head2 LimitToParent
-
-Takes a parent id and limits the returned keywords to children of that parent.
-
-=cut
-
-sub LimitToParent {
- my $self = shift;
- my $parent = shift;
- $self->Limit( FIELD => 'Parent',
- VALUE => $parent,
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR' );
-}
-# }}}
-
-1;
-
diff --git a/rt/lib/RT/Link.pm b/rt/lib/RT/Link.pm
index 885ffe3ed..962c378a8 100644
--- a/rt/lib/RT/Link.pm
+++ b/rt/lib/RT/Link.pm
@@ -1,373 +1,302 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Link.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-1999 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
+# 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
+# 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::Link - an RT Link object
+RT::Link
-=head1 SYNOPSIS
- use RT::Link;
+=head1 SYNOPSIS
=head1 DESCRIPTION
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in Ticket other similar objects.
-
=head1 METHODS
+=cut
-=begin testing
+package RT::Link;
+use RT::Record;
-ok (require RT::TestHarness);
-ok (require RT::Link);
-=end testing
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-=cut
+sub _Init {
+ my $self = shift;
-package RT::Link;
-use RT::Record;
-use Carp;
-@ISA= qw(RT::Record);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Links";
- return ($self->SUPER::_Init(@_));
+ $self->Table('Links');
+ $self->SUPER::_Init(@_);
}
-# }}}
-# {{{ sub Create
-=head2 Create PARAMHASH
-Create a new link object. Takes 'Base', 'Target' and 'Type'.
-Returns undef on failure or a Link Id on success.
+
+=item Create PARAMHASH
+
+Create takes a hash of values and creates a row in the database:
+
+ varchar(240) 'Base'.
+ varchar(240) 'Target'.
+ varchar(20) 'Type'.
+ int(11) 'LocalTarget'.
+ int(11) 'LocalBase'.
=cut
-sub Create {
+
+
+
+sub Create {
my $self = shift;
- my %args = ( Base => undef,
- Target => undef,
- Type => undef,
- @_ # get the real argumentlist
- );
-
- my $BaseURI = $self->CanonicalizeURI($args{'Base'});
- my $TargetURI = $self->CanonicalizeURI($args{'Target'});
-
- unless (defined $BaseURI) {
- $RT::Logger->warning ("$self couldn't resolve base:'".$args{'Base'}.
- "' into a URI\n");
- return (undef);
- }
- unless (defined $TargetURI) {
- $RT::Logger->warning ("$self couldn't resolve target:'".$args{'Target'}.
- "' into a URI\n");
- return(undef);
- }
-
- my $LocalBase = $self->_IsLocal($BaseURI);
- my $LocalTarget = $self->_IsLocal($TargetURI);
- my $id = $self->SUPER::Create(Base => "$BaseURI",
- Target => "$TargetURI",
- LocalBase => $LocalBase,
- LocalTarget => $LocalTarget,
- Type => $args{'Type'});
- return ($id);
+ my %args = (
+ Base => '',
+ Target => '',
+ Type => '',
+ LocalTarget => '0',
+ LocalBase => '0',
+
+ @_);
+ $self->SUPER::Create(
+ Base => $args{'Base'},
+ Target => $args{'Target'},
+ Type => $args{'Type'},
+ LocalTarget => $args{'LocalTarget'},
+ LocalBase => $args{'LocalBase'},
+);
+
}
-# }}}
-
-# {{{ sub Load
-=head2 Load
- Load an RT::Link object from the database. Takes one parameter or three.
- One parameter is the id of an entry in the links table. Three parameters are a tuple of (base, linktype, target);
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
=cut
-sub Load {
- my $self = shift;
- my $identifier = shift;
- my $linktype = shift if (@_);
- my $target = shift if (@_);
-
- if ($target) {
- my $BaseURI = $self->CanonicalizeURI($identifier);
- my $TargetURI = $self->CanonicalizeURI($target);
- $self->LoadByCols( Base => $BaseURI,
- Type => $linktype,
- Target => $TargetURI
- ) || return (0, "Couldn't load link");
- }
-
- elsif ($identifier =~ /^\d+$/) {
- $self->LoadById($identifier) ||
- return (0, "Couldn't load link");
- }
- else {
- return (0, "That's not a numerical id");
- }
-}
-# }}}
+=item Base
-# {{{ sub TargetObj
+Returns the current value of Base.
+(In the database, Base is stored as varchar(240).)
-=head2 TargetObj
-=cut
-sub TargetObj {
- my $self = shift;
- return $self->_TicketObj('base',$self->Target);
-}
-# }}}
+=item SetBase VALUE
+
-# {{{ sub BaseObj
+Set Base to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Base will be stored as a varchar(240).)
-=head2 BaseObj
=cut
-sub BaseObj {
- my $self = shift;
- return $self->_TicketObj('target',$self->Base);
-}
-# }}}
-
-# {{{ sub _TicketObj
-sub _TicketObj {
- my $self = shift;
- my $name = shift;
- my $ref = shift;
- my $tag="$name\_obj";
-
- unless (exists $self->{$tag}) {
-
- $self->{$tag}=RT::Ticket->new($self->CurrentUser);
-
- #If we can get an actual ticket, load it up.
- if ($self->_IsLocal($ref)) {
- $self->{$tag}->Load($ref);
- }
- }
- return $self->{$tag};
-}
-# }}}
-
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- LocalBase => 'read',
- LocalTarget => 'read',
- Base => 'read',
- Target => 'read',
- Type => 'read',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-# }}}
+=item Target
-# Static methods:
+Returns the current value of Target.
+(In the database, Target is stored as varchar(240).)
-# {{{ sub BaseIsLocal
-=head2 BaseIsLocal
-Returns true if the base of this link is a local ticket
+=item SetTarget VALUE
+
+
+Set Target to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Target will be stored as a varchar(240).)
+
=cut
-sub BaseIsLocal {
- my $self = shift;
- return $self->_IsLocal($self->Base);
-}
-# }}}
+=item Type
-# {{{ sub TargetIsLocal
+Returns the current value of Type.
+(In the database, Type is stored as varchar(20).)
-=head2 TargetIsLocal
-Returns true if the target of this link is a local ticket
+
+=item SetType VALUE
+
+
+Set Type to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Type will be stored as a varchar(20).)
+
=cut
-sub TargetIsLocal {
- my $self = shift;
- return $self->_IsLocal($self->Target);
-}
-# }}}
+=item LocalTarget
+
+Returns the current value of LocalTarget.
+(In the database, LocalTarget is stored as int(11).)
+
+
+
+=item SetLocalTarget VALUE
-# {{{ sub _IsLocal
-=head2 _IsLocal URI
+Set LocalTarget to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, LocalTarget will be stored as a int(11).)
-When handed a URI returns the local ticket id if it\'s local. otherwise returns undef.
=cut
-sub _IsLocal {
- my $self = shift;
- my $URI=shift;
- unless ($URI) {
- $RT::Logger->warning ("$self _IsLocal called without a URI\n");
- return (undef);
- }
- # TODO: More thorough check
- if ($URI =~ /^$RT::TicketBaseURI(\d+)$/) {
- return($1);
- }
- else {
- return (undef);
- }
-}
-# }}}
+
+=item LocalBase
+
+Returns the current value of LocalBase.
+(In the database, LocalBase is stored as int(11).)
+
-# {{{ sub BaseAsHREF
+=item SetLocalBase VALUE
-=head2 BaseAsHREF
-Returns an HTTP url to access the base of this link
+Set LocalBase to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, LocalBase will be stored as a int(11).)
+
=cut
-sub BaseAsHREF {
- my $self = shift;
- return $self->AsHREF($self->Base);
-}
-# }}}
-# {{{ sub TargetAsHREF
+=item LastUpdatedBy
-=head2 TargetAsHREF
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
-return an HTTP url to access the target of this link
=cut
-sub TargetAsHREF {
- my $self = shift;
- return $self->AsHREF($self->Target);
-}
-# }}}
-# {{{ sub AsHREF - Converts Link URIs to HTTP URLs
-=head2 URI
+=item LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
-Takes a URI and returns an http: url to access that object.
=cut
-sub AsHREF {
- my $self=shift;
- my $URI=shift;
- if ($self->_IsLocal($URI)) {
- my $url=$RT::WebURL . "Ticket/Display.html?id=$URI";
- return($url);
- }
- else {
- my ($protocol) = $URI =~ m|(.*?)://|;
- unless (exists $RT::URI2HTTP{$protocol}) {
- $RT::Logger->warning("Linking for protocol $protocol not defined in the config file!");
- return("");
- }
- return $RT::URI2HTTP{$protocol}->($URI);
- }
-}
-# }}}
-
-# {{{ sub GetContent - gets the content from a link
-sub GetContent {
- my ($self, $URI)= @_;
- if ($self->_IsLocal($URI)) {
- die "stub";
- } else {
- # Find protocol
- if ($URI =~ m|^(.*?)://|) {
- if (exists $RT::ContentFromURI{$1}) {
- return $RT::ContentFromURI{$1}->($URI);
- } else {
- warn "No sub exists for fetching the content from a $1 in $URI";
- }
- } else {
- warn "No protocol specified in $URI";
- }
- }
-}
-# }}}
-# {{{ sub CanonicalizeURI
+=item Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
-=head2 CanonicalizeURI
-Takes a single argument: some form of ticket identifier.
-Returns its canonicalized URI.
+=cut
+
+
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
-Bug: ticket aliases can't have :// in them. URIs must have :// in them.
=cut
-sub CanonicalizeURI {
- my $self = shift;
- my $id = shift;
-
-
- #If it's a local URI, load the ticket object and return its URI
- if ($id =~ /^$RT::TicketBaseURI/) {
- my $ticket = new RT::Ticket($self->CurrentUser);
- $ticket->Load($id);
- #If we couldn't find a ticket, return undef.
- return undef unless (defined $ticket->Id);
- #$RT::Logger->debug("$self -> CanonicalizeURI was passed $id and returned ".$ticket->URI ." (uri)\n");
- return ($ticket->URI);
- }
- #If it's a remote URI, we're going to punt for now
- elsif ($id =~ '://' ) {
- return ($id);
- }
-
- #If the base is an integer, load it as a ticket
- elsif ( $id =~ /^\d+$/ ) {
-
- #$RT::Logger->debug("$self -> CanonicalizeURI was passed $id. It's a ticket id.\n");
- my $ticket = new RT::Ticket($self->CurrentUser);
- $ticket->Load($id);
- #If we couldn't find a ticket, return undef.
- return undef unless (defined $ticket->Id);
- #$RT::Logger->debug("$self returned ".$ticket->URI ." (id #)\n");
- return ($ticket->URI);
- }
-
- #It's not a URI. It's not a numerical ticket ID
- else {
+
+
+sub _ClassAccessible {
+ {
- #If we couldn't find a ticket, return undef.
- return( undef);
-
- }
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Base =>
+ {read => 1, write => 1, type => 'varchar(240)', default => ''},
+ Target =>
+ {read => 1, write => 1, type => 'varchar(240)', default => ''},
+ Type =>
+ {read => 1, write => 1, type => 'varchar(20)', default => ''},
+ LocalTarget =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ LocalBase =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ LastUpdatedBy =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ LastUpdated =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+ Creator =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Created =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
-
-}
+ }
+};
+
+
+ eval "require RT::Link_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Link_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Link_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Link_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Link_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Link_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::Link_Overlay, RT::Link_Vendor, RT::Link_Local
+
+=cut
-# }}}
1;
-
diff --git a/rt/lib/RT/Links.pm b/rt/lib/RT/Links.pm
index a8180caf0..7a1773af9 100644
--- a/rt/lib/RT/Links.pm
+++ b/rt/lib/RT/Links.pm
@@ -1,90 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Links.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Links - A collection of Link objects
+=head1 NAME
+ RT::Links -- Class Description
+
=head1 SYNOPSIS
- use RT::Links;
- my $links = new RT::Links($CurrentUser);
+ use RT::Links
=head1 DESCRIPTION
=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Links);
-
-=end testing
-
=cut
package RT::Links;
-use RT::EasySearch;
+
+use RT::SearchBuilder;
use RT::Link;
-@ISA= qw(RT::EasySearch);
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "Links";
- $self->{'primary_key'} = "id";
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Links';
+ $self->{'primary_key'} = 'id';
- return ( $self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub Limit
-sub Limit {
- my $self = shift;
- my %args = ( ENTRYAGGREGATOR => 'AND',
- OPERATOR => '=',
- @_);
-
- #if someone's trying to search for tickets, try to resolve the uris for searching.
-
- if ( ( $args{'OPERATOR'} eq '=') and
- ( $args{'FIELD'} eq 'Base') or ($args{'FIELD'} eq 'Target')
- ) {
- my $dummy = $self->NewItem();
- $uri = $dummy->CanonicalizeURI($args{'VALUE'});
- }
-
-
- # If we're limiting by target, order by base
- # (Order by the thing that's changing)
-
- if ( ($args{'FIELD'} eq 'Target') or
- ($args{'FIELD'} eq 'LocalTarget') ) {
- $self->OrderBy (ALIAS => 'main',
- FIELD => 'Base',
- ORDER => 'ASC');
- }
- elsif ( ($args{'FIELD'} eq 'Base') or
- ($args{'FIELD'} eq 'LocalBase') ) {
- $self->OrderBy (ALIAS => 'main',
- FIELD => 'Target',
- ORDER => 'ASC');
- }
-
-
- $self->SUPER::Limit(%args);
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub NewItem
-sub NewItem {
+
+=item NewItem
+
+Returns an empty new RT::Link item
+
+=cut
+
+sub NewItem {
my $self = shift;
return(RT::Link->new($self->CurrentUser));
}
-# }}}
- 1;
+ eval "require RT::Links_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Links_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Links_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Links_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Links_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Links_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::Links_Overlay, RT::Links_Vendor, RT::Links_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/ObjectKeyword.pm b/rt/lib/RT/ObjectKeyword.pm
deleted file mode 100644
index 287d41fab..000000000
--- a/rt/lib/RT/ObjectKeyword.pm
+++ /dev/null
@@ -1,192 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/ObjectKeyword.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Released under the terms of the GNU Public License
-
-=head1 NAME
-
- RT::ObjectKeyword -- a keyword tied to an object in the database
-
-=head1 SYNOPSIS
-
- use RT::ObjectKeyword;
-
-
-=head1 DESCRIPTION
-
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in Ticket, Queue and other similar objects.
-
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::ObjectKeyword);
-
-=end testing
-
-=head1 METHODS
-
-=cut
-
-package RT::ObjectKeyword;
-
-use strict;
-use vars qw(@ISA);
-use RT::Record;
-
-@ISA = qw(RT::Record);
-
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ObjectKeywords";
- $self->SUPER::_Init(@_);
-}
-
-sub _Accessible {
- my $self = shift;
-
- my %cols = (
- Keyword => 'read/write', #link to the B<RT::Keyword>
- KeywordSelect => 'read/write', #link to the B<RT::KeywordSelect>
- ObjectType => 'read/write', #currently only C<Ticket>
- ObjectId => 'read/write', #link to the object specified in I<ObjectType>
- );
- return ($self->SUPER::_Accessible( @_, %cols));
-}
-
-
-
-# TODO - post 2.0. add in _Set and _Value, so we can ACL them. protected at another API level
-
-
-=head1 NAME
-
- RT::ObjectKeyword - Manipulate an RT::ObjectKeyword record
-
-=head1 SYNOPSIS
-
- use RT::ObjectKeyword;
-
- my $keyword = RT::ObjectKeyword->new($CurrentUser);
- $keyword->Create;
-
-=head1 DESCRIPTION
-
-An B<RT::ObjectKeyword> object associates an B<RT::Keyword> with another
-object (currently only B<RT::Ticket>.
-
-This module should B<NEVER> be called directly by client code. its API is entirely through RT ticket or other objects which can have keywords assigned.
-
-
-=head1 METHODS
-
-=over 4
-
-=item new CURRENT_USER
-
-Takes a single argument, an RT::CurrentUser object. Instantiates a new
-(uncreated) RT::ObjectKeyword object.
-
-=cut
-
-# {{{ sub Create
-
-=item Create KEY => VALUE, ...
-
-Takes a list of key/value pairs and creates a the object. Returns the id of
-the newly created record, or false if there was an error.
-
-Keys are:
-
-Keyword - link to the B<RT::Keyword>
-ObjectType - currently only C<Ticket>
-ObjectId - link to the object specified in I<ObjectType>
-
-=cut
-
-
-sub Create {
- my $self = shift;
- my %args = (Keyword => undef,
- KeywordSelect => undef,
- ObjectType => undef,
- ObjectId => undef,
- @_);
-
- #TODO post 2.0 ACL check
-
- return ($self->SUPER::Create( Keyword => $args{'Keyword'},
- KeywordSelect => $args{'KeywordSelect'},
- ObjectType => $args{'ObjectType'},
- ObjectId => $args{'ObjectId'}))
-}
-# }}}
-
-# {{{ sub KeywordObj
-
-=item KeywordObj
-
-Returns an B<RT::Keyword> object of the Keyword associated with this ObjectKeyword.
-
-=cut
-
-sub KeywordObj {
- my $self = shift;
- my $keyword = new RT::Keyword($self->CurrentUser);
- $keyword->Load($self->Keyword);
- return ($keyword);
-}
-# }}}
-
-# {{{ sub KeywordSelectObj
-
-=item KeywordSelectObj
-
-Returns an B<RT::KeywordSelect> object of the KeywordSelect associated with this ObjectKeyword.
-
-=cut
-
-sub KeywordSelectObj {
- my $self = shift;
- my $keyword_sel = new RT::KeywordSelect($self->CurrentUser);
- $keyword_sel->Load($self->KeywordSelect);
- return ($keyword_sel);
-}
-# }}}
-
-# {{{ sub KeywordRelativePath
-
-=item KeywordRelativePath
-
-Returns a string of the Keyword's path relative to this ObjectKeyword's KeywordSelect
-
-
-
-=cut
-
-sub KeywordRelativePath {
- my $self = shift;
- return($self->KeywordObj->RelativePath(
- $self->KeywordSelectObj->KeywordObj->Path));
-
-}
-# }}}
-
-=back
-
-=head1 AUTHOR
-
-Ivan Kohler <ivan-rt@420.am>
-
-=head1 BUGS
-
-Yes.
-
-=head1 SEE ALSO
-
-L<RT::ObjectKeywords>, L<RT::Keyword>, L<RT::Keywords>, L<RT::Ticket>,
-L<RT::Record>
-
-=cut
-
-1;
-
diff --git a/rt/lib/RT/ObjectKeywords.pm b/rt/lib/RT/ObjectKeywords.pm
deleted file mode 100644
index 5df996e37..000000000
--- a/rt/lib/RT/ObjectKeywords.pm
+++ /dev/null
@@ -1,234 +0,0 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/ObjectKeywords.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
-package RT::ObjectKeywords;
-
-use strict;
-use vars qw( @ISA );
-
-=head1 NAME
-
- RT::ObjectKeywords - note warning
-
-=head1 WARNING
-
-This module should B<NEVER> be called directly by client code. its API is entirely through RT ticket or other objects which can have keywords assigned.
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::ObjectKeywords);
-
-=end testing
-
-=cut
-
-use RT::EasySearch;
-use RT::ObjectKeyword;
-
-@ISA = qw( RT::EasySearch );
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = 'ObjectKeywords';
- $self->{'primary_key'} = 'id';
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return (new RT::ObjectKeyword($self->CurrentUser));
-}
-# }}}
-
-# {{{ sub LimitToKeywordSelect
-
-=head2 LimitToKeywordSelect
-
- Takes a B<RT::KeywordSelect> id or Nameas its single argument. limits the returned set of ObjectKeywords
-to ObjectKeywords which apply to that ticket
-
-=cut
-
-
-sub LimitToKeywordSelect {
- my $self = shift;
- my $keywordselect = shift;
-
- if ($keywordselect =~ /^\d+$/) {
-
- $self->Limit(FIELD => 'KeywordSelect',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- VALUE => "$keywordselect");
- }
-
- #We're limiting by name. time to be klever
- else {
- my $ks = $self->NewAlias('KeywordSelects');
- $self->Join(ALIAS1 => $ks, FIELD1 => 'id',
- ALIAS2 => 'main', FIELD2 => 'KeywordSelect');
-
- $self->Limit( ALIAS => "$ks",
- FIELD => 'Name',
- VALUE => "$keywordselect",
- OPERATOR => "=",
- ENTRYAGGREGATOR => "OR");
-
- $self->Limit ( ALIAS => "$ks",
- FIELD => 'ObjectType',
- VALUE => 'Ticket',
- OPERATOR => '=',
- );
-
- $self->Limit ( ALIAS => "$ks",
- FIELD => 'ObjectField',
- VALUE => 'Queue',
- OPERATOR => '=',
- );
-
-
- # TODO +++ we need to be able to limit the returned
- # keywordselects to ones that apply only to this queue
- # $self->Limit( ALIAS => "$ks",
- # FIELD => 'ObjectValue',
- # VALUE => $self->QueueObj->Id,
- # OPERATOR => "=",
- # ENTRYAGGREGATOR => "OR");
-
- }
-
-
-
-}
-
-# }}}
-
-# {{{ LimitToTicket
-
-=head2 LimitToTicket TICKET_ID
-
- Takes an B<RT::Ticket> id as its single argument. limits the returned set of ObjectKeywords
-to ObjectKeywords which apply to that ticket
-
-=cut
-
-sub LimitToTicket {
- my $self = shift;
- my $ticket = shift;
- $self->Limit(FIELD => 'ObjectId',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- VALUE => "$ticket");
-
- $self->Limit(FIELD => 'ObjectType',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- VALUE => "Ticket");
-
-}
-
-# }}}
-
-# {{{ sub _DoSearch
-#wrap around _DoSearch so that we can build the hash of returned
-#values
-
-sub _DoSearch {
- my $self = shift;
- # $RT::Logger->debug("Now in ".$self."->_DoSearch");
- my $return = $self->SUPER::_DoSearch(@_);
- # $RT::Logger->debug("In $self ->_DoSearch. return from SUPER::_DoSearch was $return\n");
- $self->_BuildHash();
- return ($return);
-}
-# }}}
-
-# {{{ sub _BuildHash
-#Build a hash of this ACL's entries.
-sub _BuildHash {
- my $self = shift;
-
- while (my $entry = $self->Next) {
-
- my $hashkey = $entry->Keyword;
- $self->{'as_hash'}->{"$hashkey"} =1;
- }
-
-}
-# }}}
-
-# {{{ HasEntry
-
-=head2 HasEntry KEYWORD_ID
-
- Takes a keyword id and returns true if this ObjectKeywords object has an entry for that
-keyword. Returns undef otherwise.
-
-=cut
-
-sub HasEntry {
-
- my $self = shift;
- my $keyword = shift;
-
-
- #if we haven't done the search yet, do it now.
- $self->_DoSearch();
-
- # $RT::Logger->debug("Now in ".$self."->HasEntry\n");
-
-
- if ($self->{'as_hash'}->{ $keyword } == 1) {
- return(1);
- }
- else {
- return(undef);
- }
-}
-
-# }}}
-
-# {{{ sub RelativePaths
-
-=head2 RelativePaths
-
-# Return a (reference to a) list of KeywordRelativePaths
-
-=cut
-
-sub RelativePaths {
- my $self = shift;
-
- my @list;
-
- # Here $key is a RT::ObjectKeyword
- while (my $key=$self->Next()) {
- push(@list, $key->KeywordRelativePath);
- }
- return(\@list);
-}
-# }}}
-
-# {{{ sub RelativePathsAsString
-
-=head2 RelativePathsAsString
-
-# Returns the RT::ObjectKeywords->RelativePaths as a comma seperated string
-
-=cut
-
-sub RelativePathsAsString {
- my $self = shift;
- return(join(", ",@{$self->KeywordRelativePaths}));
-}
-# }}}
-
-1;
-
diff --git a/rt/lib/RT/Queue.pm b/rt/lib/RT/Queue.pm
index 1656903b3..b362c9f0d 100755
--- a/rt/lib/RT/Queue.pm
+++ b/rt/lib/RT/Queue.pm
@@ -1,944 +1,371 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Queue.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Queue - an RT Queue object
+RT::Queue
-=head1 SYNOPSIS
- use RT::Queue;
+=head1 SYNOPSIS
=head1 DESCRIPTION
-
=head1 METHODS
-=begin testing
-use RT::TestHarness;
-
-use RT::Queue;
-
-=end testing
-
=cut
-
-
package RT::Queue;
-use RT::Record;
-
-@ISA= qw(RT::Record);
-
-use vars (@STATUS);
-
-@STATUS = qw(new open stalled resolved dead);
-
-=head2 StatusArray
-
-Returns an array of all statuses for this queue
-
-=cut
-
-sub StatusArray {
- my $self = shift;
- return (@STATUS);
-}
-
-
-=head2 IsValidStatus VALUE
-
-Returns true if VALUE is a valid status. Otherwise, returns 0
-
-=for testing
-my $q = new RT::Queue($RT::SystemUser);
-ok($q->IsValidStatus('new')== 1, 'New is a valid status');
-ok($q->IsValidStatus('f00')== 0, 'f00 is not a valid status');
-
-=cut
-
-sub IsValidStatus {
- my $self = shift;
- my $value = shift;
-
- my $retval = grep (/^$value$/, $self->StatusArray);
- return ($retval);
-
-}
-
-
-
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Queues";
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub _Accessible
-
-sub _Accessible {
- my $self = shift;
- my %Cols = ( Name => 'read/write',
- CorrespondAddress => 'read/write',
- Description => 'read/write',
- CommentAddress => 'read/write',
- InitialPriority => 'read/write',
- FinalPriority => 'read/write',
- DefaultDueIn => 'read/write',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto',
- Disabled => 'read/write',
-
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-
-# }}}
+use RT::Record;
-# {{{ sub Create
-=head2 Create
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-Create takes the name of the new queue
-If you pass the ACL check, it creates the queue and returns its queue id.
+sub _Init {
+ my $self = shift;
-=cut
-
-sub Create {
- my $self = shift;
- my %args = ( Name => undef,
- CorrespondAddress => '',
- Description => '',
- CommentAddress => '',
- InitialPriority => "0",
- FinalPriority => "0",
- DefaultDueIn => "0",
- @_);
-
- unless ($self->CurrentUser->HasSystemRight('AdminQueue')) { #Check them ACLs
- return (0, "No permission to create queues")
- }
-
- unless ($self->ValidateName($args{'Name'})) {
- return(0, 'Queue already exists');
- }
- #TODO better input validation
-
- my $id = $self->SUPER::Create(%args);
- unless ($id) {
- return (0, 'Queue could not be created');
- }
-
- return ($id, "Queue $id created");
+ $self->Table('Queues');
+ $self->SUPER::_Init(@_);
}
-# }}}
-# {{{ sub Delete
-sub Delete {
- my $self = shift;
- return (0, 'Deleting this object would break referential integrity');
-}
-# }}}
-# {{{ sub SetDisabled
+=item Create PARAMHASH
-=head2 SetDisabled
+Create takes a hash of values and creates a row in the database:
-Takes a boolean.
-1 will cause this queue to no longer be avaialble for tickets.
-0 will re-enable this queue
+ varchar(200) 'Name'.
+ varchar(255) 'Description'.
+ varchar(120) 'CorrespondAddress'.
+ varchar(120) 'CommentAddress'.
+ int(11) 'InitialPriority'.
+ int(11) 'FinalPriority'.
+ int(11) 'DefaultDueIn'.
+ smallint(6) 'Disabled'.
=cut
-# }}}
-# {{{ sub Load
-=head2 Load
-Takes either a numerical id or a textual Name and loads the specified queue.
-
-=cut
-
-sub Load {
+sub Create {
my $self = shift;
-
- my $identifier = shift;
- if (!$identifier) {
- return (undef);
- }
-
- if ($identifier !~ /\D/) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- $self->LoadByCol("Name", $identifier);
- }
-
- return ($self->Id);
+ my %args = (
+ Name => '',
+ Description => '',
+ CorrespondAddress => '',
+ CommentAddress => '',
+ InitialPriority => '0',
+ FinalPriority => '0',
+ DefaultDueIn => '0',
+ Disabled => '0',
+ @_);
+ $self->SUPER::Create(
+ Name => $args{'Name'},
+ Description => $args{'Description'},
+ CorrespondAddress => $args{'CorrespondAddress'},
+ CommentAddress => $args{'CommentAddress'},
+ InitialPriority => $args{'InitialPriority'},
+ FinalPriority => $args{'FinalPriority'},
+ DefaultDueIn => $args{'DefaultDueIn'},
+ Disabled => $args{'Disabled'},
+);
}
-# }}}
-# {{{ sub ValidateName
-=head2 ValidateName NAME
-Takes a queue name. Returns true if it's an ok name for
-a new queue. Returns undef if there's already a queue by that name.
+=item id
-=cut
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-sub ValidateName {
- my $self = shift;
- my $name = shift;
-
- my $tempqueue = new RT::Queue($RT::SystemUser);
- $tempqueue->Load($name);
-
- #If we couldn't load it :)
- unless ($tempqueue->id()) {
- return(1);
- }
-
- #If this queue exists, return undef
- #Avoid the ACL check.
- if ($tempqueue->Name()){
- return(undef);
- }
-
- #If the queue doesn't exist, return 1
- else {
- return(1);
- }
-
-}
-
-
-# }}}
-
-# {{{ sub Templates
-
-=head2 Templates
-
-Returns an RT::Templates object of all of this queue's templates.
=cut
-sub Templates {
- my $self = shift;
-
- my $templates = RT::Templates->new($self->CurrentUser);
+=item Name
- if ($self->CurrentUserHasRight('ShowTemplate')) {
- $templates->LimitToQueue($self->id);
- }
-
- return ($templates);
-}
-
-# }}}
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
-# {{{ Dealing with watchers
-# {{{ sub Watchers
-=head2 Watchers
+=item SetName VALUE
-Watchers returns a Watchers object preloaded with this queue\'s watchers.
-=cut
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
-sub Watchers {
- my $self = shift;
-
- require RT::Watchers;
- my $watchers =RT::Watchers->new($self->CurrentUser);
-
- if ($self->CurrentUserHasRight('SeeQueue')) {
- $watchers->LimitToQueue($self->id);
- }
-
- return($watchers);
-}
-
-# }}}
-
-# {{{ sub WatchersAsString
-=head2 WatchersAsString
-
-Returns a string of all queue watchers email addresses concatenated with ','s.
=cut
-sub WatchersAsString {
- my $self=shift;
- return($self->Watchers->EmailsAsString());
-}
-
-# }}}
-
-# {{{ sub AdminCcAsString
-=head2 AdminCcAsString
+=item Description
-Takes nothing. returns a string: All Ticket/Queue AdminCcs.
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
-=cut
-sub AdminCcAsString {
- my $self=shift;
-
- return($self->AdminCc->EmailsAsString());
- }
+=item SetDescription VALUE
-# }}}
-# {{{ sub CcAsString
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
-=head2 CcAsString
-
-B<Returns> String: All Queue Ccs as a comma delimited set of email addresses.
=cut
-sub CcAsString {
- my $self=shift;
-
- return ($self->Cc->EmailsAsString());
-}
-
-# }}}
-
-# {{{ sub Cc
-
-=head2 Cc
-
-Takes nothing.
-Returns a watchers object which contains this queue\'s Cc watchers
-=cut
+=item CorrespondAddress
-sub Cc {
- my $self = shift;
- my $cc = $self->Watchers();
- if ($self->CurrentUserHasRight('SeeQueue')) {
- $cc->LimitToCc();
- }
- return ($cc);
-}
+Returns the current value of CorrespondAddress.
+(In the database, CorrespondAddress is stored as varchar(120).)
-# A helper function for Cc, so that we can call it from the ACL checks
-# without going through acl checks.
-sub _Cc {
- my $self = shift;
- my $cc = $self->Watchers();
- $cc->LimitToCc();
- return($cc);
-
-}
-# }}}
+=item SetCorrespondAddress VALUE
-# {{{ sub AdminCc
-=head2 AdminCc
+Set CorrespondAddress to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, CorrespondAddress will be stored as a varchar(120).)
-Takes nothing.
-Returns this queue's administrative Ccs as an RT::Watchers object
=cut
-sub AdminCc {
- my $self = shift;
- my $admin_cc = $self->Watchers();
- if ($self->CurrentUserHasRight('SeeQueue')) {
- $admin_cc->LimitToAdminCc();
- }
- return($admin_cc);
-}
-
-#helper function for AdminCc so we can call it without ACLs
-sub _AdminCc {
- my $self = shift;
- my $admin_cc = $self->Watchers();
- $admin_cc->LimitToAdminCc();
- return($admin_cc);
-}
-# }}}
+=item CommentAddress
-# {{{ IsWatcher, IsCc, IsAdminCc
-
-# {{{ sub IsWatcher
-
-# a generic routine to be called by IsRequestor, IsCc and IsAdminCc
-
-=head2 IsWatcher
-
-Takes a param hash with the attributes Type and User. User is either a user object or string containing an email address. Returns true if that user or string
-is a queue watcher. Returns undef otherwise
-
-=cut
-
-sub IsWatcher {
- my $self = shift;
-
- my %args = ( Type => 'Requestor',
- Id => undef,
- Email => undef,
- @_
- );
- #ACL check - can't do it. we need this method for ACL checks
- # unless ($self->CurrentUserHasRight('SeeQueue')) {
- # return(undef);
- # }
-
-
- my %cols = ('Type' => $args{'Type'},
- 'Scope' => 'Queue',
- 'Value' => $self->Id
- );
- if (defined ($args{'Id'})) {
- if (ref($args{'Id'})){ #If it's a ref, assume it's an RT::User object;
- #Dangerous but ok for now
- $cols{'Owner'} = $args{'Id'}->Id;
- }
- elsif ($args{'Id'} =~ /^\d+$/) { # if it's an integer, it's an RT::User obj
- $cols{'Owner'} = $args{'Id'};
- }
- else {
- $cols{'Email'} = $args{'Id'};
- }
- }
-
- if (defined $args{'Email'}) {
- $cols{'Email'} = $args{'Email'};
- }
-
- my ($description);
- $description = join(":",%cols);
-
- #If we've cached a positive match...
- if (defined $self->{'watchers_cache'}->{"$description"}) {
- if ($self->{'watchers_cache'}->{"$description"} == 1) {
- return(1);
- }
- #If we've cached a negative match...
- else {
- return(undef);
- }
- }
-
- require RT::Watcher;
- my $watcher = new RT::Watcher($self->CurrentUser);
- $watcher->LoadByCols(%cols);
-
-
- if ($watcher->id) {
- $self->{'watchers_cache'}->{"$description"} = 1;
- return(1);
- }
- else {
- $self->{'watchers_cache'}->{"$description"} = 0;
- return(undef);
- }
-
-}
+Returns the current value of CommentAddress.
+(In the database, CommentAddress is stored as varchar(120).)
-# }}}
-# {{{ sub IsCc
-=head2 IsCc
+=item SetCommentAddress VALUE
-Takes a string. Returns true if the string is a Cc watcher of the current queue
-=item Bugs
+Set CommentAddress to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, CommentAddress will be stored as a varchar(120).)
-Should also be able to handle an RT::User object
=cut
-sub IsCc {
- my $self = shift;
- my $cc = shift;
-
- return ($self->IsWatcher( Type => 'Cc', Id => $cc ));
-
-}
-
-# }}}
-
-# {{{ sub IsAdminCc
-
-=head2 IsAdminCc
-
-Takes a string. Returns true if the string is an AdminCc watcher of the current queue
+=item InitialPriority
-=item Bugs
+Returns the current value of InitialPriority.
+(In the database, InitialPriority is stored as int(11).)
-Should also be able to handle an RT::User object
-
-=cut
-
-sub IsAdminCc {
- my $self = shift;
- my $admincc = shift;
-
- return ($self->IsWatcher( Type => 'AdminCc', Id => $admincc ));
-
-}
-# }}}
-# }}}
+=item SetInitialPriority VALUE
-# {{{ sub AddWatcher
-=head2 AddWatcher
+Set InitialPriority to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, InitialPriority will be stored as a int(11).)
-Takes a paramhash of Email, Owner and Type. Type is one of 'Cc' or 'AdminCc',
-We need either an Email Address in Email or a userid in Owner
=cut
-sub AddWatcher {
- my $self = shift;
- my %args = ( Email => undef,
- Type => undef,
- Owner => 0,
- @_
- );
-
- # {{{ Check ACLS
- #If the watcher we're trying to add is for the current user
- if ( ( ( defined $args{'Email'}) &&
- ( $args{'Email'} eq $self->CurrentUser->EmailAddress) ) or
- ($args{'Owner'} eq $self->CurrentUser->Id)) {
-
- # If it's an AdminCc and they don't have
- # 'WatchAsAdminCc' or 'ModifyQueueWatchers', bail
- if ($args{'Type'} eq 'AdminCc') {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers') or
- $self->CurrentUserHasRight('WatchAsAdminCc')) {
- return(0, 'Permission Denied');
- }
- }
-
- # If it's a Requestor or Cc and they don't have
- # 'Watch' or 'ModifyQueueWatchers', bail
- elsif ($args{'Type'} eq 'Cc') {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers') or
- $self->CurrentUserHasRight('Watch')) {
- return(0, 'Permission Denied');
- }
- }
- else {
- $RT::Logger->warn("$self -> AddWatcher hit code".
- " it never should. We got passed ".
- " a type of ". $args{'Type'});
- return (0,'Error in parameters to $self AddWatcher');
- }
- }
- # If the watcher isn't the current user
- # and the current user doesn't have 'ModifyQueueWatchers'
- # bail
- else {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers')) {
- return (0, "Permission Denied");
- }
- }
- # }}}
-
- require RT::Watcher;
- my $Watcher = new RT::Watcher ($self->CurrentUser);
- return ($Watcher->Create(Scope => 'Queue',
- Value => $self->Id,
- Email => $args{'Email'},
- Type => $args{'Type'},
- Owner => $args{'Owner'}
- ));
-}
-# }}}
+=item FinalPriority
-# {{{ sub AddCc
+Returns the current value of FinalPriority.
+(In the database, FinalPriority is stored as int(11).)
-=head2 AddCc
-Add a Cc to this queue.
-Takes a paramhash of Email and Owner.
-We need either an Email Address in Email or a userid in Owner
-=cut
+=item SetFinalPriority VALUE
-sub AddCc {
- my $self = shift;
- return ($self->AddWatcher( Type => 'Cc', @_));
-}
-# }}}
+Set FinalPriority to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, FinalPriority will be stored as a int(11).)
-# {{{ sub AddAdminCc
-
-=head2 AddAdminCc
-
-Add an Administrative Cc to this queue.
-Takes a paramhash of Email and Owner.
-We need either an Email Address in Email or a userid in Owner
=cut
-sub AddAdminCc {
- my $self = shift;
- return ($self->AddWatcher( Type => 'AdminCc', @_));
-}
-# }}}
-
-# {{{ sub DeleteWatcher
-
-=head2 DeleteWatcher id [type]
-DeleteWatcher takes a single argument which is either an email address
-or a watcher id.
-If the first argument is an email address, you need to specify the watcher type you're talking
-about as the second argument. Valid values are 'Cc' or 'AdminCc'.
-It removes that watcher from this Queue\'s list of watchers.
+=item DefaultDueIn
+Returns the current value of DefaultDueIn.
+(In the database, DefaultDueIn is stored as int(11).)
-=cut
-sub DeleteWatcher {
- my $self = shift;
- my $id = shift;
-
- my $type;
-
- $type = shift if (@_);
-
-
- require RT::Watcher;
- my $Watcher = new RT::Watcher($self->CurrentUser);
-
- #If it\'s a numeric watcherid
- if ($id =~ /^(\d*)$/) {
- $Watcher->Load($id);
- }
-
- #Otherwise, we'll assume it's an email address
- elsif ($type) {
- my ($result, $msg) =
- $Watcher->LoadByValue( Email => $id,
- Scope => 'Queue',
- Value => $self->id,
- Type => $type);
- return (0,$msg) unless ($result);
- }
-
- else {
- return(0,"Can\'t delete a watcher by email address without specifying a type");
- }
-
- # {{{ Check ACLS
-
- #If the watcher we're trying to delete is for the current user
- if ($Watcher->Email eq $self->CurrentUser->EmailAddress) {
-
- # If it's an AdminCc and they don't have
- # 'WatchAsAdminCc' or 'ModifyQueueWatchers', bail
- if ($Watcher->Type eq 'AdminCc') {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers') or
- $self->CurrentUserHasRight('WatchAsAdminCc')) {
- return(0, 'Permission Denied');
- }
- }
-
- # If it's a Cc and they don't have
- # 'Watch' or 'ModifyQueueWatchers', bail
- elsif ($Watcher->Type eq 'Cc') {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers') or
- $self->CurrentUserHasRight('Watch')) {
- return(0, 'Permission Denied');
- }
- }
- else {
- $RT::Logger->warn("$self -> DeleteWatcher hit code".
- " it never should. We got passed ".
- " a type of ". $args{'Type'});
- return (0,'Error in parameters to $self DeleteWatcher');
- }
- }
- # If the watcher isn't the current user
- # and the current user doesn't have 'ModifyQueueWatchers'
- # bail
- else {
- unless ($self->CurrentUserHasRight('ModifyQueueWatchers')) {
- return (0, "Permission Denied");
- }
- }
-
- # }}}
-
- unless (($Watcher->Scope eq 'Queue') and
- ($Watcher->Value == $self->id) ) {
- return (0, "Not a watcher for this queue");
- }
-
-
- #Clear out the watchers hash.
- $self->{'watchers'} = undef;
-
- my $retval = $Watcher->Delete();
-
- unless ($retval) {
- return(0,"Watcher could not be deleted.");
- }
-
- return(1, "Watcher deleted");
-}
-
-# {{{ sub DeleteCc
+=item SetDefaultDueIn VALUE
-=head2 DeleteCc EMAIL
-Takes an email address. It calls DeleteWatcher with a preset
-type of 'Cc'
+Set DefaultDueIn to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, DefaultDueIn will be stored as a int(11).)
=cut
-sub DeleteCc {
- my $self = shift;
- my $id = shift;
- return ($self->DeleteWatcher ($id, 'Cc'))
-}
-
-# }}}
-# {{{ sub DeleteAdminCc
+=item Creator
-=head2 DeleteAdminCc EMAIL
-
-Takes an email address. It calls DeleteWatcher with a preset
-type of 'AdminCc'
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
=cut
-sub DeleteAdminCc {
- my $self = shift;
- my $id = shift;
- return ($self->DeleteWatcher ($id, 'AdminCc'))
-}
-# }}}
+=item Created
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
-# }}}
-
-# }}}
-
-# {{{ Dealing with keyword selects
-
-# {{{ sub AddKeywordSelect
-
-=head2 AddKeywordSelect
-
-Takes a paramhash of Name, Keyword, Depth and Single. Adds a new KeywordSelect for
-this queue with those attributes.
=cut
-sub AddKeywordSelect {
- my $self = shift;
- my %args = ( Keyword => undef,
- Depth => undef,
- Single => undef,
- Name => undef,
- @_);
-
- #ACLS get handled in KeywordSelect
- my $NewKeywordSelect = new RT::KeywordSelect($self->CurrentUser);
-
- return ($NewKeywordSelect->Create (Keyword => $args{'Keyword'},
- Depth => $args{'Depth'},
- Name => $args{'Name'},
- Single => $args{'Single'},
- ObjectType => 'Ticket',
- ObjectField => 'Queue',
- ObjectValue => $self->Id()
- ) );
-}
-
-# }}}
-
-# {{{ sub KeywordSelect
+=item LastUpdatedBy
-=head2 KeywordSelect([NAME])
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
-Takes the name of a keyword select for this queue or that's global.
-Returns the relevant KeywordSelect object. Prefers a keywordselect that's
-specific to this queue over a global one. If it can't find the proper
-Keword select or the user doesn't have permission, returns an empty
-KeywordSelect object
=cut
-sub KeywordSelect {
- my $self = shift;
- my $name = shift;
-
- require RT::KeywordSelect;
-
- my $select = RT::KeywordSelect->new($self->CurrentUser);
- if ($self->CurrentUserHasRight('SeeQueue')) {
- $select->LoadByName( Name => $name, Queue => $self->Id);
- }
- return ($select);
-}
-
-# }}}
+=item LastUpdated
-# {{{ sub KeywordSelects
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
-=head2 KeywordSelects
-
-Returns an B<RT::KeywordSelects> object containing the collection of
-B<RT::KeywordSelect> objects which apply to this queue. (Both queue specific keyword selects
-and global keyword selects.
=cut
-sub KeywordSelects {
- my $self = shift;
+=item Disabled
- use RT::KeywordSelects;
- my $KeywordSelects = new RT::KeywordSelects($self->CurrentUser);
+Returns the current value of Disabled.
+(In the database, Disabled is stored as smallint(6).)
- if ($self->CurrentUserHasRight('SeeQueue')) {
- $KeywordSelects->LimitToQueue($self->id);
- $KeywordSelects->IncludeGlobals();
- }
- return ($KeywordSelects);
-}
-# }}}
-# }}}
-# {{{ ACCESS CONTROL
+=item SetDisabled VALUE
-# {{{ sub ACL
-=head2 ACL
+Set Disabled to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Disabled will be stored as a smallint(6).)
-#Returns an RT::ACL object of ACEs everyone who has anything to do with this queue.
=cut
-sub ACL {
- my $self = shift;
-
- use RT::ACL;
- my $acl = new RT::ACL($self->CurrentUser);
-
- if ($self->CurrentUserHasRight('ShowACL')) {
- $acl->LimitToQueue($self->Id);
- }
-
- return ($acl);
-}
-
-# }}}
-
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
- unless ($self->CurrentUserHasRight('AdminQueue')) {
- return(0, 'Permission Denied');
- }
- return ($self->SUPER::_Set(@_));
-}
-# }}}
-# {{{ sub _Value
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ CorrespondAddress =>
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
+ CommentAddress =>
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
+ InitialPriority =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ FinalPriority =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ DefaultDueIn =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ 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 => ''},
+ Disabled =>
+ {read => 1, write => 1, type => 'smallint(6)', default => '0'},
-sub _Value {
- my $self = shift;
+ }
+};
- unless ($self->CurrentUserHasRight('SeeQueue')) {
- return (undef);
- }
- return ($self->__Value(@_));
-}
+ eval "require RT::Queue_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queue_Overlay.pm}) {
+ die $@;
+ };
-# }}}
+ eval "require RT::Queue_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queue_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub CurrentUserHasRight
+ eval "require RT::Queue_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queue_Local.pm}) {
+ die $@;
+ };
-=head2 CurrentUserHasRight
-Takes one argument. A textual string with the name of the right we want to check.
-Returns true if the current user has that right for this queue.
-Returns undef otherwise.
-=cut
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
+=head1 SEE ALSO
- return ($self->HasRight( Principal=> $self->CurrentUser,
- Right => "$right"));
+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
-# {{{ sub HasRight
+ no warnings qw(redefine);
-=head2 HasRight
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-Takes a param hash with the fields 'Right' and 'Principal'.
-Principal defaults to the current user.
-Returns true if the principal has that right for this queue.
-Returns undef otherwise.
+RT::Queue_Overlay, RT::Queue_Vendor, RT::Queue_Local
=cut
-# TAKES: Right and optional "Principal" which defaults to the current user
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => $self->CurrentUser,
- @_);
- unless(defined $args{'Principal'}) {
- $RT::Logger->debug("Principal undefined in Queue::HasRight");
-
- }
- return($args{'Principal'}->HasQueueRight(QueueObj => $self,
- Right => $args{'Right'}));
-}
-# }}}
-
-# }}}
1;
diff --git a/rt/lib/RT/Queues.pm b/rt/lib/RT/Queues.pm
index ab58d8d6d..60aec9086 100755
--- a/rt/lib/RT/Queues.pm
+++ b/rt/lib/RT/Queues.pm
@@ -1,123 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Queues.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Queues - a collection of RT::Queue objects
+=head1 NAME
+ RT::Queues -- Class Description
+
=head1 SYNOPSIS
- use RT::Queues;
+ use RT::Queues
=head1 DESCRIPTION
=head1 METHODS
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Queues);
-
-=end testing
-
=cut
package RT::Queues;
-use RT::EasySearch;
-@ISA= qw(RT::EasySearch);
+use RT::SearchBuilder;
+use RT::Queue;
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Queues";
- $self->{'primary_key'} = "id";
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
- # By default, order by name
- $self->OrderBy( ALIAS => 'main',
- FIELD => 'Name',
- ORDER => 'ASC');
- return ($self->SUPER::_Init(@_));
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Queues';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub _DoSearch
-=head2 _DoSearch
+=item NewItem
- A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
-we're explicitly trying to see them.
+Returns an empty new RT::Queue item
=cut
-sub _DoSearch {
+sub NewItem {
my $self = shift;
-
- #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
- unless($self->{'find_disabled_rows'}) {
- $self->LimitToEnabled();
- }
-
- return($self->SUPER::_DoSearch(@_));
-
+ return(RT::Queue->new($self->CurrentUser));
}
-# }}}
-
+ eval "require RT::Queues_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queues_Overlay.pm}) {
+ die $@;
+ };
-# {{{ sub Limit
-sub Limit {
- my $self = shift;
- my %args = ( ENTRYAGGREGATOR => 'AND',
- @_);
- $self->SUPER::Limit(%args);
-}
-# }}}
+ eval "require RT::Queues_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queues_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- my $item;
+ eval "require RT::Queues_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Queues_Local.pm}) {
+ die $@;
+ };
- use RT::Queue;
- $item = new RT::Queue($self->CurrentUser);
- return($item);
-}
-# }}}
-# {{{ sub Next
-=head2 Next
-Returns the next queue that this user can see.
+=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::Queues_Overlay, RT::Queues_Vendor, RT::Queues_Local
=cut
-
-sub Next {
- my $self = shift;
-
-
- my $Queue = $self->SUPER::Next();
- if ((defined($Queue)) and (ref($Queue))) {
-
- if ($Queue->CurrentUserHasRight('SeeQueue')) {
- return($Queue);
- }
-
- #If the user doesn't have the right to show this queue
- else {
- return($self->Next());
- }
- }
- #if there never was any queue
- else {
- return(undef);
- }
-
-}
-# }}}
-1;
+1;
diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm
index 5340f7de4..6962221ea 100755
--- a/rt/lib/RT/Record.pm
+++ b/rt/lib/RT/Record.pm
@@ -1,5 +1,26 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Record.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-
+# 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
=head1 NAME
RT::Record - Base class for RT record objects
@@ -20,20 +41,31 @@ ok (require RT::Record);
=cut
-
package RT::Record;
-use DBIx::SearchBuilder::Record::Cachable;
use RT::Date;
use RT::User;
-@ISA= qw(DBIx::SearchBuilder::Record::Cachable);
+use RT::Base;
+use DBIx::SearchBuilder::Record::Cachable;
+
+use strict;
+use vars qw/@ISA/;
+
+@ISA = qw(RT::Base);
+
+if ($RT::DontCacheSearchBuilderRecords ) {
+ push (@ISA, 'DBIx::SearchBuilder::Record');
+} else {
+ push (@ISA, 'DBIx::SearchBuilder::Record::Cachable');
+
+}
# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->_MyCurrentUser(@_);
-
+sub _Init {
+ my $self = shift;
+ $self->CurrentUser(@_);
+
}
# }}}
@@ -48,68 +80,108 @@ The primary keys for RT classes is 'id'
sub _PrimaryKeys {
my $self = shift;
- return(['id']);
+ return ( ['id'] );
}
# }}}
-# {{{ sub _MyCurrentUser
-
-sub _MyCurrentUser {
+# {{{ sub _Handle
+sub _Handle {
my $self = shift;
-
- $self->CurrentUser(@_);
- if(!defined($self->CurrentUser)) {
- use Carp;
- Carp::cluck();
- $RT::Logger->err("$self was created without a CurrentUser\n");
- return(0);
- }
+ return ($RT::Handle);
}
# }}}
-# {{{ sub _Handle
-sub _Handle {
- my $self = shift;
- return($RT::Handle);
-}
-# }}}
-
# {{{ sub Create
-sub Create {
- my $self = shift;
- my $now = new RT::Date($self->CurrentUser);
- $now->Set(Format=> 'unix', Value => time);
- push @_, 'Created', $now->ISO()
- if ($self->_Accessible('Created', 'auto'));
-
-
- push @_, 'Creator', $self->{'user'}->id
- if $self->_Accessible('Creator', 'auto');
-
- push @_, 'LastUpdated', $now->ISO()
- if ($self->_Accessible('LastUpdated', 'auto'));
-
- push @_, 'LastUpdatedBy', $self->{'user'}->id
- if $self->_Accessible('LastUpdatedBy', 'auto');
-
-
-
- my $id = $self->SUPER::Create(@_);
-
- if ($id) {
- $self->Load($id);
+=item Create PARAMHASH
+
+Takes a PARAMHASH of Column -> Value pairs.
+If any Column has a Validate$PARAMNAME subroutine defined and the
+value provided doesn't pass validation, this routine returns
+an error.
+
+If this object's table has any of the following atetributes defined as
+'Auto', this routine will automatically fill in their values.
+
+=cut
+
+sub Create {
+ my $self = shift;
+ my %attribs = (@_);
+ foreach my $key ( keys %attribs ) {
+ my $method = "Validate$key";
+ unless ( $self->$method( $attribs{$key} ) ) {
+ if (wantarray) {
+ return ( 0, $self->loc('Invalid value for [_1]', $key) );
+ }
+ else {
+ return (0);
+ }
+ }
+ }
+ my $now = RT::Date->new( $self->CurrentUser );
+ $now->Set( Format => 'unix', Value => time );
+ $attribs{'Created'} = $now->ISO() if ( $self->_Accessible( 'Created', 'auto' ) && !$attribs{'Created'});
+
+ if ($self->_Accessible( 'Creator', 'auto' ) && !$attribs{'Creator'}) {
+ $attribs{'Creator'} = $self->CurrentUser->id || '0';
+ }
+ $attribs{'LastUpdated'} = $now->ISO()
+ if ( $self->_Accessible( 'LastUpdated', 'auto' ) && !$attribs{'LastUpdated'});
+
+ $attribs{'LastUpdatedBy'} = $self->CurrentUser->id || '0'
+ if ( $self->_Accessible( 'LastUpdatedBy', 'auto' ) && !$attribs{'LastUpdatedBy'});
+
+ my $id = $self->SUPER::Create(%attribs);
+ if ( UNIVERSAL::isa( $id, 'Class::ReturnValue' ) ) {
+ if ( $id->errno ) {
+ if (wantarray) {
+ return ( 0,
+ $self->loc( "Internal Error: [_1]", $id->{error_message} ) );
+ }
+ else {
+ return (0);
+ }
+ }
+ }
+ # If the object was created in the database,
+ # load it up now, so we're sure we get what the database
+ # has. Arguably, this should not be necessary, but there
+ # isn't much we can do about it.
+
+ unless ($id) {
+ if (wantarray) {
+ return ( $id, $self->loc('Object could not be created') );
+ }
+ else {
+ return ($id);
+ }
+
+ }
+
+ if (UNIVERSAL::isa('errno',$id)) {
+ exit(0);
+ warn "It's here!";
+ return(undef);
+ }
+
+ $self->Load($id) if ($id);
+
+
+
+ if (wantarray) {
+ return ( $id, $self->loc('Object created') );
+ }
+ else {
+ return ($id);
}
-
- return($id);
-
+
}
# }}}
-
# {{{ sub LoadByCols
=head2 LoadByCols
@@ -125,28 +197,33 @@ sub LoadByCols {
# If this database is case sensitive we need to uncase objects for
# explicit loading
- if ($self->_Handle->CaseSensitive) {
- my %newhash;
- foreach my $key (keys %hash) {
- # If we've been passed an empty value, we can't do the lookup.
- # We don't need to explicitly downcase integers or an id.
- if ($key =~ '^id$' || $hash{$key} =~/^\d+$/ || !defined ($hash{$key}) ) {
- $newhash{$key} = $hash{$key};
- }
- else {
- $newhash{"lower(".$key.")"} = lc($hash{$key});
- }
- }
- $self->SUPER::LoadByCols(%newhash);
- }
- else {
- $self->SUPER::LoadByCols(%hash);
+ if ( $self->_Handle->CaseSensitive ) {
+ my %newhash;
+ foreach my $key ( keys %hash ) {
+
+ # If we've been passed an empty value, we can't do the lookup.
+ # We don't need to explicitly downcase integers or an id.
+ if ( $key =~ '^id$'
+ || !defined( $hash{$key} )
+ || $hash{$key} =~ /^\d+$/
+ )
+ {
+ $newhash{$key} = $hash{$key};
+ }
+ else {
+ $newhash{ "lower(" . $key . ")" } = lc( $hash{$key} );
+ }
+ }
+
+ # We've clobbered everything we care about. bash the old hash
+ # and replace it with the new hash
+ %hash = %newhash;
}
+ $self->SUPER::LoadByCols(%hash);
}
# }}}
-
# {{{ Datehandling
# There is room for optimizations in most of those subs:
@@ -154,10 +231,10 @@ sub LoadByCols {
# {{{ LastUpdatedObj
sub LastUpdatedObj {
- my $self=shift;
- my $obj = new RT::Date($self->CurrentUser);
-
- $obj->Set(Format => 'sql', Value => $self->LastUpdated);
+ my $self = shift;
+ my $obj = new RT::Date( $self->CurrentUser );
+
+ $obj->Set( Format => 'sql', Value => $self->LastUpdated );
return $obj;
}
@@ -166,12 +243,11 @@ sub LastUpdatedObj {
# {{{ CreatedObj
sub CreatedObj {
- my $self=shift;
- my $obj = new RT::Date($self->CurrentUser);
-
- $obj->Set(Format => 'sql', Value => $self->Created);
+ my $self = shift;
+ my $obj = new RT::Date( $self->CurrentUser );
+
+ $obj->Set( Format => 'sql', Value => $self->Created );
-
return $obj;
}
@@ -182,9 +258,10 @@ sub CreatedObj {
# TODO: This should be deprecated
#
sub AgeAsString {
- my $self=shift;
- return($self->CreatedObj->AgeAsString());
+ my $self = shift;
+ return ( $self->CreatedObj->AgeAsString() );
}
+
# }}}
# {{{ LastUpdatedAsString
@@ -192,12 +269,13 @@ sub AgeAsString {
# TODO this should be deprecated
sub LastUpdatedAsString {
- my $self=shift;
- if ($self->LastUpdated) {
- return ($self->LastUpdatedObj->AsString());
-
- } else {
- return "never";
+ my $self = shift;
+ if ( $self->LastUpdated ) {
+ return ( $self->LastUpdatedObj->AsString() );
+
+ }
+ else {
+ return "never";
}
}
@@ -209,8 +287,9 @@ sub LastUpdatedAsString {
#
sub CreatedAsString {
my $self = shift;
- return ($self->CreatedObj->AsString());
+ return ( $self->CreatedObj->AsString() );
}
+
# }}}
# {{{ LongSinceUpdateAsString
@@ -218,42 +297,47 @@ sub CreatedAsString {
# TODO This should be deprecated
#
sub LongSinceUpdateAsString {
- my $self=shift;
- if ($self->LastUpdated) {
-
- return ($self->LastUpdatedObj->AgeAsString());
-
- } else {
- return "never";
+ my $self = shift;
+ if ( $self->LastUpdated ) {
+
+ return ( $self->LastUpdatedObj->AgeAsString() );
+
+ }
+ else {
+ return "never";
}
}
+
# }}}
# }}} Datehandling
-
# {{{ sub _Set
-sub _Set {
- my $self = shift;
+sub _Set {
+ my $self = shift;
- my %args = ( Field => undef,
- Value => undef,
- IsSQL => undef,
- @_ );
+ my %args = (
+ Field => undef,
+ Value => undef,
+ IsSQL => undef,
+ @_
+ );
+ #if the user is trying to modify the record
+ # TODO: document _why_ this code is here
- #if the user is trying to modify the record
- if ((!defined ($args{'Field'})) || (!defined ($args{'Value'}))) {
- $args{'Value'} = 0;
- }
+ if ( ( !defined( $args{'Field'} ) ) || ( !defined( $args{'Value'} ) ) ) {
+ $args{'Value'} = 0;
+ }
- $self->_SetLastUpdated();
- $self->SUPER::_Set(Field => $args{'Field'},
- Value => $args{'Value'},
- IsSQL => $args{'IsSQL'});
-
-
+ $self->_SetLastUpdated();
+ my ( $val, $msg ) = $self->SUPER::_Set(
+ Field => $args{'Field'},
+ Value => $args{'Value'},
+ IsSQL => $args{'IsSQL'}
+ );
}
+
# }}}
# {{{ sub _SetLastUpdated
@@ -268,16 +352,20 @@ It takes no options. Arguably, this is a bug
sub _SetLastUpdated {
my $self = shift;
use RT::Date;
- my $now = new RT::Date($self->CurrentUser);
+ my $now = new RT::Date( $self->CurrentUser );
$now->SetToNow();
- if ($self->_Accessible('LastUpdated','auto')) {
- my ($msg, $val) = $self->__Set( Field => 'LastUpdated',
- Value => $now->ISO);
+ if ( $self->_Accessible( 'LastUpdated', 'auto' ) ) {
+ my ( $msg, $val ) = $self->__Set(
+ Field => 'LastUpdated',
+ Value => $now->ISO
+ );
}
- if ($self->_Accessible('LastUpdatedBy','auto')) {
- my ($msg, $val) = $self->__Set( Field => 'LastUpdatedBy',
- Value => $self->CurrentUser->id);
+ if ( $self->_Accessible( 'LastUpdatedBy', 'auto' ) ) {
+ my ( $msg, $val ) = $self->__Set(
+ Field => 'LastUpdatedBy',
+ Value => $self->CurrentUser->id
+ );
}
}
@@ -291,15 +379,16 @@ Returns an RT::User object with the RT account of the creator of this row
=cut
-sub CreatorObj {
- my $self = shift;
- unless (exists $self->{'CreatorObj'}) {
-
- $self->{'CreatorObj'} = RT::User->new($self->CurrentUser);
- $self->{'CreatorObj'}->Load($self->Creator);
- }
- return($self->{'CreatorObj'});
+sub CreatorObj {
+ my $self = shift;
+ unless ( exists $self->{'CreatorObj'} ) {
+
+ $self->{'CreatorObj'} = RT::User->new( $self->CurrentUser );
+ $self->{'CreatorObj'}->Load( $self->Creator );
+ }
+ return ( $self->{'CreatorObj'} );
}
+
# }}}
# {{{ sub LastUpdatedByObj
@@ -311,35 +400,56 @@ sub CreatorObj {
=cut
sub LastUpdatedByObj {
- my $self=shift;
- unless (exists $self->{LastUpdatedByObj}) {
- $self->{'LastUpdatedByObj'}=RT::User->new($self->CurrentUser);
- $self->{'LastUpdatedByObj'}->Load($self->LastUpdatedBy);
+ my $self = shift;
+ unless ( exists $self->{LastUpdatedByObj} ) {
+ $self->{'LastUpdatedByObj'} = RT::User->new( $self->CurrentUser );
+ $self->{'LastUpdatedByObj'}->Load( $self->LastUpdatedBy );
}
return $self->{'LastUpdatedByObj'};
}
# }}}
-# {{{ sub CurrentUser
-=head2 CurrentUser
+require Encode::compat if $] < 5.007001;
+require Encode;
-If called with an argument, sets the current user to that user object.
-This will affect ACL decisions, etc.
-Returns the current user
+sub __Value {
+ my $self = shift;
+ my $field = shift;
+ my %args = ( decode_utf8 => 1,
+ @_ );
-=cut
+ unless (defined $field && $field) {
+ $RT::Logger->error("$self __Value called with undef field");
+ }
+ my $value = $self->SUPER::__Value($field);
+
+ return('') if ( !defined($value) || $value eq '');
+
+ return Encode::decode_utf8($value) || $value if $args{'decode_utf8'};
+ return $value;
+}
-sub CurrentUser {
- my $self = shift;
+# Set up defaults for DBIx::SearchBuilder::Record::Cachable
- if (@_) {
- $self->{'user'} = shift;
+sub _CacheConfig {
+ {
+ 'cache_p' => 1,
+ 'fast_update_p' => 1,
+ 'cache_for_sec' => 30,
}
- return ($self->{'user'});
}
-# }}}
+=head2 _DecodeUTF8
+
+ When passed a string will "decode" it int a proper UTF-8 string
+
+=cut
+
+eval "require RT::Record_Vendor";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Record_Vendor.pm});
+eval "require RT::Record_Local";
+die $@ if ($@ && $@ !~ qr{^Can't locate RT/Record_Local.pm});
1;
diff --git a/rt/lib/RT/Scrip.pm b/rt/lib/RT/Scrip.pm
index aef011ca3..a69dde04e 100755
--- a/rt/lib/RT/Scrip.pm
+++ b/rt/lib/RT/Scrip.pm
@@ -1,372 +1,500 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Scrip.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Scrip - an RT Scrip object
+RT::Scrip
-=head1 SYNOPSIS
- use RT::Scrip;
+=head1 SYNOPSIS
=head1 DESCRIPTION
-
=head1 METHODS
-=begin testing
+=cut
-ok (require RT::TestHarness);
-ok (require RT::Scrip);
+package RT::Scrip;
+use RT::Record;
+use RT::Queue;
+use RT::Template;
+use RT::ScripCondition;
+use RT::ScripAction;
-=end testing
-=cut
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-package RT::Scrip;
-use RT::Record;
-@ISA= qw(RT::Record);
+sub _Init {
+ my $self = shift;
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Scrips";
- return ($self->SUPER::_Init(@_));
+ $self->Table('Scrips');
+ $self->SUPER::_Init(@_);
}
-# }}}
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = ( ScripAction => 'read/write',
- ScripCondition => 'read/write',
- Stage => 'read/write',
- Queue => 'read/write',
- Template => 'read/write',
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-# }}}
-# {{{ sub Create
-=head2 Create
-Creates a new entry in the Scrips table. Takes a paramhash with the attributes:
- Queue A queue id or 0 for a global scrip
- Template A template ID or name.
- Behavior is undefined if you have multiple items with
- the same name
- ScripAction A ScripAction id or name
- Behavior is undefined if you have multiple items with
- the same name
- ScripCondition A ScripCondition id or name
- Behavior is undefined if you have multiple items with
- the same name
+=item Create PARAMHASH
-Returns (retval, msg);
-retval is 0 for failure or scrip id. msg is a textual description of what happened.
+Create takes a hash of values and creates a row in the database:
+
+ varchar(255) 'Description'.
+ int(11) 'ScripCondition'.
+ int(11) 'ScripAction'.
+ text 'ConditionRules'.
+ text 'ActionRules'.
+ text 'CustomIsApplicableCode'.
+ text 'CustomPrepareCode'.
+ text 'CustomCommitCode'.
+ varchar(32) 'Stage'.
+ int(11) 'Queue'.
+ int(11) 'Template'.
=cut
-sub Create {
+
+
+
+sub Create {
my $self = shift;
- my %args = ( Queue => undef,
- Template => undef,
- ScripAction => undef,
- ScripCondition => undef,
- Stage => 'TransactionCreate',
- @_
- );
-
-
- if ($args{'Queue'} == 0 ) {
- unless ($self->CurrentUser->HasSystemRight('ModifyScrips')) {
- return (0, 'Permission Denied');
- }
- }
- else {
- my $QueueObj = new RT::Queue($self->CurrentUser);
- $QueueObj->Load($args{'Queue'});
- unless ($QueueObj->id()) {
- return (0,'Invalid queue');
- }
- unless ($QueueObj->CurrentUserHasRight('ModifyScrips')) {
- return (0, 'Permssion Denied');
- }
- }
-
- #TODO +++ validate input
-
- require RT::ScripAction;
- my $action = new RT::ScripAction($self->CurrentUser);
- $action->Load($args{'ScripAction'});
- return (0, "Action ".$args{'ScripAction'}." not found") unless $action->Id;
-
- require RT::Template;
- my $template = new RT::Template($self->CurrentUser);
- $template->Load($args{'Template'});
- return (0, 'Template not found') unless $template->Id;
-
- require RT::ScripCondition;
- my $condition = new RT::ScripCondition($self->CurrentUser);
- $condition->Load($args{'ScripCondition'});
-
- unless ($condition->Id) {
- return (0, 'Condition not found');
- }
-
- my $id = $self->SUPER::Create(Queue => $args{'Queue'},
- Template => $template->Id,
- ScripCondition => $condition->id,
- Stage => $args{'Stage'},
- ScripAction => $action->Id
- );
- return ($id, 'Scrip Created');
+ my %args = (
+ Description => '',
+ ScripCondition => '0',
+ ScripAction => '0',
+ ConditionRules => '',
+ ActionRules => '',
+ CustomIsApplicableCode => '',
+ CustomPrepareCode => '',
+ CustomCommitCode => '',
+ Stage => '',
+ Queue => '0',
+ Template => '0',
+
+ @_);
+ $self->SUPER::Create(
+ Description => $args{'Description'},
+ ScripCondition => $args{'ScripCondition'},
+ ScripAction => $args{'ScripAction'},
+ ConditionRules => $args{'ConditionRules'},
+ ActionRules => $args{'ActionRules'},
+ CustomIsApplicableCode => $args{'CustomIsApplicableCode'},
+ CustomPrepareCode => $args{'CustomPrepareCode'},
+ CustomCommitCode => $args{'CustomCommitCode'},
+ Stage => $args{'Stage'},
+ Queue => $args{'Queue'},
+ Template => $args{'Template'},
+);
+
}
-# }}}
-# {{{ sub Delete
-=head2 Delete
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-Delete this object
=cut
-sub Delete {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ModifyScrips')) {
- return (0, 'Permission Denied');
- }
-
- return ($self->SUPER::Delete(@_));
-}
-# }}}
-# {{{ sub QueueObj
+=item Description
+
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
+
-=head2 QueueObj
-Retuns an RT::Queue object with this Scrip\'s queue
+=item SetDescription VALUE
+
+
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
+
=cut
-sub QueueObj {
- my $self = shift;
-
- if (!$self->{'QueueObj'}) {
- require RT::Queue;
- $self->{'QueueObj'} = RT::Queue->new($self->CurrentUser);
- $self->{'QueueObj'}->Load($self->Queue);
- }
- return ($self->{'QueueObj'});
-}
-# }}}
+=item ScripCondition
+
+Returns the current value of ScripCondition.
+(In the database, ScripCondition is stored as int(11).)
+
-# {{{ sub ActionObj
+=item SetScripCondition VALUE
-=head2 ActionObj
-Retuns an RT::Action object with this Scrip\'s Action
+Set ScripCondition to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ScripCondition will be stored as a int(11).)
+
=cut
-sub ActionObj {
- my $self = shift;
-
- unless (defined $self->{'ScripActionObj'}) {
- require RT::ScripAction;
-
- $self->{'ScripActionObj'} = RT::ScripAction->new($self->CurrentUser);
- #TODO: why are we loading Actions with templates like this.
- # two seperate methods might make more sense
- $self->{'ScripActionObj'}->Load($self->ScripAction, $self->Template);
- }
- return ($self->{'ScripActionObj'});
+
+=item ScripConditionObj
+
+Returns the ScripCondition Object which has the id returned by ScripCondition
+
+
+=cut
+
+sub ScripConditionObj {
+ my $self = shift;
+ my $ScripCondition = RT::ScripCondition->new($self->CurrentUser);
+ $ScripCondition->Load($self->__Value('ScripCondition'));
+ return($ScripCondition);
}
-# }}}
+=item ScripAction
+
+Returns the current value of ScripAction.
+(In the database, ScripAction is stored as int(11).)
+
+
+
+=item SetScripAction VALUE
-# {{{ sub TemplateObj
-=head2 TemplateObj
+Set ScripAction to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ScripAction will be stored as a int(11).)
-Retuns an RT::Template object with this Scrip\'s Template
=cut
-sub TemplateObj {
- my $self = shift;
-
- unless (defined $self->{'TemplateObj'}) {
- require RT::Template;
- $self->{'TemplateObj'} = RT::Template->new($self->CurrentUser);
- $self->{'TemplateObj'}->Load($self->Template);
- }
- return ($self->{'TemplateObj'});
-}
-# }}}
+=item ScripActionObj
-# {{{ sub Prepare
-=head2 Prepare
+Returns the ScripAction Object which has the id returned by ScripAction
-Calls the action object's prepare method
=cut
-sub Prepare {
- my $self = shift;
- $self->ActionObj->Prepare(@_);
+sub ScripActionObj {
+ my $self = shift;
+ my $ScripAction = RT::ScripAction->new($self->CurrentUser);
+ $ScripAction->Load($self->__Value('ScripAction'));
+ return($ScripAction);
}
-# }}}
+=item ConditionRules
+
+Returns the current value of ConditionRules.
+(In the database, ConditionRules is stored as text.)
+
-# {{{ sub Commit
-=head2 Commit
-Calls the action object's commit method
+=item SetConditionRules VALUE
+
+
+Set ConditionRules to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ConditionRules will be stored as a text.)
+
=cut
-sub Commit {
- my $self = shift;
- $self->ActionObj->Commit(@_);
-}
-# }}}
+=item ActionRules
-# {{{ sub ConditionObj
+Returns the current value of ActionRules.
+(In the database, ActionRules is stored as text.)
-=head2 ConditionObj
-Retuns an RT::ScripCondition object with this Scrip's IsApplicable
+
+=item SetActionRules VALUE
+
+
+Set ActionRules to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ActionRules will be stored as a text.)
+
=cut
-sub ConditionObj {
- my $self = shift;
-
- unless (defined $self->{'ScripConditionObj'}) {
- require RT::ScripCondition;
- $self->{'ScripConditionObj'} = RT::ScripCondition->new($self->CurrentUser);
- $self->{'ScripConditionObj'}->Load($self->ScripCondition);
- }
- return ($self->{'ScripConditionObj'});
-}
-# }}}
+=item CustomIsApplicableCode
+
+Returns the current value of CustomIsApplicableCode.
+(In the database, CustomIsApplicableCode is stored as text.)
+
+
+
+=item SetCustomIsApplicableCode VALUE
-# {{{ sub IsApplicable
-=head2 IsApplicable
+Set CustomIsApplicableCode to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, CustomIsApplicableCode will be stored as a text.)
-Calls the Condition object\'s IsApplicable method
=cut
-sub IsApplicable {
- my $self = shift;
- return ($self->ConditionObj->IsApplicable(@_));
-}
-# }}}
+=item CustomPrepareCode
-# {{{ sub DESTROY
-sub DESTROY {
- my $self = shift;
- $self->{'ActionObj'} = undef;
-}
-# }}}
+Returns the current value of CustomPrepareCode.
+(In the database, CustomPrepareCode is stored as text.)
-# {{{ ACL related methods
-# {{{ sub _Set
-# does an acl check and then passes off the call
-sub _Set {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ModifyScrips')) {
- $RT::Logger->debug("CurrentUser can't modify Scrips for ".$self->Queue."\n");
- return (0, 'Permission Denied');
- }
- return $self->__Set(@_);
-}
+=item SetCustomPrepareCode VALUE
-# }}}
-# {{{ sub _Value
-# does an acl check and then passes off the call
-sub _Value {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ShowScrips')) {
- $RT::Logger->debug("CurrentUser can't modify Scrips for ".$self->__Value('Queue')."\n");
- return (undef);
- }
-
- return $self->__Value(@_);
-}
-# }}}
+Set CustomPrepareCode to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, CustomPrepareCode will be stored as a text.)
+
+
+=cut
+
+
+=item CustomCommitCode
+
+Returns the current value of CustomCommitCode.
+(In the database, CustomCommitCode is stored as text.)
+
-# {{{ sub CurrentUserHasRight
-=head2 CurrentUserHasRight
+=item SetCustomCommitCode VALUE
+
+
+Set CustomCommitCode to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, CustomCommitCode will be stored as a text.)
-Helper menthod for HasRight. Presets Principal to CurrentUser then
-calls HasRight.
=cut
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
- return ($self->HasRight( Principal => $self->CurrentUser->UserObj,
- Right => $right ));
-
+
+=item Stage
+
+Returns the current value of Stage.
+(In the database, Stage is stored as varchar(32).)
+
+
+
+=item SetStage VALUE
+
+
+Set Stage to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Stage will be stored as a varchar(32).)
+
+
+=cut
+
+
+=item Queue
+
+Returns the current value of Queue.
+(In the database, Queue is stored as int(11).)
+
+
+
+=item SetQueue VALUE
+
+
+Set Queue to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Queue will be stored as a int(11).)
+
+
+=cut
+
+
+=item QueueObj
+
+Returns the Queue Object which has the id returned by Queue
+
+
+=cut
+
+sub QueueObj {
+ my $self = shift;
+ my $Queue = RT::Queue->new($self->CurrentUser);
+ $Queue->Load($self->__Value('Queue'));
+ return($Queue);
}
-# }}}
+=item Template
+
+Returns the current value of Template.
+(In the database, Template is stored as int(11).)
+
+
+
+=item SetTemplate VALUE
-# {{{ sub HasRight
-=head2 HasRight
+Set Template to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Template will be stored as a int(11).)
-Takes a param-hash consisting of "Right" and "Principal" Principal is
-an RT::User object or an RT::CurrentUser object. "Right" is a textual
-Right string that applies to Scrips.
=cut
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => undef,
- @_ );
-
- if ((defined $self->SUPER::_Value('Queue')) and ($self->SUPER::_Value('Queue') != 0)) {
- return ( $args{'Principal'}->HasQueueRight(
- Right => $args{'Right'},
- Queue => $self->SUPER::_Value('Queue'),
- Principal => $args{'Principal'}
- )
- );
-
- }
- else {
- return( $args{'Principal'}->HasSystemRight( $args{'Right'}) );
- }
+
+=item TemplateObj
+
+Returns the Template Object which has the id returned by Template
+
+
+=cut
+
+sub TemplateObj {
+ my $self = shift;
+ my $Template = RT::Template->new($self->CurrentUser);
+ $Template->Load($self->__Value('Template'));
+ return($Template);
}
-# }}}
-# }}}
+=item Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
+
+
+=cut
+
+
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+
+=cut
+
+
+=item LastUpdatedBy
+
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
+
+
+=cut
+
+
+=item LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
+
+
+=cut
-1;
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ ScripCondition =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ ScripAction =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ ConditionRules =>
+ {read => 1, write => 1, type => 'text', default => ''},
+ ActionRules =>
+ {read => 1, write => 1, type => 'text', default => ''},
+ CustomIsApplicableCode =>
+ {read => 1, write => 1, type => 'text', default => ''},
+ CustomPrepareCode =>
+ {read => 1, write => 1, type => 'text', default => ''},
+ CustomCommitCode =>
+ {read => 1, write => 1, type => 'text', default => ''},
+ Stage =>
+ {read => 1, write => 1, type => 'varchar(32)', default => ''},
+ Queue =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Template =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ 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::Scrip_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Scrip_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrip_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Scrip_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrip_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::Scrip_Overlay, RT::Scrip_Vendor, RT::Scrip_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/ScripAction.pm b/rt/lib/RT/ScripAction.pm
index 471ad9191..26824df5d 100755
--- a/rt/lib/RT/ScripAction.pm
+++ b/rt/lib/RT/ScripAction.pm
@@ -1,200 +1,279 @@
-# Copyright 1999-2000 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ScripAction.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::ScripAction - RT Action object
+RT::ScripAction
+
=head1 SYNOPSIS
- use RT::ScripAction;
+=head1 DESCRIPTION
+=head1 METHODS
+
+=cut
+
+package RT::ScripAction;
+use RT::Record;
-=head1 DESCRIPTION
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in other modules.
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+sub _Init {
+ my $self = shift;
-=begin testing
+ $self->Table('ScripActions');
+ $self->SUPER::_Init(@_);
+}
-ok (require RT::TestHarness);
-ok (require RT::ScripAction);
-=end testing
-=head1 METHODS
+
+
+=item Create PARAMHASH
+
+Create takes a hash of values and creates a row in the database:
+
+ varchar(200) 'Name'.
+ varchar(255) 'Description'.
+ varchar(60) 'ExecModule'.
+ varchar(255) 'Argument'.
=cut
-package RT::ScripAction;
-use RT::Record;
-@ISA= qw(RT::Record);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ScripActions";
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub _Accessible
-sub _Accessible {
+
+
+sub Create {
my $self = shift;
- my %Cols = ( Name => 'read',
- Description => 'read',
- ExecModule => 'read',
- Argument => 'read',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
+ my %args = (
+ Name => '',
+ Description => '',
+ ExecModule => '',
+ Argument => '',
+
+ @_);
+ $self->SUPER::Create(
+ Name => $args{'Name'},
+ Description => $args{'Description'},
+ ExecModule => $args{'ExecModule'},
+ Argument => $args{'Argument'},
+);
+
}
-# }}}
-# {{{ sub Create
-=head2 Create
-
- Takes a hash. Creates a new Action entry.
- should be better documented.
+
+
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
+
+
=cut
-sub Create {
- my $self = shift;
- #TODO check these args and do smart things.
- return($self->SUPER::Create(@_));
-}
-# }}}
-# {{{ sub Delete
-sub Delete {
- my $self = shift;
-
- return (0, "ScripAction->Delete not implemented");
-}
-# }}}
+=item Name
+
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
-# {{{ sub Load
-sub Load {
- my $self = shift;
- my $identifier = shift;
-
- if (!$identifier) {
- return (0, 'Input error');
- }
-
- if ($identifier !~ /\D/) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- $self->LoadByCol('Name', $identifier);
-
- }
-
- if (@_) {
- # Set the template Id to the passed in template
- my $template = shift;
-
- $self->{'Template'} = $template;
- }
- return ($self->Id, 'ScripAction loaded');
-}
-# }}}
-# {{{ sub LoadAction
-=head2 LoadAction HASH
+=item SetName VALUE
+
+
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
- Takes a hash consisting of TicketObj and TransactionObj. Loads an RT::Action:: module.
=cut
-sub LoadAction {
- my $self = shift;
- my %args = ( TransactionObj => undef,
- TicketObj => undef,
- @_ );
-
- #TODO: Put this in an eval
- $self->ExecModule =~ /^(\w+)$/;
- my $module = $1;
- my $type = "RT::Action::". $module;
-
- $RT::Logger->debug("now requiring $type\n");
- eval "require $type" || die "Require of $type failed.\n$@\n";
-
- $self->{'Action'} = $type->new ( 'ScripActionObj' => $self,
- 'TicketObj' => $args{'TicketObj'},
- 'TransactionObj' => $args{'TransactionObj'},
- 'TemplateObj' => $self->TemplateObj,
- 'Argument' => $self->Argument,
- );
-}
-# }}}
-# {{{ sub TemplateObj
+=item Description
+
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
+
+
-=head2 TemplateObj
+=item SetDescription VALUE
+
+
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
-Return this action\'s template object
=cut
-sub TemplateObj {
- my $self = shift;
- return undef unless $self->{Template};
- if (!$self->{'TemplateObj'}) {
- require RT::Template;
- $self->{'TemplateObj'} = RT::Template->new($self->CurrentUser);
- $self->{'TemplateObj'}->LoadById($self->{'Template'});
-
- }
-
- return ($self->{'TemplateObj'});
-}
-# }}}
-# The following methods call the action object
+=item ExecModule
-# {{{ sub Prepare
+Returns the current value of ExecModule.
+(In the database, ExecModule is stored as varchar(60).)
-sub Prepare {
- my $self = shift;
- return ($self->{'Action'}->Prepare());
-
-}
-# }}}
-# {{{ sub Commit
-sub Commit {
- my $self = shift;
- return($self->{'Action'}->Commit());
-
-
-}
-# }}}
-# {{{ sub Describe
-sub Describe {
- my $self = shift;
- return ($self->{'Action'}->Describe());
-
-}
-# }}}
+=item SetExecModule VALUE
-# {{{ sub DESTROY
-sub DESTROY {
- my $self=shift;
- $self->{'Action'} = undef;
- $self->{'TemplateObj'} = undef;
-}
-# }}}
+Set ExecModule to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ExecModule will be stored as a varchar(60).)
-1;
+=cut
+
+
+=item Argument
+
+Returns the current value of Argument.
+(In the database, Argument is stored as varchar(255).)
+
+
+=item SetArgument VALUE
+
+
+Set Argument to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Argument will be stored as a varchar(255).)
+
+
+=cut
+
+
+=item Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
+
+
+=cut
+
+
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+
+=cut
+
+
+=item LastUpdatedBy
+
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
+
+
+=cut
+
+
+=item LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
+
+
+=cut
+
+
+
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ ExecModule =>
+ {read => 1, write => 1, type => 'varchar(60)', default => ''},
+ Argument =>
+ {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::ScripAction_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::ScripAction_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::ScripAction_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripAction_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::ScripAction_Overlay, RT::ScripAction_Vendor, RT::ScripAction_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/ScripActions.pm b/rt/lib/RT/ScripActions.pm
index ec6141559..614ff374f 100755
--- a/rt/lib/RT/ScripActions.pm
+++ b/rt/lib/RT/ScripActions.pm
@@ -1,70 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ScripActions.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::ScripActions - Collection of Action objects
+=head1 NAME
+ RT::ScripActions -- Class Description
+
=head1 SYNOPSIS
- use RT::ScripActions;
-
+ use RT::ScripActions
=head1 DESCRIPTION
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::ScripActions);
-
-=end testing
-
=head1 METHODS
=cut
package RT::ScripActions;
-use RT::EasySearch;
+
+use RT::SearchBuilder;
use RT::ScripAction;
-@ISA= qw(RT::EasySearch);
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ScripActions";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub LimitToType
-sub LimitToType {
- my $self = shift;
- my $type = shift;
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => "$type")
- if defined $type;
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => "Correspond")
- if $type eq "Create";
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => 'any');
-
+
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'ScripActions';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return(RT::ScripAction->new($self->CurrentUser));
+=item NewItem
+
+Returns an empty new RT::ScripAction item
+
+=cut
+
+sub NewItem {
+ my $self = shift;
+ return(RT::ScripAction->new($self->CurrentUser));
}
-# }}}
+ eval "require RT::ScripActions_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripActions_Overlay.pm}) {
+ die $@;
+ };
-1;
+ eval "require RT::ScripActions_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripActions_Vendor.pm}) {
+ die $@;
+ };
+ eval "require RT::ScripActions_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripActions_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::ScripActions_Overlay, RT::ScripActions_Vendor, RT::ScripActions_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/ScripCondition.pm b/rt/lib/RT/ScripCondition.pm
index 253502bd4..fe0aa2d5a 100755
--- a/rt/lib/RT/ScripCondition.pm
+++ b/rt/lib/RT/ScripCondition.pm
@@ -1,192 +1,302 @@
-# Copyright 1999-2000 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ScripCondition.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::ScripCondition - RT scrip conditional
+RT::ScripCondition
+
=head1 SYNOPSIS
- use RT::ScripCondition;
+=head1 DESCRIPTION
+=head1 METHODS
-=head1 DESCRIPTION
+=cut
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in other modules.
+package RT::ScripCondition;
+use RT::Record;
-=begin testing
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
-ok (require RT::TestHarness);
-ok (require RT::ScripCondition);
+sub _Init {
+ my $self = shift;
-=end testing
+ $self->Table('ScripConditions');
+ $self->SUPER::_Init(@_);
+}
-=head1 METHODS
+
+
+
+
+=item Create PARAMHASH
+
+Create takes a hash of values and creates a row in the database:
+
+ varchar(200) 'Name'.
+ varchar(255) 'Description'.
+ varchar(60) 'ExecModule'.
+ varchar(255) 'Argument'.
+ varchar(60) 'ApplicableTransTypes'.
=cut
-package RT::ScripCondition;
-use RT::Record;
-@ISA= qw(RT::Record);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ScripConditions";
- return ($self->SUPER::_Init(@_));
-}
-# }}}
-# {{{ sub _Accessible
-sub _Accessible {
+
+
+sub Create {
my $self = shift;
- my %Cols = ( Name => 'read',
- Description => 'read',
- ApplicableTransTypes => 'read',
- ExecModule => 'read',
- Argument => 'read',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
+ my %args = (
+ Name => '',
+ Description => '',
+ ExecModule => '',
+ Argument => '',
+ ApplicableTransTypes => '',
+
+ @_);
+ $self->SUPER::Create(
+ Name => $args{'Name'},
+ Description => $args{'Description'},
+ ExecModule => $args{'ExecModule'},
+ Argument => $args{'Argument'},
+ ApplicableTransTypes => $args{'ApplicableTransTypes'},
+);
+
}
-# }}}
-# {{{ sub Create
-=head2 Create
-
- Takes a hash. Creates a new Condition entry.
- should be better documented.
+
+=item id
+
+Returns the current value of id.
+(In the database, id is stored as int(11).)
+
=cut
-sub Create {
- my $self = shift;
- return($self->SUPER::Create(@_));
-}
-# }}}
-# {{{ sub Delete
+=item Name
-=head2 Delete
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
+
+
+
+=item SetName VALUE
+
+
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
-No API available for deleting things just yet.
=cut
-sub Delete {
- my $self = shift;
- return(0,'Unimplemented');
-}
-# }}}
-# {{{ sub Load
+=item Description
-=head2 Load IDENTIFIER
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
+
+
+
+=item SetDescription VALUE
+
+
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
-Loads a condition takes a name or ScripCondition id.
=cut
-sub Load {
- my $self = shift;
- my $identifier = shift;
-
- unless (defined $identifier) {
- return (undef);
- }
-
- if ($identifier !~ /\D/) {
- return ($self->SUPER::LoadById($identifier));
- }
- else {
- return ($self->LoadByCol('Name', $identifier));
- }
-}
-# }}}
-# {{{ sub LoadCondition
+=item ExecModule
+
+Returns the current value of ExecModule.
+(In the database, ExecModule is stored as varchar(60).)
+
+
+
+=item SetExecModule VALUE
+
-=head2 LoadCondition HASH
+Set ExecModule to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ExecModule will be stored as a varchar(60).)
-takes a hash which has the following elements: TransactionObj and TicketObj.
-Loads the Condition module in question.
=cut
-sub LoadCondition {
- my $self = shift;
- my %args = ( TransactionObj => undef,
- TicketObj => undef,
- @_ );
-
- #TODO: Put this in an eval
- $self->ExecModule =~ /^(\w+)$/;
- my $module = $1;
- my $type = "RT::Condition::". $module;
-
- $RT::Logger->debug("now requiring $type\n");
- eval "require $type" || die "Require of $type failed.\n$@\n";
-
- $self->{'Condition'} = $type->new ( 'ScripConditionObj' => $self,
- 'TicketObj' => $args{'TicketObj'},
- 'TransactionObj' => $args{'TransactionObj'},
- 'Argument' => $self->Argument,
- 'ApplicableTransTypes' => $self->ApplicableTransTypes,
- );
-}
-# }}}
+=item Argument
+
+Returns the current value of Argument.
+(In the database, Argument is stored as varchar(255).)
-# {{{ The following methods call the Condition object
-# {{{ sub Describe
+=item SetArgument VALUE
-=head2 Describe
-Helper method to call the condition module\'s Describe method.
+Set Argument to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Argument will be stored as a varchar(255).)
+
=cut
-sub Describe {
- my $self = shift;
- return ($self->{'Condition'}->Describe());
-
-}
-# }}}
-# {{{ sub IsApplicable
+=item ApplicableTransTypes
-=head2 IsApplicable
+Returns the current value of ApplicableTransTypes.
+(In the database, ApplicableTransTypes is stored as varchar(60).)
+
+
+
+=item SetApplicableTransTypes VALUE
+
+
+Set ApplicableTransTypes to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ApplicableTransTypes will be stored as a varchar(60).)
-Helper method to call the condition module\'s IsApplicable method.
=cut
-sub IsApplicable {
- my $self = shift;
- return ($self->{'Condition'}->IsApplicable());
-
-}
-# }}}
-# }}}
+=item Creator
-# {{{ sub DESTROY
-sub DESTROY {
- my $self=shift;
- $self->{'Condition'} = undef;
-}
-# }}}
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
-1;
+=cut
+
+
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+
+=cut
+
+
+=item LastUpdatedBy
+
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
+
+
+=cut
+
+
+=item LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
+=cut
+
+
+
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ ExecModule =>
+ {read => 1, write => 1, type => 'varchar(60)', default => ''},
+ Argument =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ ApplicableTransTypes =>
+ {read => 1, write => 1, type => 'varchar(60)', 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::ScripCondition_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripCondition_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::ScripCondition_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripCondition_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::ScripCondition_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripCondition_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::ScripCondition_Overlay, RT::ScripCondition_Vendor, RT::ScripCondition_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/ScripConditions.pm b/rt/lib/RT/ScripConditions.pm
index 236e6718d..34f788d9c 100755
--- a/rt/lib/RT/ScripConditions.pm
+++ b/rt/lib/RT/ScripConditions.pm
@@ -1,69 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/ScripConditions.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::ScripConditions - Collection of Action objects
+=head1 NAME
+ RT::ScripConditions -- Class Description
+
=head1 SYNOPSIS
- use RT::ScripConditions;
-
+ use RT::ScripConditions
=head1 DESCRIPTION
-
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::ScripConditions);
-
-=end testing
-
=head1 METHODS
=cut
package RT::ScripConditions;
-use RT::EasySearch;
+
+use RT::SearchBuilder;
use RT::ScripCondition;
-@ISA= qw(RT::EasySearch);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "ScripConditions";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub LimitToType
-sub LimitToType {
- my $self = shift;
- my $type = shift;
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => "$type")
- if defined $type;
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => "Correspond")
- if $type eq "Create";
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Type',
- VALUE => 'any');
-
+
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
+
+
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'ScripConditions';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return(RT::ScripCondition->new($self->CurrentUser));
+
+=item NewItem
+
+Returns an empty new RT::ScripCondition item
+
+=cut
+
+sub NewItem {
+ my $self = shift;
+ return(RT::ScripCondition->new($self->CurrentUser));
}
-# }}}
+ eval "require RT::ScripConditions_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripConditions_Overlay.pm}) {
+ die $@;
+ };
-1;
+ eval "require RT::ScripConditions_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripConditions_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::ScripConditions_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/ScripConditions_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::ScripConditions_Overlay, RT::ScripConditions_Vendor, RT::ScripConditions_Local
+
+=cut
+
+
+1;
diff --git a/rt/lib/RT/Scrips.pm b/rt/lib/RT/Scrips.pm
index 90be847d8..a39443136 100755
--- a/rt/lib/RT/Scrips.pm
+++ b/rt/lib/RT/Scrips.pm
@@ -1,127 +1,115 @@
-# Copyright 1999-2001 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Scrips.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Scrips - a collection of RT Scrip objects
+=head1 NAME
+ RT::Scrips -- Class Description
+
=head1 SYNOPSIS
- use RT::Scrips;
+ use RT::Scrips
=head1 DESCRIPTION
=head1 METHODS
+=cut
-=begin testing
+package RT::Scrips;
-ok (require RT::TestHarness);
-ok (require RT::Scrips);
+use RT::SearchBuilder;
+use RT::Scrip;
-=end testing
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-=cut
-package RT::Scrips;
-use RT::EasySearch;
-use RT::Scrip;
-@ISA= qw(RT::EasySearch);
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Scrips';
+ $self->{'primary_key'} = 'id';
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Scrips";
- $self->{'primary_key'} = "id";
- return ( $self->SUPER::_Init(@_));
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub LimitToQueue
-=head2 LimitToQueue
+=item NewItem
-Takes a queue id (numerical) as its only argument. Makes sure that
-Scopes it pulls out apply to this queue (or another that you've selected with
-another call to this method
+Returns an empty new RT::Scrip item
=cut
-sub LimitToQueue {
- my $self = shift;
- my $queue = shift;
-
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Queue',
- VALUE => "$queue")
- if defined $queue;
-
+sub NewItem {
+ my $self = shift;
+ return(RT::Scrip->new($self->CurrentUser));
}
-# }}}
-# {{{ sub LimitToGlobal
+ eval "require RT::Scrips_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrips_Overlay.pm}) {
+ die $@;
+ };
-=head2 LimitToGlobal
+ eval "require RT::Scrips_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrips_Vendor.pm}) {
+ die $@;
+ };
-Makes sure that
-Scopes it pulls out apply to all queues (or another that you've selected with
-another call to this method or LimitToQueue
+ eval "require RT::Scrips_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Scrips_Local.pm}) {
+ die $@;
+ };
-=cut
-sub LimitToGlobal {
- my $self = shift;
-
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Queue',
- VALUE => 0);
-
-}
-# }}}
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
-
- return(new RT::Scrip($self->CurrentUser));
-}
-# }}}
+=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.
-# {{{ sub Next
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-=head2 Next
+ no warnings qw(redefine);
-Returns the next scrip that this user can see.
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
+
+RT::Scrips_Overlay, RT::Scrips_Vendor, RT::Scrips_Local
=cut
-
-sub Next {
- my $self = shift;
-
-
- my $Scrip = $self->SUPER::Next();
- if ((defined($Scrip)) and (ref($Scrip))) {
-
- if ($Scrip->CurrentUserHasRight('ShowScrips')) {
- return($Scrip);
- }
-
- #If the user doesn't have the right to show this scrip
- else {
- return($self->Next());
- }
- }
- #if there never was any scrip
- else {
- return(undef);
- }
-
-}
-# }}}
-1;
+1;
diff --git a/rt/lib/RT/Template.pm b/rt/lib/RT/Template.pm
index 3ef96c7df..f73ea3ed6 100755
--- a/rt/lib/RT/Template.pm
+++ b/rt/lib/RT/Template.pm
@@ -1,395 +1,363 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Template.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 1996-2002 Jesse Vincent <jesse@bestpractical.com>
-# Portions Copyright 2000 Tobias Brox <tobix@cpan.org>
-# Released under the terms of the GNU General Public License
+# 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
+# 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::Template - RT's template object
+RT::Template
+
=head1 SYNOPSIS
- use RT::Template;
+=head1 DESCRIPTION
+=head1 METHODS
-=head1 DESCRIPTION
+=cut
+package RT::Template;
+use RT::Record;
+use RT::Queue;
-=head1 METHODS
-=begin testing
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+
+sub _Init {
+ my $self = shift;
+
+ $self->Table('Templates');
+ $self->SUPER::_Init(@_);
+}
+
+
+
+
+
+=item Create PARAMHASH
-ok(require RT::TestHarness);
-ok(require RT::Template);
+Create takes a hash of values and creates a row in the database:
-=end testing
+ int(11) 'Queue'.
+ varchar(200) 'Name'.
+ varchar(255) 'Description'.
+ varchar(16) 'Type'.
+ varchar(16) 'Language'.
+ int(11) 'TranslationOf'.
+ blob 'Content'.
=cut
-package RT::Template;
-use RT::Record;
-use MIME::Entity;
-use MIME::Parser;
-@ISA = qw(RT::Record);
-# {{{ sub _Init
-sub _Init {
+sub Create {
my $self = shift;
- $self->{'table'} = "Templates";
- return ( $self->SUPER::_Init(@_) );
+ my %args = (
+ Queue => '0',
+ Name => '',
+ Description => '',
+ Type => '',
+ Language => '',
+ TranslationOf => '0',
+ Content => '',
+
+ @_);
+ $self->SUPER::Create(
+ Queue => $args{'Queue'},
+ Name => $args{'Name'},
+ Description => $args{'Description'},
+ Type => $args{'Type'},
+ Language => $args{'Language'},
+ TranslationOf => $args{'TranslationOf'},
+ Content => $args{'Content'},
+);
+
}
-# }}}
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- id => 'read',
- Name => 'read/write',
- Description => 'read/write',
- Type => 'read/write', #Type is one of Action or Message
- Content => 'read/write',
- Queue => 'read/write',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
- );
- return $self->SUPER::_Accessible( @_, %Cols );
-}
+=item id
-# }}}
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
+=cut
- # use super::value or we get acl blocked
- if ( ( defined $self->SUPER::_Value('Queue') )
- && ( $self->SUPER::_Value('Queue') == 0 ) )
- {
- unless ( $self->CurrentUser->HasSystemRight('ModifyTemplate') ) {
- return ( 0, 'Permission Denied' );
- }
- }
- else {
-
- unless ( $self->CurrentUserHasQueueRight('ModifyTemplate') ) {
- return ( 0, 'Permission Denied' );
- }
- }
- return ( $self->SUPER::_Set(@_) );
-}
+=item Queue
+
+Returns the current value of Queue.
+(In the database, Queue is stored as int(11).)
-# }}}
-# {{{ sub _Value
-=head2 _Value
+=item SetQueue VALUE
+
+
+Set Queue to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Queue will be stored as a int(11).)
-Takes the name of a table column.
-Returns its value as a string, if the user passes an ACL check
=cut
-sub _Value {
- my $self = shift;
- my $field = shift;
+=item QueueObj
- #If the current user doesn't have ACLs, don't let em at it.
- #use super::value or we get acl blocked
- if ( ( !defined $self->__Value('Queue') )
- || ( $self->__Value('Queue') == 0 ) )
- {
- unless ( $self->CurrentUser->HasSystemRight('ShowTemplate') ) {
- return (undef);
- }
- }
- else {
- unless ( $self->CurrentUserHasQueueRight('ShowTemplate') ) {
- return (undef);
- }
- }
- return ( $self->__Value($field) );
+Returns the Queue Object which has the id returned by Queue
+
+=cut
+
+sub QueueObj {
+ my $self = shift;
+ my $Queue = RT::Queue->new($self->CurrentUser);
+ $Queue->Load($self->__Value('Queue'));
+ return($Queue);
}
-# }}}
+=item Name
+
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
+
+
-# {{{ sub Load
+=item SetName VALUE
-=head2 Load <identifer>
-Load a template, either by number or by name
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
+
=cut
-sub Load {
- my $self = shift;
- my $identifier = shift;
- if ( !$identifier ) {
- return (undef);
- }
+=item Description
+
+Returns the current value of Description.
+(In the database, Description is stored as varchar(255).)
- if ( $identifier !~ /\D/ ) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- $self->LoadByCol( 'Name', $identifier );
- }
-}
-# }}}
+=item SetDescription VALUE
-# {{{ sub LoadGlobalTemplate
-=head2 LoadGlobalTemplate NAME
+Set Description to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Description will be stored as a varchar(255).)
-Load the global tempalte with the name NAME
=cut
-sub LoadGlobalTemplate {
- my $self = shift;
- my $id = shift;
- return ( $self->LoadQueueTemplate( Queue => 0, Name => $id ) );
-}
+=item Type
-# }}}
+Returns the current value of Type.
+(In the database, Type is stored as varchar(16).)
-# {{{ sub LoadQueueTemplate
-=head2 LoadQueueTemplate (Queue => QUEUEID, Name => NAME)
-Loads the Queue template named NAME for Queue QUEUE.
+=item SetType VALUE
+
+
+Set Type to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Type will be stored as a varchar(16).)
+
=cut
-sub LoadQueueTemplate {
- my $self = shift;
- my %args = (
- Queue => undef,
- Name => undef
- );
- return ( $self->LoadByCols( Name => $args{'Name'}, Queue => {'Queue'} ) );
+=item Language
-}
+Returns the current value of Language.
+(In the database, Language is stored as varchar(16).)
-# }}}
-# {{{ sub Create
-=head2 Create
+=item SetLanguage VALUE
-Takes a paramhash of Content, Queue, Name and Description.
-Name should be a unique string identifying this Template.
-Description and Content should be the template's title and content.
-Queue should be 0 for a global template and the queue # for a queue-specific
-template.
-Returns the Template's id # if the create was successful. Returns undef for
-unknown database failure.
+Set Language to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Language will be stored as a varchar(16).)
=cut
-sub Create {
- my $self = shift;
- my %args = (
- Content => undef,
- Queue => 0,
- Description => '[no description]',
- Type => 'Action', #By default, template are 'Action' templates
- Name => undef,
- @_
- );
-
- if ( $args{'Queue'} == 0 ) {
- unless ( $self->CurrentUser->HasSystemRight('ModifyTemplate') ) {
- return (undef);
- }
- }
- else {
- my $QueueObj = new RT::Queue( $self->CurrentUser );
- $QueueObj->Load( $args{'Queue'} ) || return ( 0, 'Invalid queue' );
-
- unless ( $QueueObj->CurrentUserHasRight('ModifyTemplate') ) {
- return (undef);
- }
- }
-
- my $result = $self->SUPER::Create(
- Content => $args{'Content'},
- Queue => $args{'Queue'},
- ,
- Description => $args{'Description'},
- Name => $args{'Name'}
- );
-
- return ($result);
-}
+=item TranslationOf
+
+Returns the current value of TranslationOf.
+(In the database, TranslationOf is stored as int(11).)
+
+
-# }}}
+=item SetTranslationOf VALUE
-# {{{ sub Delete
-=head2 Delete
+Set TranslationOf to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TranslationOf will be stored as a int(11).)
-Delete this template.
=cut
-sub Delete {
- my $self = shift;
- unless ( $self->CurrentUserHasRight('ModifyTemplate') ) {
- return ( 0, 'Permission Denied' );
- }
+=item Content
- return ( $self->SUPER::Delete(@_) );
-}
+Returns the current value of Content.
+(In the database, Content is stored as blob.)
-# }}}
-# {{{ sub MIMEObj
-sub MIMEObj {
- my $self = shift;
- return ( $self->{'MIMEObj'} );
-}
-# }}}
+=item SetContent VALUE
-# {{{ sub Parse
-=item Parse
+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 blob.)
- This routine performs Text::Template parsing on thte template and then imports the
- results into a MIME::Entity so we can really use it
- It returns a tuple of (val, message)
- If val is 0, the message contains an error message
=cut
-sub Parse {
- my $self = shift;
- #We're passing in whatever we were passed. it's destined for _ParseContent
- my $content = $self->_ParseContent(@_);
+=item LastUpdated
- #Lets build our mime Entity
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
- my $parser = MIME::Parser->new();
-
- # Do work on the parsed template in memory, rather than on disk
- $parser->output_to_core(1);
- ### Should we forgive normally-fatal errors?
- $parser->ignore_errors(1);
- $self->{'MIMEObj'} = eval { $parser->parse_data($content) };
- $error = ( $@ || $parser->last_error );
+=cut
- if ($error) {
- $RT::Logger->error("$error");
- return ( 0, $error );
- }
- # Unfold all headers
- $self->{'MIMEObj'}->head->unfold();
+=item LastUpdatedBy
- return ( 1, "Template parsed" );
-
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
-}
-# }}}
+=cut
-# {{{ sub _ParseContent
-# Perform Template substitutions on the template
+=item Creator
-sub _ParseContent {
- my $self = shift;
- my %args = (
- Argument => undef,
- TicketObj => undef,
- TransactionObj => undef,
- @_
- );
-
- # Might be subject to change
- use Text::Template;
-
- $T::Ticket = $args{'TicketObj'};
- $T::Transaction = $args{'TransactionObj'};
- $T::Argument = $args{'Argument'};
- $T::rtname = $RT::rtname;
-
- # We need to untaint the content of the template, since we'll be working
- # with it
- my $content = $self->Content();
- $content =~ s/^(.*)$/$1/;
- $template = Text::Template->new(
- TYPE => STRING,
- SOURCE => $content
- );
-
- my $retval = $template->fill_in( PACKAGE => T );
- return ($retval);
-}
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
-# }}}
-# {{{ sub QueueObj
+=cut
-=head2 QueueObj
-Takes nothing. returns this ticket's queue object
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
=cut
-sub QueueObj {
- my $self = shift;
- if ( !defined $self->{'queue'} ) {
- require RT::Queue;
- $self->{'queue'} = RT::Queue->new( $self->CurrentUser );
-
- unless ( $self->{'queue'} ) {
- $RT::Logger->crit(
- "RT::Queue->new(" . $self->CurrentUser . ") returned false" );
- return (undef);
- }
- my ($result) = $self->{'queue'}->Load( $self->__Value('Queue') );
-
- }
- return ( $self->{'queue'} );
-}
-# }}}
-# {{{ sub CurrentUserHasQueueRight
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Queue =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Description =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ Type =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ Language =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ TranslationOf =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Content =>
+ {read => 1, write => 1, type => 'blob', default => ''},
+ LastUpdated =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+ LastUpdatedBy =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Creator =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Created =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+
+ }
+};
+
+
+ eval "require RT::Template_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Template_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Template_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Template_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Template_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Template_Local.pm}) {
+ die $@;
+ };
-=head2 CurrentUserHasQueueRight
-Helper function to call the template's queue's CurrentUserHasQueueRight with the passed in args.
+
+
+=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::Template_Overlay, RT::Template_Vendor, RT::Template_Local
=cut
-sub CurrentUserHasQueueRight {
- my $self = shift;
- return ( $self->QueueObj->CurrentUserHasRight(@_) );
-}
-# }}}
1;
diff --git a/rt/lib/RT/Templates.pm b/rt/lib/RT/Templates.pm
index b5b483c96..37db84086 100755
--- a/rt/lib/RT/Templates.pm
+++ b/rt/lib/RT/Templates.pm
@@ -1,122 +1,115 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Templates.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Templates - a collection of RT Template objects
+=head1 NAME
+ RT::Templates -- Class Description
+
=head1 SYNOPSIS
- use RT::Templates;
+ use RT::Templates
=head1 DESCRIPTION
=head1 METHODS
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Templates);
-
-=end testing
-
=cut
package RT::Templates;
-use RT::EasySearch;
-@ISA= qw(RT::EasySearch);
+use RT::SearchBuilder;
+use RT::Template;
-# {{{ sub _Init
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-=head2 _Init
-
- Returns RT::Templates specific init info like table and primary key names
-
-=cut
sub _Init {
-
my $self = shift;
- $self->{'table'} = "Templates";
- $self->{'primary_key'} = "id";
- return ($self->SUPER::_Init(@_));
+ $self->{'table'} = 'Templates';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ LimitToNotInQueue
-=head2 LimitToNotInQueue
+=item NewItem
-Takes a queue id # and limits the returned set of templates to those which
-aren't that queue's templates.
+Returns an empty new RT::Template item
=cut
-sub LimitToNotInQueue {
+sub NewItem {
my $self = shift;
- my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "$queue_id",
- OPERATOR => '!='
- );
+ return(RT::Template->new($self->CurrentUser));
}
-# }}}
-# {{{ LimitToGlobal
+ eval "require RT::Templates_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Templates_Overlay.pm}) {
+ die $@;
+ };
-=head2 LimitToGlobal
+ eval "require RT::Templates_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Templates_Vendor.pm}) {
+ die $@;
+ };
-Takes no arguments. Limits the returned set to "Global" templates
-which can be used with any queue.
+ eval "require RT::Templates_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Templates_Local.pm}) {
+ die $@;
+ };
-=cut
-sub LimitToGlobal {
- my $self = shift;
- my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "0",
- OPERATOR => '='
- );
-}
-# }}}
-# {{{ LimitToQueue
-=head2 LimitToQueue
+=head1 SEE ALSO
-Takes a queue id # and limits the returned set of templates to that queue's
-templates
+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.
-=cut
+These overlay files can contain new subs or subs to replace existing subs in this module.
-sub LimitToQueue {
- my $self = shift;
- my $queue_id = shift;
- $self->Limit(FIELD => 'Queue',
- VALUE => "$queue_id",
- OPERATOR => '='
- );
-}
-# }}}
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-# {{{ sub NewItem
+ no warnings qw(redefine);
-=head2 NewItem
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-Returns a new empty Template object
+RT::Templates_Overlay, RT::Templates_Vendor, RT::Templates_Local
=cut
-sub NewItem {
- my $self = shift;
-
- use RT::Template;
- my $item = new RT::Template($self->CurrentUser);
- return($item);
-}
-# }}}
1;
-
diff --git a/rt/lib/RT/TestHarness.pm b/rt/lib/RT/TestHarness.pm
deleted file mode 100644
index 160e9e636..000000000
--- a/rt/lib/RT/TestHarness.pm
+++ /dev/null
@@ -1,14 +0,0 @@
-use lib "/opt/rt2/etc/";
-
-use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser GetMessageContent);
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-LoadConfig();
-
-
-use RT;
-RT::Init;
diff --git a/rt/lib/RT/Ticket.pm b/rt/lib/RT/Ticket.pm
index f7275e4e3..2f075a20c 100755
--- a/rt/lib/RT/Ticket.pm
+++ b/rt/lib/RT/Ticket.pm
@@ -1,3004 +1,662 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Ticket.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2001 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
+# 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
+# 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 !!
#
-=head1 NAME
+use strict;
- RT::Ticket - RT ticket object
-=head1 SYNOPSIS
+=head1 NAME
- use RT::Ticket;
- my $ticket = new RT::Ticket($CurrentUser);
- $ticket->Load($ticket_id);
+RT::Ticket
-=head1 DESCRIPTION
-This module lets you manipulate RT\'s ticket object.
+=head1 SYNOPSIS
+=head1 DESCRIPTION
=head1 METHODS
=cut
-
-
package RT::Ticket;
+use RT::Record;
use RT::Queue;
-use RT::User;
-use RT::Record;
-use RT::Link;
-use RT::Links;
-use RT::Date;
-use RT::Watcher;
-
-
-@ISA= qw(RT::Record);
-
-=begin testing
-use RT::TestHarness;
-
-ok(require RT::Ticket, "Loading the RT::Ticket library");
-
-=end testing
-
-=cut
-
-# {{{ sub _Init
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
sub _Init {
- my $self = shift;
- $self->{'table'} = "Tickets";
- return ($self->SUPER::_Init(@_));
-}
-
-# }}}
-
-# {{{ sub Load
-
-=head2 Load
-
-Takes a single argument. This can be a ticket id, ticket alias or
-local ticket uri. If the ticket can't be loaded, returns undef.
-Otherwise, returns the ticket id.
-
-=cut
-
-sub Load {
- my $self = shift;
- my $id = shift;
-
- #TODO modify this routine to look at EffectiveId and do the recursive load
- # thing. be careful to cache all the interim tickets we try so we don't loop forever.
-
- #If it's a local URI, turn it into a ticket id
- if ($id =~ /^$RT::TicketBaseURI(\d+)$/) {
- $id = $1;
- }
- #If it's a remote URI, we're going to punt for now
- elsif ($id =~ '://' ) {
- return (undef);
- }
-
- #If we have an integer URI, load the ticket
- if ( $id =~ /^\d+$/ ) {
- my $ticketid = $self->LoadById($id);
-
- unless ($ticketid) {
- $RT::Logger->debug("$self tried to load a bogus ticket: $id\n");
- return(undef);
- }
- }
-
- #It's not a URI. It's not a numerical ticket ID. Punt!
- else {
- return(undef);
- }
-
- #If we're merged, resolve the merge.
- if (($self->EffectiveId) and
- ($self->EffectiveId != $self->Id)) {
- return ($self->Load($self->EffectiveId));
- }
-
- #Ok. we're loaded. lets get outa here.
- return ($self->Id);
-
-}
-
-# }}}
+ my $self = shift;
-# {{{ sub LoadByURI
-
-=head2 LoadByURI
-
-Given a local ticket URI, loads the specified ticket.
-
-=cut
-
-sub LoadByURI {
- my $self = shift;
- my $uri = shift;
-
- if ($uri =~ /^$RT::TicketBaseURI(\d+)$/) {
- my $id = $1;
- return ($self->Load($id));
- }
- else {
- return(undef);
- }
+ $self->Table('Tickets');
+ $self->SUPER::_Init(@_);
}
-# }}}
-
-# {{{ sub Create
-
-=head2 Create (ARGS)
-
-Arguments: ARGS is a hash of named parameters. Valid parameters are:
-
- Queue - Either a Queue object or a Queue Name
- Requestor - A reference to a list of RT::User objects, email addresses or RT user Names
- Cc - A reference to a list of RT::User objects, email addresses or Names
- AdminCc - A reference to a list of RT::User objects, email addresses or Names
- Type -- The ticket\'s type. ignore this for now
- Owner -- This ticket\'s owner. either an RT::User object or this user\'s id
- Subject -- A string describing the subject of the ticket
- InitialPriority -- an integer from 0 to 99
- FinalPriority -- an integer from 0 to 99
- Status -- any valid status (Defined in RT::Queue)
- TimeWorked -- an integer
- TimeLeft -- an integer
- Starts -- an ISO date describing the ticket\'s start date and time in GMT
- Due -- an ISO date describing the ticket\'s due date and time in GMT
- MIMEObj -- a MIME::Entity object with the content of the initial ticket request.
-
- KeywordSelect-<id> -- an array of keyword ids for that keyword select
-
-
-Returns: TICKETID, Transaction Object, Error Message
-
-
-=begin testing
-
-my $t = RT::Ticket->new($RT::SystemUser);
-
-ok( $t->Create(Queue => 'General', Subject => 'This is a subject'), "Ticket Created");
-
-ok ( my $id = $t->Id, "Got ticket id");
-
-=end testing
-
-=cut
-
-sub Create {
- my $self = shift;
-
- my %args = (
- Queue => undef,
- Requestor => undef,
- Cc => undef,
- AdminCc => undef,
- Type => 'ticket',
- Owner => $RT::Nobody->UserObj,
- Subject => '[no subject]',
- InitialPriority => undef,
- FinalPriority => undef,
- Status => 'new',
- TimeWorked => "0",
- TimeLeft => 0,
- Due => undef,
- Starts => undef,
- MIMEObj => undef,
- @_);
-
- my ($ErrStr, $QueueObj, $Owner, $resolved);
- my (@non_fatal_errors);
-
- my $now = RT::Date->new($self->CurrentUser);
- $now->SetToNow();
-
- if ( (defined($args{'Queue'})) && (!ref($args{'Queue'})) ) {
- $QueueObj=RT::Queue->new($RT::SystemUser);
- $QueueObj->Load($args{'Queue'});
- }
- elsif (ref($args{'Queue'}) eq 'RT::Queue') {
- $QueueObj=RT::Queue->new($RT::SystemUser);
- $QueueObj->Load($args{'Queue'}->Id);
- }
- else {
- $RT::Logger->debug("$self ". $args{'Queue'} .
- " not a recognised queue object.");
- }
-
- #Can't create a ticket without a queue.
- unless (defined ($QueueObj)) {
- $RT::Logger->debug( "$self No queue given for ticket creation.");
- return (0, 0,'Could not create ticket. Queue not set');
- }
-
- #Now that we have a queue, Check the ACLS
- unless ($self->CurrentUser->HasQueueRight(Right => 'CreateTicket',
- QueueObj => $QueueObj )) {
- return (0,0,"No permission to create tickets in the queue '".
- $QueueObj->Name."'.");
- }
-
- #Since we have a queue, we can set queue defaults
- #Initial Priority
-
- # If there's no queue default initial priority and it's not set, set it to 0
- $args{'InitialPriority'} = ($QueueObj->InitialPriority || 0)
- unless (defined $args{'InitialPriority'});
-
- #Final priority
-
- # If there's no queue default final priority and it's not set, set it to 0
- $args{'FinalPriority'} = ($QueueObj->FinalPriority || 0)
- unless (defined $args{'FinalPriority'});
-
-
- #TODO we should see what sort of due date we're getting, rather +
- # than assuming it's in ISO format.
-
- #Set the due date. if we didn't get fed one, use the queue default due in
- my $due = new RT::Date($self->CurrentUser);
- if (defined $args{'Due'}) {
- $due->Set (Format => 'ISO',
- Value => $args{'Due'});
- }
- elsif (defined ($QueueObj->DefaultDueIn)) {
- $due->SetToNow;
- $due->AddDays($QueueObj->DefaultDueIn);
- }
-
- my $starts = new RT::Date($self->CurrentUser);
- if (defined $args{'Starts'}) {
- $starts->Set (Format => 'ISO',
- Value => $args{'Starts'});
- }
-
-
- # {{{ Deal with setting the owner
-
- if (ref($args{'Owner'}) eq 'RT::User') {
- $Owner = $args{'Owner'};
- }
- #If we've been handed something else, try to load the user.
- elsif ($args{'Owner'}) {
- $Owner = new RT::User($self->CurrentUser);
- $Owner->Load($args{'Owner'});
-
- }
- #If we can't handle it, call it nobody
- else {
- if (ref($args{'Owner'})) {
- $RT::Logger->warning("$ticket ->Create called with an Owner of ".
- "type ".ref($args{'Owner'}) .". Defaulting to nobody.\n");
-
- push @non_fatal_errors, "Invalid owner. Defaulting to 'nobody'.";
- }
- else {
- $RT::Logger->warning("$self ->Create called with an ".
- "unknown datatype for Owner: ".$args{'Owner'} .
- ". Defaulting to Nobody.\n");
- }
- }
-
- #If we have a proposed owner and they don't have the right
- #to own a ticket, scream about it and make them not the owner
- if ((defined ($Owner)) and
- ($Owner->Id != $RT::Nobody->Id) and
- (!$Owner->HasQueueRight( QueueObj => $QueueObj,
- Right => 'OwnTicket'))) {
-
- $RT::Logger->warning("$self user ".$Owner->Name . "(".$Owner->id .
- ") was proposed ".
- "as a ticket owner but has no rights to own ".
- "tickets in this queue\n");
-
- push @non_fatal_errors, "Invalid owner. Defaulting to 'nobody'.";
-
- $Owner = undef;
- }
-
- #If we haven't been handed a valid owner, make it nobody.
- unless (defined ($Owner)) {
- $Owner = new RT::User($self->CurrentUser);
- $Owner->Load($RT::Nobody->UserObj->Id);
- }
-
- # }}}
-
- unless ($self->ValidateStatus($args{'Status'})) {
- return (0,0,'Invalid value for status');
- }
-
- if ($args{'Status'} eq 'resolved') {
- $resolved = $now->ISO;
- } else{
- $resolved = undef;
- }
-
- my $id = $self->SUPER::Create(
- Queue => $QueueObj->Id,
- Owner => $Owner->Id,
- Subject => $args{'Subject'},
- InitialPriority => $args{'InitialPriority'},
- FinalPriority => $args{'FinalPriority'},
- Priority => $args{'InitialPriority'},
- Status => $args{'Status'},
- TimeWorked => $args{'TimeWorked'},
- TimeLeft => $args{'TimeLeft'},
- Type => $args{'Type'},
- Starts => $starts->ISO,
- Resolved => $resolved,
- Due => $due->ISO
- );
- #Set the ticket's effective ID now that we've created it.
- my ($val, $msg) = $self->__Set(Field => 'EffectiveId', Value => $id);
-
- unless ($val) {
- $RT::Logger->err("$self ->Create couldn't set EffectiveId: $msg\n");
- }
-
-
- my $watcher;
- foreach $watcher (@{$args{'Cc'}}) {
- my ($wval, $wmsg) =
- $self->_AddWatcher( Type => 'Cc', Person => $watcher, Silent => 1);
- push @non_fatal_errors, $wmsg unless ($wval);
- }
-
- foreach $watcher (@{$args{'Requestor'}}) {
- my ($wval, $wmsg) =
- $self->_AddWatcher( Type => 'Requestor', Person => $watcher, Silent => 1);
- push @non_fatal_errors, $wmsg unless ($wval);
- }
-
- foreach $watcher (@{$args{'AdminCc'}}) {
- # Note that we're using AddWatcher, rather than _AddWatcher, as we
- # actually _want_ that ACL check. Otherwise, random ticket creators
- # could make themselves adminccs and maybe get ticket rights. that would
- # be poor
- my ($wval, $wmsg) =
- $self->AddWatcher( Type => 'AdminCc', Person => $watcher, Silent => 1);
- push @non_fatal_errors, $wmsg unless ($wval);
- }
-
- # Iterate through all the KeywordSelect-<int> params passed in, calling _AddKeyword
- # for each of them
-
-
- foreach my $key (keys %args) {
-
- next unless ($key =~ /^KeywordSelect-(.*)$/);
-
- my $ks = $1;
-
-
- my @keywords = ref($args{$key}) eq 'ARRAY' ?
- @{$args{$key}} : ($args{$key});
-
- foreach my $keyword (@keywords) {
- my ($kval, $kmsg) = $self->_AddKeyword(KeywordSelect => $ks,
- Keyword => $keyword,
- Silent => 1);
- }
- push @non_fatal_errors, $kmsg unless ($kval);
- }
-
-
-
- #Add a transaction for the create
- my ($Trans, $Msg, $TransObj) =
- $self->_NewTransaction( Type => "Create",
- TimeTaken => 0,
- MIMEObj=>$args{'MIMEObj'});
-
- # Logging
- if ($self->Id && $Trans) {
- $ErrStr = "Ticket ".$self->Id . " created in queue '". $QueueObj->Name.
- "'.\n" . join("\n", @non_fatal_errors);
-
- $RT::Logger->info($ErrStr);
- }
- else {
- # TODO where does this get errstr from?
- $RT::Logger->warning("Ticket couldn't be created: $ErrStr");
- }
-
- return($self->Id, $TransObj->Id, $ErrStr);
-}
-# }}}
-# {{{ sub Import
-=head2 Import PARAMHASH
-Import a ticket.
-Doesn\'t create a transaction.
-Doesn\'t supply queue defaults, etc.
+=item Create PARAMHASH
-Arguments are identical to Create(), with the addition of
- Id - Ticket Id
+Create takes a hash of values and creates a row in the database:
-Returns: TICKETID
+ int(11) 'EffectiveId'.
+ int(11) 'Queue'.
+ varchar(16) 'Type'.
+ int(11) 'IssueStatement'.
+ int(11) 'Resolution'.
+ int(11) 'Owner'.
+ varchar(200) 'Subject' defaults to '[no subject]'.
+ int(11) 'InitialPriority'.
+ int(11) 'FinalPriority'.
+ int(11) 'Priority'.
+ int(11) 'TimeEstimated'.
+ int(11) 'TimeWorked'.
+ varchar(10) 'Status'.
+ int(11) 'TimeLeft'.
+ datetime 'Told'.
+ datetime 'Starts'.
+ datetime 'Started'.
+ datetime 'Due'.
+ datetime 'Resolved'.
+ smallint(6) 'Disabled'.
=cut
-sub Import {
- my $self = shift;
- my ( $ErrStr, $QueueObj, $Owner);
-
- my %args = (id => undef,
- EffectiveId => undef,
- Queue => undef,
- Requestor => undef,
- Type => 'ticket',
- Owner => $RT::Nobody->Id,
- Subject => '[no subject]',
- InitialPriority => undef,
- FinalPriority => undef,
- Status => 'new',
- TimeWorked => "0",
- Due => undef,
- Created => undef,
- Updated => undef,
- Resolved => undef,
- Told => undef,
- @_);
-
- if ( (defined($args{'Queue'})) && (!ref($args{'Queue'})) ) {
- $QueueObj=RT::Queue->new($RT::SystemUser);
- $QueueObj->Load($args{'Queue'});
- #TODO error check this and return 0 if it\'s not loading properly +++
- }
- elsif (ref($args{'Queue'}) eq 'RT::Queue') {
- $QueueObj=RT::Queue->new($RT::SystemUser);
- $QueueObj->Load($args{'Queue'}->Id);
- }
- else {
- $RT::Logger->debug("$self ". $args{'Queue'} .
- " not a recognised queue object.");
- }
-
- #Can't create a ticket without a queue.
- unless (defined ($QueueObj) and $QueueObj->Id) {
- $RT::Logger->debug( "$self No queue given for ticket creation.");
- return (0,'Could not create ticket. Queue not set');
- }
-
- #Now that we have a queue, Check the ACLS
- unless ($self->CurrentUser->HasQueueRight(Right => 'CreateTicket',
- QueueObj => $QueueObj )) {
- return (0,"No permission to create tickets in the queue '".
- $QueueObj->Name."'.");
- }
-
-
-
-
- # {{{ Deal with setting the owner
-
- # Attempt to take user object, user name or user id.
- # Assign to nobody if lookup fails.
- if (defined ($args{'Owner'})) {
- if ( ref($args{'Owner'}) ) {
- $Owner = $args{'Owner'};
- }
- else {
- $Owner = new RT::User($self->CurrentUser);
- $Owner->Load($args{'Owner'});
- if ( ! defined($Owner->id) ) {
- $Owner->Load($RT::Nobody->id);
- }
- }
- }
-
-
- #If we have a proposed owner and they don't have the right
- #to own a ticket, scream about it and make them not the owner
- if ((defined ($Owner)) and
- ($Owner->Id != $RT::Nobody->Id) and
- (!$Owner->HasQueueRight( QueueObj => $QueueObj,
- Right => 'OwnTicket'))) {
-
- $RT::Logger->warning("$self user ".$Owner->Name . "(".$Owner->id .
- ") was proposed ".
- "as a ticket owner but has no rights to own ".
- "tickets in '".$QueueObj->Name."'\n");
-
- $Owner = undef;
- }
-
- #If we haven't been handed a valid owner, make it nobody.
- unless (defined ($Owner)) {
- $Owner = new RT::User($self->CurrentUser);
- $Owner->Load($RT::Nobody->UserObj->Id);
- }
-
- # }}}
-
- unless ($self->ValidateStatus($args{'Status'})) {
- return (0,"'$args{'Status'}' is an invalid value for status");
- }
-
- $self->{'_AccessibleCache'}{Created} = { 'read'=>1, 'write'=>1 };
- $self->{'_AccessibleCache'}{Creator} = { 'read'=>1, 'auto'=>1 };
- $self->{'_AccessibleCache'}{LastUpdated} = { 'read'=>1, 'write'=>1 };
- $self->{'_AccessibleCache'}{LastUpdatedBy} = { 'read'=>1, 'auto'=>1 };
-
-
- # If we're coming in with an id, set that now.
- my $EffectiveId = undef;
- if ($args{'id'}) {
- $EffectiveId = $args{'id'};
-
- }
-
-
- my $id = $self->SUPER::Create(
- id => $args{'id'},
- EffectiveId => $EffectiveId,
- Queue => $QueueObj->Id,
- Owner => $Owner->Id,
- Subject => $args{'Subject'},
- InitialPriority => $args{'InitialPriority'},
- FinalPriority => $args{'FinalPriority'},
- Priority => $args{'InitialPriority'},
- Status => $args{'Status'},
- TimeWorked => $args{'TimeWorked'},
- Type => $args{'Type'},
- Created => $args{'Created'},
- Told => $args{'Told'},
- LastUpdated => $args{'Updated'},
- Resolved => $args{Resolved},
- Due => $args{'Due'},
- );
-
-
-
- # If the ticket didn't have an id
- # Set the ticket's effective ID now that we've created it.
- if ($args{'id'} ) {
- $self->Load($args{'id'});
- }
- else {
- my ($val, $msg) = $self->__Set(Field => 'EffectiveId', Value => $id);
-
- unless ($val) {
- $RT::Logger->err($self."->Import couldn't set EffectiveId: $msg\n");
- }
- }
-
- my $watcher;
- foreach $watcher (@{$args{'Cc'}}) {
- $self->_AddWatcher( Type => 'Cc', Person => $watcher, Silent => 1);
- }
- foreach $watcher (@{$args{'AdminCc'}}) {
- $self->_AddWatcher( Type => 'AdminCc', Person => $watcher, Silent => 1);
- }
- foreach $watcher (@{$args{'Requestor'}}) {
- $self->_AddWatcher( Type => 'Requestor', Person => $watcher, Silent => 1);
- }
-
- return($self->Id, $ErrStr);
-}
-
-# }}}
-
-# {{{ sub Delete
-
-sub Delete {
- my $self = shift;
- return (0, 'Deleting this object would violate referential integrity.'.
- ' That\'s bad.');
-}
-# }}}
-
-# {{{ Routines dealing with watchers.
-
-# {{{ Routines dealing with adding new watchers
-
-# {{{ sub AddWatcher
-
-=head2 AddWatcher
-
-AddWatcher takes a parameter hash. The keys are as follows:
-
-Email
-Type
-Owner
-
-If the watcher you\'re trying to set has an RT account, set the Owner paremeter to their User Id. Otherwise, set the Email parameter to their Email address.
-
-=cut
-
-sub AddWatcher {
- my $self = shift;
- my %args = ( Email => undef,
- Type => undef,
- Owner => undef,
- @_
- );
-
- # {{{ Check ACLS
- #If the watcher we're trying to add is for the current user
- if ( ( $self->CurrentUser->EmailAddress &&
- ($args{'Email'} eq $self->CurrentUser->EmailAddress) ) or
- ($args{'Owner'} eq $self->CurrentUser->Id)
- ) {
-
-
- # If it's an AdminCc and they don't have
- # 'WatchAsAdminCc' or 'ModifyTicket', bail
- if ($args{'Type'} eq 'AdminCc') {
- unless ($self->CurrentUserHasRight('ModifyTicket') or
- $self->CurrentUserHasRight('WatchAsAdminCc')) {
- return(0, 'Permission Denied');
- }
- }
-
- # 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, 'Permission Denied');
- }
- }
- else {
- $RT::Logger->warn("$self -> AddWatcher hit code".
- " it never should. We got passed ".
- " a type of ". $args{'Type'});
- return (0,'Error in parameters to TicketAddWatcher');
- }
- }
- # If the watcher isn't the current user
- # and the current user doesn't have 'ModifyTicket'
- # bail
- else {
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
- }
- # }}}
-
- return ($self->_AddWatcher(%args));
-}
-
-
-#This contains the meat of AddWatcher. but can be called from a routine like
-# Create, which doesn't need the additional acl check
-sub _AddWatcher {
- my $self = shift;
- my %args = (
- Type => undef,
- Silent => undef,
- Email => undef,
- Owner => 0,
- Person => undef,
- @_ );
-
-
-
- #clear the watchers cache
- $self->{'watchers_cache'} = undef;
-
- if (defined $args{'Person'}) {
- #if it's an RT::User object, pull out the id and shove it in Owner
- if (ref ($args{'Person'}) =~ /RT::User/) {
- $args{'Owner'} = $args{'Person'}->id;
- }
- #if it's an int, shove it in Owner
- elsif ($args{'Person'} =~ /^\d+$/) {
- $args{'Owner'} = $args{'Person'};
- }
- #if it's an email address, shove it in Email
- else {
- $args{'Email'} = $args{'Person'};
- }
- }
-
- # Turn an email address int a watcher if we possibly can.
- if ($args{'Email'}) {
- my $watcher = new RT::User($self->CurrentUser);
- $watcher->LoadByEmail($args{'Email'});
- if ($watcher->Id) {
- $args{'Owner'} = $watcher->Id;
- delete $args{'Email'};
- }
- }
-
-
- # see if this user is already a watcher. if we have an owner, check it
- # otherwise, we've got an email-address watcher. use that.
-
- if ($self->IsWatcher(Type => $args{'Type'},
- Id => ($args{'Owner'} || $args{'Email'}) ) ) {
-
-
- return(0, 'That user is already that sort of watcher for this ticket');
- }
-
-
- require RT::Watcher;
- my $Watcher = new RT::Watcher ($self->CurrentUser);
- my ($retval, $msg) = ($Watcher->Create( Value => $self->Id,
- Scope => 'Ticket',
- Email => $args{'Email'},
- Type => $args{'Type'},
- Owner => $args{'Owner'},
- ));
-
- unless ($args{'Silent'}) {
- $self->_NewTransaction( Type => 'AddWatcher',
- NewValue => $Watcher->Email,
- Field => $Watcher->Type);
- }
-
- return ($retval, $msg);
-}
-
-# }}}
-
-# {{{ sub AddRequestor
-
-=head2 AddRequestor
-
-AddRequestor takes what AddWatcher does, except it presets
-the "Type" parameter to \'Requestor\'
-
-=cut
-
-sub AddRequestor {
- my $self = shift;
- return ($self->AddWatcher ( Type => 'Requestor', @_));
-}
-
-# }}}
-
-# {{{ sub AddCc
-
-=head2 AddCc
-
-AddCc takes what AddWatcher does, except it presets
-the "Type" parameter to \'Cc\'
-
-=cut
-
-sub AddCc {
- my $self = shift;
- return ($self->AddWatcher ( Type => 'Cc', @_));
-}
-# }}}
-
-# {{{ sub AddAdminCc
-
-=head2 AddAdminCc
-
-AddAdminCc takes what AddWatcher does, except it presets
-the "Type" parameter to \'AdminCc\'
-
-=cut
-
-sub AddAdminCc {
- my $self = shift;
- return ($self->AddWatcher ( Type => 'AdminCc', @_));
-}
-
-# }}}
-
-# }}}
-
-# {{{ sub DeleteWatcher
-
-=head2 DeleteWatcher id [type]
-
-DeleteWatcher takes a single argument which is either an email address
-or a watcher id.
-If the first argument is an email address, you need to specify the watcher type you're talking
-about as the second argument. Valid values are 'Requestor', 'Cc' or 'AdminCc'.
-It removes that watcher from this Ticket\'s list of watchers.
-
-
-=cut
-#TODO It is lame that you can't call this the same way you can call AddWatcher
-sub DeleteWatcher {
+sub Create {
my $self = shift;
- my $id = shift;
-
- my $type;
-
- $type = shift if (@_);
-
- my $Watcher = new RT::Watcher($self->CurrentUser);
-
- #If it\'s a numeric watcherid
- if ($id =~ /^(\d*)$/) {
- $Watcher->Load($id);
- }
-
- #Otherwise, we'll assume it's an email address
- elsif ($type) {
- my ($result, $msg) =
- $Watcher->LoadByValue( Email => $id,
- Scope => 'Ticket',
- Value => $self->id,
- Type => $type);
- return (0,$msg) unless ($result);
- }
-
- else {
- return(0,"Can\'t delete a watcher by email address without specifying a type");
- }
-
- # {{{ Check ACLS
-
- #If the watcher we're trying to delete is for the current user
- if ($Watcher->Email eq $self->CurrentUser->EmailAddress) {
-
- # If it's an AdminCc and they don't have
- # 'WatchAsAdminCc' or 'ModifyTicket', bail
- if ($Watcher->Type eq 'AdminCc') {
- unless ($self->CurrentUserHasRight('ModifyTicket') or
- $self->CurrentUserHasRight('WatchAsAdminCc')) {
- return(0, 'Permission Denied');
- }
- }
-
- # If it's a Requestor or Cc and they don't have
- # 'Watch' or 'ModifyTicket', bail
- elsif (($Watcher->Type eq 'Cc') or
- ($Watcher->Type eq 'Requestor')) {
-
- unless ($self->CurrentUserHasRight('ModifyTicket') or
- $self->CurrentUserHasRight('Watch')) {
- return(0, 'Permission Denied');
- }
- }
- else {
- $RT::Logger->warn("$self -> DeleteWatcher hit code".
- " it never should. We got passed ".
- " a type of ". $args{'Type'});
- return (0,'Error in parameters to $self DeleteWatcher');
- }
- }
- # If the watcher isn't the current user
- # and the current user doesn't have 'ModifyTicket'
- # bail
- else {
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
- }
-
- # }}}
-
- unless (($Watcher->Scope eq 'Ticket') and
- ($Watcher->Value == $self->id) ) {
- return (0, "Not a watcher for this ticket");
- }
-
-
- #Clear out the watchers hash.
- $self->{'watchers'} = undef;
-
- #If we\'ve validated that it is a watcher for this ticket
- $self->_NewTransaction ( Type => 'DelWatcher',
- OldValue => $Watcher->Email,
- Field => $Watcher->Type,
- );
-
- my $retval = $Watcher->Delete();
-
- unless ($retval) {
- return(0,"Watcher could not be deleted. Database inconsistency possible.");
- }
-
- return(1, "Watcher deleted");
-}
-
-# {{{ sub DeleteRequestor
-
-=head2 DeleteRequestor EMAIL
+ my %args = (
+ EffectiveId => '0',
+ Queue => '0',
+ Type => '',
+ IssueStatement => '0',
+ Resolution => '0',
+ Owner => '0',
+ Subject => '[no subject]',
+ InitialPriority => '0',
+ FinalPriority => '0',
+ Priority => '0',
+ TimeEstimated => '0',
+ TimeWorked => '0',
+ Status => '',
+ TimeLeft => '0',
+ Told => '',
+ Starts => '',
+ Started => '',
+ Due => '',
+ Resolved => '',
+ Disabled => '0',
-Takes an email address. It calls DeleteWatcher with a preset
-type of 'Requestor'
-
-
-=cut
+ @_);
+ $self->SUPER::Create(
+ EffectiveId => $args{'EffectiveId'},
+ Queue => $args{'Queue'},
+ Type => $args{'Type'},
+ IssueStatement => $args{'IssueStatement'},
+ Resolution => $args{'Resolution'},
+ Owner => $args{'Owner'},
+ Subject => $args{'Subject'},
+ InitialPriority => $args{'InitialPriority'},
+ FinalPriority => $args{'FinalPriority'},
+ Priority => $args{'Priority'},
+ TimeEstimated => $args{'TimeEstimated'},
+ TimeWorked => $args{'TimeWorked'},
+ Status => $args{'Status'},
+ TimeLeft => $args{'TimeLeft'},
+ Told => $args{'Told'},
+ Starts => $args{'Starts'},
+ Started => $args{'Started'},
+ Due => $args{'Due'},
+ Resolved => $args{'Resolved'},
+ Disabled => $args{'Disabled'},
+);
-sub DeleteRequestor {
- my $self = shift;
- my $id = shift;
- return ($self->DeleteWatcher ($id, 'Requestor'))
}
-# }}}
-
-# {{{ sub DeleteCc
-
-=head2 DeleteCc EMAIL
-
-Takes an email address. It calls DeleteWatcher with a preset
-type of 'Cc'
-
-
-=cut
-
-sub DeleteCc {
- my $self = shift;
- my $id = shift;
- return ($self->DeleteWatcher ($id, 'Cc'))
-}
-
-# }}}
-
-# {{{ sub DeleteAdminCc
-
-=head2 DeleteAdminCc EMAIL
-
-Takes an email address. It calls DeleteWatcher with a preset
-type of 'AdminCc'
-
-
-=cut
-
-sub DeleteAdminCc {
- my $self = shift;
- my $id = shift;
- return ($self->DeleteWatcher ($id, 'AdminCc'))
-}
-
-# }}}
-
-
-# }}}
-# {{{ sub Watchers
-=head2 Watchers
+=item id
-Watchers returns a Watchers object preloaded with this ticket\'s watchers.
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-# It should return only the ticket watchers. the actual FooAsString
-# methods capture the queue watchers too. I don't feel thrilled about this,
-# but we don't want the Cc Requestors and AdminCc objects to get filled up
-# with all the queue watchers too. we've got seperate objects for that.
- # should we rename these as s/(.*)AsString/$1Addresses/ or somesuch?
=cut
-sub Watchers {
- my $self = shift;
-
- require RT::Watchers;
- my $watchers=RT::Watchers->new($self->CurrentUser);
- if ($self->CurrentUserHasRight('ShowTicket')) {
- $watchers->LimitToTicket($self->id);
- }
-
- return($watchers);
-
-}
-
-# }}}
-# {{{ a set of [foo]AsString subs that will return the various sorts of watchers for a ticket/queue as a comma delineated string
+=item EffectiveId
-=head2 RequestorsAsString
+Returns the current value of EffectiveId.
+(In the database, EffectiveId is stored as int(11).)
- B<Returns> String: All Ticket Requestor email addresses as a string.
-=cut
-sub RequestorsAsString {
- my $self=shift;
+=item SetEffectiveId VALUE
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return undef;
- }
-
- return ($self->Requestors->EmailsAsString() );
-}
-=head2 WatchersAsString
+Set EffectiveId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, EffectiveId will be stored as a int(11).)
-B<Returns> String: All Ticket Watchers email addresses as a string
=cut
-sub WatchersAsString {
- my $self=shift;
-
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (0, "Permission Denied");
- }
-
- return ($self->Watchers->EmailsAsString());
-
-}
-=head2 AdminCcAsString
+=item Queue
-returns String: All Ticket AdminCc email addresses as a string
+Returns the current value of Queue.
+(In the database, Queue is stored as int(11).)
-=cut
-sub AdminCcAsString {
- my $self=shift;
+=item SetQueue VALUE
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return undef;
- }
-
- return ($self->AdminCc->EmailsAsString());
-
-}
-=head2 CcAsString
+Set Queue to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Queue will be stored as a int(11).)
-returns String: All Ticket Ccs as a string of email addresses
=cut
-sub CcAsString {
- my $self=shift;
-
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return undef;
- }
-
- return ($self->Cc->EmailsAsString());
-
-}
-
-# }}}
-
-# {{{ Routines that return RT::Watchers objects of Requestors, Ccs and AdminCcs
-# {{{ sub Requestors
+=item QueueObj
-=head2 Requestors
+Returns the Queue Object which has the id returned by Queue
-Takes nothing.
-Returns this ticket's Requestors as an RT::Watchers object
-
-=cut
-
-sub Requestors {
- my $self = shift;
-
- my $requestors = $self->Watchers();
- if ($self->CurrentUserHasRight('ShowTicket')) {
- $requestors->LimitToRequestors();
- }
-
- return($requestors);
-
-}
-
-# }}}
-
-# {{{ sub Cc
-
-=head2 Cc
-
-Takes nothing.
-Returns a watchers object which contains this ticket's Cc watchers
-
-=cut
-
-sub Cc {
- my $self = shift;
-
- my $cc = $self->Watchers();
-
- if ($self->CurrentUserHasRight('ShowTicket')) {
- $cc->LimitToCc();
- }
-
- return($cc);
-
-}
-
-# }}}
-
-# {{{ sub AdminCc
-
-=head2 AdminCc
-
-Takes nothing.
-Returns this ticket\'s administrative Ccs as an RT::Watchers object
-
-=cut
-
-sub AdminCc {
- my $self = shift;
-
- my $admincc = $self->Watchers();
- if ($self->CurrentUserHasRight('ShowTicket')) {
- $admincc->LimitToAdminCc();
- }
- return($admincc);
-}
-
-# }}}
-
-# }}}
-
-# {{{ IsWatcher,IsRequestor,IsCc, IsAdminCc
-
-# {{{ sub IsWatcher
-# a generic routine to be called by IsRequestor, IsCc and IsAdminCc
-
-=head2 IsWatcher
-
-Takes a param hash with the attributes Type and User. User is either a user object or string containing an email address. Returns true if that user or string
-is a ticket watcher. Returns undef otherwise
-
-=cut
-
-sub IsWatcher {
- my $self = shift;
-
- my %args = ( Type => 'Requestor',
- Email => undef,
- Id => undef,
- @_
- );
-
- my %cols = ('Type' => $args{'Type'},
- 'Scope' => 'Ticket',
- 'Value' => $self->Id,
- 'Owner' => undef,
- 'Email' => undef
- );
-
- if (ref($args{'Id'})){
- #If it's a ref, it's an RT::User object;
- $cols{'Owner'} = $args{'Id'}->Id;
- }
- elsif ($args{'Id'} =~ /^\d+$/) {
- # if it's an integer, it's a reference to an RT::User obj
- $cols{'Owner'} = $args{'Id'};
- }
- else {
- $cols{'Email'} = $args{'Id'};
- }
-
- if ($args{'Email'}) {
- $cols{'Email'} = $args{'Email'};
- }
-
- my $description = join(":",%cols);
-
- #If we've cached a positive match...
- if (defined $self->{'watchers_cache'}->{"$description"}) {
- if ($self->{'watchers_cache'}->{"$description"} == 1) {
- return(1);
- }
- else { #If we've cached a negative match...
- return(undef);
- }
- }
-
-
- my $watcher = new RT::Watcher($self->CurrentUser);
- $watcher->LoadByCols(%cols);
-
-
- if ($watcher->id) {
- $self->{'watchers_cache'}->{"$description"} = 1;
- return(1);
- }
- else {
- $self->{'watchers_cache'}->{"$description"} = 0;
- return(undef);
- }
-
-}
-# }}}
-
-# {{{ sub IsRequestor
-
-=head2 IsRequestor
-
- Takes an email address, RT::User object or integer (RT user id)
- Returns true if the string is a requestor of the current ticket.
-
-
-=cut
-
-sub IsRequestor {
- my $self = shift;
- my $person = shift;
-
- return ($self->IsWatcher(Type => 'Requestor', Id => $person));
-
-};
-
-# }}}
-
-# {{{ sub IsCc
-
-=head2 IsCc
-
-Takes a string. Returns true if the string is a Cc watcher of the current ticket.
-
-=cut
-
-sub IsCc {
- my $self = shift;
- my $cc = shift;
-
- return ($self->IsWatcher( Type => 'Cc', Id => $cc ));
-
-}
-
-# }}}
-
-# {{{ sub IsAdminCc
-
-=head2 IsAdminCc
-
-Takes a string. Returns true if the string is an AdminCc watcher of the current ticket.
-
-=cut
-
-sub IsAdminCc {
- my $self = shift;
- my $person = shift;
-
- return ($self->IsWatcher( Type => 'AdminCc', Id => $person ));
-
-}
-
-# }}}
-
-# {{{ sub IsOwner
-
-=head2 IsOwner
-
- Takes an RT::User object. Returns true if that user is this ticket's owner.
-returns undef otherwise
-
-=cut
-
-sub IsOwner {
- my $self = shift;
- my $person = shift;
-
-
- # no ACL check since this is used in acl decisions
- # unless ($self->CurrentUserHasRight('ShowTicket')) {
- # return(undef);
- # }
-
-
- #Tickets won't yet have owners when they're being created.
- unless ($self->OwnerObj->id) {
- return(undef);
- }
-
- if ($person->id == $self->OwnerObj->id) {
- return(1);
- }
- else {
- return(undef);
- }
-}
-
-
-# }}}
-
-# }}}
-
-# }}}
-
-# {{{ Routines dealing with queues
-
-# {{{ sub ValidateQueue
-
-sub ValidateQueue {
- my $self = shift;
- my $Value = shift;
-
- #TODO I don't think this should be here. We shouldn't allow anything to have an undef queue,
- if (!$Value) {
- $RT::Logger->warning( " RT:::Queue::ValidateQueue called with a null value. this isn't ok.");
- return (1);
- }
-
- my $QueueObj = RT::Queue->new($self->CurrentUser);
- my $id = $QueueObj->Load($Value);
-
- if ($id) {
- return (1);
- }
- else {
- return (undef);
- }
-}
-
-# }}}
-
-# {{{ sub SetQueue
-
-sub SetQueue {
- my $self = shift;
- my $NewQueue = shift;
-
- #Redundant. ACL gets checked in _Set;
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
-
- my $NewQueueObj = RT::Queue->new($self->CurrentUser);
- $NewQueueObj->Load($NewQueue);
-
- unless ($NewQueueObj->Id()) {
- return (0, "That queue does not exist");
- }
-
- if ($NewQueueObj->Id == $self->QueueObj->Id) {
- return (0, 'That is the same value');
- }
- unless ($self->CurrentUser->HasQueueRight(Right =>'CreateTicket',
- QueueObj => $NewQueueObj )) {
- return (0, "You may not create requests in that queue.");
- }
-
- unless ($self->OwnerObj->HasQueueRight(Right=> 'OwnTicket',
- QueueObj => $NewQueueObj)) {
- $self->Untake();
- }
-
- return($self->_Set(Field => 'Queue', Value => $NewQueueObj->Id()));
-
-}
-
-# }}}
-
-# {{{ sub QueueObj
-
-=head2 QueueObj
-
-Takes nothing. returns this ticket's queue object
=cut
sub QueueObj {
- my $self = shift;
-
- my $queue_obj = RT::Queue->new($self->CurrentUser);
- #We call __Value so that we can avoid the ACL decision and some deep recursion
- my ($result) = $queue_obj->Load($self->__Value('Queue'));
- return ($queue_obj);
+ my $self = shift;
+ my $Queue = RT::Queue->new($self->CurrentUser);
+ $Queue->Load($self->__Value('Queue'));
+ return($Queue);
}
+=item Type
-# }}}
+Returns the current value of Type.
+(In the database, Type is stored as varchar(16).)
-# }}}
-# {{{ Date printing routines
-# {{{ sub DueObj
-
-=head2 DueObj
-
- Returns an RT::Date object containing this ticket's due date
-
-=cut
-sub DueObj {
- my $self = shift;
-
- my $time = new RT::Date($self->CurrentUser);
-
- # -1 is RT::Date slang for never
- if ($self->Due) {
- $time->Set(Format => 'sql', Value => $self->Due );
- }
- else {
- $time->Set(Format => 'unix', Value => -1);
- }
-
- return $time;
-}
-# }}}
+=item SetType VALUE
-# {{{ sub DueAsString
-=head2 DueAsString
+Set Type to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Type will be stored as a varchar(16).)
-Returns this ticket's due date as a human readable string
=cut
-sub DueAsString {
- my $self = shift;
- return $self->DueObj->AsString();
-}
-
-# }}}
-# {{{ sub GraceTimeAsString
+=item IssueStatement
-=head2 GraceTimeAsString
+Returns the current value of IssueStatement.
+(In the database, IssueStatement is stored as int(11).)
-Return the time until this ticket is due as a string
-
-=cut
-
-# TODO This should be deprecated
-
-sub GraceTimeAsString {
- my $self=shift;
-
- if ($self->Due) {
- return ($self->DueObj->AgeAsString());
- } else {
- return "";
- }
-}
-# }}}
+=item SetIssueStatement VALUE
-# {{{ sub ResolvedObj
-=head2 ResolvedObj
+Set IssueStatement to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, IssueStatement will be stored as a int(11).)
- Returns an RT::Date object of this ticket's 'resolved' time.
=cut
-sub ResolvedObj {
- my $self = shift;
- my $time = new RT::Date($self->CurrentUser);
- $time->Set(Format => 'sql', Value => $self->Resolved);
- return $time;
-}
-# }}}
+=item Resolution
-# {{{ sub SetStarted
+Returns the current value of Resolution.
+(In the database, Resolution is stored as int(11).)
-=head2 SetStarted
-Takes a date in ISO format or undef
-Returns a transaction id and a message
-The client calls "Start" to note that the project was started on the date in $date.
-A null date means "now"
-=cut
-
-sub SetStarted {
- my $self = shift;
- my $time = shift || 0;
-
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- #We create a date object to catch date weirdness
- my $time_obj = new RT::Date($self->CurrentUser());
- if ($time != 0) {
- $time_obj->Set(Format => 'ISO', Value => $time);
- }
- else {
- $time_obj->SetToNow();
- }
-
- #Now that we're starting, open this ticket
- #TODO do we really want to force this as policy? it should be a scrip
-
- #We need $TicketAsSystem, in case the current user doesn't have
- #ShowTicket
- #
- my $TicketAsSystem = new RT::Ticket($RT::SystemUser);
- $TicketAsSystem->Load($self->Id);
- if ($TicketAsSystem->Status eq 'new') {
- $TicketAsSystem->Open();
- }
-
- return ($self->_Set(Field => 'Started', Value =>$time_obj->ISO));
-
-}
+=item SetResolution VALUE
-# }}}
-# {{{ sub StartedObj
+Set Resolution to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Resolution will be stored as a int(11).)
-=head2 StartedObj
-
- Returns an RT::Date object which contains this ticket's
-'Started' time.
=cut
-sub StartedObj {
- my $self = shift;
-
- my $time = new RT::Date($self->CurrentUser);
- $time->Set(Format => 'sql', Value => $self->Started);
- return $time;
-}
-# }}}
+=item Owner
-# {{{ sub StartsObj
+Returns the current value of Owner.
+(In the database, Owner is stored as int(11).)
-=head2 StartsObj
- Returns an RT::Date object which contains this ticket's
-'Starts' time.
-=cut
-
-sub StartsObj {
- my $self = shift;
-
- my $time = new RT::Date($self->CurrentUser);
- $time->Set(Format => 'sql', Value => $self->Starts);
- return $time;
-}
-# }}}
+=item SetOwner VALUE
-# {{{ sub ToldObj
-=head2 ToldObj
+Set Owner to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Owner will be stored as a int(11).)
- Returns an RT::Date object which contains this ticket's
-'Told' time.
=cut
-sub ToldObj {
- my $self = shift;
-
- my $time = new RT::Date($self->CurrentUser);
- $time->Set(Format => 'sql', Value => $self->Told);
- return $time;
-}
+=item Subject
-# }}}
+Returns the current value of Subject.
+(In the database, Subject is stored as varchar(200).)
-# {{{ sub LongSinceToldAsString
-# TODO this should be deprecated
+=item SetSubject VALUE
-sub LongSinceToldAsString {
- my $self = shift;
-
- if ($self->Told) {
- return $self->ToldObj->AgeAsString();
- } else {
- return "Never";
- }
-}
-# }}}
-
-# {{{ sub ToldAsString
-=head2 ToldAsString
+Set Subject to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Subject will be stored as a varchar(200).)
-A convenience method that returns ToldObj->AsString
-
-TODO: This should be deprecated
=cut
-sub ToldAsString {
- my $self = shift;
- if ($self->Told) {
- return $self->ToldObj->AsString();
- }
- else {
- return("Never");
- }
-}
-# }}}
-
-# {{{ sub TimeWorkedAsString
+=item InitialPriority
-=head2 TimeWorkedAsString
+Returns the current value of InitialPriority.
+(In the database, InitialPriority is stored as int(11).)
-Returns the amount of time worked on this ticket as a Text String
-=cut
-sub TimeWorkedAsString {
- my $self=shift;
- return "0" unless $self->TimeWorked;
-
- #This is not really a date object, but if we diff a number of seconds
- #vs the epoch, we'll get a nice description of time worked.
-
- my $worked = new RT::Date($self->CurrentUser);
- #return the #of minutes worked turned into seconds and written as
- # a simple text string
-
- return($worked->DurationAsString($self->TimeWorked*60));
-}
+=item SetInitialPriority VALUE
-# }}}
+Set InitialPriority to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, InitialPriority will be stored as a int(11).)
-# }}}
-
-# {{{ Routines dealing with correspondence/comments
-
-# {{{ sub Comment
-
-=head2 Comment
-
-Comment on this ticket.
-Takes a hashref with the follwoing attributes:
-
-MIMEObj, TimeTaken, CcMessageTo, BccMessageTo
=cut
-sub Comment {
- my $self = shift;
-
- my %args = (
- CcMessageTo => undef,
- BccMessageTo => undef,
- MIMEObj => undef,
- TimeTaken => 0,
- @_ );
-
- unless (($self->CurrentUserHasRight('CommentOnTicket')) or
- ($self->CurrentUserHasRight('ModifyTicket'))) {
- return (0, "Permission Denied");
- }
-
- unless ($args{'MIMEObj'}) {
- return(0,"No correspondence attached");
- }
-
- # If we've been passed in CcMessageTo and BccMessageTo fields,
- # add them to the mime object for passing on to the transaction handler
- # The "NotifyOtherRecipients" scripAction will look for RT--Send-Cc: and
- # RT-Send-Bcc: headers
-
- $args{'MIMEObj'}->head->add('RT-Send-Cc', $args{'CcMessageTo'});
- $args{'MIMEObj'}->head->add('RT-Send-Bcc', $args{'BccMessageTo'});
-
- #Record the correspondence (write the transaction)
- my ($Trans, $Msg, $TransObj) = $self->_NewTransaction( Type => 'Comment',
- Data =>($args{'MIMEObj'}->head->get('subject') || 'No Subject'),
- TimeTaken => $args{'TimeTaken'},
- MIMEObj => $args{'MIMEObj'}
- );
-
-
- return ($Trans, "The comment has been recorded");
-}
-
-# }}}
-# {{{ sub Correspond
+=item FinalPriority
-=head2 Correspond
+Returns the current value of FinalPriority.
+(In the database, FinalPriority is stored as int(11).)
-Correspond on this ticket.
-Takes a hashref with the following attributes:
-
-
-MIMEObj, TimeTaken, CcMessageTo, BccMessageTo
-
-=cut
-
-sub Correspond {
- my $self = shift;
- my %args = (
- CcMessageTo => undef,
- BccMessageTo => undef,
- MIMEObj => undef,
- TimeTaken => 0,
- @_ );
-
- unless (($self->CurrentUserHasRight('ReplyToTicket')) or
- ($self->CurrentUserHasRight('ModifyTicket'))) {
- return (0, "Permission Denied");
- }
-
- unless ($args{'MIMEObj'}) {
- return(0,"No correspondence attached");
- }
-
- # If we've been passed in CcMessageTo and BccMessageTo fields,
- # add them to the mime object for passing on to the transaction handler
- # The "NotifyOtherRecipients" scripAction will look for RT-Send-Cc: and RT-Send-Bcc:
- # headers
-
- $args{'MIMEObj'}->head->add('RT-Send-Cc', $args{'CcMessageTo'});
- $args{'MIMEObj'}->head->add('RT-Send-Bcc', $args{'BccMessageTo'});
-
- #Record the correspondence (write the transaction)
- my ($Trans,$msg, $TransObj) = $self->_NewTransaction
- (Type => 'Correspond',
- Data => ($args{'MIMEObj'}->head->get('subject') || 'No Subject'),
- TimeTaken => $args{'TimeTaken'},
- MIMEObj=> $args{'MIMEObj'}
- );
-
- # TODO this bit of logic should really become a scrip for 2.2
- my $TicketAsSystem = new RT::Ticket($RT::SystemUser);
- $TicketAsSystem->Load($self->Id);
-
- if (
- ($TicketAsSystem->Status ne 'open') and
- ($TicketAsSystem->Status ne 'new')
- ) {
-
- my $oldstatus = $TicketAsSystem->Status();
- $TicketAsSystem->__Set(Field => 'Status', Value => 'open');
- $TicketAsSystem->_NewTransaction
- ( Type => 'Set',
- Field => 'Status',
- OldValue => $oldstatus,
- NewValue => 'open',
- Data => 'Ticket auto-opened on incoming correspondence'
- );
- }
-
- unless ($Trans) {
- $RT::Logger->err("$self couldn't init a transaction ($msg)\n");
- return ($Trans, "correspondence (probably) not sent", $args{'MIMEObj'});
- }
-
- #Set the last told date to now if this isn't mail from the requestor.
- #TODO: Note that this will wrongly ack mail from any non-requestor as a "told"
-
- unless ($TransObj->IsInbound) {
- $self->_SetTold;
- }
-
- return ($Trans, "correspondence sent");
-}
-# }}}
-# }}}
+=item SetFinalPriority VALUE
-# {{{ Routines dealing with Links and Relations between tickets
-# {{{ Link Collections
+Set FinalPriority to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, FinalPriority will be stored as a int(11).)
-# {{{ sub Members
-
-=head2 Members
-
- This returns an RT::Links object which references all the tickets
-which are 'MembersOf' this ticket
=cut
-sub Members {
- my $self = shift;
- return ($self->_Links('Target', 'MemberOf'));
-}
-
-# }}}
-# {{{ sub MemberOf
+=item Priority
-=head2 MemberOf
+Returns the current value of Priority.
+(In the database, Priority is stored as int(11).)
- This returns an RT::Links object which references all the tickets that this
-ticket is a 'MemberOf'
-=cut
-
-sub MemberOf {
- my $self = shift;
- return ($self->_Links('Base', 'MemberOf'));
-}
-# }}}
+=item SetPriority VALUE
-# {{{ RefersTo
-=head2 RefersTo
+Set Priority to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Priority will be stored as a int(11).)
- This returns an RT::Links object which shows all references for which this ticket is a base
=cut
-sub RefersTo {
- my $self = shift;
- return ($self->_Links('Base', 'RefersTo'));
-}
-
-# }}}
-# {{{ ReferredToBy
+=item TimeEstimated
-=head2 ReferredToBy
+Returns the current value of TimeEstimated.
+(In the database, TimeEstimated is stored as int(11).)
- This returns an RT::Links object which shows all references for which this ticket is a target
-=cut
-sub ReferredToBy {
- my $self = shift;
- return ($self->_Links('Target', 'RefersTo'));
-}
+=item SetTimeEstimated VALUE
-# }}}
-# {{{ DependedOnBy
+Set TimeEstimated to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TimeEstimated will be stored as a int(11).)
-=head2 DependedOnBy
-
- This returns an RT::Links object which references all the tickets that depend on this one
=cut
-sub DependedOnBy {
- my $self = shift;
- return ($self->_Links('Target','DependsOn'));
-}
-
-# }}}
-
-# {{{ DependsOn
-
-=head2 DependsOn
-
- This returns an RT::Links object which references all the tickets that this ticket depends on
-
-=cut
-sub DependsOn {
- my $self = shift;
- return ($self->_Links('Base','DependsOn'));
-}
-
-# }}}
-
-# {{{ sub _Links
-
-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')) {
-
- $self->{"$field$type"}->Limit(FIELD=>$field, VALUE=>$self->URI);
- $self->{"$field$type"}->Limit(FIELD=>'Type',
- VALUE=>$type) if ($type);
- }
- }
- return ($self->{"$field$type"});
-}
-
-# }}}
-
-# }}}
-# {{{ sub DeleteLink
+=item TimeWorked
-=head2 DeleteLink
+Returns the current value of TimeWorked.
+(In the database, TimeWorked is stored as int(11).)
-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,
- @_ );
-
- #check acls
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- $RT::Logger->debug("No permission to delete links\n");
- return (0, 'Permission Denied');
-
-
- }
-
- #we want one of base and target. we don't care which
- #but we only want _one_
-
- if ($args{'Base'} and $args{'Target'}) {
- $RT::Logger->debug("$self ->_DeleteLink. got both Base and Target\n");
- return (0, 'Can\'t specifiy both base and target');
- }
- elsif ($args{'Base'}) {
- $args{'Target'} = $self->Id();
- }
- elsif ($args{'Target'}) {
- $args{'Base'} = $self->Id();
- }
- else {
- $RT::Logger->debug("$self: Base or Target must be specified\n");
- return (0, 'Either base or target must be specified');
- }
-
- my $link = new RT::Link($self->CurrentUser);
- $RT::Logger->debug("Trying to load link: ". $args{'Base'}." ". $args{'Type'}. " ". $args{'Target'}. "\n");
-
- $link->Load($args{'Base'}, $args{'Type'}, $args{'Target'});
-
-
-
- #it's a real link.
- if ($link->id) {
- $RT::Logger->debug("We're going to delete link ".$link->id."\n");
- $link->Delete();
-
- my $TransString=
- "Ticket $args{'Base'} no longer $args{Type} ticket $args{'Target'}.";
- my ($Trans, $Msg, $TransObj) = $self->_NewTransaction
- (Type => 'DeleteLink',
- Field => $args{'Type'},
- Data => $TransString,
- TimeTaken => 0
- );
-
- return ($linkid, "Link deleted ($TransString)", $transactionid);
- }
- #if it's not a link we can find
- else {
- $RT::Logger->debug("Couldn't find that link\n");
- return (0, "Link not found");
- }
-}
+=item SetTimeWorked VALUE
-# }}}
-# {{{ sub AddLink
-
-=head2 AddLink
-
-Takes a paramhash of Type and one of Base or Target. Adds that link to this ticket.
+Set TimeWorked to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TimeWorked will be stored as a int(11).)
=cut
-sub AddLink {
- my $self = shift;
- my %args = ( Target => '',
- Base => '',
- Type => '',
- @_ );
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- if ($args{'Base'} and $args{'Target'}) {
- $RT::Logger->debug("$self tried to delete a link. both base and target were specified\n");
- return (0, 'Can\'t specifiy both base and target');
- }
- elsif ($args{'Base'}) {
- $args{'Target'} = $self->Id();
- }
- elsif ($args{'Target'}) {
- $args{'Base'} = $self->Id();
- }
- else {
- return (0, 'Either base or target must be specified');
- }
-
- # {{{ We don't want references to ourself
- if ($args{Base} eq $args{Target}) {
- return (0, "Can\'t link a ticket to itself");
- }
-
- # }}}
-
- # If the base isn't a URI, make it a URI.
- # If the target isn't a URI, make it a URI.
-
- # {{{ Check if the link already exists - we don't want duplicates
- my $old_link= new RT::Link ($self->CurrentUser);
- $old_link->Load($args{'Base'}, $args{'Type'}, $args{'Target'});
- if ($old_link->Id) {
- $RT::Logger->debug("$self Somebody tried to duplicate a link");
- return ($old_link->id, "Link already exists",0);
- }
- # }}}
-
- # Storing the link in the DB.
- my $link = RT::Link->new($self->CurrentUser);
- my ($linkid) = $link->Create(Target => $args{Target},
- Base => $args{Base},
- Type => $args{Type});
-
- unless ($linkid) {
- return (0,"Link could not be created");
- }
- #Write the transaction
-
- my $TransString="Ticket $args{'Base'} $args{Type} ticket $args{'Target'}.";
-
- my ($Trans, $Msg, $TransObj) = $self->_NewTransaction
- (Type => 'AddLink',
- Field => $args{'Type'},
- Data => $TransString,
- TimeTaken => 0
- );
-
- return ($Trans, "Link created ($TransString)");
-
-
-}
-# }}}
-# {{{ sub URI
+=item Status
-=head2 URI
+Returns the current value of Status.
+(In the database, Status is stored as varchar(10).)
-Returns this ticket's URI
-=cut
-sub URI {
- my $self = shift;
- return $RT::TicketBaseURI.$self->id;
-}
+=item SetStatus VALUE
-# }}}
-# {{{ sub MergeInto
+Set Status to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Status will be stored as a varchar(10).)
-=head2 MergeInto
-MergeInto take the id of the ticket to merge this ticket into.
=cut
-sub MergeInto {
- my $self = shift;
- my $MergeInto = shift;
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- # Load up the new ticket.
- my $NewTicket = RT::Ticket->new($RT::SystemUser);
- $NewTicket->Load($MergeInto);
-
- # make sure it exists.
- unless (defined $NewTicket->Id) {
- return (0, 'New ticket doesn\'t exist');
- }
-
-
- # Make sure the current user can modify the new ticket.
- unless ($NewTicket->CurrentUserHasRight('ModifyTicket')) {
- $RT::Logger->debug("failed...");
- return (0, "Permission Denied");
- }
-
- $RT::Logger->debug("checking if the new ticket has the same id and effective id...");
- unless ($NewTicket->id == $NewTicket->EffectiveId) {
- $RT::Logger->err('$self trying to merge into '.$NewTicket->Id .
- ' which is itself merged.\n');
- return (0, "Can't merge into a merged ticket. ".
- "You should never get this error");
- }
-
-
- # We use EffectiveId here even though it duplicates information from
- # the links table becasue of the massive performance hit we'd take
- # by trying to do a seperate database query for merge info everytime
- # loaded a ticket.
-
-
- #update this ticket's effective id to the new ticket's id.
- my ($id_val, $id_msg) = $self->__Set(Field => 'EffectiveId',
- Value => $NewTicket->Id());
-
- unless ($id_val) {
- $RT::Logger->error("Couldn't set effective ID for ".$self->Id.
- ": $id_msg");
- return(0,"Merge failed. Couldn't set EffectiveId");
- }
-
- my ($status_val, $status_msg) = $self->__Set(Field => 'Status',
- Value => 'resolved');
-
- unless ($status_val) {
- $RT::Logger->error("$self couldn't set status to resolved.".
- "RT's Database may be inconsistent.");
- }
-
- #make a new link: this ticket is merged into that other ticket.
- $self->AddLink( Type =>'MergedInto',
- Target => $NewTicket->Id() );
-
- #add all of this ticket's watchers to that ticket.
- my $watchers = $self->Watchers();
-
- while (my $watcher = $watchers->Next()) {
- unless (
- ($watcher->Owner &&
- $NewTicket->IsWatcher (Type => $watcher->Type,
- Id => $watcher->Owner)) or
- ($watcher->Email &&
- $NewTicket->IsWatcher (Type => $watcher->Type,
- Id => $watcher->Email))
- ) {
-
-
-
- $NewTicket->_AddWatcher(Silent => 1,
- Type => $watcher->Type,
- Email => $watcher->Email,
- Owner => $watcher->Owner);
- }
- }
-
-
- #find all of the tickets that were merged into this ticket.
- my $old_mergees = new RT::Tickets($self->CurrentUser);
- $old_mergees->Limit( FIELD => 'EffectiveId',
- OPERATOR => '=',
- VALUE => $self->Id );
-
- # update their EffectiveId fields to the new ticket's id
- while (my $ticket = $old_mergees->Next()) {
- my ($val, $msg) = $ticket->__Set(Field => 'EffectiveId',
- Value => $NewTicket->Id());
- }
- $NewTicket->_SetLastUpdated;
-
- return ($TransactionObj, "Merge Successful");
-}
-
-# }}}
-
-# }}}
-
-# {{{ Routines dealing with keywords
-
-# {{{ sub KeywordsObj
-
-=head2 KeywordsObj [KEYWORD_SELECT_ID]
-
- Returns an B<RT::ObjectKeywords> object preloaded with this ticket's ObjectKeywords.
-If the optional KEYWORD_SELECT_ID parameter is set, limit the keywords object to that keyword
-select.
-
-=cut
-
-sub KeywordsObj {
- my $self = shift;
- my $keyword_select;
-
- $keyword_select = shift if (@_);
-
- use RT::ObjectKeywords;
- my $Keywords = new RT::ObjectKeywords($self->CurrentUser);
-
- #ACL check
- if ($self->CurrentUserHasRight('ShowTicket')) {
- $Keywords->LimitToTicket($self->id);
- if ($keyword_select) {
- $Keywords->LimitToKeywordSelect($keyword_select);
- }
- }
- return ($Keywords);
-}
-# }}}
-# {{{ sub AddKeyword
+=item TimeLeft
-=head2 AddKeyword
+Returns the current value of TimeLeft.
+(In the database, TimeLeft is stored as int(11).)
-Takes a paramhash of Keyword and KeywordSelect. If Keyword is a valid choice
-for KeywordSelect, creates a KeywordObject. If the KeywordSelect says this should
-be a single KeywordObject, automatically removes the old value.
- Issues: probably doesn't enforce the depth restrictions or make sure that keywords
-are coming from the right part of the tree. really should.
-=cut
+=item SetTimeLeft VALUE
-sub AddKeyword {
- my $self = shift;
- #ACL check
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, 'Permission Denied');
- }
-
- return($self->_AddKeyword(@_));
-
-}
+Set TimeLeft to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TimeLeft will be stored as a int(11).)
-# Helper version of AddKeyword without that pesky ACL check
-sub _AddKeyword {
- my $self = shift;
- my %args = ( KeywordSelect => undef, # id of a keyword select record
- Keyword => undef, #id of the keyword to add
- Silent => 0,
- @_
- );
-
- my ($OldValue);
-
- #TODO make sure that $args{'Keyword'} is valid for $args{'KeywordSelect'}
-
- #TODO: make sure that $args{'KeywordSelect'} applies to this ticket's queue.
-
- my $Keyword = new RT::Keyword($self->CurrentUser);
- unless ($Keyword->Load($args{'Keyword'}) ) {
- $RT::Logger->err("$self Couldn't load Keyword ".$args{'Keyword'} ."\n");
- return(0, "Couldn't load keyword");
- }
-
- my $KeywordSelectObj = new RT::KeywordSelect($self->CurrentUser);
- unless ($KeywordSelectObj->Load($args{'KeywordSelect'})) {
- $RT::Logger->err("$self Couldn't load KeywordSelect ".$args{'KeywordSelect'});
- return(0, "Couldn't load keywordselect");
- }
-
- my $Keywords = $self->KeywordsObj($KeywordSelectObj->id);
-
- #If the ticket already has this keyword, just get out of here.
- if ($Keywords->HasEntry($Keyword->id)) {
- return(0, "That is already the current value");
- }
-
- #If the keywordselect wants this to be a singleton:
-
- if ($KeywordSelectObj->Single) {
-
- #Whack any old values...keep track of the last value that we get.
- #we shouldn't need a loop ehre, but we do it anyway, to try to
- # help keep the database clean.
- while (my $OldKey = $Keywords->Next) {
- $OldValue = $OldKey->KeywordObj->Name;
- $OldKey->Delete();
- }
-
-
- }
-
- # create the new objectkeyword
- my $ObjectKeyword = new RT::ObjectKeyword($self->CurrentUser);
- my $result = $ObjectKeyword->Create( Keyword => $Keyword->Id,
- ObjectType => 'Ticket',
- ObjectId => $self->Id,
- KeywordSelect => $KeywordSelectObj->Id );
-
-
- # record a single transaction, unless we were told not to
- unless ($args{'Silent'}) {
- my ($TransactionId, $Msg, $TransactionObj) =
- $self->_NewTransaction( Type => 'Keyword',
- Field => $KeywordSelectObj->Id,
- OldValue => $OldValue,
- NewValue => $Keyword->Name );
- }
- return ($TransactionId, "Keyword ".$ObjectKeyword->KeywordObj->Name ." added.");
-
-}
-
-# }}}
-
-# {{{ sub DeleteKeyword
-
-=head2 DeleteKeyword
-
- Takes a paramhash. Deletes the Keyword denoted by the I<Keyword> parameter from this
- ticket's object keywords.
=cut
-sub DeleteKeyword {
- my $self = shift;
- my %args = ( Keyword => undef,
- KeywordSelect => undef,
- @_ );
-
- #ACL check
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, 'Permission Denied');
- }
-
-
- #Load up the ObjectKeyword we\'re talking about
- my $ObjectKeyword = new RT::ObjectKeyword($self->CurrentUser);
- $ObjectKeyword->LoadByCols(Keyword => $args{'Keyword'},
- KeywordSelect => $args{'KeywordSelect'},
- ObjectType => 'Ticket',
- ObjectId => $self->id()
- );
-
- #if we can\'t find it, bail
- unless ($ObjectKeyword->id) {
- $RT::Logger->err("Couldn't find the keyword ".$args{'Keyword'} .
- " for keywordselect ". $args{'KeywordSelect'} .
- "for ticket ".$self->id );
- return (undef, "Couldn't load keyword while trying to delete it.");
- };
-
- #record transaction here.
- my ($TransactionId, $Msg, $TransObj) =
- $self->_NewTransaction( Type => 'Keyword',
- OldValue => $ObjectKeyword->KeywordObj->Name);
-
- $ObjectKeyword->Delete();
-
- return ($TransactionId, "Keyword ".$ObjectKeyword->KeywordObj->Name ." deleted.");
-
-}
-# }}}
+=item Told
-# }}}
+Returns the current value of Told.
+(In the database, Told is stored as datetime.)
-# {{{ Routines dealing with ownership
-# {{{ sub OwnerObj
-=head2 OwnerObj
+=item SetTold VALUE
-Takes nothing and returns an RT::User object of
-this ticket's owner
-=cut
+Set Told to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Told will be stored as a datetime.)
-sub OwnerObj {
- my $self = shift;
-
- #If this gets ACLed, we lose on a rights check in User.pm and
- #get deep recursion. if we need ACLs here, we need
- #an equiv without ACLs
-
- $owner = new RT::User ($self->CurrentUser);
- $owner->Load($self->__Value('Owner'));
-
- #Return the owner object
- return ($owner);
-}
-
-# }}}
-
-# {{{ sub OwnerAsString
-
-=head2 OwnerAsString
-
-Returns the owner's email address
=cut
-sub OwnerAsString {
- my $self = shift;
- return($self->OwnerObj->EmailAddress);
-}
+=item Starts
-# }}}
+Returns the current value of Starts.
+(In the database, Starts is stored as datetime.)
-# {{{ sub SetOwner
-=head2 SetOwner
-
-Takes two arguments:
- the Id or Name of the owner
-and (optionally) the type of the SetOwner Transaction. It defaults
-to 'Give'. 'Steal' is also a valid option.
-
-=cut
-
-sub SetOwner {
- my $self = shift;
- my $NewOwner = shift;
- my $Type = shift || "Give";
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- my $NewOwnerObj = RT::User->new($self->CurrentUser);
- my $OldOwnerObj = $self->OwnerObj;
-
- $NewOwnerObj->Load($NewOwner);
- if (!$NewOwnerObj->Id) {
- return (0, "That user does not exist");
- }
-
- #If thie ticket has an owner and it's not the current user
-
- if (($Type ne 'Steal' ) and ($Type ne 'Force') and #If we're not stealing
- ($self->OwnerObj->Id != $RT::Nobody->Id ) and #and the owner is set
- ($self->CurrentUser->Id ne $self->OwnerObj->Id())) { #and it's not us
- return(0, "You can only reassign tickets that you own or that are unowned");
- }
-
- #If we've specified a new owner and that user can't modify the ticket
- elsif (($NewOwnerObj->Id) and
- (!$NewOwnerObj->HasQueueRight(Right => 'OwnTicket',
- QueueObj => $self->QueueObj,
- TicketObj => $self))
- ) {
- return (0, "That user may not own requests in that queue");
- }
-
-
- #If the ticket has an owner and it's the new owner, we don't need
- #To do anything
- elsif (($self->OwnerObj) and ($NewOwnerObj->Id eq $self->OwnerObj->Id)) {
- return(0, "That user already owns that request");
- }
-
-
- my ($trans,$msg)=$self->_Set(Field => 'Owner',
- Value => $NewOwnerObj->Id,
- TimeTaken => 0,
- TransactionType => $Type);
-
- if ($trans) {
- $msg = "Owner changed from ".$OldOwnerObj->Name." to ".$NewOwnerObj->Name;
- }
- return ($trans, $msg);
-
-}
-# }}}
+=item SetStarts VALUE
-# {{{ sub Take
-=head2 Take
+Set Starts to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Starts will be stored as a datetime.)
-A convenince method to set the ticket's owner to the current user
=cut
-sub Take {
- my $self = shift;
- return ($self->SetOwner($self->CurrentUser->Id, 'Take'));
-}
-# }}}
+=item Started
-# {{{ sub Untake
+Returns the current value of Started.
+(In the database, Started is stored as datetime.)
-=head2 Untake
-Convenience method to set the owner to 'nobody' if the current user is the owner.
-=cut
+=item SetStarted VALUE
-sub Untake {
- my $self = shift;
- return($self->SetOwner($RT::Nobody->UserObj->Id, 'Untake'));
-}
-# }}}
-
-# {{{ sub Steal
-=head2 Steal
+Set Started to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Started will be stored as a datetime.)
-A convenience method to change the owner of the current ticket to the
-current user. Even if it's owned by another user.
=cut
-sub Steal {
- my $self = shift;
-
- if ($self->IsOwner($self->CurrentUser)) {
- return (0,"You already own this ticket");
- } else {
- return($self->SetOwner($self->CurrentUser->Id, 'Steal'));
-
- }
-
-}
-
-# }}}
-
-# }}}
-# {{{ Routines dealing with status
+=item Due
-# {{{ sub ValidateStatus
+Returns the current value of Due.
+(In the database, Due is stored as datetime.)
-=head2 ValidateStatus STATUS
-Takes a string. Returns true if that status is a valid status for this ticket.
-Returns false otherwise.
-=cut
-
-sub ValidateStatus {
- my $self = shift;
- my $status = shift;
+=item SetDue VALUE
- #Make sure the status passed in is valid
- unless ($self->QueueObj->IsValidStatus($status)) {
- return (undef);
- }
-
- return (1);
-}
+Set Due to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Due will be stored as a datetime.)
-# }}}
+=cut
-# {{{ sub SetStatus
-=head2 SetStatus STATUS
+=item Resolved
-Set this ticket\'s status. STATUS can be one of: new, open, stalled, resolved or dead.
+Returns the current value of Resolved.
+(In the database, Resolved is stored as datetime.)
-=cut
-sub SetStatus {
- my $self = shift;
- my $status = shift;
-
- #Check ACL
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, 'Permission Denied');
- }
-
- my $now = new RT::Date($self->CurrentUser);
- $now->SetToNow();
-
- #If we're changing the status from new, record that we've started
- if (($self->Status =~ /new/) && ($status ne 'new')) {
- #Set the Started time to "now"
- $self->_Set(Field => 'Started',
- Value => $now->ISO,
- RecordTransaction => 0);
- }
-
-
- if ($status eq 'resolved') {
- #When we resolve a ticket, set the 'Resolved' attribute to now.
- $self->_Set(Field => 'Resolved',
- Value => $now->ISO,
- RecordTransaction => 0);
- }
-
-
- #Actually update the status
- return($self->_Set(Field => 'Status',
- Value => $status,
- TimeTaken => 0,
- TransactionType => 'Status'));
-}
-# }}}
+=item SetResolved VALUE
-# {{{ sub Kill
-=head2 Kill
+Set Resolved to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Resolved will be stored as a datetime.)
-Takes no arguments. Marks this ticket for garbage collection
=cut
-sub Kill {
- my $self = shift;
- return ($self->SetStatus('dead'));
- # TODO: garbage collection
-}
-
-# }}}
-# {{{ sub Stall
+=item LastUpdatedBy
-=head2 Stall
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
-Sets this ticket's status to stalled
=cut
-sub Stall {
- my $self = shift;
- return ($self->SetStatus('stalled'));
-}
-
-# }}}
-# {{{ sub Open
+=item LastUpdated
-=head2 Open
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
-Sets this ticket\'s status to Open
=cut
-sub Open {
- my $self = shift;
- return ($self->SetStatus('open'));
-}
-
-# }}}
-# {{{ sub Resolve
+=item Creator
-=head2 Resolve
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
-Sets this ticket\'s status to Resolved
=cut
-sub Resolve {
- my $self = shift;
- return ($self->SetStatus('resolved'));
-}
-
-# }}}
-
-# }}}
-
-# {{{ Actions + Routines dealing with transactions
-# {{{ sub SetTold and _SetTold
+=item Created
-=head2 SetTold ISO [TIMETAKEN]
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
-Updates the told and records a transaction
=cut
-sub SetTold {
- my $self=shift;
- my $told;
- $told = shift if (@_);
- my $timetaken=shift || 0;
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- my $datetold = new RT::Date($self->CurrentUser);
- if ($told) {
- $datetold->Set( Format => 'iso',
- Value => $told);
- }
- else {
- $datetold->SetToNow();
- }
-
- return($self->_Set(Field => 'Told',
- Value => $datetold->ISO,
- TimeTaken => $timetaken,
- TransactionType => 'Told'));
-}
-=head2 _SetTold
+=item Disabled
-Updates the told without a transaction or acl check. Useful when we're sending replies.
+Returns the current value of Disabled.
+(In the database, Disabled is stored as smallint(6).)
-=cut
-sub _SetTold {
- my $self=shift;
-
- my $now = new RT::Date($self->CurrentUser);
- $now->SetToNow();
- #use __Set to get no ACLs ;)
- return($self->__Set(Field => 'Told',
- Value => $now->ISO));
-}
-# }}}
+=item SetDisabled VALUE
-# {{{ sub Transactions
-=head2 Transactions
+Set Disabled to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Disabled will be stored as a smallint(6).)
- Returns an RT::Transactions object of all transactions on this ticket
=cut
-
-sub Transactions {
- my $self = shift;
-
- use RT::Transactions;
- my $transactions = RT::Transactions->new($self->CurrentUser);
-
- #If the user has no rights, return an empty object
- if ($self->CurrentUserHasRight('ShowTicket')) {
- my $tickets = $transactions->NewAlias('Tickets');
- $transactions->Join( ALIAS1 => 'main',
- FIELD1 => 'Ticket',
- ALIAS2 => $tickets,
- FIELD2 => 'id');
- $transactions->Limit( ALIAS => $tickets,
- FIELD => 'EffectiveId',
- VALUE => $self->id());
- # if the user may not see comments do not return them
- unless ($self->CurrentUserHasRight('ShowTicketComments')) {
- $transactions->Limit( FIELD => 'Type',
- OPERATOR => '!=',
- VALUE => "Comment");
- }
- }
-
- return($transactions);
-}
-
-# }}}
-
-# {{{ sub _NewTransaction
-
-sub _NewTransaction {
- my $self = shift;
- my %args = ( TimeTaken => 0,
- Type => undef,
- OldValue => undef,
- NewValue => undef,
- Data => undef,
- Field => undef,
- MIMEObj => undef,
- @_ );
-
-
- require RT::Transaction;
- my $trans = new RT::Transaction($self->CurrentUser);
- my ($transaction, $msg) =
- $trans->Create( Ticket => $self->Id,
- TimeTaken => $args{'TimeTaken'},
- Type => $args{'Type'},
- Data => $args{'Data'},
- Field => $args{'Field'},
- NewValue => $args{'NewValue'},
- OldValue => $args{'OldValue'},
- MIMEObj => $args{'MIMEObj'}
- );
-
- $RT::Logger->warning($msg) unless $transaction;
-
- $self->_SetLastUpdated;
-
- if (defined $args{'TimeTaken'} ) {
- $self->_UpdateTimeTaken($args{'TimeTaken'});
- }
- return($transaction, $msg, $trans);
-}
-# }}}
-# }}}
-
-# {{{ PRIVATE UTILITY METHODS. Mostly needed so Ticket can be a DBIx::Record
-
-# {{{ sub _ClassAccessible
sub _ClassAccessible {
{
- EffectiveId => { 'read' => 1, 'write' => 1, 'public' => 1 },
- Queue => { 'read' => 1, 'write' => 1 },
- Requestors => { 'read' => 1, 'write' => 1 },
- Owner => { 'read' => 1, 'write' => 1 },
- Subject => { 'read' => 1, 'write' => 1 },
- InitialPriority => { 'read' => 1, 'write' => 1 },
- FinalPriority => { 'read' => 1, 'write' => 1 },
- Priority => { 'read' => 1, 'write' => 1 },
- Status => { 'read' => 1, 'write' => 1 },
- TimeWorked => { 'read' => 1, 'write' => 1 },
- TimeLeft => { 'read' => 1, 'write' => 1 },
- Created => { 'read' => 1, 'auto' => 1 },
- Creator => { 'read' => 1, 'auto' => 1 },
- Told => { 'read' => 1, 'write' => 1 },
- Resolved => {'read' => 1},
- Starts => { 'read' => 1, 'write' => 1 },
- Started => { 'read' => 1, 'write' => 1 },
- Due => { 'read' => 1, 'write' => 1 },
- Creator => { 'read' => 1, 'auto' => 1 },
- Created => { 'read' => 1, 'auto' => 1 },
- LastUpdatedBy => { 'read' => 1, 'auto' => 1 },
- LastUpdated => { 'read' => 1, 'auto' => 1 }
- };
-
-}
-
-# }}}
-
-# {{{ sub _Set
-
-sub _Set {
- my $self = shift;
-
- unless ($self->CurrentUserHasRight('ModifyTicket')) {
- return (0, "Permission Denied");
- }
-
- my %args = (Field => undef,
- Value => undef,
- TimeTaken => 0,
- RecordTransaction => 1,
- TransactionType => 'Set',
- @_
- );
- #if the user is trying to modify the record
-
- #Take care of the old value we really don't want to get in an ACL loop.
- # so ask the super::_Value
- my $Old=$self->SUPER::_Value("$args{'Field'}");
-
- #Set the new value
- my ($ret, $msg)=$self->SUPER::_Set(Field => $args{'Field'},
- Value=> $args{'Value'});
-
- #If we can't actually set the field to the value, don't record
- # a transaction. instead, get out of here.
- if ($ret==0) {return (0,$msg);}
-
- if ($args{'RecordTransaction'} == 1) {
-
- my ($Trans, $Msg, $TransObj) =
- $self->_NewTransaction(Type => $args{'TransactionType'},
- Field => $args{'Field'},
- NewValue => $args{'Value'},
- OldValue => $Old,
- TimeTaken => $args{'TimeTaken'},
- );
- return ($Trans,$TransObj->Description);
- }
- else {
- return ($ret, $msg);
- }
-}
-
-# }}}
-
-# {{{ sub _Value
-
-=head2 _Value
-
-Takes the name of a table column.
-Returns its value as a string, if the user passes an ACL check
-
-=cut
-
-sub _Value {
-
- my $self = shift;
- my $field = shift;
-
-
- #if the field is public, return it.
- if ($self->_Accessible($field, 'public')) {
- #$RT::Logger->debug("Skipping ACL check for $field\n");
- return($self->SUPER::_Value($field));
-
- }
-
- #If the current user doesn't have ACLs, don't let em at it.
-
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (undef);
- }
- return($self->SUPER::_Value($field));
-
-}
-
-# }}}
-
-# {{{ sub _UpdateTimeTaken
-
-=head2 _UpdateTimeTaken
-
-This routine will increment the timeworked counter. it should
-only be called from _NewTransaction
-
-=cut
-
-sub _UpdateTimeTaken {
- my $self = shift;
- my $Minutes = shift;
- my ($Total);
-
- $Total = $self->SUPER::_Value("TimeWorked");
- $Total = ($Total || 0) + ($Minutes || 0);
- $self->SUPER::_Set(Field => "TimeWorked",
- Value => $Total);
-
- return ($Total);
-}
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ EffectiveId =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Queue =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Type =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ IssueStatement =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Resolution =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Owner =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Subject =>
+ {read => 1, write => 1, type => 'varchar(200)', default => '[no subject]'},
+ InitialPriority =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ FinalPriority =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Priority =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ TimeEstimated =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ TimeWorked =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Status =>
+ {read => 1, write => 1, type => 'varchar(10)', default => ''},
+ TimeLeft =>
+ {read => 1, write => 1, type => 'int(11)', default => '0'},
+ Told =>
+ {read => 1, write => 1, type => 'datetime', default => ''},
+ Starts =>
+ {read => 1, write => 1, type => 'datetime', default => ''},
+ Started =>
+ {read => 1, write => 1, type => 'datetime', default => ''},
+ Due =>
+ {read => 1, write => 1, type => 'datetime', default => ''},
+ Resolved =>
+ {read => 1, write => 1, type => 'datetime', default => ''},
+ LastUpdatedBy =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ LastUpdated =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+ Creator =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Created =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
+ Disabled =>
+ {read => 1, write => 1, type => 'smallint(6)', default => '0'},
+
+ }
+};
-# }}}
-# }}}
+ eval "require RT::Ticket_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Overlay.pm}) {
+ die $@;
+ };
-# {{{ Routines dealing with ACCESS CONTROL
+ eval "require RT::Ticket_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Vendor.pm}) {
+ die $@;
+ };
-# {{{ sub CurrentUserHasRight
+ eval "require RT::Ticket_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Ticket_Local.pm}) {
+ die $@;
+ };
-=head2 CurrentUserHasRight
- Takes the textual name of a Ticket scoped right (from RT::ACE) and returns
-1 if the user has that right. It returns 0 if the user doesn't have that right.
-=cut
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
-
- return ($self->HasRight( Principal=> $self->CurrentUser->UserObj(),
- Right => "$right"));
+=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.
-# {{{ sub HasRight
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-=head2 HasRight
+ no warnings qw(redefine);
- Takes a paramhash with the attributes 'Right' and 'Principal'
- 'Right' is a ticket-scoped textual right from RT::ACE
- 'Principal' is an RT::User object
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
- Returns 1 if the principal has the right. Returns undef if not.
+RT::Ticket_Overlay, RT::Ticket_Vendor, RT::Ticket_Local
=cut
-sub HasRight {
- my $self = shift;
- my %args = ( Right => undef,
- Principal => undef,
- @_);
-
- unless ((defined $args{'Principal'}) and (ref($args{'Principal'}))) {
- $RT::Logger->warning("Principal attrib undefined for Ticket::HasRight");
- }
-
- return($args{'Principal'}->HasQueueRight(TicketObj => $self,
- Right => $args{'Right'}));
-}
-
-# }}}
-
-# }}}
-
1;
-
-=head1 AUTHOR
-
-Jesse Vincent, jesse@fsck.com
-
-=head1 SEE ALSO
-
-RT
-
-=cut
-
-
diff --git a/rt/lib/RT/Tickets.pm b/rt/lib/RT/Tickets.pm
index dd91126c4..b6b349144 100755
--- a/rt/lib/RT/Tickets.pm
+++ b/rt/lib/RT/Tickets.pm
@@ -1,1789 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Tickets.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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 !!
+#
-=head1 NAME
+use strict;
- RT::Tickets - A collection of Ticket objects
+=head1 NAME
+ RT::Tickets -- Class Description
+
=head1 SYNOPSIS
- use RT::Tickets;
- my $tickets = new RT::Tickets($CurrentUser);
+ use RT::Tickets
=head1 DESCRIPTION
- A collection of RT::Tickets.
=head1 METHODS
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Tickets);
-
-=end testing
-
=cut
package RT::Tickets;
-use RT::EasySearch;
-use RT::Ticket;
-@ISA= qw(RT::EasySearch);
-
-use vars qw(%TYPES @SORTFIELDS);
-
-# {{{ TYPES
-
-%TYPES = ( Status => 'ENUM',
- Queue => 'ENUM',
- Type => 'ENUM',
- Creator => 'ENUM',
- LastUpdatedBy => 'ENUM',
- Owner => 'ENUM',
- EffectiveId => 'INT',
- id => 'INT',
- InitialPriority => 'INT',
- FinalPriority => 'INT',
- Priority => 'INT',
- TimeLeft => 'INT',
- TimeWorked => 'INT',
- MemberOf => 'LINK',
- DependsOn => 'LINK',
- HasMember => 'LINK',
- HasDepender => 'LINK',
- RelatedTo => 'LINK',
- Told => 'DATE',
- StartsBy => 'DATE',
- Started => 'DATE',
- Due => 'DATE',
- Resolved => 'DATE',
- LastUpdated => 'DATE',
- Created => 'DATE',
- Subject => 'STRING',
- Type => 'STRING',
- Content => 'TRANSFIELD',
- ContentType => 'TRANSFIELD',
- TransactionDate => 'TRANSDATE',
- Watcher => 'WATCHERFIELD',
- LinkedTo => 'LINKFIELD',
- Keyword => 'KEYWORDFIELD'
-
- );
-
-
-# }}}
-
-# {{{ sub SortFields
-
-@SORTFIELDS = qw(id Status Owner Created Due Starts Started
- Queue Subject Told Started
- Resolved LastUpdated Priority TimeWorked TimeLeft);
-
-=head2 SortFields
-
-Returns the list of fields that lists of tickets can easily be sorted by
-
-=cut
-
-
-sub SortFields {
- my $self = shift;
- return(@SORTFIELDS);
-}
-
-
-# }}}
-
-# {{{ Limit the result set based on content
-
-# {{{ sub Limit
-
-=head2 Limit
-
-Takes a paramhash with the fields FIELD, OPERATOR, VALUE and DESCRIPTION
-Generally best called from LimitFoo methods
-
-=cut
-sub Limit {
- my $self = shift;
- my %args = ( FIELD => undef,
- OPERATOR => '=',
- VALUE => undef,
- DESCRIPTION => undef,
- @_
- );
- $args{'DESCRIPTION'} = "Autodescribed: ".$args{'FIELD'} . $args{'OPERATOR'} . $args{'VALUE'},
- if (!defined $args{'DESCRIPTION'}) ;
-
- my $index = $self->_NextIndex;
-
- #make the TicketRestrictions hash the equivalent of whatever we just passed in;
-
- %{$self->{'TicketRestrictions'}{$index}} = %args;
-
- $self->{'RecalcTicketLimits'} = 1;
-
- # If we're looking at the effective id, we don't want to append the other clause
- # which limits us to tickets where id = effective id
- if ($args{'FIELD'} eq 'EffectiveId') {
- $self->{'looking_at_effective_id'} = 1;
- }
-
- return ($index);
-}
-
-# }}}
-
-
-
-
-=head2 FreezeLimits
-
-Returns a frozen string suitable for handing back to ThawLimits.
-
-=cut
-# {{{ sub FreezeLimits
-
-sub FreezeLimits {
- my $self = shift;
- require FreezeThaw;
- return (FreezeThaw::freeze($self->{'TicketRestrictions'},
- $self->{'restriction_index'}
- ));
-}
-
-# }}}
-
-=head2 ThawLimits
-
-Take a frozen Limits string generated by FreezeLimits and make this tickets
-object have that set of limits.
-
-=cut
-# {{{ sub ThawLimits
-
-sub ThawLimits {
- my $self = shift;
- my $in = shift;
-
- #if we don't have $in, get outta here.
- return undef unless ($in);
-
- $self->{'RecalcTicketLimits'} = 1;
-
- require FreezeThaw;
-
- #We don't need to die if the thaw fails.
-
- eval {
- ($self->{'TicketRestrictions'},
- $self->{'restriction_index'}
- ) = FreezeThaw::thaw($in);
- }
-
-}
-
-# }}}
-
-# {{{ Limit by enum or foreign key
-
-# {{{ sub LimitQueue
-
-=head2 LimitQueue
-
-LimitQueue takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of = or !=. (It defaults to =).
-VALUE is a queue id.
-
-=cut
-
-sub LimitQueue {
- my $self = shift;
- my %args = (VALUE => undef,
- OPERATOR => '=',
- @_);
-
- #TODO VALUE should also take queue names and queue objects
- my $queue = new RT::Queue($self->CurrentUser);
- $queue->Load($args{'VALUE'});
-
- #TODO check for a valid queue here
-
- $self->Limit (FIELD => 'Queue',
- VALUE => $queue->id(),
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Queue ' . $args{'OPERATOR'}. " ". $queue->Name
- );
-
-}
-# }}}
-
-# {{{ sub LimitStatus
-
-=head2 LimitStatus
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of = or !=.
-VALUE is a status.
-
-=cut
-
-sub LimitStatus {
- my $self = shift;
- my %args = ( OPERATOR => '=',
- @_);
- $self->Limit (FIELD => 'Status',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Status ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitType
-
-=head2 LimitType
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of = or !=, it defaults to "=".
-VALUE is a string to search for in the type of the ticket.
-
-=cut
-
-sub LimitType {
- my $self = shift;
- my %args = (OPERATOR => '=',
- VALUE => undef,
- @_);
- $self->Limit (FIELD => 'Type',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Type ' . $args{'OPERATOR'}. " ". $args{'Limit'},
- );
-}
-
-# }}}
-
-# }}}
-
-# {{{ Limit by string field
-
-# {{{ sub LimitSubject
-
-=head2 LimitSubject
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of = or !=.
-VALUE is a string to search for in the subject of the ticket.
-
-=cut
-
-sub LimitSubject {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'Subject',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Subject ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# }}}
-
-# {{{ Limit based on ticket numerical attributes
-# Things that can be > < = !=
-
-# {{{ sub LimitId
-
-=head2 LimitId
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a ticket Id to search for
-
-=cut
-
-sub LimitId {
- my $self = shift;
- my %args = (OPERATOR => '=',
- @_);
-
- $self->Limit (FIELD => 'id',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Id ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitPriority
-
-=head2 LimitPriority
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s priority against
-
-=cut
-
-sub LimitPriority {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'Priority',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Priority ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitInitialPriority
-
-=head2 LimitInitialPriority
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s initial priority against
-
-
-=cut
-
-sub LimitInitialPriority {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'InitialPriority',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Initial Priority ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitFinalPriority
-
-=head2 LimitFinalPriority
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket\'s final priority against
-
-=cut
-
-sub LimitFinalPriority {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'FinalPriority',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Final Priority ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitTimeWorked
-
-=head2 LimitTimeWorked
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket's TimeWorked attribute
-
-=cut
-
-sub LimitTimeWorked {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'TimeWorked',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Time worked ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# {{{ sub LimitTimeLeft
-
-=head2 LimitTimeLeft
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, >, < or !=.
-VALUE is a value to match the ticket's TimeLeft attribute
-
-=cut
-
-sub LimitTimeLeft {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'TimeLeft',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Time left ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-
-# }}}
-
-# {{{ Limiting based on attachment attributes
-
-# {{{ sub LimitContent
-
-=head2 LimitContent
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, LIKE, NOT LIKE or !=.
-VALUE is a string to search for in the body of the ticket
-
-=cut
-sub LimitContent {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'Content',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Ticket content ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-
-# }}}
-# {{{ sub LimitContentType
-
-=head2 LimitContentType
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of =, LIKE, NOT LIKE or !=.
-VALUE is a content type to search ticket attachments for
-
-=cut
-
-sub LimitContentType {
- my $self = shift;
- my %args = (@_);
- $self->Limit (FIELD => 'ContentType',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Ticket content type ' . $args{'OPERATOR'}. " ". $args{'VALUE'},
- );
-}
-# }}}
-
-# }}}
-
-# {{{ Limiting based on people
-
-# {{{ sub LimitOwner
-
-=head2 LimitOwner
-
-Takes a paramhash with the fields OPERATOR and VALUE.
-OPERATOR is one of = or !=.
-VALUE is a user id.
-
-=cut
-
-sub LimitOwner {
- my $self = shift;
- my %args = ( OPERATOR => '=',
- @_);
-
- my $owner = new RT::User($self->CurrentUser);
- $owner->Load($args{'VALUE'});
- $self->Limit (FIELD => 'Owner',
- VALUE => $owner->Id,
- OPERATOR => $args{'OPERATOR'},
- DESCRIPTION => 'Owner ' . $args{'OPERATOR'}. " ". $owner->Name()
- );
-
-}
-
-# }}}
-
-# {{{ Limiting watchers
-
-# {{{ sub LimitWatcher
-
-
-=head2 LimitWatcher
-
- Takes a paramhash with the fields OPERATOR, TYPE and VALUE.
- OPERATOR is one of =, LIKE, NOT LIKE or !=.
- VALUE is a value to match the ticket\'s watcher email addresses against
- TYPE is the sort of watchers you want to match against. Leave it undef if you want to search all of them
-
-=cut
-
-sub LimitWatcher {
- my $self = shift;
- my %args = ( OPERATOR => '=',
- VALUE => undef,
- TYPE => undef,
- @_);
-
-
- #build us up a description
- my ($watcher_type, $desc);
- if ($args{'TYPE'}) {
- $watcher_type = $args{'TYPE'};
- }
- else {
- $watcher_type = "Watcher";
- }
- $desc = "$watcher_type ".$args{'OPERATOR'}." ".$args{'VALUE'};
-
-
- $self->Limit (FIELD => 'Watcher',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
- TYPE => $args{'TYPE'},
- DESCRIPTION => "$desc"
- );
-}
-
-# }}}
-
-# {{{ sub LimitRequestor
-
-=head2 LimitRequestor
-
-It\'s like LimitWatcher, but it presets TYPE to Requestor
-
-=cut
-
-
-sub LimitRequestor {
- my $self = shift;
- $self->LimitWatcher(TYPE=> 'Requestor', @_);
-}
-
-# }}}
-
-# {{{ sub LimitCc
-
-=head2 LimitCC
-
-It\'s like LimitWatcher, but it presets TYPE to Cc
-
-=cut
-
-sub LimitCc {
- my $self = shift;
- $self->LimitWatcher(TYPE=> 'Cc', @_);
-}
-
-# }}}
-
-# {{{ sub LimitAdminCc
-
-=head2 LimitAdminCc
-
-It\'s like LimitWatcher, but it presets TYPE to AdminCc
-
-=cut
-
-sub LimitAdminCc {
- my $self = shift;
- $self->LimitWatcher(TYPE=> 'AdminCc', @_);
-}
-
-# }}}
-
-# }}}
-
-# }}}
-
-# {{{ Limiting based on links
-
-# {{{ LimitLinkedTo
-
-=head2 LimitLinkedTo
-
-LimitLinkedTo takes a paramhash with two fields: TYPE and TARGET
-TYPE limits the sort of relationship we want to search on
-
-TARGET is the id or URI of the TARGET of the link
-(TARGET used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as TARGET
-
-=cut
-
-sub LimitLinkedTo {
- my $self = shift;
- my %args = (
- TICKET => undef,
- TARGET => undef,
- TYPE => undef,
- @_);
-
-
- $self->Limit( FIELD => 'LinkedTo',
- BASE => undef,
- TARGET => ($args{'TARGET'} || $args{'TICKET'}),
- TYPE => $args{'TYPE'},
- DESCRIPTION => "Tickets ".$args{'TYPE'}." by ".($args{'TARGET'} || $args{'TICKET'})
- );
-}
-
-
-# }}}
-
-# {{{ LimitLinkedFrom
-
-=head2 LimitLinkedFrom
-
-LimitLinkedFrom takes a paramhash with two fields: TYPE and BASE
-TYPE limits the sort of relationship we want to search on
-
-
-BASE is the id or URI of the BASE of the link
-(BASE used to be 'TICKET'. 'TICKET' is deprecated, but will be treated as BASE
-
-
-=cut
-
-sub LimitLinkedFrom {
- my $self = shift;
- my %args = ( BASE => undef,
- TICKET => undef,
- TYPE => undef,
- @_);
-
-
- $self->Limit( FIELD => 'LinkedTo',
- TARGET => undef,
- BASE => ($args{'BASE'} || $args{'TICKET'}),
- TYPE => $args{'TYPE'},
- DESCRIPTION => "Tickets " .($args{'BASE'} || $args{'TICKET'}) ." ".$args{'TYPE'}
- );
-}
-
-
-# }}}
-
-# {{{ LimitMemberOf
-sub LimitMemberOf {
- my $self = shift;
- my $ticket_id = shift;
- $self->LimitLinkedTo ( TARGET=> "$ticket_id",
- TYPE => 'MemberOf',
- );
-
-}
-# }}}
-
-# {{{ LimitHasMember
-sub LimitHasMember {
- my $self = shift;
- my $ticket_id =shift;
- $self->LimitLinkedFrom ( BASE => "$ticket_id",
- TYPE => 'MemberOf',
- );
-
-}
-# }}}
-
-# {{{ LimitDependsOn
-
-sub LimitDependsOn {
- my $self = shift;
- my $ticket_id = shift;
- $self->LimitLinkedTo ( TARGET => "$ticket_id",
- TYPE => 'DependsOn',
- );
-
-}
-
-# }}}
-
-# {{{ LimitDependedOnBy
-
-sub LimitDependedOnBy {
- my $self = shift;
- my $ticket_id = shift;
- $self->LimitLinkedFrom ( BASE => "$ticket_id",
- TYPE => 'DependsOn',
- );
-
-}
-
-# }}}
-
-
-# {{{ LimitRefersTo
-
-sub LimitRefersTo {
- my $self = shift;
- my $ticket_id = shift;
- $self->LimitLinkedTo ( TARGET => "$ticket_id",
- TYPE => 'RefersTo',
- );
-
-}
-
-# }}}
-
-# {{{ LimitReferredToBy
-
-sub LimitReferredToBy {
- my $self = shift;
- my $ticket_id = shift;
- $self->LimitLinkedFrom ( BASE=> "$ticket_id",
- TYPE => 'RefersTo',
- );
-
-}
-
-# }}}
-
-# }}}
-
-# {{{ limit based on ticket date attribtes
-
-# {{{ sub LimitDate
-
-=head2 LimitDate (FIELD => 'DateField', OPERATOR => $oper, VALUE => $ISODate)
-
-Takes a paramhash with the fields FIELD OPERATOR and VALUE.
-
-OPERATOR is one of > or <
-VALUE is a date and time in ISO format in GMT
-FIELD is one of Starts, Started, Told, Created, Resolved, LastUpdated
-
-There are also helper functions of the form LimitFIELD that eliminate
-the need to pass in a FIELD argument.
-
-=cut
-
-sub LimitDate {
- my $self = shift;
- my %args = (
- FIELD => undef,
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
-
- @_);
-
- #Set the description if we didn't get handed it above
- unless ($args{'DESCRIPTION'} ) {
- $args{'DESCRIPTION'} = $args{'FIELD'} . " " .$args{'OPERATOR'}. " ". $args{'VALUE'} . " GMT"
- }
-
- $self->Limit (%args);
-
-}
-
-# }}}
-
-
-
-
-sub LimitCreated {
- my $self = shift;
- $self->LimitDate( FIELD => 'Created', @_);
-}
-sub LimitDue {
- my $self = shift;
- $self->LimitDate( FIELD => 'Due', @_);
-
-}
-sub LimitStarts {
- my $self = shift;
- $self->LimitDate( FIELD => 'Starts', @_);
-
-}
-sub LimitStarted {
- my $self = shift;
- $self->LimitDate( FIELD => 'Started', @_);
-}
-sub LimitResolved {
- my $self = shift;
- $self->LimitDate( FIELD => 'Resolved', @_);
-}
-sub LimitTold {
- my $self = shift;
- $self->LimitDate( FIELD => 'Told', @_);
-}
-sub LimitLastUpdated {
- my $self = shift;
- $self->LimitDate( FIELD => 'LastUpdated', @_);
-}
-#
-# {{{ sub LimitTransactionDate
-
-=head2 LimitTransactionDate (OPERATOR => $oper, VALUE => $ISODate)
-
-Takes a paramhash with the fields FIELD OPERATOR and VALUE.
-
-OPERATOR is one of > or <
-VALUE is a date and time in ISO format in GMT
-
-
-=cut
-
-sub LimitTransactionDate {
- my $self = shift;
- my %args = (
- FIELD => 'TransactionDate',
- VALUE => $args{'VALUE'},
- OPERATOR => $args{'OPERATOR'},
-
- @_);
-
- #Set the description if we didn't get handed it above
- unless ($args{'DESCRIPTION'} ) {
- $args{'DESCRIPTION'} = $args{'FIELD'} . " " .$args{'OPERATOR'}. " ". $args{'VALUE'} . " GMT"
- }
-
- $self->Limit (%args);
-
-}
-
-# }}}
-
-# }}}
-
-# {{{ sub LimitKeyword
-
-=head2 LimitKeyword
-
-Takes a paramhash of key/value pairs with the following keys:
-
-=over 4
-
-=item KEYWORDSELECT - KeywordSelect id
-
-=item OPERATOR - (for KEYWORD only - KEYWORDSELECT operator is always `=')
-
-=item KEYWORD - Keyword id
-
-=back
-
-=cut
-
-sub LimitKeyword {
- my $self = shift;
- my %args = ( KEYWORD => undef,
- KEYWORDSELECT => undef,
- OPERATOR => '=',
- DESCRIPTION => undef,
- FIELD => 'Keyword',
- QUOTEVALUE => 1,
- @_
- );
-
- use RT::KeywordSelect;
- my $KeywordSelect = RT::KeywordSelect->new($self->CurrentUser);
- $KeywordSelect->Load($args{KEYWORDSELECT});
-
-
- # Below, We're checking to see whether the keyword we're searching for
- # is null or not.
- # This could probably be rewritten to be easier to read and understand
-
-
- #If we are looking to compare with a null value.
- if ($args{'OPERATOR'} =~ /is/i) {
- if ($args{'OPERATOR'} =~ /^is$/i) {
- $args{'DESCRIPTION'} ||= "Keyword Selection ". $KeywordSelect->Name . " has no value";
- }
- elsif ($args{'OPERATOR'} =~ /^is not$/i) {
- $args{'DESCRIPTION'} ||= "Keyword Selection ". $KeywordSelect->Name . " has a value";
- }
- }
- # if we're not looking to compare with a null value
- else {
- use RT::Keyword;
- my $Keyword = RT::Keyword->new($self->CurrentUser);
- $Keyword->Load($args{KEYWORD});
- $args{'DESCRIPTION'} ||= "Keyword Selection " . $KeywordSelect->Name. " $args{OPERATOR} ". $Keyword->Name;
- }
-
- $args{SingleValued} = $KeywordSelect->Single();
-
-
- my $index = $self->_NextIndex;
- %{$self->{'TicketRestrictions'}{$index}} = %args;
-
- $self->{'RecalcTicketLimits'} = 1;
- return ($index);
-}
-
-# }}}
-
-# {{{ sub _NextIndex
-
-=head2 _NextIndex
-
-Keep track of the counter for the array of restrictions
-
-=cut
-
-sub _NextIndex {
- my $self = shift;
- return ($self->{'restriction_index'}++);
-}
-# }}}
-
-# }}}
-
-# {{{ Core bits to make this a DBIx::SearchBuilder object
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Tickets";
- $self->{'RecalcTicketLimits'} = 1;
- $self->{'looking_at_effective_id'} = 0;
- $self->{'restriction_index'} =1;
- $self->{'primary_key'} = "id";
- $self->SUPER::_Init(@_);
-
-}
-# }}}
-
-# {{{ sub NewItem
-sub NewItem {
- my $self = shift;
- return(RT::Ticket->new($self->CurrentUser));
-
-}
-# }}}
-
-# {{{ sub Count
-sub Count {
- my $self = shift;
- $self->_ProcessRestrictions if ($self->{'RecalcTicketLimits'} == 1 );
- return($self->SUPER::Count());
-}
-# }}}
-
-# {{{ sub ItemsArrayRef
-
-=head2 ItemsArrayRef
-
-Returns a reference to the set of all items found in this search
-
-=cut
-
-sub ItemsArrayRef {
- my $self = shift;
- my @items;
-
- my $placeholder = $self->_ItemsCounter;
- $self->GotoFirstItem();
- while (my $item = $self->Next) {
- push (@items, $item);
- }
-
- $self->GotoItem($placeholder);
- return(\@items);
-}
-# }}}
-
-# {{{ sub Next
-sub Next {
- my $self = shift;
-
- $self->_ProcessRestrictions if ($self->{'RecalcTicketLimits'} == 1 );
-
- my $Ticket = $self->SUPER::Next();
- if ((defined($Ticket)) and (ref($Ticket))) {
-
- #Make sure we _never_ show dead tickets
- #TODO we should be doing this in the where clause.
- #but you can't do multiple clauses on the same field just yet :/
-
- if ($Ticket->Status eq 'dead') {
- return($self->Next());
- }
- elsif ($Ticket->CurrentUserHasRight('ShowTicket')) {
- return($Ticket);
- }
-
- #If the user doesn't have the right to show this ticket
- else {
- return($self->Next());
- }
- }
- #if there never was any ticket
- else {
- return(undef);
- }
-
-}
-# }}}
-
-# }}}
-
-# {{{ Deal with storing and restoring restrictions
-# {{{ sub LoadRestrictions
-
-=head2 LoadRestrictions
-
-LoadRestrictions takes a string which can fully populate the TicketRestrictons hash.
-TODO It is not yet implemented
-
-=cut
-
-# }}}
-
-# {{{ sub DescribeRestrictions
-
-=head2 DescribeRestrictions
-
-takes nothing.
-Returns a hash keyed by restriction id.
-Each element of the hash is currently a one element hash that contains DESCRIPTION which
-is a description of the purpose of that TicketRestriction
-
-=cut
-
-sub DescribeRestrictions {
- my $self = shift;
-
- my ($row, %listing);
-
- foreach $row (keys %{$self->{'TicketRestrictions'}}) {
- $listing{$row} = $self->{'TicketRestrictions'}{$row}{'DESCRIPTION'};
- }
- return (%listing);
-}
-# }}}
-
-# {{{ sub RestrictionValues
-
-=head2 RestrictionValues FIELD
+use RT::SearchBuilder;
+use RT::Ticket;
-Takes a restriction field and returns a list of values this field is restricted
-to.
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-=cut
-sub RestrictionValues {
+sub _Init {
my $self = shift;
- my $field = shift;
- map $self->{'TicketRestrictions'}{$_}{'VALUE'},
- grep {
- $self->{'TicketRestrictions'}{$_}{'FIELD'} eq $field
- && $self->{'TicketRestrictions'}{$_}{'OPERATOR'} eq "="
- }
- keys %{$self->{'TicketRestrictions'}};
-}
-
-# }}}
-
-# {{{ sub ClearRestrictions
+ $self->{'table'} = 'Tickets';
+ $self->{'primary_key'} = 'id';
-=head2 ClearRestrictions
-Removes all restrictions irretrievably
-
-=cut
-
-sub ClearRestrictions {
- my $self = shift;
- delete $self->{'TicketRestrictions'};
- $self->{'looking_at_effective_id'} = 0;
- $self->{'RecalcTicketLimits'} =1;
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-
-# {{{ sub DeleteRestriction
-=head2 DeleteRestriction
+=item NewItem
-Takes the row Id of a restriction (From DescribeRestrictions' output, for example.
-Removes that restriction from the session's limits.
+Returns an empty new RT::Ticket item
=cut
-
-sub DeleteRestriction {
- my $self = shift;
- my $row = shift;
- delete $self->{'TicketRestrictions'}{$row};
-
- $self->{'RecalcTicketLimits'} = 1;
- #make the underlying easysearch object forget all its preconceptions
-}
-
-# }}}
-
-# {{{ sub _ProcessRestrictions
-
-sub _ProcessRestrictions {
+sub NewItem {
my $self = shift;
-
- #Need to clean the EasySearch slate because it makes things too sticky
- $self->CleanSlate();
-
- #Blow away ticket aliases since we'll need to regenerate them for a new search
- delete $self->{'TicketAliases'};
- delete $self->{KeywordsAliases};
-
- my $row;
-
- foreach $row (keys %{$self->{'TicketRestrictions'}}) {
- my $restriction = $self->{'TicketRestrictions'}{$row};
- # {{{ if it's an int
-
- if ($TYPES{$restriction->{'FIELD'}} eq 'INT' ) {
- if ($restriction->{'OPERATOR'} =~ /^(=|!=|>|<|>=|<=)$/) {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => $restriction->{'OPERATOR'},
- VALUE => $restriction->{'VALUE'},
- );
- }
- }
- # }}}
- # {{{ if it's an enum
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'ENUM') {
-
- if ($restriction->{'OPERATOR'} eq '=') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'OR',
- OPERATOR => '=',
- VALUE => $restriction->{'VALUE'},
- );
- }
- elsif ($restriction->{'OPERATOR'} eq '!=') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => '!=',
- VALUE => $restriction->{'VALUE'},
- );
- }
-
- }
- # }}}
- # {{{ if it's a date
-
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'DATE') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => $restriction->{'OPERATOR'},
- VALUE => $restriction->{'VALUE'},
- );
- }
- # }}}
- # {{{ if it's a string
-
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'STRING') {
-
- if ($restriction->{'OPERATOR'} eq '=') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'OR',
- OPERATOR => '=',
- VALUE => $restriction->{'VALUE'},
- CASESENSITIVE => 0
- );
- }
- elsif ($restriction->{'OPERATOR'} eq '!=') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => '!=',
- VALUE => $restriction->{'VALUE'},
- CASESENSITIVE => 0
- );
- }
- elsif ($restriction->{'OPERATOR'} eq 'LIKE') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => 'LIKE',
- VALUE => $restriction->{'VALUE'},
- CASESENSITIVE => 0
- );
- }
- elsif ($restriction->{'OPERATOR'} eq 'NOT LIKE') {
- $self->SUPER::Limit( FIELD => $restriction->{'FIELD'},
- ENTRYAGGREGATOR => 'AND',
- OPERATOR => 'NOT LIKE',
- VALUE => $restriction->{'VALUE'},
- CASESENSITIVE => 0
- );
- }
- }
-
- # }}}
- # {{{ if it's Transaction content that we're hunting for
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'TRANSFIELD') {
-
- #Basically, we want to make sure that the limits apply to the same attachment,
- #rather than just another attachment for the same ticket, no matter how many
- #clauses we lump on.
- #We put them in TicketAliases so that they get nuked when we redo the join.
-
- unless (defined $self->{'TicketAliases'}{'TransFieldAlias'}) {
- $self->{'TicketAliases'}{'TransFieldAlias'} = $self->NewAlias ('Transactions');
- }
- unless (defined $self->{'TicketAliases'}{'TransFieldAttachAlias'}){
- $self->{'TicketAliases'}{'TransFieldAttachAlias'} = $self->NewAlias('Attachments');
-
- }
- #Join transactions to attachments
- $self->Join( ALIAS1 => $self->{'TicketAliases'}{'TransFieldAttachAlias'},
- FIELD1 => 'TransactionId',
- ALIAS2 => $self->{'TicketAliases'}{'TransFieldAlias'}, FIELD2=> 'id');
-
- #Join transactions to tickets
- $self->Join( ALIAS1 => 'main', FIELD1 => $self->{'primary_key'},
- ALIAS2 =>$self->{'TicketAliases'}{'TransFieldAlias'}, FIELD2 => 'Ticket');
-
- #Search for the right field
- $self->SUPER::Limit(ALIAS => $self->{'TicketAliases'}{'TransFieldAttachAlias'},
- ENTRYAGGREGATOR => 'AND',
- FIELD => $restriction->{'FIELD'},
- OPERATOR => $restriction->{'OPERATOR'} ,
- VALUE => $restriction->{'VALUE'},
- CASESENSITIVE => 0
- );
-
-
- }
-
- # }}}
- # {{{ if it's a Transaction date that we're hunting for
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'TRANSDATE') {
-
- #Basically, we want to make sure that the limits apply to the same attachment,
- #rather than just another attachment for the same ticket, no matter how many
- #clauses we lump on.
- #We put them in TicketAliases so that they get nuked when we redo the join.
-
- unless (defined $self->{'TicketAliases'}{'TransFieldAlias'}) {
- $self->{'TicketAliases'}{'TransFieldAlias'} = $self->NewAlias ('Transactions');
- }
-
- #Join transactions to tickets
- $self->Join( ALIAS1 => 'main', FIELD1 => $self->{'primary_key'},
- ALIAS2 =>$self->{'TicketAliases'}{'TransFieldAlias'}, FIELD2 => 'Ticket');
-
- #Search for the right field
- $self->SUPER::Limit(ALIAS => $self->{'TicketAliases'}{'TransFieldAlias'},
- ENTRYAGGREGATOR => 'AND',
- FIELD => 'Created',
- OPERATOR => $restriction->{'OPERATOR'} ,
- VALUE => $restriction->{'VALUE'} );
- }
-
- # }}}
- # {{{ if it's a relationship that we're hunting for
-
- # Takes FIELD: which is something like "LinkedTo"
- # takes TARGET or BASE which is the TARGET or BASE id that we're searching for
- # takes TYPE which is the type of link we're looking for.
-
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'LINKFIELD') {
-
-
- my $LinkAlias = $self->NewAlias ('Links');
-
-
- #Make sure we get the right type of link, if we're restricting it
- if ($restriction->{'TYPE'}) {
- $self->SUPER::Limit(ALIAS => $LinkAlias,
- ENTRYAGGREGATOR => 'AND',
- FIELD => 'Type',
- OPERATOR => '=',
- VALUE => $restriction->{'TYPE'} );
- }
-
- #If we're trying to limit it to things that are target of
- if ($restriction->{'TARGET'}) {
-
-
- # If the TARGET is an integer that means that we want to look at the LocalTarget
- # field. otherwise, we want to look at the "Target" field
-
- my ($matchfield);
- if ($restriction->{'TARGET'} =~/^(\d+)$/) {
- $matchfield = "LocalTarget";
- }
- else {
- $matchfield = "Target";
- }
-
- $self->SUPER::Limit(ALIAS => $LinkAlias,
- ENTRYAGGREGATOR => 'AND',
- FIELD => $matchfield,
- OPERATOR => '=',
- VALUE => $restriction->{'TARGET'} );
-
-
- #If we're searching on target, join the base to ticket.id
- $self->Join( ALIAS1 => 'main', FIELD1 => $self->{'primary_key'},
- ALIAS2 => $LinkAlias,
- FIELD2 => 'LocalBase');
-
-
-
-
- }
- #If we're trying to limit it to things that are base of
- elsif ($restriction->{'BASE'}) {
-
-
- # If we're trying to match a numeric link, we want to look at LocalBase,
- # otherwise we want to look at "Base"
-
- my ($matchfield);
- if ($restriction->{'BASE'} =~/^(\d+)$/) {
- $matchfield = "LocalBase";
- }
- else {
- $matchfield = "Base";
- }
-
-
- $self->SUPER::Limit(ALIAS => $LinkAlias,
- ENTRYAGGREGATOR => 'AND',
- FIELD => $matchfield,
- OPERATOR => '=',
- VALUE => $restriction->{'BASE'} );
-
- #If we're searching on base, join the target to ticket.id
- $self->Join( ALIAS1 => 'main', FIELD1 => $self->{'primary_key'},
- ALIAS2 => $LinkAlias,
- FIELD2 => 'LocalTarget');
-
- }
-
- }
-
- # }}}
- # {{{ if it's a watcher that we're hunting for
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'WATCHERFIELD') {
-
- my $Watch = $self->NewAlias('Watchers');
-
- #Join watchers to users
- my $User = $self->Join( TYPE => 'left',
- ALIAS1 => $Watch,
- FIELD1 => 'Owner',
- TABLE2 => 'Users',
- FIELD2 => 'id',
- );
-
- #Join Ticket to watchers
- $self->Join( ALIAS1 => 'main', FIELD1 => 'id',
- ALIAS2 => $Watch, FIELD2 => 'Value');
-
-
- #Make sure we're only talking about ticket watchers
- $self->SUPER::Limit( ALIAS => $Watch,
- FIELD => 'Scope',
- VALUE => 'Ticket',
- OPERATOR => '=');
-
-
- # Find email address watchers
- $self->SUPER::Limit( SUBCLAUSE => 'WatcherEmailAddress',
- ALIAS => $Watch,
- FIELD => 'Email',
- ENTRYAGGREGATOR => 'OR',
- VALUE => $restriction->{'VALUE'},
- OPERATOR => $restriction->{'OPERATOR'},
- CASESENSITIVE => 0
- );
-
-
-
- #Find user watchers
- $self->SUPER::Limit(
- SUBCLAUSE => 'WatcherEmailAddress',
- ALIAS => $User,
- FIELD => 'EmailAddress',
- ENTRYAGGREGATOR => 'OR',
- VALUE => $restriction->{'VALUE'},
- OPERATOR => $restriction->{'OPERATOR'},
- CASESENSITIVE => 0
- );
-
-
- #If we only want a specific type of watchers, then limit it to that
- if ($restriction->{'TYPE'}) {
- $self->SUPER::Limit( ALIAS => $Watch,
- FIELD => 'Type',
- ENTRYAGGREGATOR => 'OR',
- VALUE => $restriction->{'TYPE'},
- OPERATOR => '=');
- }
- }
-
- # }}}
- # {{{ if it's a keyword
- elsif ($TYPES{$restriction->{'FIELD'}} eq 'KEYWORDFIELD') {
-
- my $null_columns_ok;
-
- my $ObjKeywordsAlias;
- $ObjKeywordsAlias = $self->{KeywordsAliases}{$restriction->{'KEYWORDSELECT'}}
- if $restriction->{SingleValued};
- unless (defined $ObjKeywordsAlias) {
- $ObjKeywordsAlias = $self->Join(
- TYPE => 'left',
- ALIAS1 => 'main',
- FIELD1 => 'id',
- TABLE2 => 'ObjectKeywords',
- FIELD2 => 'ObjectId'
- );
- if ($restriction->{'SingleValued'}) {
- $self->{KeywordsAliases}{$restriction->{'KEYWORDSELECT'}}
- = $ObjKeywordsAlias;
- }
- }
-
-
- $self->SUPER::Limit(
- ALIAS => $ObjKeywordsAlias,
- FIELD => 'Keyword',
- OPERATOR => $restriction->{'OPERATOR'},
- VALUE => $restriction->{'KEYWORD'},
- QUOTEVALUE => $restriction->{'QUOTEVALUE'},
- ENTRYAGGREGATOR => 'OR',
- );
-
- if ( ($restriction->{'OPERATOR'} =~ /^IS$/i) or
- ($restriction->{'OPERATOR'} eq '!=') ) {
-
- $null_columns_ok=1;
-
- }
-
- #If we're trying to find tickets where the keyword isn't somethng, also check ones where it _IS_ null
- if ( $restriction->{'OPERATOR'} eq '!=') {
- $self->SUPER::Limit(
- ALIAS => $ObjKeywordsAlias,
- FIELD => 'Keyword',
- OPERATOR => 'IS',
- VALUE => 'NULL',
- QUOTEVALUE => 0,
- ENTRYAGGREGATOR => 'OR',
- );
- }
-
-
- $self->SUPER::Limit(LEFTJOIN => $ObjKeywordsAlias,
- FIELD => 'KeywordSelect',
- VALUE => $restriction->{'KEYWORDSELECT'},
- ENTRYAGGREGATOR => 'OR');
-
-
-
- $self->SUPER::Limit( ALIAS => $ObjKeywordsAlias,
- FIELD => 'ObjectType',
- VALUE => 'Ticket',
- ENTRYAGGREGATOR => 'AND');
-
- if ($null_columns_ok) {
- $self->SUPER::Limit(ALIAS => $ObjKeywordsAlias,
- FIELD => 'ObjectType',
- OPERATOR => 'IS',
- VALUE => 'NULL',
- QUOTEVALUE => 0,
- ENTRYAGGREGATOR => 'OR');
- }
-
- }
- # }}}
-
-
- }
-
-
- # here, we make sure we don't get any tickets that have been merged into other tickets
- # (Ticket Id == Ticket EffectiveId
- # note that we _really_ don't want to do this if we're already looking at the effectiveid
- if ($self->_isLimited && (! $self->{'looking_at_effective_id'})) {
- $self->SUPER::Limit( FIELD => 'EffectiveId',
- OPERATOR => '=',
- QUOTEVALUE => 0,
- VALUE => 'main.id'); #TODO, we shouldn't be hard coding the tablename to main.
- }
- $self->{'RecalcTicketLimits'} = 0;
+ return(RT::Ticket->new($self->CurrentUser));
}
-# }}}
-
-# }}}
-
-# {{{ Deal with displaying rows of the listing
+ eval "require RT::Tickets_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Tickets_Overlay.pm}) {
+ die $@;
+ };
-#
-# Everything in this section is stub code for 2.2
-# It's not part of the API. It's not for your use
-# It's not for our use.
-#
+ eval "require RT::Tickets_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Tickets_Vendor.pm}) {
+ die $@;
+ };
+ eval "require RT::Tickets_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Tickets_Local.pm}) {
+ die $@;
+ };
-# {{{ sub SetListingFormat
-=head2 SetListingFormat
-Takes a single Format string as specified below. parses that format string and makes the various listing output
-things DTRT.
-=item Format strings
+=head1 SEE ALSO
-Format strings are made up of a chain of Elements delimited with vertical pipes (|).
-Elements of a Format string
+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.
-FormatString: Element[::FormatString]
+If you'll be working with perl 5.6.0 or greater, each of these files should begin with the line
-Element: AttributeName[;HREF=<URL>][;TITLE=<TITLE>]
+ no warnings qw(redefine);
-AttributeName Id | Subject | Status | Owner | Priority | InitialPriority | TimeWorked | TimeLeft |
-
- Keywords[;SELECT=<KeywordSelect>] |
-
- <Created|Starts|Started|Contacted|Due|Resolved>Date<AsString|AsISO|AsAge>
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
+RT::Tickets_Overlay, RT::Tickets_Vendor, RT::Tickets_Local
=cut
-
-
-#accept a format string
-
-
-
-sub SetListingFormat {
- my $self = shift;
- my $listing_format = shift;
-
- my ($element, $attribs);
- my $i = 0;
- foreach $element (split (/::/,$listing_format)) {
- if ($element =~ /^(.*?);(.*)$/) {
- $element = $1;
- $attribs = $2;
- }
- $self->{'format_string'}->[$i]->{'Element'} = $element;
- foreach $attrib (split (/;/, $attribs)) {
- my $value = "";
- if ($attrib =~ /^(.*?)=(.*)$/) {
- $attrib = $1;
- $value = $2;
- }
- $self->{'format_string'}->[$i]->{"$attrib"} = $val;
-
- }
-
- }
- return(1);
-}
-
-# }}}
-
-# {{{ sub HeaderAsHTML
-sub HeaderAsHTML {
- my $self = shift;
- my $header = "";
- my $col;
- foreach $col ( @{[ $self->{'format_string'} ]}) {
- $header .= "<TH>" . $self->_ColumnTitle($self->{'format_string'}->[$col]) . "</TH>";
-
- }
- return ($header);
-}
-# }}}
-
-# {{{ sub HeaderAsText
-#Print text header
-sub HeaderAsText {
- my $self = shift;
- my ($header);
-
- return ($header);
-}
-# }}}
-
-# {{{ sub TicketAsHTMLRow
-#Print HTML row
-sub TicketAsHTMLRow {
- my $self = shift;
- my $Ticket = shift;
- my ($row, $col);
- foreach $col (@{[$self->{'format_string'}]}) {
- $row .= "<TD>" . $self->_TicketColumnValue($ticket,$self->{'format_string'}->[$col]) . "</TD>";
-
- }
- return ($row);
-}
-# }}}
-
-# {{{ sub TicketAsTextRow
-#Print text row
-sub TicketAsTextRow {
- my $self = shift;
- my ($row);
-
- #TODO implement
-
- return ($row);
-}
-# }}}
-
-# {{{ _ColumnTitle {
-
-sub _ColumnTitle {
- my $self = shift;
-
- # Attrib is a hash
- my $attrib = shift;
-
- # return either attrib->{'TITLE'} or..
- if ($attrib->{'TITLE'}) {
- return($attrib->{'TITLE'});
- }
- # failing that, Look up the title in a hash
- else {
- #TODO create $self->{'ColumnTitles'};
- return ($self->{'ColumnTitles'}->{$attrib->{'Element'}});
- }
-
-}
-
-# }}}
-
-# {{{ _TicketColumnValue
-sub _TicketColumnValue {
- my $self = shift;
- my $Ticket = shift;
- my $attrib = shift;
-
-
- my $out;
-
- SWITCH: {
- /^id/i && do {
- $out = $Ticket->id;
- last SWITCH;
- };
- /^subj/i && do {
- last SWITCH;
- $Ticket->Subject;
- };
- /^status/i && do {
- last SWITCH;
- $Ticket->Status;
- };
- /^prio/i && do {
- last SWITCH;
- $Ticket->Priority;
- };
- /^finalprio/i && do {
-
- last SWITCH;
- $Ticket->FinalPriority
- };
- /^initialprio/i && do {
-
- last SWITCH;
- $Ticket->InitialPriority;
- };
- /^timel/i && do {
-
- last SWITCH;
- $Ticket->TimeWorked;
- };
- /^timew/i && do {
-
- last SWITCH;
- $Ticket->TimeLeft;
- };
-
- /^(.*?)date(.*)$/i && do {
- my $o = $1;
- my $m = $2;
- my ($obj);
- #TODO: optimize
- $obj = $Ticket->DueObj if $o =~ /due/i;
- $obj = $Ticket->CreatedObj if $o =~ /created/i;
- $obj = $Ticket->StartsObj if $o =~ /starts/i;
- $obj = $Ticket->StartedObj if $o =~ /started/i;
- $obj = $Ticket->ToldObj if $o =~ /told/i;
- $obj = $Ticket->LastUpdatedObj if $o =~ /lastu/i;
-
- $method = 'ISO' if $m =~ /iso/i;
-
- $method = 'AsString' if $m =~ /asstring/i;
- $method = 'AgeAsString' if $m =~ /age/i;
- last SWITCH;
- $obj->$method();
-
- };
-
- /^watcher/i && do {
- last SWITCH;
- $Ticket->WatchersAsString();
- };
-
- /^requestor/i && do {
- last SWITCH;
- $Ticket->RequestorsAsString();
- };
- /^cc/i && do {
- last SWITCH;
- $Ticket->CCAsString();
- };
-
-
- /^admincc/i && do {
- last SWITCH;
- $Ticket->AdminCcAsString();
- };
-
- /^keywords/i && do {
- last SWITCH;
- #Limit it to the keyword select we're talking about, if we've got one.
- my $objkeys =$Ticket->KeywordsObj($attrib->{'SELECT'});
- $objkeys->KeywordRelativePathsAsString();
- };
-
- }
-
-}
-
-# }}}
-
-# }}}
-
-# {{{ POD
-=head2 notes
-"Enum" Things that get Is, IsNot
-
-
-"Int" Things that get Is LessThan and GreaterThan
-id
-InitialPriority
-FinalPriority
-Priority
-TimeLeft
-TimeWorked
-
-"Text" Things that get Is, Like
-Subject
-TransactionContent
-
-
-"Link" OPERATORs
-
-
-"Date" OPERATORs Is, Before, After
-
- =cut
-# }}}
1;
diff --git a/rt/lib/RT/Transaction.pm b/rt/lib/RT/Transaction.pm
index ee1f069b2..ca491a6c7 100755
--- a/rt/lib/RT/Transaction.pm
+++ b/rt/lib/RT/Transaction.pm
@@ -1,783 +1,364 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Transaction.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# Copyright 1999-2001 Jesse Vincent <jesse@fsck.com>
-# Released under the terms of the GNU Public License
+# 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
+# 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::Transaction - RT\'s transaction object
+RT::Transaction
+
=head1 SYNOPSIS
- use RT::Transaction;
+=head1 DESCRIPTION
+=head1 METHODS
-=head1 DESCRIPTION
+=cut
+package RT::Transaction;
+use RT::Record;
+use RT::Ticket;
-Each RT::Transaction describes an atomic change to a ticket object
-or an update to an RT::Ticket object.
-It can have arbitrary MIME attachments.
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+
+sub _Init {
+ my $self = shift;
+
+ $self->Table('Transactions');
+ $self->SUPER::_Init(@_);
+}
-=head1 METHODS
-=begin testing
-ok(require RT::TestHarness);
-ok(require RT::Transaction);
-=end testing
+
+=item Create PARAMHASH
+
+Create takes a hash of values and creates a row in the database:
+
+ int(11) 'EffectiveTicket'.
+ int(11) 'Ticket'.
+ int(11) 'TimeTaken'.
+ varchar(20) 'Type'.
+ varchar(40) 'Field'.
+ varchar(255) 'OldValue'.
+ varchar(255) 'NewValue'.
+ varchar(100) 'Data'.
=cut
-package RT::Transaction;
-use RT::Record;
-@ISA= qw(RT::Record);
-
-use RT::Attachments;
-# {{{ sub _Init
-sub _Init {
+
+sub Create {
my $self = shift;
- $self->{'table'} = "Transactions";
- return ($self->SUPER::_Init(@_));
+ my %args = (
+ EffectiveTicket => '0',
+ Ticket => '0',
+ TimeTaken => '0',
+ Type => '',
+ Field => '',
+ OldValue => '',
+ NewValue => '',
+ Data => '',
+
+ @_);
+ $self->SUPER::Create(
+ EffectiveTicket => $args{'EffectiveTicket'},
+ Ticket => $args{'Ticket'},
+ TimeTaken => $args{'TimeTaken'},
+ Type => $args{'Type'},
+ Field => $args{'Field'},
+ OldValue => $args{'OldValue'},
+ NewValue => $args{'NewValue'},
+ Data => $args{'Data'},
+);
}
-# }}}
-# {{{ sub Create
-=head2 Create
-Create a new transaction.
+=item id
-This routine should _never_ be called anything other Than RT::Ticket. It should not be called
-from client code. Ever. Not ever. If you do this, we will hunt you down. and break your kneecaps.
-Then the unpleasant stuff will start.
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-TODO: Document what gets passed to this
=cut
-sub Create {
- my $self = shift;
- my %args = ( id => undef,
- TimeTaken => 0,
- Ticket => 0 ,
- Type => 'undefined',
- Data => '',
- Field => undef,
- OldValue => undef,
- NewValue => undef,
- MIMEObj => undef,
- ActivateScrips => 1,
- @_
- );
-
- #if we didn't specify a ticket, we need to bail
- unless ( $args{'Ticket'} ) {
- return(0, "RT::Transaction->Create couldn't, as you didn't specify a ticket id");
- }
-
- #lets create our transaction
- my $id = $self->SUPER::Create(Ticket => $args{'Ticket'},
- TimeTaken => $args{'TimeTaken'},
- Type => $args{'Type'},
- Data => $args{'Data'},
- Field => $args{'Field'},
- OldValue => $args{'OldValue'},
- NewValue => $args{'NewValue'},
- Created => $args{'Created'}
- );
- $self->Load($id);
- $self->_Attach($args{'MIMEObj'})
- if defined $args{'MIMEObj'};
-
- #Provide a way to turn off scrips if we need to
- if ($args{'ActivateScrips'}) {
-
- #We're really going to need a non-acled ticket for the scrips to work
- my $TicketAsSystem = RT::Ticket->new($RT::SystemUser);
- $TicketAsSystem->Load($args{'Ticket'}) ||
- $RT::Logger->err("$self couldn't load ticket $args{'Ticket'}\n");
-
- my $TransAsSystem = RT::Transaction->new($RT::SystemUser);
- $TransAsSystem->Load($self->id) ||
- $RT::Logger->err("$self couldn't load a copy of itself as superuser\n");
-
- # {{{ Deal with Scrips
-
- #Load a scripscopes object
- use RT::Scrips;
- my $PossibleScrips = RT::Scrips->new($RT::SystemUser);
-
- $PossibleScrips->LimitToQueue($TicketAsSystem->QueueObj->Id); #Limit it to $Ticket->QueueObj->Id
- $PossibleScrips->LimitToGlobal(); # or to "global"
- my $ConditionsAlias = $PossibleScrips->NewAlias('ScripConditions');
-
- $PossibleScrips->Join(ALIAS1 => 'main', FIELD1 => 'ScripCondition',
- ALIAS2 => $ConditionsAlias, FIELD2=> 'id');
-
-
- #We only want things where the scrip applies to this sort of transaction
- $PossibleScrips->Limit(ALIAS=> $ConditionsAlias,
- FIELD=>'ApplicableTransTypes',
- OPERATOR => 'LIKE',
- VALUE => $args{'Type'},
- ENTRYAGGREGATOR => 'OR',
- );
-
- # Or where the scrip applies to any transaction
- $PossibleScrips->Limit(ALIAS=> $ConditionsAlias,
- FIELD=>'ApplicableTransTypes',
- OPERATOR => 'LIKE',
- VALUE => "Any",
- ENTRYAGGREGATOR => 'OR',
- );
-
- #Iterate through each script and check it's applicability.
-
- while (my $Scrip = $PossibleScrips->Next()) {
-
- #TODO: properly deal with errors raised in this scrip loop
-
- #$RT::Logger->debug("$self now dealing with ".$Scrip->Id. "\n");
- eval {
- local $SIG{__DIE__} = sub { $RT::Logger->error($_[0])};
-
-
- #Load the scrip's Condition object
- $Scrip->ConditionObj->LoadCondition(TicketObj => $TicketAsSystem,
- TransactionObj => $TransAsSystem);
-
-
- #If it's applicable, prepare and commit it
-
- $RT::Logger->debug ("$self: Checking condition ".$Scrip->ConditionObj->Name. "...\n");
-
- if ( $Scrip->IsApplicable() ) {
-
- $RT::Logger->debug ("$self: Matches condition ".$Scrip->ConditionObj->Name. "...\n");
- #TODO: handle some errors here
-
- $Scrip->ActionObj->LoadAction(TicketObj => $TicketAsSystem,
- TransactionObj => $TransAsSystem);
-
-
- if ($Scrip->Prepare()) {
- $RT::Logger->debug("$self: Prepared " .
- $Scrip->ActionObj->Name . "\n");
- if ($Scrip->Commit()) {
- $RT::Logger->debug("$self: Committed " .
- $Scrip->ActionObj->Name . "\n");
- }
- else {
- $RT::Logger->info("$self: Failed to commit ".
- $Scrip->ActionObj->Name . "\n");
- }
- }
- else {
- $RT::Logger->info("$self: Failed to prepare " .
- $Scrip->ActionObj->Name . "\n");
- }
-
- #We're done with it. lets clean up.
- #TODO: something else isn't letting these get garbage collected. check em out.
- $Scrip->ActionObj->DESTROY();
- $Scrip->ConditionObj->DESTROY;
- }
-
-
- else {
- $RT::Logger->debug ("$self: Doesn't match condition ".$Scrip->ConditionObj->Name. "...\n");
-
- # TODO: why doesn't this catch all the ScripObjs we create.
- # and why do we explictly need to destroy them?
- $Scrip->ConditionObj->DESTROY;
- }
- }
- }
-
- # }}}
-
- }
-
- return ($id, "Transaction Created");
-}
-# }}}
+=item EffectiveTicket
-# {{{ sub Delete
+Returns the current value of EffectiveTicket.
+(In the database, EffectiveTicket is stored as int(11).)
-sub Delete {
- my $self = shift;
- return (0, 'Deleting this object could break referential integrity');
-}
-# }}}
-# {{{ Routines dealing with Attachments
+=item SetEffectiveTicket VALUE
-# {{{ sub Message
-=head2 Message
+Set EffectiveTicket to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, EffectiveTicket will be stored as a int(11).)
- Returns the RT::Attachments Object which contains the "top-level" object
- attachment for this transaction
=cut
-sub Message {
- my $self = shift;
-
- if (!defined ($self->{'message'}) ){
-
- $self->{'message'} = new RT::Attachments($self->CurrentUser);
- $self->{'message'}->Limit(FIELD => 'TransactionId',
- VALUE => $self->Id);
-
- $self->{'message'}->ChildrenOf(0);
- }
- return($self->{'message'});
-}
-# }}}
+=item Ticket
+
+Returns the current value of Ticket.
+(In the database, Ticket is stored as int(11).)
+
-# {{{ sub Content
-=head2 Content PARAMHASH
+=item SetTicket VALUE
-If this transaction has attached mime objects, returns the first text/ part.
-Otherwise, returns undef.
-Takes a paramhash. If the $args{'Quote'} parameter is set, wraps this message
-at $args{'Wrap'}. $args{'Wrap'} defaults to 70.
+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
-sub Content {
- my $self = shift;
- my %args = ( Quote => 0,
- Wrap => 70,
- @_ );
-
- my $content = undef;
-
- # If we don\'t have any content, return undef now.
- unless ($self->Message->First) {
- return (undef);
- }
-
- # Get the set of toplevel attachments to this transaction.
- my $MIMEObj = $self->Message->First();
-
- # If it's a message or a plain part, just return the
- # body.
- if ($MIMEObj->ContentType() =~ '^(text|message)(/|$)') {
- $content = $MIMEObj->Content();
- }
-
- # If it's a multipart object, first try returning the first
- # text/plain part.
-
- elsif ($MIMEObj->ContentType() =~ '^multipart/') {
- my $plain_parts = $MIMEObj->Children();
- $plain_parts->ContentType(VALUE => 'text/plain');
-
- # If we actully found a part, return its content
- if ($plain_parts->First &&
- $plain_parts->First->Content ne '') {
- $content = $plain_parts->First->Content;
- }
-
- # If that fails, return the first text/ or message/ part
- # which has some content.
-
- else {
- my $all_parts = $MIMEObj->Children();
- while (($content == undef) &&
- (my $part = $all_parts->Next)) {
- if (($part->ContentType() =~ '^(text|message)(/|$)') and
- ($part->Content())) {
- $content = $part->Content;
- }
- }
- }
-
- }
- # If all else fails, return a message that we couldn't find
- # any content
- else {
- $content = 'This transaction appears to have no content';
- }
-
- if ($args{'Quote'}) {
- # Remove quoted signature.
- $content =~ s/\n-- \n(.*)$//s;
-
- # What's the longest line like?
- foreach (split (/\n/,$content)) {
- $max=length if ( length > $max);
- }
-
- if ($max>76) {
- require Text::Wrapper;
- my $wrapper=new Text::Wrapper
- (
- columns => $args{'Wrap'},
- body_start => ($max > 70*3 ? ' ' : ''),
- par_start => ''
- );
- $content=$wrapper->wrap($content);
- }
-
- $content =~ s/^/> /gm;
- $content = '[' . $self->CreatorObj->Name() . ' - ' . $self->CreatedAsString()
- . "]:\n\n"
- . $content . "\n\n";
-
- }
-
- return ($content);
-}
-# }}}
-# {{{ sub Subject
+=item TicketObj
+
+Returns the Ticket Object which has the id returned by Ticket
-=head2 Subject
-If this transaction has attached mime objects, returns the first one's subject
-Otherwise, returns null
-
=cut
-sub Subject {
- my $self = shift;
- if ($self->Message->First) {
- return ($self->Message->First->Subject);
- }
- else {
- return (undef);
- }
+sub TicketObj {
+ my $self = shift;
+ my $Ticket = RT::Ticket->new($self->CurrentUser);
+ $Ticket->Load($self->__Value('Ticket'));
+ return($Ticket);
}
-# }}}
-# {{{ sub Attachments
+=item TimeTaken
+
+Returns the current value of TimeTaken.
+(In the database, TimeTaken is stored as int(11).)
+
-=head2 Attachments
- Returns all the RT::Attachment objects which are attached
-to this transaction. Takes an optional parameter, which is
-a ContentType that Attachments should be restricted to.
+=item SetTimeTaken VALUE
+
+
+Set TimeTaken to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, TimeTaken will be stored as a int(11).)
+
=cut
-sub Attachments {
- my $self = shift;
- my $Types = '';
- $Types = shift if (@_);
-
- my $Attachments = new RT::Attachments($self->CurrentUser);
-
- #If it's a comment, return an empty object if they don't have the right to see it
- if ($self->Type eq 'Comment') {
- unless ($self->CurrentUserHasRight('ShowTicketComments')) {
- return ($Attachments);
- }
- }
- #if they ain't got rights to see, return an empty object
- else {
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return ($Attachments);
- }
- }
-
- $Attachments->Limit(FIELD => 'TransactionId',
- VALUE => $self->Id);
-
- # Get the attachments in the order they're put into
- # the database. Arguably, we should be returning a tree
- # of attachments, not a set...but no current app seems to need
- # it.
-
- $Attachments->OrderBy(ALIAS => 'main',
- FIELD => 'Id',
- ORDER => 'asc');
-
- if ($Types) {
- $Attachments->ContentType( VALUE => "$Types",
- OPERATOR => "LIKE");
- }
-
-
- return($Attachments);
-
-}
+=item Type
-# }}}
+Returns the current value of Type.
+(In the database, Type is stored as varchar(20).)
-# {{{ sub _Attach
-=head2 _Attach
-A private method used to attach a mime object to this transaction.
+=item SetType VALUE
+
+
+Set Type to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Type will be stored as a varchar(20).)
+
=cut
-sub _Attach {
- my $self = shift;
- my $MIMEObject = shift;
-
- if (!defined($MIMEObject)) {
- $RT::Logger->error("$self _Attach: We can't attach a mime object if you don't give us one.\n");
- return(0, "$self: no attachment specified");
- }
-
-
- use RT::Attachment;
- my $Attachment = new RT::Attachment ($self->CurrentUser);
- $Attachment->Create(TransactionId => $self->Id,
- Attachment => $MIMEObject);
- return ($Attachment, "Attachment created");
-
-}
-# }}}
+=item Field
-# }}}
+Returns the current value of Field.
+(In the database, Field is stored as varchar(40).)
-# {{{ Routines dealing with Transaction Attributes
-# {{{ sub TicketObj
-=head2 TicketObj
+=item SetField VALUE
+
+
+Set Field to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Field will be stored as a varchar(40).)
-Returns this transaction's ticket object.
=cut
-sub TicketObj {
- my $self = shift;
- if (! exists $self->{'TicketObj'}) {
- $self->{'TicketObj'} = new RT::Ticket($self->CurrentUser);
- $self->{'TicketObj'}->Load($self->Ticket);
- }
-
- return $self->{'TicketObj'};
-}
-# }}}
-# {{{ sub Description
+=item OldValue
+
+Returns the current value of OldValue.
+(In the database, OldValue is stored as varchar(255).)
+
+
+
+=item SetOldValue VALUE
+
-=head2 Description
+Set OldValue to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, OldValue will be stored as a varchar(255).)
-Returns a text string which describes this transaction
=cut
-sub Description {
- my $self = shift;
+=item NewValue
+
+Returns the current value of NewValue.
+(In the database, NewValue is stored as varchar(255).)
- #Check those ACLs
- #If it's a comment, we need to be extra special careful
- if ($self->__Value('Type') eq 'Comment') {
- unless ($self->CurrentUserHasRight('ShowTicketComments')) {
- return (0, "Permission Denied");
- }
- }
-
- #if they ain't got rights to see, don't let em
- else {
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (0, "Permission Denied");
- }
- }
-
- if (!defined($self->Type)) {
- return("No transaction type specified");
- }
-
- return ($self->BriefDescription . " by " . $self->CreatorObj->Name);
-}
-# }}}
-# {{{ sub BriefDescription
+=item SetNewValue VALUE
-=head2 BriefDescription
-Returns a text string which briefly describes this transaction
+Set NewValue to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, NewValue will be stored as a varchar(255).)
+
=cut
-sub BriefDescription {
- my $self = shift;
+=item Data
- #Check those ACLs
- #If it's a comment, we need to be extra special careful
- if ($self->__Value('Type') eq 'Comment') {
- unless ($self->CurrentUserHasRight('ShowTicketComments')) {
- return (0, "Permission Denied");
- }
- }
-
- #if they ain't got rights to see, don't let em
- else {
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (0, "Permission Denied");
- }
- }
-
- if (!defined($self->Type)) {
- return("No transaction type specified");
- }
-
- if ($self->Type eq 'Create'){
- return("Ticket created");
- }
- elsif ($self->Type =~ /Status/) {
- if ($self->Field eq 'Status') {
- if ($self->NewValue eq 'dead') {
- return ("Ticket killed");
- }
- else {
- return( "Status changed from ". $self->OldValue .
- " to ". $self->NewValue);
-
- }
- }
- # Generic:
- return ($self->Field." changed from ".($self->OldValue||"(empty value)").
- " to ".$self->NewValue );
- }
-
- if ($self->Type eq 'Correspond') {
- return("Correspondence added");
- }
-
- elsif ($self->Type eq 'Comment') {
- return( "Comments added");
- }
-
- elsif ($self->Type eq 'Keyword') {
-
- my $field = 'Keyword';
-
- if ($self->Field) {
- my $keywordsel = new RT::KeywordSelect ($self->CurrentUser);
- $keywordsel->Load($self->Field);
- $field = $keywordsel->Name();
- }
-
- if ($self->OldValue eq '') {
- return ($field." ".$self->NewValue." added");
- }
- elsif ($self->NewValue eq '') {
- return ($field." ".$self->OldValue." deleted");
-
- }
- else {
- return ($field." ".$self->OldValue . " changed to ".
- $self->NewValue);
- }
- }
-
- elsif ($self->Type eq 'Untake'){
- return( "Untaken");
- }
-
- elsif ($self->Type eq "Take") {
- return( "Taken");
- }
-
- elsif ($self->Type eq "Force") {
- my $Old = RT::User->new($self->CurrentUser);
- $Old->Load($self->OldValue);
- my $New = RT::User->new($self->CurrentUser);
- $New->Load($self->NewValue);
- return "Owner forcibly changed from ".$Old->Name . " to ". $New->Name;
- }
- elsif ($self->Type eq "Steal") {
- my $Old = RT::User->new($self->CurrentUser);
- $Old->Load($self->OldValue);
- return "Stolen from ".$Old->Name;
- }
-
- elsif ($self->Type eq "Give") {
- my $New = RT::User->new($self->CurrentUser);
- $New->Load($self->NewValue);
- return( "Given to ".$New->Name);
- }
-
- elsif ($self->Type eq 'AddWatcher'){
- return( $self->Field." ". $self->NewValue ." added");
- }
-
- elsif ($self->Type eq 'DelWatcher'){
- return( $self->Field." ".$self->OldValue ." deleted");
- }
-
- elsif ($self->Type eq 'Subject') {
- return( "Subject changed to ".$self->Data);
- }
- elsif ($self->Type eq 'Told') {
- return( "User notified");
- }
-
- elsif ($self->Type eq 'AddLink') {
- return ($self->Data);
- }
- elsif ($self->Type eq 'DeleteLink') {
- return ($self->Data);
- }
- elsif ($self->Type eq 'Set') {
- if ($self->Field eq 'Queue') {
- my $q1 = new RT::Queue($self->CurrentUser);
- $q1->Load($self->OldValue);
- my $q2 = new RT::Queue($self->CurrentUser);
- $q2->Load($self->NewValue);
- return ($self->Field . " changed from " . $q1->Name . " to ".
- $q2->Name);
- }
-
- # Write the date/time change at local time:
- elsif ($self->Field =~ /Due|Starts|Started|Told/) {
- my $t1 = new RT::Date($self->CurrentUser);
- $t1->Set(Format => 'ISO', Value => $self->NewValue);
- my $t2 = new RT::Date($self->CurrentUser);
- $t2->Set(Format => 'ISO', Value => $self->OldValue);
- return ($self->Field . " changed from " . $t2->AsString .
- " to ".$t1->AsString);
- }
- else {
- return ($self->Field . " changed from " . $self->OldValue .
- " to ".$self->NewValue);
- }
- }
- elsif ($self->Type eq 'PurgeTransaction') {
- return ("Transaction ".$self->Data. " purged");
- }
- else {
- return ("Default: ". $self->Type ."/". $self->Field .
- " changed from " . $self->OldValue .
- " to ".$self->NewValue);
-
- }
-}
+Returns the current value of Data.
+(In the database, Data is stored as varchar(100).)
-# }}}
-# {{{ Utility methods
-# {{{ sub IsInbound
+=item SetData VALUE
-=head2 IsInbound
-Returns true if the creator of the transaction is a requestor of the ticket.
-Returns false otherwise
+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(100).)
-=cut
-sub IsInbound {
- my $self=shift;
- return ($self->TicketObj->IsRequestor($self->CreatorObj));
-}
+=cut
-# }}}
-
-# }}}
-
-# {{{ sub _Accessible
-
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- TimeTaken => 'read',
- Ticket => 'read/public',
- Type=> 'read',
- Field => 'read',
- Data => 'read',
- NewValue => 'read',
- OldValue => 'read',
- Creator => 'read/auto',
- Created => 'read/auto',
- );
- return $self->SUPER::_Accessible(@_, %Cols);
-}
-# }}}
+=item Creator
-# }}}
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
- return(0, 'Transactions are immutable');
-}
+=cut
-# }}}
-# {{{ sub _Value
+=item Created
-=head2 _Value
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
-Takes the name of a table column.
-Returns its value as a string, if the user passes an ACL check
=cut
-sub _Value {
- my $self = shift;
- my $field = shift;
-
-
- #if the field is public, return it.
- if ($self->_Accessible($field, 'public')) {
- return($self->__Value($field));
-
- }
- #If it's a comment, we need to be extra special careful
- if ($self->__Value('Type') eq 'Comment') {
- unless ($self->CurrentUserHasRight('ShowTicketComments')) {
- return (undef);
- }
- }
- #if they ain't got rights to see, don't let em
- else {
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (undef);
- }
- }
-
- return($self->__Value($field));
-
-}
-# }}}
+sub _ClassAccessible {
+ {
+
+ id =>
+ {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, type => 'int(11)', default => '0'},
+ Type =>
+ {read => 1, write => 1, type => 'varchar(20)', default => ''},
+ Field =>
+ {read => 1, write => 1, type => 'varchar(40)', default => ''},
+ OldValue =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ NewValue =>
+ {read => 1, write => 1, type => 'varchar(255)', default => ''},
+ Data =>
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
+ Creator =>
+ {read => 1, auto => 1, type => 'int(11)', default => '0'},
+ Created =>
+ {read => 1, auto => 1, type => 'datetime', default => ''},
-# {{{ sub CurrentUserHasRight
+ }
+};
-=head2 CurrentUserHasRight RIGHT
-Calls $self->CurrentUser->HasQueueRight for the right passed in here.
-passed in here.
+ eval "require RT::Transaction_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Overlay.pm}) {
+ die $@;
+ };
-=cut
+ eval "require RT::Transaction_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transaction_Vendor.pm}) {
+ die $@;
+ };
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
- return ($self->CurrentUser->HasQueueRight(Right => "$right",
- TicketObj => $self->TicketObj));
-}
+ eval "require RT::Transaction_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transaction_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::Transaction_Overlay, RT::Transaction_Vendor, RT::Transaction_Local
+
+=cut
-# }}}
1;
diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm
index 2ae98f286..23a475ac6 100755
--- a/rt/lib/RT/Transactions.pm
+++ b/rt/lib/RT/Transactions.pm
@@ -1,78 +1,115 @@
-#$Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Transactions.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
+# 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
+# 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::Transactions - a collection of RT Transaction objects
+=head1 NAME
+ RT::Transactions -- Class Description
+
=head1 SYNOPSIS
- use RT::Transactions;
-
+ use RT::Transactions
=head1 DESCRIPTION
=head1 METHODS
-=begin testing
-
-ok (require RT::TestHarness);
-ok (require RT::Transactions);
-
-=end testing
-
=cut
package RT::Transactions;
-use RT::EasySearch;
-@ISA= qw(RT::EasySearch);
+use RT::SearchBuilder;
use RT::Transaction;
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "Transactions";
- $self->{'primary_key'} = "id";
-
- # By default, order by the date of the transaction, rather than ID.
- $self->OrderBy( ALIAS => 'main',
- FIELD => 'Created',
- ORDER => 'ASC');
-
- return ( $self->SUPER::_Init(@_));
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
+
+
+sub _Init {
+ my $self = shift;
+ $self->{'table'} = 'Transactions';
+ $self->{'primary_key'} = 'id';
+
+
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-# {{{ sub NewItem
-sub NewItem {
+
+=item NewItem
+
+Returns an empty new RT::Transaction item
+
+=cut
+
+sub NewItem {
my $self = shift;
-
return(RT::Transaction->new($self->CurrentUser));
}
-# }}}
+
+ eval "require RT::Transactions_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transactions_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Transactions_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transactions_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::Transactions_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Transactions_Local.pm}) {
+ die $@;
+ };
-=head2 example methods
- Queue RT::Queue or Queue Id
- Ticket RT::Ticket or Ticket Id
+=head1 SEE ALSO
-LimitDate
-
-Type TRANSTYPE
-Field STRING
-OldValue OLDVAL
-NewValue NEWVAL
-Data DATA
-TimeTaken
-Actor USEROBJ/USERID
-ContentMatches STRING
+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::Transactions_Overlay, RT::Transactions_Vendor, RT::Transactions_Local
=cut
1;
-
diff --git a/rt/lib/RT/User.pm b/rt/lib/RT/User.pm
index 4e8554030..cbc10f5b4 100755
--- a/rt/lib/RT/User.pm
+++ b/rt/lib/RT/User.pm
@@ -1,1222 +1,854 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/User.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
+# 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
+# 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::User - RT User object
+RT::User
-=head1 SYNOPSIS
- use RT::User;
+=head1 SYNOPSIS
=head1 DESCRIPTION
-
=head1 METHODS
-=begin testing
+=cut
+
+package RT::User;
+use RT::Record;
+
+
+use vars qw( @ISA );
+@ISA= qw( RT::Record );
+
+sub _Init {
+ my $self = shift;
+
+ $self->Table('Users');
+ $self->SUPER::_Init(@_);
+}
-ok(require RT::TestHarness);
-ok(require RT::User);
-=end testing
+
+=item Create PARAMHASH
+
+Create takes a hash of values and creates a row in the database:
+
+ varchar(200) 'Name'.
+ varchar(40) 'Password'.
+ blob 'Comments'.
+ blob 'Signature'.
+ varchar(120) 'EmailAddress'.
+ blob 'FreeformContactInfo'.
+ varchar(200) 'Organization'.
+ varchar(120) 'RealName'.
+ varchar(16) 'NickName'.
+ varchar(16) 'Lang'.
+ varchar(16) 'EmailEncoding'.
+ varchar(16) 'WebEncoding'.
+ varchar(100) 'ExternalContactInfoId'.
+ varchar(30) 'ContactInfoSystem'.
+ varchar(100) 'ExternalAuthId'.
+ varchar(30) 'AuthSystem'.
+ varchar(16) 'Gecos'.
+ varchar(30) 'HomePhone'.
+ varchar(30) 'WorkPhone'.
+ varchar(30) 'MobilePhone'.
+ varchar(30) 'PagerPhone'.
+ varchar(200) 'Address1'.
+ varchar(200) 'Address2'.
+ varchar(100) 'City'.
+ varchar(100) 'State'.
+ varchar(16) 'Zip'.
+ varchar(50) 'Country'.
+ varchar(50) 'Timezone'.
+ text 'PGPKey'.
+
=cut
-package RT::User;
-use RT::Record;
-@ISA= qw(RT::Record);
-# {{{ sub _Init
-sub _Init {
+
+sub Create {
my $self = shift;
- $self->{'table'} = "Users";
- return($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub _Accessible
-
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- # {{{ Core RT info
- Name => 'public/read/write/admin',
- Password => 'write',
- Comments => 'read/write/admin',
- Signature => 'read/write',
- EmailAddress => 'public/read/write',
- PagerEmailAddress => 'read/write',
- FreeformContactInfo => 'read/write',
- Organization => 'public/read/write/admin',
- Disabled => 'public/read/write/admin', #To modify this attribute, we have helper
- #methods
- Privileged => 'read/write/admin', # 0=no 1=user 2=system
-
- # }}}
-
- # {{{ Names
-
- RealName => 'public/read/write',
- NickName => 'public/read/write',
- # }}}
-
- # {{{ Localization and Internationalization
- Lang => 'public/read/write',
- EmailEncoding => 'public/read/write',
- WebEncoding => 'public/read/write',
- # }}}
-
- # {{{ External ContactInfo Linkage
- ExternalContactInfoId => 'public/read/write/admin',
- ContactInfoSystem => 'public/read/write/admin',
- # }}}
-
- # {{{ User Authentication identifier
- ExternalAuthId => 'public/read/write/admin',
- #Authentication system used for user
- AuthSystem => 'public/read/write/admin',
- Gecos => 'public/read/write/admin', #Gecos is the name of the fields in a
- # unix passwd file. In this case, it refers to "Unix Username"
- # }}}
-
- # {{{ Telephone numbers
- HomePhone => 'read/write',
- WorkPhone => 'read/write',
- MobilePhone => 'read/write',
- PagerPhone => 'read/write',
-
- # }}}
-
- # {{{ Paper Address
- Address1 => 'read/write',
- Address2 => 'read/write',
- City => 'read/write',
- State => 'read/write',
- Zip => 'read/write',
- Country => 'read/write',
- # }}}
-
- # {{{ Core DBIx::Record Attributes
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
-
- # }}}
- );
- return($self->SUPER::_Accessible(@_, %Cols));
+ my %args = (
+ Name => '',
+ Password => '',
+ Comments => '',
+ Signature => '',
+ EmailAddress => '',
+ FreeformContactInfo => '',
+ Organization => '',
+ RealName => '',
+ NickName => '',
+ Lang => '',
+ EmailEncoding => '',
+ WebEncoding => '',
+ ExternalContactInfoId => '',
+ ContactInfoSystem => '',
+ ExternalAuthId => '',
+ AuthSystem => '',
+ Gecos => '',
+ HomePhone => '',
+ WorkPhone => '',
+ MobilePhone => '',
+ PagerPhone => '',
+ Address1 => '',
+ Address2 => '',
+ City => '',
+ State => '',
+ Zip => '',
+ Country => '',
+ Timezone => '',
+ PGPKey => '',
+
+ @_);
+ $self->SUPER::Create(
+ Name => $args{'Name'},
+ Password => $args{'Password'},
+ Comments => $args{'Comments'},
+ Signature => $args{'Signature'},
+ EmailAddress => $args{'EmailAddress'},
+ FreeformContactInfo => $args{'FreeformContactInfo'},
+ Organization => $args{'Organization'},
+ RealName => $args{'RealName'},
+ NickName => $args{'NickName'},
+ Lang => $args{'Lang'},
+ EmailEncoding => $args{'EmailEncoding'},
+ WebEncoding => $args{'WebEncoding'},
+ ExternalContactInfoId => $args{'ExternalContactInfoId'},
+ ContactInfoSystem => $args{'ContactInfoSystem'},
+ ExternalAuthId => $args{'ExternalAuthId'},
+ AuthSystem => $args{'AuthSystem'},
+ Gecos => $args{'Gecos'},
+ HomePhone => $args{'HomePhone'},
+ WorkPhone => $args{'WorkPhone'},
+ MobilePhone => $args{'MobilePhone'},
+ PagerPhone => $args{'PagerPhone'},
+ Address1 => $args{'Address1'},
+ Address2 => $args{'Address2'},
+ City => $args{'City'},
+ State => $args{'State'},
+ Zip => $args{'Zip'},
+ Country => $args{'Country'},
+ Timezone => $args{'Timezone'},
+ PGPKey => $args{'PGPKey'},
+);
+
}
-# }}}
-# {{{ sub Create
-sub Create {
- my $self = shift;
- my %args = (Privileged => 0,
- @_ # get the real argumentlist
- );
-
- #Check the ACL
- unless ($self->CurrentUserHasRight('AdminUsers')) {
- return (0, 'No permission to create users');
- }
-
- if (! $args{'Password'}) {
- $args{'Password'} = '*NO-PASSWORD*';
- }
- elsif (length($args{'Password'}) < $RT::MinimumPasswordLength) {
- return(0,"Password too short");
- }
- else {
- my $salt = join '', ('.','/',0..9,'A'..'Z','a'..'z')[rand 64, rand 64];
- $args{'Password'} = crypt($args{'Password'}, $salt);
- }
-
-
- #TODO Specify some sensible defaults.
-
- unless (defined ($args{'Name'})) {
- return(0, "Must specify 'Name' attribute");
- }
-
-
- #SANITY CHECK THE NAME AND ABORT IF IT'S TAKEN
- if ($RT::SystemUser) { #This only works if RT::SystemUser has been defined
- my $TempUser = RT::User->new($RT::SystemUser);
- $TempUser->Load($args{'Name'});
- return (0, 'Name in use') if ($TempUser->Id);
-
- return(0, 'Email address in use')
- unless ($self->ValidateEmailAddress($args{'EmailAddress'}));
- }
- else {
- $RT::Logger->warning("$self couldn't check for pre-existing ".
- " users on create. This will happen".
- " on installation\n");
- }
-
- my $id = $self->SUPER::Create(%args);
-
- #If the create failed.
- unless ($id) {
- return (0, 'Could not create user');
- }
-
-
- #TODO post 2.0
- #if ($args{'SendWelcomeMessage'}) {
- # #TODO: Check if the email exists and looks valid
- # #TODO: Send the user a "welcome message"
- #}
-
- return ($id, 'User created');
-}
+=item id
-# }}}
+Returns the current value of id.
+(In the database, id is stored as int(11).)
-# {{{ sub _BootstrapCreate
-#create a user without validating _any_ data.
+=cut
-#To be used only on database init.
-sub _BootstrapCreate {
- my $self = shift;
- my %args = (@_);
+=item Name
- $args{'Password'} = "*NO-PASSWORD*";
- my $id = $self->SUPER::Create(%args);
-
- #If the create failed.
- return (0, 'Could not create user')
- unless ($id);
+Returns the current value of Name.
+(In the database, Name is stored as varchar(200).)
- return ($id, 'User created');
-}
-# }}}
-# {{{ sub Delete
+=item SetName VALUE
-sub Delete {
- my $self = shift;
-
- return(0, 'Deleting this object would violate referential integrity');
-
-}
-# }}}
+Set Name to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Name will be stored as a varchar(200).)
+
+
+=cut
+
+
+=item Password
+
+Returns the current value of Password.
+(In the database, Password is stored as varchar(40).)
-# {{{ sub Load
-=head2 Load
-Load a user object from the database. Takes a single argument.
-If the argument is numerical, load by the column 'id'. Otherwise, load by
-the "Name" column which is the user's textual username.
+=item SetPassword VALUE
+
+
+Set Password to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Password will be stored as a varchar(40).)
+
=cut
-sub Load {
- my $self = shift;
- my $identifier = shift || return undef;
-
- #if it's an int, load by id. otherwise, load by name.
- if ($identifier !~ /\D/) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- $self->LoadByCol("Name",$identifier);
- }
-}
-# }}}
+=item Comments
+
+Returns the current value of Comments.
+(In the database, Comments is stored as blob.)
-# {{{ sub LoadByEmail
-=head2 LoadByEmail
+=item SetComments VALUE
-Tries to load this user object from the database by the user's email address.
+
+Set Comments to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Comments will be stored as a blob.)
=cut
-sub LoadByEmail {
- my $self=shift;
- my $address = shift;
- # Never load an empty address as an email address.
- unless ($address) {
- return(undef);
- }
+=item Signature
- $address = RT::CanonicalizeAddress($address);
- #$RT::Logger->debug("Trying to load an email address: $address\n");
- return $self->LoadByCol("EmailAddress", $address);
-}
-# }}}
+Returns the current value of Signature.
+(In the database, Signature is stored as blob.)
-# {{{ sub ValidateEmailAddress
-=head2 ValidateEmailAddress ADDRESS
+=item SetSignature VALUE
+
+
+Set Signature to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Signature will be stored as a blob.)
-Returns true if the email address entered is not in use by another user or is
-undef or ''. Returns false if it's in use.
=cut
-sub ValidateEmailAddress {
- my $self = shift;
- my $Value = shift;
- # if the email address is null, it's always valid
- return (1) if(!$Value || $Value eq "");
+=item EmailAddress
- my $TempUser = RT::User->new($RT::SystemUser);
- $TempUser->LoadByEmail($Value);
+Returns the current value of EmailAddress.
+(In the database, EmailAddress is stored as varchar(120).)
- if( $TempUser->id &&
- ($TempUser->id != $self->id)) { # if we found a user with that address
- # it's invalid to set this user's address to it
- return(undef);
- }
- else { #it's a valid email address
- return(1);
- }
-}
-# }}}
+=item SetEmailAddress VALUE
+
+
+Set EmailAddress to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, EmailAddress will be stored as a varchar(120).)
+
+
+=cut
+
+
+=item FreeformContactInfo
+
+Returns the current value of FreeformContactInfo.
+(In the database, FreeformContactInfo is stored as blob.)
-# {{{ sub SetRandomPassword
+=item SetFreeformContactInfo VALUE
-=head2 SetRandomPassword
-Takes no arguments. Returns a status code and a new password or an error message.
-If the status is 1, the second value returned is the new password.
-If the status is anything else, the new value returned is the error code.
+Set FreeformContactInfo to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, FreeformContactInfo will be stored as a blob.)
+
=cut
-sub SetRandomPassword {
- my $self = shift;
+=item Organization
- unless ($self->CurrentUserCanModify('Password')) {
- return (0, "Permission Denied");
- }
-
- my $pass = $self->GenerateRandomPassword(6,8);
+Returns the current value of Organization.
+(In the database, Organization is stored as varchar(200).)
- # If we have "notify user on
- my ($val, $msg) = $self->SetPassword($pass);
-
- #If we got an error return the error.
- return (0, $msg) unless ($val);
-
- #Otherwise, we changed the password, lets return it.
- return (1, $pass);
-
-}
-# }}}
+=item SetOrganization VALUE
+
+
+Set Organization to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Organization will be stored as a varchar(200).)
+
+
+=cut
+
+
+=item RealName
+
+Returns the current value of RealName.
+(In the database, RealName is stored as varchar(120).)
-# {{{ sub ResetPassword
-=head2 ResetPassword
+=item SetRealName VALUE
+
+
+Set RealName to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, RealName will be stored as a varchar(120).)
-Returns status, [ERROR or new password]. Resets this user\'s password to
-a randomly generated pronouncable password and emails them, using a
-global template called "RT_PasswordChange", which can be overridden
-with global templates "RT_PasswordChange_Privileged" or "RT_PasswordChange_NonPrivileged"
-for privileged and Non-privileged users respectively.
=cut
-sub ResetPassword {
- my $self = shift;
-
- unless ($self->CurrentUserCanModify('Password')) {
- return (0, "Permission Denied");
- }
- my ($status, $pass) = $self->SetRandomPassword();
-
- unless ($status) {
- return (0, "$pass");
- }
-
- my $template = RT::Template->new($self->CurrentUser);
-
-
- if ($self->IsPrivileged) {
- $template->LoadGlobalTemplate('RT_PasswordChange_Privileged');
- }
- else {
- $template->LoadGlobalTemplate('RT_PasswordChange_Privileged');
- }
-
- unless ($template->Id) {
- $template->LoadGlobalTemplate('RT_PasswordChange');
- }
-
- unless ($template->Id) {
- $RT::Logger->crit("$self tried to send ".$self->Name." a password reminder ".
- "but couldn't find a password change template");
- }
-
- my $notification = RT::Action::SendPasswordEmail->new(TemplateObj => $template,
- Argument => $pass);
-
- $notification->SetTo($self->EmailAddress);
-
- my ($ret);
- $ret = $notification->Prepare();
- if ($ret) {
- $ret = $notification->Commit();
- }
-
- if ($ret) {
- return(1, 'New password notification sent');
- } else {
- return (0, 'Notification could not be sent');
- }
-
-}
+=item NickName
-# }}}
+Returns the current value of NickName.
+(In the database, NickName is stored as varchar(16).)
-# {{{ sub GenerateRandomPassword
-=head2 GenerateRandomPassword MIN_LEN and MAX_LEN
-Returns a random password between MIN_LEN and MAX_LEN characters long.
+=item SetNickName VALUE
+
+
+Set NickName to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, NickName will be stored as a varchar(16).)
+
=cut
-sub GenerateRandomPassword {
- my $self = shift;
- my $min_length = shift;
- my $max_length = shift;
-
- #This code derived from mpw.pl, a bit of code with a sordid history
- # Its notes:
-
- # Perl cleaned up a bit by Jesse Vincent 1/14/2001.
- # Converted to perl from C by Marc Horowitz, 1/20/2000.
- # Converted to C from Multics PL/I by Bill Sommerfeld, 4/21/86.
- # Original PL/I version provided by Jerry Saltzer.
-
-
- my ($frequency, $start_freq, $total_sum, $row_sums);
-
- #When munging characters, we need to know where to start counting letters from
- my $a = ord('a');
-
- # frequency of English digraphs (from D Edwards 1/27/66)
- $frequency =
- [ [ 4, 20, 28, 52, 2, 11, 28, 4, 32, 4, 6, 62, 23,
- 167, 2, 14, 0, 83, 76, 127, 7, 25, 8, 1, 9, 1 ], # aa - az
- [ 13, 0, 0, 0, 55, 0, 0, 0, 8, 2, 0, 22, 0,
- 0, 11, 0, 0, 15, 4, 2, 13, 0, 0, 0, 15, 0 ], # ba - bz
- [ 32, 0, 7, 1, 69, 0, 0, 33, 17, 0, 10, 9, 1,
- 0, 50, 3, 0, 10, 0, 28, 11, 0, 0, 0, 3, 0 ], # ca - cz
- [ 40, 16, 9, 5, 65, 18, 3, 9, 56, 0, 1, 4, 15,
- 6, 16, 4, 0, 21, 18, 53, 19, 5, 15, 0, 3, 0 ], # da - dz
- [ 84, 20, 55, 125, 51, 40, 19, 16, 50, 1, 4, 55, 54,
- 146, 35, 37, 6, 191, 149, 65, 9, 26, 21, 12, 5, 0 ], # ea - ez
- [ 19, 3, 5, 1, 19, 21, 1, 3, 30, 2, 0, 11, 1,
- 0, 51, 0, 0, 26, 8, 47, 6, 3, 3, 0, 2, 0 ], # fa - fz
- [ 20, 4, 3, 2, 35, 1, 3, 15, 18, 0, 0, 5, 1,
- 4, 21, 1, 1, 20, 9, 21, 9, 0, 5, 0, 1, 0 ], # ga - gz
- [ 101, 1, 3, 0, 270, 5, 1, 6, 57, 0, 0, 0, 3,
- 2, 44, 1, 0, 3, 10, 18, 6, 0, 5, 0, 3, 0 ], # ha - hz
- [ 40, 7, 51, 23, 25, 9, 11, 3, 0, 0, 2, 38, 25,
- 202, 56, 12, 1, 46, 79, 117, 1, 22, 0, 4, 0, 3 ], # ia - iz
- [ 3, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0,
- 0, 4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0 ], # ja - jz
- [ 1, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0,
- 2, 0, 0, 0, 0, 6, 2, 1, 0, 2, 0, 1, 0 ], # ka - kz
- [ 44, 2, 5, 12, 62, 7, 5, 2, 42, 1, 1, 53, 2,
- 2, 25, 1, 1, 2, 16, 23, 9, 0, 1, 0, 33, 0 ], # la - lz
- [ 52, 14, 1, 0, 64, 0, 0, 3, 37, 0, 0, 0, 7,
- 1, 17, 18, 1, 2, 12, 3, 8, 0, 1, 0, 2, 0 ], # ma - mz
- [ 42, 10, 47, 122, 63, 19, 106, 12, 30, 1, 6, 6, 9,
- 7, 54, 7, 1, 7, 44, 124, 6, 1, 15, 0, 12, 0 ], # na - nz
- [ 7, 12, 14, 17, 5, 95, 3, 5, 14, 0, 0, 19, 41,
- 134, 13, 23, 0, 91, 23, 42, 55, 16, 28, 0, 4, 1 ], # oa - oz
- [ 19, 1, 0, 0, 37, 0, 0, 4, 8, 0, 0, 15, 1,
- 0, 27, 9, 0, 33, 14, 7, 6, 0, 0, 0, 0, 0 ], # pa - pz
- [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0 ], # qa - qz
- [ 83, 8, 16, 23, 169, 4, 8, 8, 77, 1, 10, 5, 26,
- 16, 60, 4, 0, 24, 37, 55, 6, 11, 4, 0, 28, 0 ], # ra - rz
- [ 65, 9, 17, 9, 73, 13, 1, 47, 75, 3, 0, 7, 11,
- 12, 56, 17, 6, 9, 48, 116, 35, 1, 28, 0, 4, 0 ], # sa - sz
- [ 57, 22, 3, 1, 76, 5, 2, 330, 126, 1, 0, 14, 10,
- 6, 79, 7, 0, 49, 50, 56, 21, 2, 27, 0, 24, 0 ], # ta - tz
- [ 11, 5, 9, 6, 9, 1, 6, 0, 9, 0, 1, 19, 5,
- 31, 1, 15, 0, 47, 39, 31, 0, 3, 0, 0, 0, 0 ], # ua - uz
- [ 7, 0, 0, 0, 72, 0, 0, 0, 28, 0, 0, 0, 0,
- 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 ], # va - vz
- [ 36, 1, 1, 0, 38, 0, 0, 33, 36, 0, 0, 4, 1,
- 8, 15, 0, 0, 0, 4, 2, 0, 0, 1, 0, 0, 0 ], # wa - wz
- [ 1, 0, 2, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0,
- 0, 1, 5, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0 ], # xa - xz
- [ 14, 5, 4, 2, 7, 12, 12, 6, 10, 0, 0, 3, 7,
- 5, 17, 3, 0, 4, 16, 30, 0, 0, 5, 0, 0, 0 ], # ya - yz
- [ 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ]; # za - zz
-
- #We need to know the totals for each row
- $row_sums =
- [ map { my $sum = 0; map { $sum += $_ } @$_; $sum } @$frequency ];
-
-
- #Frequency with which a given letter starts a word.
- $start_freq =
- [ 1299, 425, 725, 271, 375, 470, 93, 223, 1009, 24, 20, 355, 379,
- 319, 823, 618, 21, 317, 962, 1991, 271, 104, 516, 6, 16, 14 ];
-
- $total_sum = 0; map { $total_sum += $_ } @$start_freq;
-
-
- my $length = $min_length + int(rand($max_length-$min_length));
-
- my $char = $self->GenerateRandomNextChar($total_sum, $start_freq);
- my @word = ($char+$a);
- for (2..$length) {
- $char = $self->_GenerateRandomNextChar($row_sums->[$char], $frequency->[$char]);
- push(@word, $char+$a);
- }
-
- #Return the password
- return pack("C*",@word);
-
-}
+=item Lang
+
+Returns the current value of Lang.
+(In the database, Lang is stored as varchar(16).)
-#A private helper function for RandomPassword
-# Takes a row summary and a frequency chart for the next character to be searched
-sub _GenerateRandomNextChar {
- my $self = shift;
- my($all, $freq) = @_;
- my($pos, $i);
-
- for ($pos = int(rand($all)), $i=0;
- $pos >= $freq->[$i];
- $pos -= $freq->[$i], $i++) {};
-
- return($i);
-}
-# }}}
-# {{{ sub SetPassword
+=item SetLang VALUE
-=head2 SetPassword
-Takes a string. Checks the string's length and sets this user's password
-to that string.
+Set Lang to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Lang will be stored as a varchar(16).)
+
=cut
-sub SetPassword {
- my $self = shift;
- my $password = shift;
-
- unless ($self->CurrentUserCanModify('Password')) {
- return(0, 'Permission Denied');
- }
-
- if (! $password) {
- return(0, "No password set");
- }
- elsif (length($password) < $RT::MinimumPasswordLength) {
- return(0,"Password too short");
- }
- else {
- my $salt = join '', ('.','/',0..9,'A'..'Z','a'..'z')[rand 64, rand 64];
- return ( $self->SUPER::SetPassword(crypt($password, $salt)) );
- }
-
-}
-# }}}
+=item EmailEncoding
+
+Returns the current value of EmailEncoding.
+(In the database, EmailEncoding is stored as varchar(16).)
-# {{{ sub IsPassword
-=head2 IsPassword
-Returns true if the passed in value is this user's password.
-Returns undef otherwise.
+=item SetEmailEncoding VALUE
+
+
+Set EmailEncoding to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, EmailEncoding will be stored as a varchar(16).)
+
=cut
-sub IsPassword {
- my $self = shift;
- my $value = shift;
-
- #TODO there isn't any apparent way to legitimately ACL this
-
- # RT does not allow null passwords
- if ((!defined ($value)) or ($value eq '')) {
- return(undef);
- }
- if ($self->Disabled) {
- $RT::Logger->info("Disabled user ".$self->Name." tried to log in");
- return(undef);
- }
-
- if ( ($self->__Value('Password') eq '') ||
- ($self->__Value('Password') eq undef) ) {
- return(undef);
- }
- if ($self->__Value('Password') eq crypt($value, $self->__Value('Password'))) {
- return (1);
- }
- else {
- return (undef);
- }
-}
-# }}}
+=item WebEncoding
+
+Returns the current value of WebEncoding.
+(In the database, WebEncoding is stored as varchar(16).)
-# {{{ sub SetDisabled
-=head2 Sub SetDisabled
-Toggles the user's disabled flag.
-If this flag is
-set, all password checks for this user will fail. All ACL checks for this
-user will fail. The user will appear in no user listings.
+=item SetWebEncoding VALUE
-=cut
-# }}}
+Set WebEncoding to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, WebEncoding will be stored as a varchar(16).)
-# {{{ ACL Related routines
-# {{{ GrantQueueRight
+=cut
+
-=head2 GrantQueueRight
+=item ExternalContactInfoId
+
+Returns the current value of ExternalContactInfoId.
+(In the database, ExternalContactInfoId is stored as varchar(100).)
+
+
+
+=item SetExternalContactInfoId VALUE
+
+
+Set ExternalContactInfoId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ExternalContactInfoId will be stored as a varchar(100).)
-Grant a queue right to this user. Takes a paramhash of which the elements
-RightAppliesTo and RightName are important.
=cut
-sub GrantQueueRight {
-
- my $self = shift;
- my %args = ( RightScope => 'Queue',
- RightName => undef,
- RightAppliesTo => undef,
- PrincipalType => 'User',
- PrincipalId => $self->Id,
- @_);
-
- #ACL check handled in ACE.pm
-
- require RT::ACE;
-
-# $RT::Logger->debug("$self ->GrantQueueRight right:". $args{'RightName'} .
-# " applies to queue ".$args{'RightAppliesTo'}."\n");
-
- my $ace = new RT::ACE($self->CurrentUser);
-
- return ($ace->Create(%args));
-}
-# }}}
+=item ContactInfoSystem
+
+Returns the current value of ContactInfoSystem.
+(In the database, ContactInfoSystem is stored as varchar(30).)
+
+
-# {{{ GrantSystemRight
+=item SetContactInfoSystem VALUE
-=head2 GrantSystemRight
-Grant a system right to this user.
-The only element that's important to set is RightName.
+Set ContactInfoSystem to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ContactInfoSystem will be stored as a varchar(30).)
+
=cut
-sub GrantSystemRight {
-
- my $self = shift;
- my %args = ( RightScope => 'System',
- RightName => undef,
- RightAppliesTo => 0,
- PrincipalType => 'User',
- PrincipalId => $self->Id,
- @_);
-
-
- #ACL check handled in ACE.pm
-
- require RT::ACE;
- my $ace = new RT::ACE($self->CurrentUser);
-
- return ($ace->Create(%args));
-}
-# }}}
+=item ExternalAuthId
+
+Returns the current value of ExternalAuthId.
+(In the database, ExternalAuthId is stored as varchar(100).)
-# {{{ sub HasQueueRight
-=head2 HasQueueRight
-Takes a paramhash which can contain
-these items:
- TicketObj => RT::Ticket or QueueObj => RT::Queue or Queue => integer
- IsRequestor => undef, (for bootstrapping create)
- Right => 'Right'
+=item SetExternalAuthId VALUE
-Returns 1 if this user has the right specified in the paramhash. for the queue
-passed in.
+Set ExternalAuthId to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, ExternalAuthId will be stored as a varchar(100).)
-Returns undef if they don't
=cut
-sub HasQueueRight {
- my $self = shift;
- my %args = ( TicketObj => undef,
- QueueObj => undef,
- Queue => undef,
- IsRequestor => undef,
- Right => undef,
- @_);
-
- my ($IsRequestor, $IsCc, $IsAdminCc, $IsOwner);
-
- if (defined $args{'Queue'}) {
- $args{'QueueObj'} = new RT::Queue($self->CurrentUser);
- $args{'QueueObj'}->Load($args{'Queue'});
- }
-
- if (defined $args{'TicketObj'}) {
- $args{'QueueObj'} = $args{'TicketObj'}->QueueObj();
- }
-
- # {{{ Validate and load up the QueueId
- unless ((defined $args{'QueueObj'}) and ($args{'QueueObj'}->Id)) {
- require Carp;
- $RT::Logger->debug(Carp::cluck ("$self->HasQueueRight Couldn't find a queue id"));
- return undef;
- }
-
- # }}}
-
-
- # Figure out whether a user has the right we're asking about.
- # first see if they have the right personally for the queue in question.
- my $retval = $self->_HasRight(Scope => 'Queue',
- AppliesTo => $args{'QueueObj'}->Id,
- Right => $args{'Right'},
- IsOwner => $IsOwner);
-
- return ($retval) if (defined $retval);
-
- # then we see whether they have the right personally globally.
- $retval = $self->HasSystemRight( $args{'Right'});
-
- return ($retval) if (defined $retval);
-
- # now that we know they don't have the right personally,
-
- # {{{ Find out about whether the current user is a Requestor, Cc, AdminCc or Owner
-
- if (defined $args{'TicketObj'}) {
- if ($args{'TicketObj'}->IsRequestor($self)) {#user is requestor
- $IsRequestor = 1;
- }
-
- if ($args{'TicketObj'}->IsCc($self)) { #If user is a cc
- $IsCc = 1;
- }
-
- if ($args{'TicketObj'}->IsAdminCc($self)) { #If user is an admin cc
- $IsAdminCc = 1;
- }
-
- if ($args{'TicketObj'}->IsOwner($self)) { #If user is an owner
- $IsOwner = 1;
- }
- }
-
- if (defined $args{'QueueObj'}) {
- if ($args{'QueueObj'}->IsCc($self)) { #If user is a cc
- $IsCc = 1;
- }
- if ($args{'QueueObj'}->IsAdminCc($self)) { #If user is an admin cc
- $IsAdminCc = 1;
- }
-
- }
- # }}}
-
- # then see whether they have the right for the queue as a member of a metagroup
-
- $retval = $self->_HasRight(Scope => 'Queue',
- AppliesTo => $args{'QueueObj'}->Id,
- Right => $args{'Right'},
- IsOwner => $IsOwner,
- IsCc => $IsCc,
- IsAdminCc => $IsAdminCc,
- IsRequestor => $IsRequestor
- );
-
- return ($retval) if (defined $retval);
-
- # then we see whether they have the right globally as a member of a metagroup
- $retval = $self->HasSystemRight( $args{'Right'},
- (IsOwner => $IsOwner,
- IsCc => $IsCc,
- IsAdminCc => $IsAdminCc,
- IsRequestor => $IsRequestor
- ) );
-
- #If they haven't gotten it by now, they just lose.
- return ($retval);
-
-}
-# }}}
-
-# {{{ sub HasSystemRight
+=item AuthSystem
+
+Returns the current value of AuthSystem.
+(In the database, AuthSystem is stored as varchar(30).)
+
-=head2 HasSystemRight
-takes an array of a single value and a paramhash.
-The single argument is the right being passed in.
-the param hash is some additional data. (IsCc, IsOwner, IsAdminCc and IsRequestor)
+=item SetAuthSystem VALUE
+
+
+Set AuthSystem to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, AuthSystem will be stored as a varchar(30).)
-Returns 1 if this user has the listed 'right'. Returns undef if this user doesn't.
=cut
-sub HasSystemRight {
- my $self = shift;
- my $right = shift;
-
- my %args = ( IsOwner => undef,
- IsCc => undef,
- IsAdminCc => undef,
- IsRequestor => undef,
- @_);
-
- unless (defined $right) {
-
- $RT::Logger->debug("$self RT::User::HasSystemRight was passed in no right.");
- return(undef);
- }
- return ( $self->_HasRight ( Scope => 'System',
- AppliesTo => '0',
- Right => $right,
- IsOwner => $args{'IsOwner'},
- IsCc => $args{'IsCc'},
- IsAdminCc => $args{'IsAdminCc'},
- IsRequestor => $args{'IsRequestor'},
-
- )
- );
-
-}
-# }}}
+=item Gecos
+
+Returns the current value of Gecos.
+(In the database, Gecos is stored as varchar(16).)
+
+
-# {{{ sub _HasRight
+=item SetGecos VALUE
-=head2 sub _HasRight (Right => 'right', Scope => 'scope', AppliesTo => int, ExtendedPrincipals => SQL)
-_HasRight is a private helper method for checking a user's rights. It takes
-several options:
+Set Gecos to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Gecos will be stored as a varchar(16).)
+
+
+=cut
+
-=item Right is a textual right name
+=item HomePhone
-=item Scope is a textual scope name. (As of July these were Queue, Ticket and System
+Returns the current value of HomePhone.
+(In the database, HomePhone is stored as varchar(30).)
-=item AppliesTo is the numerical Id of the object identified in the scope. For tickets, this is the queue #. for queues, this is the queue #
-=item ExtendedPrincipals is an SQL select clause which assumes that the only
-table in play is ACL. It's used by HasQueueRight to pass in which
-metaprincipals apply. Actually, it's probably obsolete. TODO: remove it.
-Returns 1 if a matching ACE was found.
+=item SetHomePhone VALUE
+
+
+Set HomePhone to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, HomePhone will be stored as a varchar(30).)
-Returns undef if no ACE was found.
=cut
-sub _HasRight {
-
- my $self = shift;
- my %args = ( Right => undef,
- Scope => undef,
- AppliesTo => undef,
- IsRequestor => undef,
- IsCc => undef,
- IsAdminCc => undef,
- IsOwner => undef,
- ExtendedPrincipals => undef,
- @_);
-
- if ($self->Disabled) {
- $RT::Logger->debug ("Disabled User: ".$self->Name.
- " failed access check for ".$args{'Right'}.
- " to object ".$args{'Scope'}."/".
- $args{'AppliesTo'}."\n");
- return (undef);
- }
-
- if (!defined $args{'Right'}) {
- $RT::Logger->debug("_HasRight called without a right\n");
- return(undef);
- }
- elsif (!defined $args{'Scope'}) {
- $RT::Logger->debug("_HasRight called without a scope\n");
- return(undef);
- }
- elsif (!defined $args{'AppliesTo'}) {
- $RT::Logger->debug("_HasRight called without an AppliesTo object\n");
- return(undef);
- }
-
- #If we've cached a win or loss for this lookup say so
-
- #TODO Security +++ check to make sure this is complete and right
-
- #Construct a hashkey to cache decisions in
- my ($hashkey);
- { #it's ugly, but we need to turn off warning, cuz we're joining nulls.
- local $^W=0;
- $hashkey =$self->Id .":". join(':',%args);
- }
-
- # $RT::Logger->debug($hashkey."\n");
-
- #Anything older than 10 seconds needs to be rechecked
- my $cache_timeout = (time - 10);
-
-
- if ((defined $self->{'rights'}{"$hashkey"}) &&
- ($self->{'rights'}{"$hashkey"} == 1 ) &&
- (defined $self->{'rights'}{"$hashkey"}{'set'} ) &&
- ($self->{'rights'}{"$hashkey"}{'set'} > $cache_timeout)) {
-# $RT::Logger->debug("Cached ACL win for ".
-# $args{'Right'}.$args{'Scope'}.
-# $args{'AppliesTo'}."\n");
- return ($self->{'rights'}{"$hashkey"});
- }
- elsif ((defined $self->{'rights'}{"$hashkey"}) &&
- ($self->{'rights'}{"$hashkey"} == -1) &&
- (defined $self->{'rights'}{"$hashkey"}{'set'}) &&
- ($self->{'rights'}{"$hashkey"}{'set'} > $cache_timeout)) {
-
-# $RT::Logger->debug("Cached ACL loss decision for ".
-# $args{'Right'}.$args{'Scope'}.
-# $args{'AppliesTo'}."\n");
-
- return(undef);
- }
-
-
- my $RightClause = "(RightName = '$args{'Right'}')";
- my $ScopeClause = "(RightScope = '$args{'Scope'}')";
-
- #If an AppliesTo was passed in, we should pay attention to it.
- #otherwise, none is needed
-
- $ScopeClause = "($ScopeClause AND (RightAppliesTo = $args{'AppliesTo'}))"
- if ($args{'AppliesTo'});
-
-
- # The generic principals clause looks for users with my id
- # and Rights that apply to _everyone_
- my $PrincipalsClause = "((PrincipalType = 'User') AND (PrincipalId = ".$self->Id."))";
-
-
- # If the user is the superuser, grant them the damn right ;)
- my $SuperUserClause =
- "(RightName = 'SuperUser') AND (RightScope = 'System') AND (RightAppliesTo = 0)";
-
- # If we've been passed in an extended principals clause, we should lump it
- # on to the existing principals clause. it'll make life easier
- if ($args{'ExtendedPrincipals'}) {
- $PrincipalsClause = "(($PrincipalsClause) OR ".
- "($args{'ExtendedPrincipalsClause'}))";
- }
-
- my $GroupPrincipalsClause = "((ACL.PrincipalType = 'Group') ".
- "AND (ACL.PrincipalId = Groups.Id) AND (GroupMembers.GroupId = Groups.Id) ".
- " AND (GroupMembers.UserId = ".$self->Id."))";
-
-
-
-
- # {{{ A bunch of magic statements that make the metagroups listed
- # work. basically, we if the user falls into the right group,
- # we add the type of ACL check needed
- my (@MetaPrincipalsSubClauses, $MetaPrincipalsClause);
-
- #The user is always part of the 'Everyone' Group
- push (@MetaPrincipalsSubClauses, "((Groups.Name = 'Everyone') AND
- (PrincipalType = 'Group') AND
- (Groups.Id = PrincipalId))");
-
- if ($args{'IsAdminCc'}) {
- push (@MetaPrincipalsSubClauses, "((Groups.Name = 'AdminCc') AND
- (PrincipalType = 'Group') AND
- (Groups.Id = PrincipalId))");
- }
- if ($args{'IsCc'}) {
- push (@MetaPrincipalsSubClauses, " ((Groups.Name = 'Cc') AND
- (PrincipalType = 'Group') AND
- (Groups.Id = PrincipalId))");
- }
- if ($args{'IsRequestor'}) {
- push (@MetaPrincipalsSubClauses, " ((Groups.Name = 'Requestor') AND
- (PrincipalType = 'Group') AND
- (Groups.Id = PrincipalId))");
- }
- if ($args{'IsOwner'}) {
-
- push (@MetaPrincipalsSubClauses, " ((Groups.Name = 'Owner') AND
- (PrincipalType = 'Group') AND
- (Groups.Id = PrincipalId))");
- }
-
- # }}}
-
- my ($GroupRightsQuery, $MetaGroupRightsQuery, $IndividualRightsQuery, $hitcount);
-
- # {{{ If there are any metaprincipals to be checked
- if (@MetaPrincipalsSubClauses) {
- #chop off the leading or
- #TODO redo this with an array and a join
- $MetaPrincipalsClause = join (" OR ", @MetaPrincipalsSubClauses);
-
- $MetaGroupRightsQuery = "SELECT COUNT(ACL.id) FROM ACL, Groups".
- " WHERE " .
- " ($ScopeClause) AND ($RightClause) AND ($MetaPrincipalsClause)";
-
- # {{{ deal with checking if the user has a right as a member of a metagroup
-
-# $RT::Logger->debug("Now Trying $MetaGroupRightsQuery\n");
- $hitcount = $self->_Handle->FetchResult($MetaGroupRightsQuery);
-
- #if there's a match, the right is granted
- if ($hitcount) {
- $self->{'rights'}{"$hashkey"}{'set'} = time;
- $self->{'rights'}{"$hashkey"} = 1;
- return (1);
- }
-
-# $RT::Logger->debug("No ACL matched MetaGroups query: $MetaGroupRightsQuery\n");
-
- # }}}
-
- }
- # }}}
-
- # {{{ deal with checking if the user has a right as a member of a group
- # This query checks to se whether the user has the right as a member of a
- # group
- $GroupRightsQuery = "SELECT COUNT(ACL.id) FROM ACL, GroupMembers, Groups".
- " WHERE " .
- " (((($ScopeClause) AND ($RightClause)) OR ($SuperUserClause)) ".
- " AND ($GroupPrincipalsClause))";
-
- # $RT::Logger->debug("Now Trying $GroupRightsQuery\n");
- $hitcount = $self->_Handle->FetchResult($GroupRightsQuery);
-
- #if there's a match, the right is granted
- if ($hitcount) {
- $self->{'rights'}{"$hashkey"}{'set'} = time;
- $self->{'rights'}{"$hashkey"} = 1;
- return (1);
- }
-
-# $RT::Logger->debug("No ACL matched $GroupRightsQuery\n");
-
- # }}}
-
- # {{{ Check to see whether the user has a right as an individual
-
- # This query checks to see whether the current user has the right directly
- $IndividualRightsQuery = "SELECT COUNT(ACL.id) FROM ACL WHERE ".
- " ((($ScopeClause) AND ($RightClause)) OR ($SuperUserClause)) " .
- " AND ($PrincipalsClause)";
-
-
- $hitcount = $self->_Handle->FetchResult($IndividualRightsQuery);
-
- if ($hitcount) {
- $self->{'rights'}{"$hashkey"}{'set'} = time;
- $self->{'rights'}{"$hashkey"} = 1;
- return (1);
- }
- # }}}
-
- else { #If the user just doesn't have the right
-
-# $RT::Logger->debug("No ACL matched $IndividualRightsQuery\n");
-
- #If nothing matched, return 0.
- $self->{'rights'}{"$hashkey"}{'set'} = time;
- $self->{'rights'}{"$hashkey"} = -1;
-
-
- return (undef);
- }
-}
+=item WorkPhone
+
+Returns the current value of WorkPhone.
+(In the database, WorkPhone is stored as varchar(30).)
+
+
-# }}}
+=item SetWorkPhone VALUE
-# {{{ sub CurrentUserCanModify
-=head2 CurrentUserCanModify RIGHT
+Set WorkPhone to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, WorkPhone will be stored as a varchar(30).)
-If the user has rights for this object, either because
-he has 'AdminUsers' or (if he\'s trying to edit himself and the right isn\'t an
-admin right) 'ModifySelf', return 1. otherwise, return undef.
=cut
-sub CurrentUserCanModify {
- my $self = shift;
- my $right = shift;
-
- if ($self->CurrentUserHasRight('AdminUsers')) {
- return (1);
- }
- #If the field is marked as an "administrators only" field,
- # don\'t let the user touch it.
- elsif ($self->_Accessible($right, 'admin')) {
- return(undef);
- }
-
- #If the current user is trying to modify themselves
- elsif ( ($self->id == $self->CurrentUser->id) and
- ($self->CurrentUserHasRight('ModifySelf'))) {
- return(1);
- }
-
- #If we don\'t have a good reason to grant them rights to modify
- # by now, they lose
- else {
- return(undef);
- }
-
-}
-# }}}
+=item MobilePhone
+
+Returns the current value of MobilePhone.
+(In the database, MobilePhone is stored as varchar(30).)
+
-# {{{ sub CurrentUserHasRight
-=head2 CurrentUserHasRight
-
- Takes a single argument. returns 1 if $Self->CurrentUser
- has the requested right. returns undef otherwise
+=item SetMobilePhone VALUE
+
+
+Set MobilePhone to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, MobilePhone will be stored as a varchar(30).)
+
=cut
-sub CurrentUserHasRight {
- my $self = shift;
- my $right = shift;
-
- return ($self->CurrentUser->HasSystemRight($right));
-}
-# }}}
+=item PagerPhone
+Returns the current value of PagerPhone.
+(In the database, PagerPhone is stored as varchar(30).)
-# {{{ sub _Set
-sub _Set {
- my $self = shift;
-
- my %args = (Field => undef,
- Value => undef,
- @_
- );
- # Nobody is allowed to futz with RT_System or Nobody unless they
- # want to change an email address. For 2.2, neither should have an email address
+=item SetPagerPhone VALUE
- if ($self->Privileged == 2) {
- return (0, "Can not modify system users");
- }
- unless ($self->CurrentUserCanModify($args{'Field'})) {
- return (0, "Permission Denied");
- }
+Set PagerPhone to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, PagerPhone will be stored as a varchar(30).)
+
+
+=cut
+
+
+=item Address1
+
+Returns the current value of Address1.
+(In the database, Address1 is stored as varchar(200).)
-
- #Set the new value
- my ($ret, $msg)=$self->SUPER::_Set(Field => $args{'Field'},
- Value=> $args{'Value'});
-
- return ($ret, $msg);
-}
-# }}}
-# {{{ sub _Value
+=item SetAddress1 VALUE
-=head2 _Value
-Takes the name of a table column.
-Returns its value as a string, if the user passes an ACL check
+Set Address1 to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Address1 will be stored as a varchar(200).)
+
=cut
-sub _Value {
-
- my $self = shift;
- my $field = shift;
-
- #If the current user doesn't have ACLs, don't let em at it.
-
- my @PublicFields = qw( Name EmailAddress Organization Disabled
- RealName NickName Gecos ExternalAuthId
- AuthSystem ExternalContactInfoId
- ContactInfoSystem );
-
- #if the field is public, return it.
- if ($self->_Accessible($field, 'public')) {
- return($self->SUPER::_Value($field));
-
- }
- #If the user wants to see their own values, let them
- elsif ($self->CurrentUser->Id == $self->Id) {
- return($self->SUPER::_Value($field));
- }
- #If the user has the admin users right, return the field
- elsif ($self->CurrentUserHasRight('AdminUsers')) {
- return($self->SUPER::_Value($field));
- }
- else {
- return(undef);
- }
-
-}
+=item Address2
+
+Returns the current value of Address2.
+(In the database, Address2 is stored as varchar(200).)
+
+
+
+=item SetAddress2 VALUE
+
+
+Set Address2 to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Address2 will be stored as a varchar(200).)
+
+
+=cut
+
+
+=item City
+
+Returns the current value of City.
+(In the database, City is stored as varchar(100).)
+
+
+
+=item SetCity VALUE
+
+
+Set City to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, City will be stored as a varchar(100).)
+
+
+=cut
+
+
+=item State
+
+Returns the current value of State.
+(In the database, State is stored as varchar(100).)
+
+
+
+=item SetState VALUE
+
+
+Set State to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, State will be stored as a varchar(100).)
+
+
+=cut
+
+
+=item Zip
+
+Returns the current value of Zip.
+(In the database, Zip is stored as varchar(16).)
+
+
+
+=item SetZip VALUE
+
+
+Set Zip to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Zip will be stored as a varchar(16).)
+
+
+=cut
+
+
+=item Country
+
+Returns the current value of Country.
+(In the database, Country is stored as varchar(50).)
+
+
+
+=item SetCountry VALUE
+
+
+Set Country to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Country will be stored as a varchar(50).)
+
+
+=cut
+
+
+=item Timezone
+
+Returns the current value of Timezone.
+(In the database, Timezone is stored as varchar(50).)
+
+
+
+=item SetTimezone VALUE
+
+
+Set Timezone to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, Timezone will be stored as a varchar(50).)
+
+
+=cut
+
+
+=item PGPKey
+
+Returns the current value of PGPKey.
+(In the database, PGPKey is stored as text.)
+
+
+
+=item SetPGPKey VALUE
+
+
+Set PGPKey to VALUE.
+Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
+(In the database, PGPKey will be stored as a text.)
+
+
+=cut
+
+
+=item Creator
+
+Returns the current value of Creator.
+(In the database, Creator is stored as int(11).)
+
+
+=cut
+
+
+=item Created
+
+Returns the current value of Created.
+(In the database, Created is stored as datetime.)
+
+
+=cut
+
+
+=item LastUpdatedBy
+
+Returns the current value of LastUpdatedBy.
+(In the database, LastUpdatedBy is stored as int(11).)
+
+
+=cut
+
+
+=item LastUpdated
+
+Returns the current value of LastUpdated.
+(In the database, LastUpdated is stored as datetime.)
+
+
+=cut
+
+
+
+sub _ClassAccessible {
+ {
+
+ id =>
+ {read => 1, type => 'int(11)', default => ''},
+ Name =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Password =>
+ {read => 1, write => 1, type => 'varchar(40)', default => ''},
+ Comments =>
+ {read => 1, write => 1, type => 'blob', default => ''},
+ Signature =>
+ {read => 1, write => 1, type => 'blob', default => ''},
+ EmailAddress =>
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
+ FreeformContactInfo =>
+ {read => 1, write => 1, type => 'blob', default => ''},
+ Organization =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ RealName =>
+ {read => 1, write => 1, type => 'varchar(120)', default => ''},
+ NickName =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ Lang =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ EmailEncoding =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ WebEncoding =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ ExternalContactInfoId =>
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
+ ContactInfoSystem =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ ExternalAuthId =>
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
+ AuthSystem =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ Gecos =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ HomePhone =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ WorkPhone =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ MobilePhone =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ PagerPhone =>
+ {read => 1, write => 1, type => 'varchar(30)', default => ''},
+ Address1 =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ Address2 =>
+ {read => 1, write => 1, type => 'varchar(200)', default => ''},
+ City =>
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
+ State =>
+ {read => 1, write => 1, type => 'varchar(100)', default => ''},
+ Zip =>
+ {read => 1, write => 1, type => 'varchar(16)', default => ''},
+ Country =>
+ {read => 1, write => 1, type => 'varchar(50)', default => ''},
+ Timezone =>
+ {read => 1, write => 1, type => 'varchar(50)', default => ''},
+ PGPKey =>
+ {read => 1, write => 1, type => 'text', 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::User_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/User_Overlay.pm}) {
+ die $@;
+ };
+
+ eval "require RT::User_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/User_Vendor.pm}) {
+ die $@;
+ };
+
+ eval "require RT::User_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/User_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::User_Overlay, RT::User_Vendor, RT::User_Local
+
+=cut
-# }}}
-# }}}
1;
-
diff --git a/rt/lib/RT/Users.pm b/rt/lib/RT/Users.pm
index f4a97268c..d58f69653 100755
--- a/rt/lib/RT/Users.pm
+++ b/rt/lib/RT/Users.pm
@@ -1,281 +1,115 @@
+# 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
+# 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;
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Users.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-1999 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
=head1 NAME
- RT::Users - Collection of RT::User objects
-
+ RT::Users -- Class Description
+
=head1 SYNOPSIS
- use RT::Users;
-
+ use RT::Users
=head1 DESCRIPTION
=head1 METHODS
-=begin testing
-
-ok(require RT::TestHarness);
-ok(require RT::Users);
-
-=end testing
-
=cut
package RT::Users;
-use RT::EasySearch;
-@ISA = qw(RT::EasySearch);
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
- $self->{'table'} = "Users";
- $self->{'primary_key'} = "id";
-
- # By default, order by name
- $self->OrderBy( ALIAS => 'main',
- FIELD => 'Name',
- ORDER => 'ASC');
-
- return ($self->SUPER::_Init(@_));
-
-}
-# }}}
-
-# {{{ sub _DoSearch
-
-=head2 _DoSearch
-
- A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
-we're explicitly trying to see them.
-
-=cut
-
-sub _DoSearch {
- my $self = shift;
-
- #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
- unless($self->{'find_disabled_rows'}) {
- $self->LimitToEnabled();
- }
-
- return($self->SUPER::_DoSearch(@_));
-
-}
-
-# }}}
-
-# {{{ sub NewItem
-
-sub NewItem {
- my $self = shift;
- use RT::User;
- my $item = new RT::User($self->CurrentUser);
- return($item);
-}
-# }}}
-
-# {{{ LimitToEmail
-=head2 LimitToEmail
+use RT::SearchBuilder;
+use RT::User;
-Takes one argument. an email address. limits the returned set to
-that email address
+use vars qw( @ISA );
+@ISA= qw(RT::SearchBuilder);
-=cut
-sub LimitToEmail {
+sub _Init {
my $self = shift;
- my $addr = shift;
- $self->Limit(FIELD => 'EmailAddress', VALUE => "$addr");
-}
-
-# }}}
-
-# {{{ MemberOfGroup
-
-=head2 MemberOfGroup
-
-takes one argument, a group id number. Limits the returned set
-to members of a given group
-
-=cut
-
-sub MemberOfGroup {
- my $self = shift;
- my $group = shift;
-
- return ("No group specified") if (!defined $group);
-
- my $groupalias = $self->NewAlias('GroupMembers');
-
- $self->Join( ALIAS1 => 'main', FIELD1 => 'id',
- ALIAS2 => "$groupalias", FIELD2 => 'Name');
-
- $self->Limit (ALIAS => "$groupalias",
- FIELD => 'GroupId',
- VALUE => "$group",
- OPERATOR => "="
- );
-}
-
-# }}}
-
-# {{{ LimitToPrivileged
-
-=head2 LimitToPrivileged
-
-Limits to users who can be made members of ACLs and groups
+ $self->{'table'} = 'Users';
+ $self->{'primary_key'} = 'id';
-=cut
-sub LimitToPrivileged {
- my $self = shift;
- $self->Limit( FIELD => 'Privileged',
- OPERATOR => '=',
- VALUE => '1');
+ return ( $self->SUPER::_Init(@_) );
}
-# }}}
-
-
-
-# {{{ LimitToSystem
-=head2 LimitToSystem
+=item NewItem
-Limits to users who can be granted rights, but who should
-never have their rights modified by a user or be made members of groups.
+Returns an empty new RT::User item
=cut
-sub LimitToSystem {
+sub NewItem {
my $self = shift;
- $self->Limit( FIELD => 'Privileged',
- OPERATOR => '=',
- VALUE => '2');
+ return(RT::User->new($self->CurrentUser));
}
-# }}}
-
-# {{{ HasQueueRight
-
-=head2 HasQueueRight
-
-Takes a queue id as its first argument. Queue Id "0" is treated by RT as "applies to all queues"
-Takes a specific right as an optional second argument
-
-Limits the returned set to users who have rights in the queue specified, personally. If the optional second argument is supplied, limits to users who have been explicitly granted that right.
-
-
-
-This should not be used as an ACL check, but only for obtaining lists of
-users with explicit rights in a given queue.
-
-=cut
-
-sub HasQueueRight {
- my $self = shift;
- my $queue = shift;
- my $right;
-
- $right = shift if (@_);
-
+ eval "require RT::Users_Overlay";
+ if ($@ && $@ !~ qr{^Can't locate RT/Users_Overlay.pm}) {
+ die $@;
+ };
- my $acl_alias = $self->NewAlias('ACL');
- $self->Join( ALIAS1 => 'main', FIELD1 => 'id',
- ALIAS2 => $acl_alias, FIELD2 => 'PrincipalId');
- $self->Limit (ALIAS => $acl_alias,
- FIELD => 'PrincipalType',
- OPERATOR => '=',
- VALUE => 'User');
+ eval "require RT::Users_Vendor";
+ if ($@ && $@ !~ qr{^Can't locate RT/Users_Vendor.pm}) {
+ die $@;
+ };
+ eval "require RT::Users_Local";
+ if ($@ && $@ !~ qr{^Can't locate RT/Users_Local.pm}) {
+ die $@;
+ };
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightAppliesTo',
- OPERATOR => '=',
- VALUE => "$queue");
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightScope',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- VALUE => 'Queue');
+=head1 SEE ALSO
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightScope',
- OPERATOR => '=',
- ENTRYAGGREGATOR => 'OR',
- VALUE => 'Ticket');
+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.
- #TODO: is this being initialized properly if the right isn't there?
- if (defined ($right)) {
-
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightName',
- OPERATOR => '=',
- VALUE => "$right");
-
-
- };
+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);
-}
-
-
-
-# }}}
-
-# {{{ HasSystemRight
+so that perl does not kick and scream when you redefine a subroutine or variable in your overlay.
-=head2 HasSystemRight
-
-Takes one optional argument:
- The name of a System level right.
-
-Limits the returned set to users who have been granted system rights, personally. If the optional argument is passed in, limits to users who have been granted the explicit right listed. Please see the note attached to LimitToQueueRights
+RT::Users_Overlay, RT::Users_Vendor, RT::Users_Local
=cut
-sub HasSystemRight {
- my $self = shift;
- my $right = shift if (@_);
- my $acl_alias = $self->NewAlias('ACL');
-
-
- $self->Join( ALIAS1 => 'main', FIELD1 => 'id',
- ALIAS2 => $acl_alias, FIELD2 => 'PrincipalId');
- $self->Limit (ALIAS => $acl_alias,
- FIELD => 'PrincipalType',
- OPERATOR => '=',
- VALUE => 'User');
-
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightScope',
- OPERATOR => '=',
- VALUE => 'System');
-
-
- #TODO: is this being initialized properly if the right isn't there?
- if (defined ($right)) {
- $self->Limit(ALIAS => $acl_alias,
- FIELD => 'RightName',
- OPERATOR => '=',
- VALUE => "$right");
-
- }
-
-
-}
-
-# }}}
1;
-
diff --git a/rt/lib/RT/Watcher.pm b/rt/lib/RT/Watcher.pm
deleted file mode 100755
index c7c6100cf..000000000
--- a/rt/lib/RT/Watcher.pm
+++ /dev/null
@@ -1,313 +0,0 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/Watcher.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2001 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
-=head1 NAME
-
- RT::Watcher - RT Watcher object
-
-=head1 SYNOPSIS
-
- use RT::Watcher;
-
-
-=head1 DESCRIPTION
-
-This module should never be called directly by client code. it\'s an internal module which
-should only be accessed through exported APIs in Ticket, Queue and other similar objects.
-
-=head1 METHODS
-
-=begin testing
-
-ok(require RT::TestHarness);
-ok(require RT::Watcher);
-
-=end testing
-
-=cut
-
-package RT::Watcher;
-use RT::Record;
-@ISA= qw(RT::Record);
-
-
-# {{{ sub _Init
-
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "Watchers";
- return ($self->SUPER::_Init(@_));
-
-}
-# }}}
-
-# {{{ sub Create
-
-=head2 Create PARAMHASH
-
-Create a new watcher object with the following Attributes:
-
-Scope: Ticket or Queue
-Value: Ticket or queue id
-Type: Requestor, Cc or AdminCc. Requestor is not supported for a scope of \'Queue\'
-Email: The email address of the watcher. If the email address maps to an RT User, this is resolved
-to an Owner object instead.
-Owner: The RT user id of the \'owner\' of this watcher object.
-
-=cut
-
-sub Create {
- my $self = shift;
- my %args = (
- Owner => undef,
- Email => undef,
- Value => undef,
- Scope => undef,
- Type => undef,
- Quiet => 0,
- @_ # get the real argumentlist
- );
-
- #Do we have someone this applies to?
- unless (($args{'Owner'} =~ /^(\d+)$/) || ($args{'Email'} =~ /\@/)) {
- return (0, "No user or email address specified");
- }
-
- #if we only have an email address, try to resolve it to an owner
- if ($args{'Owner'} == 0) {
- my $User = new RT::User($RT::SystemUser);
- $User->LoadByEmail($args{'Email'});
- if ($User->id) {
- $args{'Owner'} = $User->id;
- delete $args{'Email'};
- }
- }
-
-
- if ($args{'Type'} eq "Requestor" and $args{'Owner'} == 0) {
- # Requestors *MUST* have an account
-
- my $Address = RT::CanonicalizeAddress($args{'Email'});
-
- my $NewUser = RT::User->new($RT::SystemUser);
- my ($Val, $Message) =
- $NewUser->Create(Name => $Address,
- EmailAddress => $Address,
- RealName => $Address,
- Password => undef,
- Privileged => 0,
- Comments => 'Autocreated on ticket submission'
- );
- return (0, "Could not create watcher for requestor")
- unless $Val;
- if ($NewUser->id) {
- $args{'Owner'} = $NewUser->id;
- delete $args{'Email'};
- }
- }
-
-
-
-
- #Make sure we\'ve got a valid type
- #TODO --- move this to ValidateType
- return (0, "Invalid Type")
- unless ($args{'Type'} =~ /^(Requestor|Cc|AdminCc)$/i);
-
- my $id = $self->SUPER::Create(%args);
- if ($id) {
- return (1,"Interest noted");
- }
- else {
- return (0, "Error adding watcher");
- }
-}
-# }}}
-
-# {{{ sub Load
-
-=head2 Load ID
-
- Loads a watcher by the primary key of the watchers table ($Watcher->id)
-
-=cut
-
-sub Load {
- my $self = shift;
- my $identifier = shift;
-
- if ($identifier !~ /\D/) {
- $self->SUPER::LoadById($identifier);
- }
- else {
- return (0, "That's not a numerical id");
- }
-}
-
-# }}}
-
-# {{{ sub LoadByValue
-
-=head2 LoadByValue PARAMHASH
-
-LoadByValue takes a parameter hash with the following attributes:
-
- Email, Owner, Scope, Type, Value
-
-The same rules enforced at create are enforced by Load.
-
-Returns a tuple of (retval, msg). Retval is 1 on success and 0 on failure.
-msg describes what happened in a human readable form.
-
-=cut
-
-sub LoadByValue {
- my $self = shift;
- my %args = ( Email => undef,
- Owner => undef,
- Scope => undef,
- Type => undef,
- Value => undef,
- @_);
-
- #TODO: all this code is being copied from Create. that\'s silly
-
- #Do we have someone this applies to?
- unless (($args{'Owner'} =~ /^(\d*)$/) || ($args{'Email'} =~ /\@/)) {
- return (0, "No user or email address specified");
- }
-
- #if we only have an email address, try to resolve it to an owner
- unless ($args{'Owner'}) {
- my $User = new RT::User($RT::SystemUser);
- $User->LoadByEmail($args{'Email'});
- if ($User->id > 0) {
- $args{'Owner'} = $User->id;
- delete $args{'Email'};
- }
- }
-
- if ((defined ($args{'Type'})) and
- ($args{'Type'} !~ /^(Requestor|Cc|AdminCc)$/i)) {
- return (0, "Invalid Type");
- }
- if ($args{'Owner'}) {
- $self->LoadByCols( Type => $args{'Type'},
- Value => $args{'Value'},
- Owner => $args{'Owner'},
- Scope => $args{'Scope'},
- );
- }
- else {
- $self->LoadByCols( Type => $args{'Type'},
- Email => $args{'Email'},
- Value => $args{'Value'},
- Scope => $args{'Scope'},
- );
- }
- unless ($self->Id) {
- return(0, "Couldn\'t find that watcher");
- }
- return (1, "Watcher loaded");
-}
-
-# }}}
-
-# {{{ sub OwnerObj
-
-=head2 OwnerObj
-
-Return an RT Owner Object for this Watcher, if we have one
-
-=cut
-
-sub OwnerObj {
- my $self = shift;
- if (!defined $self->{'OwnerObj'}) {
- require RT::User;
- $self->{'OwnerObj'} = RT::User->new($self->CurrentUser);
- if ($self->Owner) {
- $self->{'OwnerObj'}->Load($self->Owner);
- } else {
- return $RT::Nobody->UserObj;
- }
- }
- return ($self->{'OwnerObj'});
-}
-# }}}
-
-# {{{ sub Email
-
-=head2 Email
-
-This custom data accessor does the right thing and returns
-the 'Email' attribute of this Watcher object. If that's undefined,
-it returns the 'EmailAddress' attribute of its 'Owner' object, which is
-an RT::User object.
-
-=cut
-
-sub Email {
- my $self = shift;
-
- # IF Email is defined, return that. Otherwise, return the Owner's email address
- if (defined($self->__Value('Email'))) {
- return ($self->__Value('Email'));
- }
- elsif ($self->Owner) {
- return ($self->OwnerObj->EmailAddress);
- }
- else {
- return ("Data error");
- }
-}
-# }}}
-
-# {{{ sub IsUser
-
-=head2 IsUser
-
-Returns true if this watcher object is tied to a user object. (IE it
-isn't sending to some other email address).
-Otherwise, returns undef
-
-=cut
-
-sub IsUser {
- my $self = shift;
- # if this watcher has an email address glued onto it,
- # return undef
-
- if (defined($self->__Value('Email'))) {
- return undef;
- }
- else {
- return 1;
- }
-}
-
-# }}}
-
-# {{{ sub _Accessible
-sub _Accessible {
- my $self = shift;
- my %Cols = (
- Email => 'read/write',
- Scope => 'read/write',
- Value => 'read/write',
- Type => 'read/write',
- Quiet => 'read/write',
- Owner => 'read/write',
- Creator => 'read/auto',
- Created => 'read/auto',
- LastUpdatedBy => 'read/auto',
- LastUpdated => 'read/auto'
- );
- return($self->SUPER::_Accessible(@_, %Cols));
-}
-# }}}
-
-1;
-
diff --git a/rt/lib/RT/Watchers.pm b/rt/lib/RT/Watchers.pm
deleted file mode 100755
index c55adda3f..000000000
--- a/rt/lib/RT/Watchers.pm
+++ /dev/null
@@ -1,226 +0,0 @@
-# $Header: /home/cvs/cvsroot/freeside/rt/lib/RT/Attic/Watchers.pm,v 1.1 2002-08-12 06:17:07 ivan Exp $
-# (c) 1996-2000 Jesse Vincent <jesse@fsck.com>
-# This software is redistributable under the terms of the GNU GPL
-
-=head1 NAME
-
- RT::Watchers - Collection of RT Watcher objects
-
-=head1 SYNOPSIS
-
- use RT::Watchers;
- my $watchers = new RT::Watchers($CurrentUser);
- while (my $watcher = $watchers->Next()) {
- print $watcher->Id . "is a watcher";
- }
-
-=head1 DESCRIPTION
-
-This module should never be called directly by client code. it's an internal module which
-should only be accessed through exported APIs in Ticket, Queue and other similar objects.
-
-
-=head1 METHODS
-
-=begin testing
-
-ok(require RT::TestHarness);
-ok(require RT::Watchers);
-
-=end testing
-
-=cut
-
-package RT::Watchers;
-
-use strict;
-use vars qw( @ISA );
-
-
-require RT::EasySearch;
-require RT::Watcher;
-@ISA= qw(RT::EasySearch);
-
-
-# {{{ sub _Init
-sub _Init {
- my $self = shift;
-
- $self->{'table'} = "Watchers";
- $self->{'primary_key'} = "id";
- return($self->SUPER::_Init(@_));
-}
-# }}}
-
-# {{{ sub Limit
-
-=head2 Limit
-
- A wrapper around RT::EasySearch::Limit which sets
-the default entry aggregator to 'AND'
-
-=cut
-
-sub Limit {
- my $self = shift;
- my %args = ( ENTRYAGGREGATOR => 'AND',
- @_);
-
- $self->SUPER::Limit(%args);
-}
-# }}}
-
-# {{{ sub LimitToTicket
-
-=head2 LimitToTicket
-
-Takes a single arg which is a ticket id
-Limits to watchers of that ticket
-
-=cut
-
-sub LimitToTicket {
- my $self = shift;
- my $ticket = shift;
- $self->Limit( ENTRYAGGREGATOR => 'OR',
- FIELD => 'Value',
- VALUE => $ticket);
- $self->Limit (ENTRYAGGREGATOR => 'AND',
- FIELD => 'Scope',
- VALUE => 'Ticket');
-}
-# }}}
-
-# {{{ sub LimitToQueue
-
-=head2 LimitToQueue
-
-Takes a single arg, which is a queue id
-Limits to watchers of that queue.
-
-=cut
-
-sub LimitToQueue {
- my $self = shift;
- my $queue = shift;
- $self->Limit (ENTRYAGGREGATOR => 'OR',
- FIELD => 'Value',
- VALUE => $queue);
- $self->Limit (ENTRYAGGREGATOR => 'AND',
- FIELD => 'Scope',
- VALUE => 'Queue');
-}
-# }}}
-
-# {{{ sub LimitToType
-
-=head2 LimitToType
-
-Takes a single string as its argument. That string is a watcher type
-which is one of 'Requestor', 'Cc' or 'AdminCc'
-Limits to watchers of that type
-
-=cut
-
-
-sub LimitToType {
- my $self = shift;
- my $type = shift;
- $self->Limit(FIELD => 'Type',
- VALUE => "$type");
-}
-# }}}
-
-# {{{ sub LimitToRequestors
-
-=head2 LimitToRequestors
-
-Limits to watchers of type 'Requestor'
-
-=cut
-
-sub LimitToRequestors {
- my $self = shift;
- $self->LimitToType("Requestor");
-}
-# }}}
-
-# {{{ sub LimitToCc
-
-=head2 LimitToCc
-
-Limits to watchers of type 'Cc'
-
-=cut
-
-sub LimitToCc {
- my $self = shift;
- $self->LimitToType("Cc");
-}
-# }}}
-
-# {{{ sub LimitToAdminCc
-
-=head2 LimitToAdminCc
-
-Limits to watchers of type AdminCc
-
-=cut
-
-sub LimitToAdminCc {
- my $self = shift;
- $self->LimitToType("AdminCc");
-}
-# }}}
-
-# {{{ sub Emails
-
-=head2 Emails
-
-# Return a (reference to a) list of emails
-
-=cut
-
-sub Emails {
- my $self = shift;
- my @list; # List is a list of watcher email addresses
-
- # $watcher is an RT::Watcher object
- while (my $watcher=$self->Next()) {
- push(@list, $watcher->Email);
- }
- return \@list;
-}
-# }}}
-
-# {{{ sub EmailsAsString
-
-=head2 EmailsAsString
-
-# Returns the RT::Watchers->Emails as a comma seperated string
-
-=cut
-
-sub EmailsAsString {
- my $self = shift;
- return(join(", ",@{$self->Emails}));
-}
-# }}}
-
-# {{{ sub NewItem
-
-
-
-sub NewItem {
- my $self = shift;
-
- use RT::Watcher;
- my $item = new RT::Watcher($self->CurrentUser);
- return($item);
-}
-# }}}
-1;
-
-
-
-
diff --git a/rt/lib/test.pl b/rt/lib/test.pl
deleted file mode 100644
index f0da5df27..000000000
--- a/rt/lib/test.pl
+++ /dev/null
@@ -1,52 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-######################### We start with some black magic to print on failure.
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-BEGIN { $| = 1; print "1..1\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use RT;
-$loaded = 1;
-print "ok 1\n";
-
-######################### End of black magic.
-
-# Insert your test code below (better if it prints "ok 13"
-# (correspondingly "not ok 13") depending on the success of chunk 13
-# of the test code):
-
-use RT::Record;
-use RT::EasySearch;
-use RT::Handle;
-use RT::Ticket;
-use RT::Tickets;
-use RT::ACE;
-use RT::ACL;
-use RT::Watcher;
-use RT::Watchers;
-use RT::Scrip;
-use RT::Scrips;
-use RT::ScripAction;
-use RT::ScripCondition;
-use RT::ScripActions;
-use RT::ScripConditions;
-use RT::Transaction;
-use RT::Transactions;
-use RT::Group;
-use RT::GroupMembers;
-use RT::User;
-use RT::Users;
-use RT::CurrentUser;
-use RT::Attachment;
-use RT::Attachments;
-use RT::Keyword;
-use RT::Keywords;
-use RT::KeywordSelect;
-use RT::KeywordSelects;
-use RT::ObjectKeyword;
-use RT::ObjectKeywords;
-use RT::Date;
-
diff --git a/rt/tools/cpan2rpm b/rt/tools/cpan2rpm
deleted file mode 100644
index 9b54cb912..000000000
--- a/rt/tools/cpan2rpm
+++ /dev/null
@@ -1,299 +0,0 @@
-#!/usr/bin/perl -w
-
-
-# Take a perl tarball and make a specfile for it. Now with bundles.
-#
-# Copyright 2000,2001 Simon Wilkinson. All rights reserved.
-#
-# 10/18/2001 - <jesse@bestpractical.com>
-# Added resolution of prereq_pm modules
-#
-# This program is free software; you can redistribute it
-# and/or modify it under the same terms as Perl itself.
-#
-
-use strict;
-
-use CPAN;
-use POSIX;
-use Sys::Hostname;
-use File::Basename;
-use Getopt::Long;
-
-use vars qw ($DEBUG $ARCH $builddir $seen @report);
-
-$ARCH = 'i386';
-
-$DEBUG = 0;
-# Icky globals
-
-my $release;
-my $package;
-
-$seen = {};
-
-
-sub usage
-{
- print STDERR <<EOM;
-
-Usage: cpan2rpm [--release <release>] [--builddir <rpm build dir>] <Perl::Module>
-
-Where:
-<release> is the release number of the RPM you wish to produce
-<Perl::Module> is the name of the module to build
-EOM
- exit(1);
-}
-
-
-my $ret=GetOptions("release" => \$release,
- "builddir=s" => \$builddir);
-
-$package=$ARGV[0];
-usage() if !$package;
-$release=1 if !$release;
-
-
-$builddir=ExtractRpmMacro($ENV{HOME}."/.rpmmacros","_topdir") if !$builddir;
-$builddir=ExtractRpmMacro("/etc/rpm/macros","_topdir") if !$builddir;
-$builddir=getcwd() if !$builddir;
-
-die "Build directory $builddir doesn't look like an RPM build root\n"
- if ((! -d "$builddir/SPECS") || (! -d "$builddir/SOURCES"));
-
-process($package,$release);
-
-print join("\n",@report)."\n";
-
-sub process {
- my ($infile,$release)=@_;
-
-
-
-# Convert our installation list into an unbundled one
- unbundle($infile);
-
- print "Building $infile\n";
-
- cpan2rpm($infile,$builddir,$release);
-
-}
-
-# Given a Module, try to split it into its required components - this
-# currently only handles Bundles, but could also be extended to deal with
-# prereqs as well.
-
-sub unbundle {
- my ($item) = @_;
-
- if ($item=~/Bundle::/) {
- my $obj=CPAN::Shell->expand('Bundle',$item);
-
- foreach my $kid ($obj->contains) {
- process($kid,$release);
- }
- }
-}
-
-
-sub cpan2rpm($$$) {
- my ($infile,$builddir,$release) = @_;
-
- my $ret;
-
- my $obj=CPAN::Shell->expand('Module',$infile);
-
- print "CPAN tells us the following about $infile:\n",$obj->as_string if ($DEBUG);
-
- $ret=fetch_source($obj,$builddir);
- $ret=build_specfile($obj,$builddir,$release) if !$ret;
-
- return $ret;
-}
-
-# FIXME: Some error handling in the function below wouldn't go amiss ...
-sub fetch_source {
- my ($obj,$builddir)=@_;
-
- # Minor Sanity checks
- my $id=$obj->{ID};
-
- return "Error: No file for $id\n"
- if $obj->cpan_file eq "N/A";
- return "Error: $id says 'Contact Author'\n"
- if $obj->cpan_file =~ /^Contact Author/;
- return "Error: $id is contained within Perl itself!\n"
- if ($obj->cpan_file =~/perl-5\.\d?\.\d?\.tar\.gz/xo);
-
- # We do this so we can take advantage of CPAN's object caching. This is
- # pinched from the CPAN::Distribution::get method, which we can't use
- # directly, as it untars the package as well - which we let RPM do.
-
- my $dist = $CPAN::META->instance('CPAN::Distribution',$obj->cpan_file);
-
-
- my($local_wanted) =
- MM->catfile($CPAN::Config->{keep_source_where},
- "authors",
- "id",
- split("/",$dist->{ID})
- );
-
- my $local_file = CPAN::FTP->localize("authors/id/$dist->{ID}", $local_wanted);
-
- $dist->{localfile} = $local_file;
-
- $dist->verifyMD5 if ($CPAN::META->has_inst('MD5'));
-
-
- # Find all the prereqs for this distribution, then build em.
- # TODO this should be somewhere else
-
- $dist->make;
- build_prereqs( $dist->prereq_pm());
-
-
-
- my $infile=basename($obj->cpan_file);
-
- File::Copy::copy($local_file,"$builddir/SOURCES/$infile");
-
- return undef;
-}
-
-
-sub build_prereqs($) {
- my ($prereqs) = @_;
-
- foreach my $prereq (keys %{$prereqs}) {
- process ($prereq, $release);
- }
-}
-sub build_specfile($$$) {
- my ($obj,$builddir,$release) = @_;
-
- my $source=basename($obj->cpan_file);
-
- # don't go through dependencies on something we've already dealt with
- return() if ($seen->{$source});
- $seen->{$source} = 1;
-
-my ($name,$version)=($source=~/(.*)-(.*)\.tar\.gz/);
- return "Couldn't get a name for $source\n" if !$name;
- return "Couldn't get a version for $source\n" if !$version;
-
- my $summary="$name module for perl";
- my $description=$obj->{description};
- $description= $summary if !$description;
-
- open(SPEC, ">$builddir/SPECS/perl-$name.spec")
- or die "Couldn't open perl-$name.spec for writing.";
- print SPEC <<EOF;
-
-Summary: $summary
-Name: perl-$name
-Version: $version
-Release: $release
-Copyright: distributable
-Group: Applications/CPAN
-Source0: $source
-Url: http://www.cpan.org
-BuildRoot: /var/tmp/perl-${name}-buildroot/
-Requires: perl
-
-%description
-This is a perl module, autogenerated by cpan2rpm. The original package's
-description was:
-
-$description
-
-%prep
-%setup -q -n $name-%{version}
-
-%build
-CFLAGS="\$RPM_OPT_FLAGS" perl Makefile.PL
-make
-
-%clean
-rm -rf \$RPM_BUILD_ROOT
-
-%install
-rm -rf \$RPM_BUILD_ROOT
-eval `perl '-V:installarchlib'`
-mkdir -p \$RPM_BUILD_ROOT/\$installarchlib
-make PREFIX=\$RPM_BUILD_ROOT/usr install
-/usr/lib/rpm/brp-compress
-find \$RPM_BUILD_ROOT/usr -type f -print | sed "s\@^\$RPM_BUILD_ROOT\@\@g" | grep -v perllocal.pod > $name-$version-filelist
-
-%files -f ${name}-${version}-filelist
-%defattr(-,root,root)
-
-%changelog
-EOF
- print SPEC "* ",POSIX::strftime("%a %b %d %Y",localtime()), " ",$ENV{USER}," <",$ENV{USER},"\@",hostname(),">\n";
- print SPEC "- Spec file automatically generated by cpan2rpm\n";
-
- close(SPEC);
-
- system("rpm -ba $builddir/SPECS/perl-$name.spec >/dev/null") == 0
- or push (@report, "RPM of $source failed with : $!\n");
-
- system("rpm -Uvh $builddir/RPMS/$ARCH/perl-$name-$version-$release.$ARCH.rpm") == 0
- or warn "RPM of $source could not be installed: $!\n";
-
- push (@report, "Built perl-$name-$version-$release.$ARCH.rpm");
-}
-
-sub ExtractRpmMacro {
- my ($file,$macro) = @_;
-
- my $handle=new IO::File;
-
- if (!$handle->open($file)) {
- return undef;
- }
-
- while(<$handle>) {
- if (/\%$macro (.*)/) {
- return $1;
- }
- }
-
- return undef;
-}
-
-=head1 NAME
-
-cpan2rpm - fetch and convert CPAN packages to RPMs
-
-=head1 SYNOPSIS
-
-cpan2rpm --release <release> <package>
-
-=head1 DESCRIPTION
-
-cpan2rpm provides a quick way of creating RPM packages from perl modules
-published on CPAN. It interfaces with the perl CPAN module to fetch the
-file from the selected mirror, and then creates a spec file from the
-information in CPAN, and invokes RPM on that spec file.
-
-Files are created in the users RPM build root.
-
-=head1 OPTIONS
-
-=over 4
-
-=item release
-
-Sets the release number of the created RPMs.
-
-=back
-
-=head1 SEE ALSO
-
-rpm(1)
-
-=head1 AUTHOR
-
-Simon Wilkinson <sxw@sxw.org.uk>
diff --git a/rt/tools/initdb b/rt/tools/initdb
deleted file mode 100644
index ffb1ae3b0..000000000
--- a/rt/tools/initdb
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/usr/bin/perl -w
-# $Header: /home/cvs/cvsroot/freeside/rt/tools/Attic/initdb,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-use strict;
-use vars qw($PROMPT $SCHEMA_FILE $SCHEMA_DIR
- $ACTION $DEBUG $DB_TYPE $DB_HOME
- $DB_HOST $DB_PORT $DB_DBA $DB_DATABASE $DB_DBA_PASSWORD);
-
-use DBI;
-use DBIx::DataSource qw( create_database drop_database );
-
-
-$|=1; #unbuffer that output.
-
-$DEBUG=0;
-$PROMPT = 1; #by default, should at least *ask* before nuking databases
-$SCHEMA_DIR ="etc";
-$SCHEMA_FILE = "$SCHEMA_DIR/schema.pm"; #hmm
-
-($DB_TYPE, $DB_HOME, $DB_HOST, $DB_PORT, $DB_DBA, $DB_DATABASE, $ACTION) = @ARGV;
-
-
-if ($DEBUG) {
- print_config_params();
-}
-my $dsn = "dbi:$DB_TYPE:";
-
-if (($DB_TYPE eq 'Pg') or ($DB_TYPE eq 'mysql')) {
- $dsn .= "dbname=$DB_DATABASE";
- if ($DB_HOST) {
- $dsn .= ";host=$DB_HOST";
- }
- if ($DB_PORT) {
- $dsn .= ";port=$DB_PORT";
- }
-}
-elsif ($DB_TYPE eq 'Oracle') {
- $dsn .= "$DB_DATABASE";
-}
-
-
-if ($ACTION eq 'create') {
- unless ($DB_TYPE eq 'Oracle') {
- print "Now creating a database for RT.\n";
- prompt_for_dba_password();
- create_db();
- }
-}
-elsif ($ACTION eq 'drop' ) {
- unless ($DB_TYPE eq 'Oracle') {
- print "Now dropping the RT2 database.\n";
- prompt_for_dba_password();
- drop_db();
- }
-}
-elsif ($ACTION eq 'insert' ) {
- print "Now populating database schema.\n";
- prompt_for_dba_password();
- insert_schema();
-}
-elsif ($ACTION eq 'generate') {
- prompt_for_dba_password();
- generate_schema();
-}
-else {
- print STDERR '$ACTION unspecified. Makefile error. It was '.$ACTION ;
- exit(-1);
-}
-
-
-# {{{ sub prompt_for_dba_password
-
-sub prompt_for_dba_password {
- print "Enter the $DB_TYPE password for $DB_DBA: ";
-
- system "stty -echo";
- $DB_DBA_PASSWORD = scalar(<STDIN>); #keep off commandline
- system "stty echo";
- chomp $DB_DBA_PASSWORD;
-
-}
-# }}}
-
-# {{{ sub print_config_params
-sub print_config_params {
- print <<END;
-Database creation parameters:
-
-DB_TYPE = $DB_TYPE
-DB_HOME = $DB_HOME
-DB_HOST = $DB_HOST
-DB_DBA = $DB_DBA
-DB_DBA_PASSWORD = <hidden>
-DB_DATABASE = $DB_DATABASE
-END
-}
-# }}}
-
-# {{{ sub drop_db
-sub drop_db {
-
- if ( $PROMPT ) {
- print <<END;
-
-About to drop $DB_TYPE database $DB_DATABASE.
-WARNING: This will erase all data in $DB_DATABASE.
-If you have an existing RT 2.x installation, this will destroy all your data.
-i
-END
- exit unless _yesno();
-
- }
-
-
- print "\nDropping $DB_TYPE database $DB_DATABASE.\n";
- drop_database( $dsn, $DB_DBA, $DB_DBA_PASSWORD )
- or warn $DBIx::DataSource::errstr;
-
-
-}
-# }}}
-
-# {{{ sub generate_schema
-sub generate_schema {
- my @schema = generate_schema_from_hash();
- print "Generating schema for $DB_TYPE...";
-
- system('mv', "$SCHEMA_DIR/schema.$DB_TYPE", "$SCHEMA_DIR/schema.$DB_TYPE.bak")
- if (-f "$SCHEMA_DIR/schema.$DB_TYPE");
- open(SCHEMA, ">$SCHEMA_DIR/schema.$DB_TYPE");
- foreach my $line (@schema) {
- print SCHEMA "$line;\n";
- }
- close(SCHEMA);
- print "done.\n";
-}
-# }}}
-
-# {{{ sub insert_schema
-sub insert_schema {
- my (@schema);
- print "\nCreating database schema.\n";
-
- my $dbh = DBI->connect( $dsn, $DB_DBA, $DB_DBA_PASSWORD ) or die $DBI::errstr;
-
- if ( -f "$SCHEMA_DIR/schema.$DB_TYPE") {
- open (SCHEMA, "<$SCHEMA_DIR/schema.$DB_TYPE");
- my $statement = "";
- foreach my $line (<SCHEMA>) {
- $statement .= $line;
- if ($line =~ /;$/) {
- $statement =~ s/;$//g;
- push @schema, $statement;
- $statement = "";
- }
- }
- }
-
- else {
- @schema = generate_schema_from_hash();
- }
-
- foreach my $statement (@schema) {
- print STDERR $statement if $DEBUG;
- my $sth = $dbh->prepare($statement) or die $dbh->errstr;
- unless ($sth->execute) {
- print STDERR "Problem with statement:\n $statement\n";
- die $sth->errstr;
- }
- }
-
-
- $dbh->disconnect;
- print "schema sucessfully inserted\n";
-
-}
-# }}}
-
-# {{{ sub generate_schema_from_hash
-sub generate_schema_from_hash {
- my (@schema);
-
- require DBIx::DBSchema;
- my $schema_href = do "$SCHEMA_FILE" or die $@ || $!;
- my $schema = DBIx::DBSchema->pretty_read($schema_href);
-
-
- foreach my $statement ( $schema->sql($dsn, $DB_DBA, $DB_DBA_PASSWORD ) ) {
- print STDERR $statement if $DEBUG;
- chomp $statement;
- push @schema, $statement;
-
- }
- return (@schema);
-
-}
-# }}}
-
-# {{{ sub create_db
-sub create_db {
-
- print "\nCreating $DB_TYPE database $DB_DATABASE.\n";
- create_database( $dsn, $DB_DBA, $DB_DBA_PASSWORD )
- or die $DBIx::DataSource::errstr;
-
-}
-# }}}
-
-# {{{ sub _yesno
-sub _yesno {
- print "Proceed [y/N]:";
- my $x = scalar(<STDIN>);
- $x =~ /^y/i;
-}
-
-# }}}
diff --git a/rt/tools/insertdata b/rt/tools/insertdata
deleted file mode 100755
index b3e76e623..000000000
--- a/rt/tools/insertdata
+++ /dev/null
@@ -1,618 +0,0 @@
-#!/usr/bin/perl -w
-#
-# $Header: /home/cvs/cvsroot/freeside/rt/tools/Attic/insertdata,v 1.1 2002-08-12 06:17:08 ivan Exp $
-# RT is (c) 1996-2002 Jesse Vincent (jesse@bestpractical.com);
-
-package RT;
-use strict;
-use vars qw($VERSION $Handle $Nobody $SystemUser $item);
-
-use lib "!!RT_LIB_PATH!!";
-use lib "!!RT_ETC_PATH!!";
-
-#This drags in RT's config.pm
-use config;
-use Carp;
-
-use RT::Handle;
-use RT::User;
-use RT::CurrentUser;
-
-#
-my $LastVersion = shift || undef;
-my $LastMinorVersion = undef;
-
-#connect to the db
-$RT::Handle = new RT::Handle($RT::DatabaseType);
-$RT::Handle->Connect();
-
-#Put together a current user object so we can create a User object
-my $CurrentUser = new RT::CurrentUser();
-
-if ($LastVersion) {
- if ( $LastVersion =~ /^2.0.(\d+)$/ ) {
- $LastMinorVersion = $1;
- print "Looking for new objects to add to the database"
- . " since $LastVersion\n\n";
- }
- else {
- print "This tool does not support upgrades from development releases "
- . "or non 2.0.x versions";
- }
-}
-else { # this is a virgin install
- 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 already run insertdata.\n"
- . "Exiting, so as not to clobber your existing data. To ERASE your\n"
- . "RT database and start over, type 'make dropdb; make install' in\n"
- . "the RT installation directory. If you just meant to upgrade the\n"
- . "content of your database, rerun this program as: \n",
- " $0 <version>\n"
- . "where <version> is the last RELEASED version of RT you installed\n"
- . "for example, if you're upgrading from 2.0.4, you'd type:\n"
- . " $0 2.0.4\n";
- exit(-1);
-
- }
- else {
- print "not found. This appears to be a new installation";
- }
-
- 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',
- Privileged => '2',
- Creator => '1'
- );
-
- if ($val) {
- print "done.\n";
- }
- else {
- print "$msg\n";
- exit(1);
- }
-
-}
-
-#now that we bootstrapped that little bit, we can use the standard RT cli
-# helpers to do what we need
-
-use RT::Interface::CLI qw(CleanEnv LoadConfig DBConnect
- GetCurrentUser GetMessageContent);
-
-#Clean out all the nasties from the environment
-CleanEnv();
-
-#Load etc/config.pm and drop privs
-LoadConfig();
-
-#Connect to the database and get RT::SystemUser and RT::Nobody loaded
-DBConnect();
-
-$CurrentUser->LoadByName('RT_System');
-
-# {{{ Users
-
-my @users;
-
-unless ($LastVersion) {
- @users = (
- {
- Name => 'Nobody',
- RealName => 'Nobody in particular',
- Comments => 'Do not delete or modify this user. It is integral '
- . 'to RT\'s internal data structures',
- Privileged => '2',
- },
-
- {
- Name => 'root',
- Gecos => 'root',
- RealName => 'Enoch Root',
- Password => 'password',
- EmailAddress => "root\@localhost",
- Comments => 'SuperUser',
- Privileged => '1',
- }
- );
-}
-
-# }}}
-
-# {{{ Groups
-
-my @groups;
-unless ($LastVersion) {
- @groups = (
- {
- Name => 'Everyone',
- Description => 'Pseudogroup for internal use',
- Pseudo => '1',
- },
- {
- Name => 'Owner',
- Description => 'Pseudogroup for internal use',
- Pseudo => '1',
- },
- {
- Name => 'Requestor',
- Description => 'Pseudogroup for internal use',
- Pseudo => '1',
- },
- {
- Name => 'Cc',
- Description => 'Pseudogroup for internal use',
- Pseudo => '1',
- },
- {
- Name => 'AdminCc',
- Description => 'Pseudogroup for internal use',
- Pseudo => '1',
- },
- );
-}
-
-# }}}
-
-# {{{ ACL
-my @acl;
-
-unless ($LastVersion) {
- @acl = ( #TODO: make this actually take the serial # granted to root.
- {
- PrincipalId => '1',
- PrincipalType => 'User',
- RightName => 'SuperUser',
- RightScope => 'System',
- RightAppliesTo => '0'
- },
- {
- PrincipalId => '2',
- PrincipalType => 'User',
- RightName => 'SuperUser',
- RightScope => 'System',
- RightAppliesTo => '0'
- },
-
- {
- PrincipalId => '3',
- PrincipalType => 'User',
- RightName => 'SuperUser',
- RightScope => 'System',
- RightAppliesTo => '0'
- }
-
- );
-}
-
-# }}}
-
-# {{{ Queues
-
-my @queues;
-unless ($LastVersion) {
- @queues = (
- {
- Name => 'general',
- Description => 'The default queue',
- CorrespondAddress => "rt\@localhost",
- CommentAddress => "rt-comment\@localhost"
- }
- );
-}
-
-# }}}
-
-# {{{ ScripActions
-
-my @ScripActions;
-
-unless ($LastVersion) {
- @ScripActions = (
-
- {
- Name => 'AutoreplyToRequestors',
- Description =>
-'Always sends a message to the requestors independent of message sender',
- ExecModule => 'Autoreply',
- Argument => 'Requestor'
- },
- {
- Name => 'NotifyRequestors',
- Description => 'Sends a message to the requestors',
- ExecModule => 'Notify',
- Argument => 'Requestor'
- },
- {
- Name => 'NotifyOwnerAsComment',
- Description => 'Sends mail to the owner',
- ExecModule => 'NotifyAsComment',
- Argument => 'Owner'
- },
- {
- Name => 'NotifyOwner',
- Description => 'Sends mail to the owner',
- ExecModule => 'Notify',
- Argument => 'Owner'
- },
- {
- Name => 'NotifyAdminCcsAsComment',
- Description => 'Sends mail to the administrative Ccs as a comment',
- ExecModule => 'NotifyAsComment',
- Argument => 'AdminCc'
- },
- {
- Name => 'NotifyAdminCcs',
- Description => 'Sends mail to the administrative Ccs',
- ExecModule => 'Notify',
- Argument => 'AdminCc'
- },
-
- {
- Name => 'NotifyRequestorsAndCcsAsComment',
- Description => 'Send mail to requestors and Ccs as a comment',
- ExecModule => 'NotifyAsComment',
- Argument => 'Requestor,Cc'
- },
-
- {
- Name => 'NotifyRequestorsAndCcs',
- Description => 'Send mail to requestors and Ccs',
- ExecModule => 'Notify',
- Argument => 'Requestor,Cc'
- },
-
- {
- Name => 'NotifyAllWatchersAsComment',
- Description => 'Send mail to all watchers',
- ExecModule => 'NotifyAsComment',
- Argument => 'All'
- },
- {
- Name => 'NotifyAllWatchers',
- Description => 'Send mail to all watchers',
- ExecModule => 'Notify',
- Argument => 'All'
- },
- );
-}
-
-if ( $LastMinorVersion < 12 ) {
- push (
- @ScripActions,
- {
- Name => 'NotifyOtherRecipientsAsComment',
- Description => 'Sends mail to explicitly listed Ccs and Bccs',
- ExecModule => 'NotifyAsComment',
- Argument => 'OtherRecipients'
- },
- {
- Name => 'NotifyOtherRecipients',
- Description => 'Sends mail to explicitly listed Ccs and Bccs',
- ExecModule => 'Notify',
- Argument => 'OtherRecipients'
- },
- );
-}
-
-# }}}
-
-# {{{ ScripConditions
-
-my @ScripConditions;
-unless ($LastVersion) {
- @ScripConditions = (
- {
- Name => 'OnCreate',
- Description => 'When a ticket is created',
- ApplicableTransTypes => 'Create',
- ExecModule => 'AnyTransaction',
- },
-
- {
- Name => 'OnTransaction',
- Description => 'When anything happens',
- ApplicableTransTypes => 'Any',
- ExecModule => 'AnyTransaction',
- },
- {
-
- Name => 'OnCorrespond',
- Description => 'Whenever correspondence comes in',
- ApplicableTransTypes => 'Correspond',
- ExecModule => 'AnyTransaction',
- },
-
- {
-
- Name => 'OnComment',
- Description => 'Whenever comments come in',
- ApplicableTransTypes => 'Comment',
- ExecModule => 'AnyTransaction'
- },
- {
-
- Name => 'OnStatus',
- Description => 'Whenever a ticket\'s status changes',
- ApplicableTransTypes => 'Status',
- ExecModule => 'AnyTransaction',
-
- },
- {
- Name => 'OnResolve',
- Description => 'Whenever a ticket is resolved.',
- ApplicableTransTypes => 'Status',
- ExecModule => 'StatusChange',
- Argument => 'resolved'
-
- },
-
- );
-}
-
-# }}}
-
-# {{{ Templates
-my @templates;
-
-unless ($LastVersion) {
- @templates = (
- {
- Queue => '0',
- Name => 'Autoreply',
- Description => 'Default Autoresponse Template',
- Content => 'Subject: AutoReply: {$Ticket->Subject}
-
-
-Greetings,
-
-This message has been automatically generated in response to the
-creation of a trouble ticket regarding:
- "{$Ticket->Subject()}",
-a summary of which appears below.
-
-There is no need to reply to this message right now. Your ticket has been
-assigned an ID of [{$rtname} #{$Ticket->id()}].
-
-Please include the string:
-
- [{$rtname} #{$Ticket->id}]
-
-in the subject line of all future correspondence about this issue. To do so,
-you may reply to this message.
-
- Thank you,
- {$Ticket->QueueObj->CorrespondAddress()}
-
--------------------------------------------------------------------------
-{$Transaction->Content()}
-'
- },
-
- {
-
- # id => 2,
- Queue => '0',
- Name => 'Transaction',
- Description => 'Default transaction template',
- Content => '
-
-
-{$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
-Transaction: {$Transaction->Description}
- Queue: {$Ticket->QueueObj->Name}
- Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject given)"}
- Owner: {$Ticket->OwnerObj->Name}
- Requestors: {$Ticket->Requestors->EmailsAsString()}
- Status: {$Ticket->Status}
- Ticket <URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
--------------------------------------------------------------------------
-{$Transaction->Content()}'
- },
-
- {
-
- Queue => '0',
- Name => 'AdminCorrespondence',
- Description => 'Default admin correspondence template',
- Content => '
-
-
-<URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id} >
-
-{$Transaction->Content()}'
- },
-
- {
- Queue => '0',
- Name => 'Correspondence',
- Description => 'Default correspondence template',
- Content => '
-
-{$Transaction->Content()}'
- },
-
- {
- Queue => '0',
- Name => 'AdminComment',
- Description => 'Default admin comment template',
- Content =>
-'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;}
-
-
-{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
-This is a comment. It is not sent to the Requestor(s):
-
-{$Transaction->Content()}
-'
- },
-
- {
- Queue => '0',
- Name => 'StatusChange',
- Description => 'Ticket status changed',
- Content => 'Subject: Status Changed to: {$Transaction->NewValue}
-
-
-{$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
-
-{$Transaction->Content()}
-'
- },
-
- {
-
- Queue => '0',
- Name => 'Resolved',
- Description => 'Ticket Resolved',
- Content => 'Subject: Ticket Resolved
-
-According to our records, your request has been resolved. If you have any
-further questions or concerns, please respond to this message.
-'
- }
- );
-}
-
-# }}}
-
-# {{{ Scrips;
-
-my @scrips;
-unless ($LastVersion) {
- @scrips = (
- { Queue => 0,
- ScripCondition => 'OnCreate',
- ScripAction => 'AutoreplyToRequestors',
- Template => 'Autoreply'
- },
- { Queue => 0,
- ScripCondition => 'OnCreate',
- ScripAction => 'NotifyAdminCcs',
- Template => 'Transaction',
- },
- { Queue => 0,
- ScripCondition => 'OnCorrespond',
- ScripAction => 'NotifyAllWatchers',
- Template => 'Correspondence',
- },
- { Queue => 0,
- ScripCondition => 'OnComment',
- ScripAction => 'NotifyAdminCcsAsComment',
- Template => 'AdminComment',
- },
- )
-}
-if ( $LastMinorVersion < 12 ) {
- push (
- @scrips,
- { Queue => 0,
- ScripCondition => 'OnComment',
- ScripAction => 'NotifyOtherRecipientsAsComment',
- Template => 'Correspondence',
- },
- { Queue => 0,
- ScripCondition => 'OnCorrespond',
- ScripAction => 'NotifyOtherRecipients',
- Template => 'Correspondence',
- },
- );
-}
-# }}}
-
-print "Creating ACL...";
-use RT::ACE;
-for $item (@acl) {
- my $new_entry = new RT::ACE($CurrentUser);
-
- #Using an internal function. this should never be used outside of the bootstrap script
- my $return = $new_entry->_BootstrapRight(%$item);
- print $return. ".";
-}
-print "done.\n";
-
-print "Creating users...";
-use RT::User;
-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";
-
-print "Creating groups...";
-use RT::Group;
-foreach $item (@groups) {
- my $new_entry = new RT::Group($CurrentUser);
- my $return = $new_entry->Create(%$item);
- print $return. ".";
-}
-print "done.\n";
-
-print "Creating queues...";
-use RT::Queue;
-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";
-print "Creating ScripActions...";
-
-use RT::ScripAction;
-for $item (@ScripActions) {
- my $new_entry = new RT::ScripAction($CurrentUser);
- my $return = $new_entry->Create(%$item);
- print $return. ".";
-}
-
-print "done.\n";
-print "Creating ScripConditions...";
-
-use RT::ScripCondition;
-for $item (@ScripConditions) {
- my $new_entry = new RT::ScripCondition($CurrentUser);
- my $return = $new_entry->Create(%$item);
- print $return. ".";
-}
-
-print "done.\n";
-
-print "Creating templates...";
-
-use RT::Template;
-for $item (@templates) {
- my $new_entry = new RT::Template($CurrentUser);
- my $return = $new_entry->Create(%$item);
- print $return. ".";
-}
-print "done.\n";
-
-print "Creating Scrips...";
-
-use RT::Scrip;
-for $item (@scrips) {
- my $new_entry = RT::Scrip->new($CurrentUser);
- my ($return,$msg) = $new_entry->Create(%$item);
- print "(Error: $msg)" unless ($return);
- print $return.".";
-
-}
-print "done.\n";
-
-$RT::Handle->Disconnect();
-
-1;
-
diff --git a/rt/tools/testdeps b/rt/tools/testdeps
deleted file mode 100644
index ddc338107..000000000
--- a/rt/tools/testdeps
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/usr/bin/perl -w
-
-# $Header: /home/cvs/cvsroot/freeside/rt/tools/Attic/testdeps,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-# Copyright 2000 Jesse Vincent <jesse@fsck.com>
-# Distributed under the GNU General Public License
-#
-
-#
-# 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;
-
-use vars qw($mode $dbd $module @modules);
-
-$mode = shift || print_help();
-$dbd = shift || print_help();
-
-@modules = qw(
-Digest::MD5
-Storable
-DBI 1.18
-DBIx::DataSource 0.02
-DBIx::SearchBuilder 0.48
-HTML::Entities
-MLDBM
-Net::Domain
-Net::SMTP
-Params::Validate 0.02
-HTML::Mason 1.02
-CGI::Cookie 1.20
-Apache::Cookie
-Apache::Session 1.53
-Date::Parse
-Date::Format
-MIME::Entity 5.108
-Mail::Mailer 1.20
-Getopt::Long 2.24
-Tie::IxHash
-Text::Wrapper
-Text::Template
-File::Spec 0.8
-Errno
-FreezeThaw
-File::Temp
-Log::Dispatch 1.6
-);
-
-
-if ($dbd =~ /mysql/i) {
- push @modules, ('DBD::mysql','2.0416');
-}
-elsif ($dbd =~ /oracle/i) {
- push @modules, ('DBD::Oracle','');
-}
-elsif ($dbd =~ /pg/i) {
- push @modules, ('DBD::Pg','');
-}
-use CPAN;
-
-while ($module= shift @modules) {
- my $version = "";
- $version = " ". shift (@modules) . " " if ($modules[0] =~ /^([\d\.]*)$/);
- print "Checking for $module$version";
- eval "use $module$version" ;
- if ($@) {
- &resolve_dependency($module, $version)
- }
- else {
- print "...found\n";
- }
-}
-
-sub print_help {
-print <<EOF;
-
-$0 FLAG DBTYPE
-
-
-$0 is a tool for RT that will tell you if you've got all
-the modules RT depends on properly installed.
-
-Flags: (only one flag is valid for a given run)
-
--quiet will check to see if we've got everything we need
- and will exit with a return code of (1) if we don't.
-
--warn will tell you what isn't properly installed
-
--fix will use CPAN to magically make everything better
-
-DBTYPE is one of:
- oracle, pg, mysql
-
-EOF
-
-exit(0);
-}
-
-sub resolve_dependency {
- my $module = shift;
- my $version = shift;
- print "....$module$version not installed.";
- if ($mode =~ /-f/) {
- $module = "DBD::mysql::Install" if ($module =~ /DBD::mysql/);
-
- print "Installing with CPAN...";
- CPAN::install($module);
- }
- print "\n";
- exit(1) if ($mode =~ /-q/);
-}
-
diff --git a/rt/webrt/Admin/Elements/CreateQueueCalled b/rt/webrt/Admin/Elements/CreateQueueCalled
deleted file mode 100755
index aeed6e786..000000000
--- a/rt/webrt/Admin/Elements/CreateQueueCalled
+++ /dev/null
@@ -1,3 +0,0 @@
-<FORM METHOD=get ACTION="<% $RT::WebPath %>/Admin/Queues/Create.html">
-Create a queue called <INPUT NAME="Name" size=10><input type=submit>
-</form>
diff --git a/rt/webrt/Admin/Elements/CreateUserCalled b/rt/webrt/Admin/Elements/CreateUserCalled
deleted file mode 100755
index 7e4bb7554..000000000
--- a/rt/webrt/Admin/Elements/CreateUserCalled
+++ /dev/null
@@ -1,3 +0,0 @@
-<FORM METHOD=get ACTION="<%$RT::WebPath%>/Admin/Users/Create.html">
-New user called <INPUT NAME="Name" size=10><input type=submit value="Create">
-</form>
diff --git a/rt/webrt/Admin/Elements/EditUserComments b/rt/webrt/Admin/Elements/EditUserComments
deleted file mode 100755
index 1ac7e187f..000000000
--- a/rt/webrt/Admin/Elements/EditUserComments
+++ /dev/null
@@ -1,9 +0,0 @@
-<& /Elements/Header, Title => "Comments about $name" &>
-These comments aren't generally visible to the user:<br>
-<input type="hidden" name="id" value="<%$id%>">
-<TEXTAREA COLS=60 ROWS=15 WRAP=SOFT NAME="Comments"><% $UserObj->Comments %></TEXTAREA>
-</FORM>
-
-<%ARGS>
-$UserObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/GrantQueueRightsTo b/rt/webrt/Admin/Elements/GrantQueueRightsTo
deleted file mode 100755
index 3850a18f2..000000000
--- a/rt/webrt/Admin/Elements/GrantQueueRightsTo
+++ /dev/null
@@ -1,30 +0,0 @@
-<BR>
-
-% if ($msg) {
-<%$msg%>
-% } elsif ($Users) {
-<ul>
-% while (my $u = $Users->Next ) {
-<li> <%$u->Name%> (<%$u->RealName%>) <& SelectQueueRights, Name => "GrantTo".$u->id &>
-% }
-</ul>
-% }
-
-<%INIT>
-my ($msg, $Users);
-if (!$ARGS{'UserString'}) {
-$msg = "No users selected.";
- }
-else {
- $Users = new RT::Users($session{'CurrentUser'});
- $Users->Limit(FIELD => $ARGS{'UserField'},
- VALUE => $ARGS{'UserString'},
- OPERATOR => $ARGS{'UserOp'});
- }
-</%INIT>
-
-<%ARGS>
-$UserField => 'Name'
-$UserOp => '='
-$UserString => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/GroupTabs b/rt/webrt/Admin/Elements/GroupTabs
deleted file mode 100755
index 261bef1e2..000000000
--- a/rt/webrt/Admin/Elements/GroupTabs
+++ /dev/null
@@ -1,18 +0,0 @@
-<& /Admin/Elements/Tabs, subtabs => $subtabs, current_tab => 'Admin/Groups/' &>
-<hr>
-<%INIT>
-my $subtabs = {
- Basics => { title => 'Basics',
- path => "Admin/Groups/Modify.html?id=". $GroupObj->id
- }
- };
-
-unless ($GroupObj->Pseudo) {
-$subtabs->{'Members'} = { title => 'Members',
- path => "Admin/Groups/Members.html?id=".$GroupObj->id };
-}
-</%INIT>
-
-<%ARGS>
-$GroupObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/Header b/rt/webrt/Admin/Elements/Header
deleted file mode 100755
index 95acdac7e..000000000
--- a/rt/webrt/Admin/Elements/Header
+++ /dev/null
@@ -1,5 +0,0 @@
-<& /Elements/Header, Title => $Title &>
-
-<%ARGS>
-$Title => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/ListGlobalKeywordSelects b/rt/webrt/Admin/Elements/ListGlobalKeywordSelects
deleted file mode 100644
index b24d68989..000000000
--- a/rt/webrt/Admin/Elements/ListGlobalKeywordSelects
+++ /dev/null
@@ -1,15 +0,0 @@
-% while (my $KeywordSelect = $KeywordSelects->Next()) {
-
-<%$KeywordSelect->Name %>:
-<% $KeywordSelect->Single ? 'Single' : 'Multiple' %>
-children of
-<% $KeywordSelect->KeywordObj->Path %>
-% if ($KeywordSelect->Depth) {
- up to <%$KeywordSelect->Depth%> levels deep
-% }
-<BR>
-%}
-<%INIT>
-my $KeywordSelects = RT::KeywordSelects->new($session{'CurrentUser'});
-$KeywordSelects->LimitToGlobals();
-</%INIT>
diff --git a/rt/webrt/Admin/Elements/ListGlobalScrips b/rt/webrt/Admin/Elements/ListGlobalScrips
deleted file mode 100755
index 2f044bf52..000000000
--- a/rt/webrt/Admin/Elements/ListGlobalScrips
+++ /dev/null
@@ -1,10 +0,0 @@
-% while (my $scrip = $Scrips->Next ) {
-<% $scrip->ConditionObj->Name %>
-<% $scrip->ActionObj->Name %>
-with template <% $scrip->TemplateObj->Name %>
-<BR>
-% }
-<%init>
-my $Scrips = new RT::Scrips ($session{'CurrentUser'});
-$Scrips->LimitToGlobal();
-</%INIT>
diff --git a/rt/webrt/Admin/Elements/ModifyKeyword b/rt/webrt/Admin/Elements/ModifyKeyword
deleted file mode 100644
index 4b01c3692..000000000
--- a/rt/webrt/Admin/Elements/ModifyKeyword
+++ /dev/null
@@ -1,95 +0,0 @@
-<FORM METHOD="get" ACTION="<%$RT::WebPath%>/Admin/Keywords/Modify.html">
-[<%$title |n %>]<BR>
-
-<INPUT TYPE="hidden" NAME="id" VALUE="<% $id %>">
-Keyword <INPUT NAME="Name" VALUE="<% $Keyword->Name %>"><BR>
-
-Parent <SELECT NAME="Parent">
- <OPTION VALUE=""<% defined($Keyword->Parent) ? '' : ' SELECTED' %>>-</OPTION>
-%while ( $parent = $parents->Next ) {
- <OPTION VALUE="<% $parent->id %>"<% defined($Keyword->Parent) && $parent->id == $Keyword->Parent ? ' SELECTED' : '' %>><% $parent->Name %></OPTION>
-%}
-</SELECT>
-
-
-Kids <FONT SIZE="-2">(separate by
-<INPUT TYPE="radio" NAME="delim" VALUE="n"<% $delim eq 'n' ? ' CHECKED' : '' %>>
-line or
-<INPUT TYPE="radio" NAME="delim" VALUE="s"<% $delim eq 's' ? ' CHECKED' : '' %>>
-whitespace)</FONT><BR>
-
-<TEXTAREA NAME="Kids" ROWS=4><% $kidstring %></TEXTAREA>
-<BR>
-
-<& /Elements/Submit, Label => $submit &>
-</FORM>
-
-<%INIT>
-
-my $Keyword = new RT::Keyword($session{CurrentUser});
-my ($title, $submit, %kids, $kid);
-
-if ( $Create ) {
- $title = "Create a new Keyword";
- $submit = "Create";
- $id = "new";
- %kids = ();
- $Parent = ''; #silence
-} elsif ( $id eq 'new' ) {
- $id = $Keyword->Create( Name => $Name, Parent => $Parent )
- or Abort("can't create keyword Name=>$Name, Parent=>$Parent");
-} else {
- $Keyword->Load($id) || Abort("Can't load keyword id $id");
- #foreach my $field ( grep eval "defined(\$$_)", qw( Name Parent )) {
- # eval "\$Keyword->Set(\$field=>\$$field); #sigh
- #}
- $Keyword->SetName($Name) if defined($Name);
- $Keyword->SetParent($Parent) if defined($Parent);
-}
-
-$title = "Modify the Keyword <B>". $Keyword->Name. "</B>";
-$submit = "Modify";
-
-my $kids = new RT::Keywords($session{CurrentUser});
-$kids->Limit( FIELD => 'Parent', VALUE => $id, OPERATOR => '=' );
-$kids{$kid->Name} = $kid while $kid = $kids->Next;
-
-if ( defined($Kids) ) {
- my %newkids;
- if ( $delim eq 'n' ) {
- %newkids = map { $_=>1 } split(/\n/, $Kids);
- } elsif ( $delim eq 's' ) {
- %newkids = map { $_=>1 } split(' ', $Kids);
- } else {
- Abort("'$delim' isn't a valid keyword delimiter.");
- }
- foreach ( grep { ! defined($newkids{$_}) } keys %kids ) {
- $kids{$_}->Delete;
- delete $kids{$_};
- }
- foreach ( grep { ! defined($kids{$_}) } keys %newkids ) {
- $kids{$_} = new RT::Keyword($session{CurrentUser});
- $kids{$_}->Create( Name => $_, Parent => $id )
- or Abort("can't create keyword Name=>$_, Parent=>$id");
- }
-
-}
-
-
-my $parent;
-my $parents = new RT::Keywords($session{CurrentUser});
-$parents->UnLimit;
-
-$delim = ( grep /\s/, keys %kids ) ? 'n' : 's';
-my $kidstring = join("\n", keys %kids);
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Create => undef
-$Name => undef
-$Parent => undef
-$Kids => undef
-$delim => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/ModifyKeywordSelect b/rt/webrt/Admin/Elements/ModifyKeywordSelect
deleted file mode 100644
index 470e62929..000000000
--- a/rt/webrt/Admin/Elements/ModifyKeywordSelect
+++ /dev/null
@@ -1,120 +0,0 @@
- <FORM NAME="ModifyKeywordSelect" METHOD=POST ACTION="<%$RT::WebPath%>/Admin/KeywordSelects/Modify.html">
-
- [<%$title |n %>]
- <BR>
-
- <INPUT TYPE="hidden" NAME="id" VALUE="<% $id %>">
- Keyword
- <SELECT NAME="Parent">
-
-%while ( $parent = $parents->Next ) {
-
- <OPTION VALUE="<% $parent->id %>" <% defined($KeywordSelect->Parent) && $parent->id == $KeywordSelect->Parent ? ' SELECTED' : '' %>><% $parent->Name %></OPTION>
-
-% }
-
- </SELECT>
- <BR>
- Object
- <SELECT NAME="ObjectType">
- <OPTION SELECTED>Ticket</OPTION>
- </SELECT>
- <BR>
-
-<SCRIPT>
-function addOption(text, value, defaultselected, selected) {
- var option = new Option(text, value, defaultselected, selected )
- var length = document.ModifyKeywordSelect.ObjectValue.length;
- document.ModifyKeywordSelect.ObjectValue.options[length] = option
-}
-function ChangeObjectValue(what) {
- Value = what.options[what.selectedIndex].value
- if ( Value == "(none)" ) {
- document.ModifyKeywordSelect.ObjectValue.options.length = 0
- addOption("(n/a)", "", false, false)
- }
- if ( Value == "Queue" ) {
- document.ModifyKeywordSelect.ObjectValue.options.length = 0
-%foreach $queue ( keys %queues ) {
- addOption("<% $queues{$queue} %>", "<% $queue %>", false, <% $queue == $KeywordSelect->ObjectValue ? 'true' : 'false' %> )
-%}
- }
-}
-</SCRIPT>
-
- Limit to <SELECT NAME="ObjectField" onChange="ChangeObjectValue(this)">
- <OPTION VALUE="" <% $KeywordSelect->ObjectField ? '' : ' SELECTED' %>>(none)</OPTION>
- <OPTION VALUE="Queue" <% $KeywordSelect->ObjectField eq 'Queue' ? ' SELECTED' : '' %>>Queue</OPTION>
- </SELECT>
- <SELECT NAME="ObjectValue">
- <OPTION VALUE="<% $KeywordSelect->ObjectValue %>">
- <% $KeywordSelect->ObjectField ? $queues{$KeywordSelect->ObjectValue} : "(n/a)" %></OPTION>
- </SELECT><BR>
- <INPUT TYPE="hidden" NAME="SingleMagic" VALUE="1">
- <INPUT TYPE="checkbox" NAME="Single" VALUE="1" <% $KeywordSelect->Single ? ' CHECKED' : '' %>>Allow single selection only<BR>
- Limit to <INPUT TYPE="text" NAME="Generations" SIZE="2" VALUE="<% $KeywordSelect->Generations %>"> generations (0 = no limit)<BR>
- <& /Elements/Submit, Label => $submit &>
-
-</FORM>
-
-<%INIT>
-
-
-my $KeywordSelect = new RT::KeywordSelect($session{CurrentUser});
-
-my($title, $submit);
-
-if ( $Create ) {
- $title = "Create a new KeywordSelect";
- $submit = "Create";
- $id = "new";
-} else {
- if ( $id eq 'new' ) {
- $id = $KeywordSelect->Create (
- Parent => $Parent,
- ObjectType => $ObjectType,
- ObjectField => $ObjectField,
- ObjectValue => $ObjectValue,
- Single => $Single,
- Generations => $Generations,
- ) or Abort "can't create KeywordSelect";
- } else {
- $KeywordSelect->Load($id) || Abort("Can't load keyword id $id");
- #false laziness
- $KeywordSelect->SetParent($Parent) if defined($Parent);
- $KeywordSelect->SetObjectType($ObjectType) if defined($ObjectType);
- $KeywordSelect->SetObjectField($ObjectField) if defined($ObjectField);
- $KeywordSelect->SetObjectValue($ObjectValue) if defined($ObjectValue);
- $KeywordSelect->SetSingle($Single) if defined($SingleMagic);
- $KeywordSelect->SetGenerations($Generations) if defined($Generations);
- }
- $title = "Modify the KeywordSelect <B>". $KeywordSelect->KeywordObj->Name. "</B>";
- $submit = "Modify";
-
-}
-
- my $parents = new RT::Keywords($session{CurrentUser});
- $parents->UnLimit;
- my $parent;
-
-my $queues = new RT::Queues($session{CurrentUser});
-$queues->UnLimit;
-
-my %queues;
-my $queue;
-$queues{$queue->id} = $queue->Name while $queue = $queues->Next;
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Create => undef
-$Parent => undef
-$ObjectType => undef
-$ObjectField => undef
-$ObjectValue => undef
-$Single => undef
-$SingleMagic => undef
-$Generations => undef
-</%ARGS>
-
diff --git a/rt/webrt/Admin/Elements/ModifyQueue b/rt/webrt/Admin/Elements/ModifyQueue
deleted file mode 100755
index a641c81af..000000000
--- a/rt/webrt/Admin/Elements/ModifyQueue
+++ /dev/null
@@ -1,56 +0,0 @@
-
-<& /Elements/TitleBoxStart, title => 'Editing Configuration for queue '.$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>
-Queue Name:
-</TD>
-<TD><INPUT name="Name" value="<%$QueueObj->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-Description:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$QueueObj->Description%>" size=60></TD></TR>
-<TR>
-<TD ALIGN=RIGHT>
-Correspondence Address:
-</TD><TD>
-<INPUT name="CorrespondAddress" value="<%$QueueObj->CorrespondAddress%>">
-</TD>
-<TD ALIGN=RIGHT>
-
-Comment Address: </TD><TD>
-<INPUT NAME="CommentAddress" value="<%$QueueObj->CommentAddress%>">
-</TD>
-</TR><TR>
-
-<TD ALIGN=RIGHT>
-Priority starts at:
-</TD><TD><INPUT NAME="InitialPriority" value="<%$QueueObj->InitialPriority %>">
-</TD>
-<TD ALIGN=RIGHT>
-Over time, priority moves toward:
-</TD><TD><INPUT NAME="FinalPriority" value="<%$QueueObj->FinalPriority %>">
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-Requests should be due in:
-</TD><TD>
-<INPUT NAME="DefaultDueIn" VALUE="<%$QueueObj->DefaultDueIn%>"> days.
-</TD>
-</TR>
-</TABLE>
-<& /Elements/Submit &>
-</form>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-</%INIT>
-
-<%ARGS>
-
-
-$QueueObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/ModifyTemplate b/rt/webrt/Admin/Elements/ModifyTemplate
deleted file mode 100755
index 6e4f8a379..000000000
--- a/rt/webrt/Admin/Elements/ModifyTemplate
+++ /dev/null
@@ -1,78 +0,0 @@
-
-<& /Elements/TitleBoxStart, title => 'Editing Configuration for user '.$UserObj->Name &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/ModifyUser.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
-
-Name: <input name="Name" value="<%$UserObj->Name%>">
-<BR>
-New Password: <input type=password name="Pass1"><BR>
-Retype Password: <input type=password name="Pass2"><BR>
-
-Comments: <TEXTAREA name="Comments" COLS=20 ROWS=5>
-<%$UserObj->Comments%></TEXTAREA>
-
-<BR>
-Signature: <TEXTAREA COLS=80 ROWS=5 name="Signature">
-<%$UserObj->Signature%>"></TEXTAREA>
-<BR>
-EmailAddress: <input name="EmailAddress" value="<%$UserObj->EmailAddress%>">
-<BR>
-FreeformContactInfo: <input name="FreeformContactInfo" value="<%$UserObj->FreeformContactInfo%>">
-<BR>
-Organization: <input name="Organization" value="<%$UserObj->Organization%>">
-<BR>
-RealName: <input name="RealName" value="<%$UserObj->RealName%>">
-<BR>
-NickName: <input name="NickName" value="<%$UserObj->NickName%>">
-<BR>
-Lang: <input name="Lang" value="<%$UserObj->Lang%>">
-<BR>
-EmailEncoding: <input name="EmailEncoding" value="<%$UserObj->EmailEncoding%>">
-<BR>
-WebEncoding: <input name="WebEncoding" value="<%$UserObj->WebEncoding%>">
-<BR>
-ExternalContactInfoId: <input name="ExternalContactInfoId" value="<%$UserObj->ExternalContactInfoId%>">
-<BR>
-ContactInfoSystem: <input name="ContactInfoSystem" value="<%$UserObj->ContactInfoSystem%>">
-<BR>
-Gecos: <input name="Gecos" value="<%$UserObj->Gecos%>">
-<BR>
-ExternalAuthId: <input name="ExternalAuthId" value="<%$UserObj->ExternalAuthId%>">
-<BR>
-AuthSystem: <input name="AuthSystem" value="<%$UserObj->AuthSystem%>">
-<BR>
-HomePhone: <input name="HomePhone" value="<%$UserObj->HomePhone%>">
-<BR>
-WorkPhone: <input name="WorkPhone" value="<%$UserObj->WorkPhone%>">
-<BR>
-MobilePhone: <input name="MobilePhone" value="<%$UserObj->MobilePhone%>">
-<BR>
-PagerPhone: <input name="PagerPhone" value="<%$UserObj->PagerPhone%>">
-<BR>
-Address1: <input name="Address1" value="<%$UserObj->Address1%>">
-<BR>
-Address2: <input name="Address2" value="<%$UserObj->Address2%>">
-<BR>
-City: <input name="City" value="<%$UserObj->City%>">
-<BR>
-State: <input name="State" value="<%$UserObj->State%>">
-<BR>
-Zip: <input name="Zip" value="<%$UserObj->Zip%>">
-<BR>
-Country: <input name="Country" value="<%$UserObj->Country%>">
-<BR>
-
-<input type=submit>
-</form>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-</%INIT>
-
-<%ARGS>
-
-
-$UserObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/ModifyUser b/rt/webrt/Admin/Elements/ModifyUser
deleted file mode 100755
index 53aa027c0..000000000
--- a/rt/webrt/Admin/Elements/ModifyUser
+++ /dev/null
@@ -1,77 +0,0 @@
-
-<& /Elements/TitleBoxStart, title => 'Editing Configuration for user '.$UserObj->Name &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
-
-Name: <input name="Name" value="<%$UserObj->Name%>">
-<BR>
-New Password: <input type=password name="Pass1"><BR>
-Retype Password: <input type=password name="Pass2"><BR>
-
-Comments: <TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL>
-<%$UserObj->Comments%></TEXTAREA>
-
-<BR>
-Signature: <TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
-<%$UserObj->Signature%></TEXTAREA>
-<BR>
-EmailAddress: <input name="EmailAddress" value="<%$UserObj->EmailAddress%>">
-<BR>
-FreeformContactInfo: <input name="FreeformContactInfo" value="<%$UserObj->FreeformContactInfo%>">
-<BR>
-Organization: <input name="Organization" value="<%$UserObj->Organization%>">
-<BR>
-RealName: <input name="RealName" value="<%$UserObj->RealName%>">
-<BR>
-NickName: <input name="NickName" value="<%$UserObj->NickName%>">
-<BR>
-Lang: <input name="Lang" value="<%$UserObj->Lang%>">
-<BR>
-EmailEncoding: <input name="EmailEncoding" value="<%$UserObj->EmailEncoding%>">
-<BR>
-WebEncoding: <input name="WebEncoding" value="<%$UserObj->WebEncoding%>">
-<BR>
-ExternalContactInfoId: <input name="ExternalContactInfoId" value="<%$UserObj->ExternalContactInfoId%>">
-<BR>
-ContactInfoSystem: <input name="ContactInfoSystem" value="<%$UserObj->ContactInfoSystem%>">
-<BR>
-Gecos: <input name="Gecos" value="<%$UserObj->Gecos%>">
-<BR>
-ExternalAuthId: <input name="ExternalAuthId" value="<%$UserObj->ExternalAuthId%>">
-<BR>
-AuthSystem: <input name="AuthSystem" value="<%$UserObj->AuthSystem%>">
-<BR>
-HomePhone: <input name="HomePhone" value="<%$UserObj->HomePhone%>">
-<BR>
-WorkPhone: <input name="WorkPhone" value="<%$UserObj->WorkPhone%>">
-<BR>
-MobilePhone: <input name="MobilePhone" value="<%$UserObj->MobilePhone%>">
-<BR>
-PagerPhone: <input name="PagerPhone" value="<%$UserObj->PagerPhone%>">
-<BR>
-Address1: <input name="Address1" value="<%$UserObj->Address1%>">
-<BR>
-Address2: <input name="Address2" value="<%$UserObj->Address2%>">
-<BR>
-City: <input name="City" value="<%$UserObj->City%>">
-<BR>
-State: <input name="State" value="<%$UserObj->State%>">
-<BR>
-Zip: <input name="Zip" value="<%$UserObj->Zip%>">
-<BR>
-Country: <input name="Country" value="<%$UserObj->Country%>">
-<BR>
-<& /Elements/Submit &>
-</form>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-</%INIT>
-
-<%ARGS>
-
-
-$UserObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/QueueRightsForUser b/rt/webrt/Admin/Elements/QueueRightsForUser
deleted file mode 100644
index e62a124ce..000000000
--- a/rt/webrt/Admin/Elements/QueueRightsForUser
+++ /dev/null
@@ -1,17 +0,0 @@
-<UL>
-%while(my $ACE = $ACL->Next) {
-
-<LI><checkbox name="delete_ace_<%$ACE->id%>"> <%$ACE->RightName%> (<%$ACE->UserObj->RealName%>)
-
-%}
-</UL>
-
-<%INIT>
-my $ACL = new RT::ACL($session{'CurrentUser'});
-$ACL->LimitToQueue($QueueObj->id);
-$ACL->LimitPrincipalToUser($PrincipalId);
-</%INIT>
-<%ARGS>
-$PrincipalId => undef
-$QueueObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/QueueTabs b/rt/webrt/Admin/Elements/QueueTabs
deleted file mode 100755
index b7da7e007..000000000
--- a/rt/webrt/Admin/Elements/QueueTabs
+++ /dev/null
@@ -1,36 +0,0 @@
-<& /Admin/Elements/Tabs, subtabs => $subtabs, current_tab => 'Admin/Queues/' &>
-<hr>
-<%INIT>
- my $subtabs = {
- A => { title => 'Basics',
- path => "Admin/Queues/Modify.html?id=".$id,
- },
- B => { title => 'Watchers',
- path => "Admin/Queues/People.html?id=".$id,
- },
-
- C => { title => 'Scrips',
- path => "Admin/Queues/Scrips.html?id=".$id,
- },
- D => { title => 'Templates',
- path => "Admin/Queues/Templates.html?id=".$id,
- },
- E => { title => 'Keyword Selections',
- path => "Admin/Queues/Keywords.html?id=".$id,
- },
- F => { title => 'Group Rights',
- path => "Admin/Queues/GroupRights.html?id=".$id,
- },
- G => { title => 'User Rights',
- path => "Admin/Queues/UserRights.html?id=".$id,
- },
-
-
-
-};
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectKeywordSelect b/rt/webrt/Admin/Elements/SelectKeywordSelect
deleted file mode 100644
index f5a8d77cd..000000000
--- a/rt/webrt/Admin/Elements/SelectKeywordSelect
+++ /dev/null
@@ -1,22 +0,0 @@
-<input size=10 name="<%$NamePrefix%>-Name" value="<% $KeywordSelect->Name %>">:
-<& /Admin/Elements/SelectSingleOrMultiple,
- Name => $NamePrefix.'-Single',
- Default => $KeywordSelect->Single &>
-
-children of
-<& /Elements/SelectKeyword, Root => '0',
- Name => $NamePrefix.'-Keyword',
- Default => $KeywordSelect->KeywordObj->Id &>
- up to <input name="<%$NamePrefix%>-Depth" size=2 value="<%$KeywordSelect->Depth%>"> levels deep.
-<%INIT>
-unless ($NamePrefix) {
- $NamePrefix = $KeywordSelect->Id;
-}
-$NamePrefix = "KeywordSelect-$NamePrefix";
-
-</%INIT>
-
-<%ARGS>
-$KeywordSelect => undef
-$NamePrefix => undef
-</%ARGS> \ No newline at end of file
diff --git a/rt/webrt/Admin/Elements/SelectModifyGroup b/rt/webrt/Admin/Elements/SelectModifyGroup
deleted file mode 100644
index 45d437f41..000000000
--- a/rt/webrt/Admin/Elements/SelectModifyGroup
+++ /dev/null
@@ -1,10 +0,0 @@
-%while ( $Group = $Groups->Next) {
-<A HREF="Modify.html?id=<%$Group->id%>"><%$Group->id%>: <%$Group->Name%></a><BR>
-%}
-<%INIT>
-my ($Group);
-my $Groups = new RT::Groups($session{'CurrentUser'});
-$Groups->UnLimit;
-</%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectModifyKeyword b/rt/webrt/Admin/Elements/SelectModifyKeyword
deleted file mode 100644
index 6af223229..000000000
--- a/rt/webrt/Admin/Elements/SelectModifyKeyword
+++ /dev/null
@@ -1,13 +0,0 @@
-%while ( $keyword = $keywords->Next ) {
-<A HREF="/Admin/Keywords/Modify.html?id=<%$keyword->id%>"><%$keyword->id%>: <%$keyword->Name%></a><BR>
-%}
-
-<%INIT>
-
-use RT::Keywords;
-
-my $keyword;
-my $keywords = new RT::Keywords $session{CurrentUser};
-$keywords->UnLimit;
-</%INIT>
-
diff --git a/rt/webrt/Admin/Elements/SelectModifyKeywordSelect b/rt/webrt/Admin/Elements/SelectModifyKeywordSelect
deleted file mode 100644
index c91eb6cfe..000000000
--- a/rt/webrt/Admin/Elements/SelectModifyKeywordSelect
+++ /dev/null
@@ -1,13 +0,0 @@
-%while ( $keywordselect = $keywordselects->Next ) {
-<A HREF="/Admin/KeywordSelects/Modify.html?id=<%$keywordselect->id%>"><%$keywordselect->id%>: ( <%$keywordselect->Parent%>: <%$keywordselect->KeywordObj->Name%> )</a><BR>
-%}
-
-<%INIT>
-
-use RT::KeywordSelects;
-
-my $keywordselect;
-my $keywordselects = new RT::KeywordSelects $session{CurrentUser};
-$keywordselects->UnLimit;
-</%INIT>
-
diff --git a/rt/webrt/Admin/Elements/SelectModifyQueue b/rt/webrt/Admin/Elements/SelectModifyQueue
deleted file mode 100755
index 1c6cd7d5e..000000000
--- a/rt/webrt/Admin/Elements/SelectModifyQueue
+++ /dev/null
@@ -1,10 +0,0 @@
-%while ( $queue = $queues->Next) {
-<A HREF="Modify.html?id=<%$queue->id%>"><%$queue->id%>: <%$queue->Name%></a><BR>
-%}
-<%INIT>
-my ($queue);
-my $queues = new RT::Queues($session{'CurrentUser'});
-$queues->UnLimit;
-</%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectModifyUser b/rt/webrt/Admin/Elements/SelectModifyUser
deleted file mode 100755
index da49212e4..000000000
--- a/rt/webrt/Admin/Elements/SelectModifyUser
+++ /dev/null
@@ -1,26 +0,0 @@
-%while ( $user = $users->Next) {
-<A HREF="Modify.html?id=<%$user->id%>"><%$user->id%>: <%$user->Name%></a><BR>
-%}
-<%INIT>
-my ($user);
-my $users = new RT::Users($session{'CurrentUser'});
-$users->Limit(FIELD => 'id',
- VALUE => $RT::SystemUser->id,
- OPERATOR => '!=' );
-
-if (defined $IdLike) {
-$users->Limit(FIELD => 'Name',
- VALUE => $IdLike,
- OPERATOR => 'LIKE' );
-}
-if (defined $EmailLike) {
-$users->Limit(FIELD => 'EmailAddress',
- VALUE => $EmailLike,
- OPERATOR => 'LIKE');
-
-}
-</%INIT>
-<%ARGS>
-$IdLike => undef
-$EmailLike => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectQueueRights b/rt/webrt/Admin/Elements/SelectQueueRights
deleted file mode 100755
index 6861d40c6..000000000
--- a/rt/webrt/Admin/Elements/SelectQueueRights
+++ /dev/null
@@ -1,29 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Admin/Elements/Attic/SelectQueueRights,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="">-</OPTION>
-%foreach $right (@rights) {
-<OPTION VALUE="<%$right%>" <%($Default eq $right) && 'SELECTED'%>><%$right%></OPTION>
-% }
-</SELECT>
-<%ONCE>
-
-use RT::ACE;
-my $ACE = new RT::ACE($session{'CurrentUser'});
-my %QueueRights = $ACE->QueueRights;
-my %TicketRights = $ACE->TicketRights;
-
-my ($key, $right, @rights);
-
-foreach $key (sort keys %QueueRights) {
-push (@rights, $QueueRights{$key} . " ($key)");
-}
-foreach $key (sort keys %TicketRights) {
-push (@rights, $TicketRights{$key} . " ($key)");
-}
-</%ONCE>
-<%ARGS>
-$Name => undef
-$Default => undef
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectRights b/rt/webrt/Admin/Elements/SelectRights
deleted file mode 100644
index 0ac774985..000000000
--- a/rt/webrt/Admin/Elements/SelectRights
+++ /dev/null
@@ -1,58 +0,0 @@
-<INPUT TYPE=HIDDEN NAME="CheckACL" VALUE="<%$ACLDesc%>">
- <TABLE BORDER=0>
-<TR>
-<TD valign=top>
-<h3>New rights</h3>
-<SELECT SIZE=5 MULTIPLE NAME="GrantACE-<%$ACLDesc%>">
-% foreach $right (sort keys %Rights) {
- <OPTION VALUE="<%$right%>"
- ><%$right%></OPTION>
-% }
-<OPTION VALUE="" SELECTED>(no value)</OPTION>
-</SELECT>
-</TD>
-<TD valign=top>
-<h3>Current rights</h3>
-<i>(Check box to revoke right)</i> <BR>
-% while (my $right = $ACLObj->Next()) {
-% if ($right->RightName) {
-<input type=checkbox value="<%$right->Id%>" name="RevokeACE"> <%$right->RightName%><br>
-% }
-% }
-</TD>
-</TR>
-</TABLE>
-<%INIT>
- my ($right, $ACLDesc, $AppliesTo, %Rights);
-
-
- my $ACLObj = new RT::ACL($session{'CurrentUser'});
- my $ACE = new RT::ACE($session{'CurrentUser'});
-
- if ($Scope eq 'Queue') {
- $AppliesTo = $QueueObj->Id;
- $ACLObj->LimitToQueue($AppliesTo);
- %Rights = $ACE->QueueRights();
- }
- elsif ($Scope eq 'System') {
- $AppliesTo = 0;
- $ACLObj->LimitToSystem();
- %Rights = ( $ACE->SystemRights , $ACE->QueueRights());
- }
-
- if ($PrincipalType eq 'Group') {
- $ACLObj->LimitPrincipalToGroup($PrincipalObj->Id);
- }
- elsif ($PrincipalType eq 'User') {
- $ACLObj->LimitPrincipalToUser($PrincipalObj->Id);
- }
-
- $ACLDesc = "$PrincipalType-".$PrincipalObj->Id."-$Scope-$AppliesTo";
-</%INIT>
-
-<%ARGS>
-$PrincipalType => undef
-$PrincipalObj => undef
-$Scope => undef
-$QueueObj => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectScrip b/rt/webrt/Admin/Elements/SelectScrip
deleted file mode 100755
index 4ae15d8c3..000000000
--- a/rt/webrt/Admin/Elements/SelectScrip
+++ /dev/null
@@ -1,25 +0,0 @@
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
-<% $Default eq undef && 'SELECTED' %>
->-</OPTION>
-%while (my $Scrip = $Scrips->Next) {
-<OPTION VALUE=<%$Scrip->Id%>
-<% $Scrip->Id == $Default && 'SELECTED' %>
-><%$Scrip->Name%>
-</OPTION>
-%}
-</SELECT>
-
-<%INIT>
-my $Scrips = RT::Scrips->new($session{'CurrentUser'});
-$Scrips->UnLimit;
-
-
-
-</%INIT>
-<%ARGS>
-
-$Default => undef
-$Name => 'Scrip'
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectScripAction b/rt/webrt/Admin/Elements/SelectScripAction
deleted file mode 100644
index 08a173493..000000000
--- a/rt/webrt/Admin/Elements/SelectScripAction
+++ /dev/null
@@ -1,25 +0,0 @@
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
-<% $Default eq undef && 'SELECTED' %>
->-</OPTION>
-%while (my $ScripAction = $ScripActions->Next) {
-<OPTION VALUE=<%$ScripAction->Id%>
-<% $ScripAction->Id == $Default && 'SELECTED' %>
-><%$ScripAction->Name%>
-</OPTION>
-%}
-</SELECT>
-
-<%INIT>
-my $ScripActions = RT::ScripActions->new($session{'CurrentUser'});
-$ScripActions->UnLimit;
-
-
-
-</%INIT>
-<%ARGS>
-
-$Default => undef
-$Name => 'ScripAction'
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectScripCondition b/rt/webrt/Admin/Elements/SelectScripCondition
deleted file mode 100644
index 434f0c4ae..000000000
--- a/rt/webrt/Admin/Elements/SelectScripCondition
+++ /dev/null
@@ -1,25 +0,0 @@
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
-<% $Default eq undef && 'SELECTED' %>
->-</OPTION>
-%while (my $ScripCondition = $ScripConditions->Next) {
-<OPTION VALUE=<%$ScripCondition->Id%>
-<% $ScripCondition->Id == $Default && 'SELECTED' %>
-><%$ScripCondition->Name%>
-</OPTION>
-%}
-</SELECT>
-
-<%INIT>
-my $ScripConditions = RT::ScripConditions->new($session{'CurrentUser'});
-$ScripConditions->UnLimit;
-
-
-
-</%INIT>
-<%ARGS>
-
-$Default => undef
-$Name => 'ScripCondition'
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectSingleOrMultiple b/rt/webrt/Admin/Elements/SelectSingleOrMultiple
deleted file mode 100644
index 307b0211c..000000000
--- a/rt/webrt/Admin/Elements/SelectSingleOrMultiple
+++ /dev/null
@@ -1,20 +0,0 @@
- <select name="<%$Name%>">
- <option value="1" <%$SingleDefault%>>Single</option>
- <option value="0" <%$MultipleDefault%>>Multiple</option>
- </select>
-
-
-<%INIT>
-my ($SingleDefault, $MultipleDefault);
-if ($Default == 1) {
- $SingleDefault = "SELECTED";
-}
-elsif ($Default == 0 ) {
- $MultipleDefault = "SELECTED";
-}
-
-</%INIT>
-<%ARGS>
-$Name => 'Single'
-$Default => 1
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectTemplate b/rt/webrt/Admin/Elements/SelectTemplate
deleted file mode 100755
index 76550dc4e..000000000
--- a/rt/webrt/Admin/Elements/SelectTemplate
+++ /dev/null
@@ -1,37 +0,0 @@
-<SELECT NAME=<%$Name%>>
-<OPTION VALUE=""
-<% $Default eq 'none' && 'SELECTED' %>
->-</OPTION>
-%while (my $Template = $PrimaryTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
-<% ($Template->Id == $Default) && 'SELECTED' %>
-><%$Template->Name%>
-</OPTION>
-%}
-%while (my $Template = $OtherTemplates->Next) {
-<OPTION VALUE=<%$Template->Id%>
-<% ($Template->Id == $Default) && 'SELECTED'%>
->Global template: <%$Template->Name%>
-</OPTION>
-%}
-</SELECT>
-
-<%INIT>
-
-
-my $PrimaryTemplates = RT::Templates->new($session{'CurrentUser'});
-if ($DefaultQueue != 0) {
-$PrimaryTemplates->LimitToQueue($DefaultQueue);
-}
-
-my $OtherTemplates = RT::Templates->new($session{'CurrentUser'});
-$OtherTemplates->LimitToGlobal($DefaultQueue);
-
-</%INIT>
-<%ARGS>
-
-$Default => 'none'
-$DefaultQueue => undef
-$Name => 'Template'
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SelectUsers b/rt/webrt/Admin/Elements/SelectUsers
deleted file mode 100644
index af51c60f9..000000000
--- a/rt/webrt/Admin/Elements/SelectUsers
+++ /dev/null
@@ -1,17 +0,0 @@
-<SELECT MULTIPLE NAME="<%$Name%>" SIZE=10>
-%while (my $user = $users->Next) {
-<OPTION VALUE="<%$user->id%>"><%$user->Name%>
-%}
-</SELECT>
-
-<%INIT>
-my $users = new RT::Users($session{'CurrentUser'});
-
-$users->Limit(FIELD => 'id', VALUE => $RT::SystemUser->id, OPERATOR => '!=' );
-$users->Limit(FIELD => 'id', VALUE => $RT::Nobody->id, OPERATOR => '!=' );
-$users->LimitToPrivileged();
-
-</%INIT>
-<%ARGS>
-$Name => 'Users'
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/SystemTabs b/rt/webrt/Admin/Elements/SystemTabs
deleted file mode 100755
index f8b23128b..000000000
--- a/rt/webrt/Admin/Elements/SystemTabs
+++ /dev/null
@@ -1,31 +0,0 @@
-<& /Admin/Elements/Tabs, subtabs => $subtabs, current_tab => 'Admin/Global/', current_subtab => $current_subtab &>
-<hr>
-<%INIT>
- my $subtabs = {
-
- A => { title => 'Scrips',
- path => 'Admin/Global/Scrips.html',
- },
- Ba => { title => 'Keyword Selections',
- path => 'Admin/Global/Keywords.html',
- },
-
- B => { title => 'Templates',
- path => 'Admin/Global/Templates.html',
- },
- C => { title => 'Group Rights',
- path => 'Admin/Global/GroupRights.html',
- },
- D => { title => 'User Rights',
- path => 'Admin/Global/UserRights.html',
- }
-
-
-};
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/Tabs b/rt/webrt/Admin/Elements/Tabs
deleted file mode 100755
index ee6d82b58..000000000
--- a/rt/webrt/Admin/Elements/Tabs
+++ /dev/null
@@ -1,31 +0,0 @@
-<& /Elements/Tabs, tabs => $tabs, subtabs => $subtabs, current_toptab => 'Admin/', current_tab => $current_tab, current_subtab => $current_subtab&>
-
-<hr>
-
-<%INIT>
- my $tabs = { Users => { title => 'Users',
- path => 'Admin/Users/',
- },
- Groups => { title => 'Groups',
- path => 'Admin/Groups/',
- },
- Queues => { title => 'Queues',
- path => 'Admin/Queues/',
- },
- System => { 'title' => 'Global',
- path => 'Admin/Global/',
- },
- Keywords => { title => 'Keywords',
- path => 'Admin/Keywords/',
- },
-
-
- };
-</%INIT>
-
-
-<%ARGS>
-$subtabs => undef
-$current_tab => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Elements/UserTabs b/rt/webrt/Admin/Elements/UserTabs
deleted file mode 100755
index bbf17314d..000000000
--- a/rt/webrt/Admin/Elements/UserTabs
+++ /dev/null
@@ -1,21 +0,0 @@
-<& /Admin/Elements/Tabs, subtabs => $subtabs,
- current_tab => 'Admin/Users/',
- current_subtab => $current_subtab &>
-<hr>
-<%INIT>
-my $subtabs = {
- Queues => { title => 'Basics',
- path => "Admin/Users/Modify.html?id=".$id
- },
-# Scrips => { title => 'Rights',
-# path => "Admin/Users/Rights.html?id=".$id
-# }
-
- };
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$current_subtab => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/GroupRights.html b/rt/webrt/Admin/Global/GroupRights.html
deleted file mode 100755
index 26b7e1fe2..000000000
--- a/rt/webrt/Admin/Global/GroupRights.html
+++ /dev/null
@@ -1,78 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Modify System ACLS' &>
-<& /Admin/Elements/SystemTabs &>
-
-<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST action="GroupRights.html">
-
-
-
-<h2>Modify global rights for groups</h2>
-
-<TABLE>
-<TR><TD>Pseudogroups</TD></TR>
-% while (my $GroupObj = $PseudoGroups->Next()) {
-
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $GroupObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj,
- PrincipalType => 'Group',
- Scope => 'System' &>
- </TD>
- </TR>
-
-% }
-
-<TR><TD>Groups</TD></TR>
-
-% while (my $GroupObj = $Groups->Next()) {
-
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $GroupObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj,
- PrincipalType => 'Group',
- Scope => 'System' &>
- </TD>
- </TR>
-
-% }
-
- </TABLE>
- <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &>
- </FORM>
-
- <%INIT>
-
- #Update the acls.
- my @results = ProcessACLChanges(\@CheckACL, \%ARGS);
-
-
- # {{{ do basic initialization.
-
-
-
- # Find out which groups we want to display ACL selects for.
- my $Groups = new RT::Groups($session{'CurrentUser'});
- #TODO: limit this to non-pseudogroups
- $Groups->LimitToReal();
-
-
- my $PseudoGroups = new RT::Groups($session{'CurrentUser'});
- #TODO: limit this to non-pseudogroups
- $PseudoGroups->LimitToPseudo;
-
- # }}}
-
-
-
-
- </%INIT>
-
-<%ARGS>
-@CheckACL => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/Keywords.html b/rt/webrt/Admin/Global/Keywords.html
deleted file mode 100644
index bf7bbd266..000000000
--- a/rt/webrt/Admin/Global/Keywords.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit keywords' &>
-<& /Admin/Elements/SystemTabs &>
-<& /Elements/ListActions, actions => \@actions &>
-
-<& /Elements/TitleBoxStart, title => $description &>
-
- <FORM METHOD=POST ACTION="Keywords.html">
-
-% if ($KeywordSelects->Count > 0 ) {
-<TABLE>
-<TR><TD>Delete</TD></TR>
-% while (my $keywordselect = $KeywordSelects->Next ) {
-<TR>
- <TD><INPUT TYPE="CHECKBOX" NAME="KeywordSelect-<%$keywordselect->Id%>-Delete"></TD>
- <TD><& /Admin/Elements/SelectKeywordSelect, KeywordSelect => $keywordselect &></TD>
-</TR>
-% }
-</TABLE>
-% }
-
-Add a global keyword selection:
-%my $ks = new RT::KeywordSelect($session{'CurrentUser'});
-<ul>
-<li><& /Admin/Elements/SelectKeywordSelect, KeywordSelect => $ks, NamePrefix => 'new' &></li>
-</ul>
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-</FORM>
-
-
-
-<%init>
-my (@actions);
-
-my $description = "Modify global Keyword selections";
-
-my $KeywordSelects = new RT::KeywordSelects ($session{'CurrentUser'});
-
-unless ($KeywordSelects->LimitToGlobals()) {
- Abort("Couldn't load KeywordSelects.");
-}
-
-
-# {{{ if we're trying to create a new keyword select
-
-if ($ARGS{'KeywordSelect-new-Name'}) {
- my $NewKeywordSelect = new RT::KeywordSelect($session{'CurrentUser'});
-
- my ($retval, $msg) = $NewKeywordSelect->Create ( Keyword => $ARGS{'KeywordSelect-new-Keyword'},
- ObjectField => 'Queue',
- ObjectType => 'Ticket',
- ObjectValue => 0,
- Name => $ARGS{'KeywordSelect-new-Name'},
- Single => $ARGS{'KeywordSelect-new-Single'},
- Depth => $ARGS{'KeywordSelect-new-Depth'}
- );
- push (@actions, $msg);
-}
-# }}}
-
-# {{{ if we're trying to delete the keywordselect
-foreach my $key (keys %ARGS) {
- if ($key =~ /^KeywordSelect-(\d+)-Delete$/) {
- my $id = $1;
- my $keywordselect = new RT::KeywordSelect($session{'CurrentUser'});
- $keywordselect->Load($id) || push @actions, "Couldn't load keywordSelect";
- my ($val, $msg) = $keywordselect->SetDisabled(1);
- if ($val) {
- push @actions, 'KeywordSelect disabled.';
- }
- else {
- push @actions, $msg;
- }
- }
-}
-# }}}
-# {{{ if we're modifying keyword selects
-my @fields = qw(Name Keyword Single Depth);
-
-while (my $ks = $KeywordSelects->Next) {
- foreach my $field (@fields) {
- if (defined ($ARGS{"KeywordSelect-".$ks->Id."-".$field}) &&
- ($ARGS{"KeywordSelect-".$ks->Id."-".$field} ne $ks->$field())) {
-
- my $method = "Set$field";
- my ($val, $msg) = $ks->$method($ARGS{"KeywordSelect-".$ks->Id."-".$field});
- push @actions, "Keyword Select ". $ks->Name."/$field:".$msg;
- }
- }
-}
-# }}}
-
-</%init>
-
-<%ARGS>
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/Scrips.html b/rt/webrt/Admin/Global/Scrips.html
deleted file mode 100755
index e55f8b3de..000000000
--- a/rt/webrt/Admin/Global/Scrips.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit scrips' &>
-<& /Admin/Elements/SystemTabs &>
-
-<& /Elements/ListActions, actions => \@actions &>
-
-<& /Elements/TitleBoxStart, title => "Modify global scrips" &>
-
- <FORM METHOD=POST ACTION="Scrips.html">
-
-% if ($Scrips->Count > 0 ) {
-<TABLE>
-<TR>
-<TD>Delete
-</TD>
-<TD>
-</TR>
-
-% while (my $scrip = $Scrips->Next ) {
-<TR>
-<TD>
-<INPUT TYPE="CHECKBOX" NAME="DeleteScrip-<%$scrip->Id%>">
-</TD>
-<TD>
-<% $scrip->ConditionObj->Name %>
-<% $scrip->ActionObj->Name %>
-with template <% $scrip->TemplateObj->Name %>
-</TD>
-</TR>
-% }
-
-</TABLE>
-
-% }
-Add a scrip which will apply to all queues:
-<ul>
-<li>Condition: <& /Admin/Elements/SelectScripCondition, Name => 'NewScripCondition' &>
- Action: <& /Admin/Elements/SelectScripAction, Name => 'NewScripAction' &>
- Template: <& /Admin/Elements/SelectTemplate, Name => 'NewScripTemplate' &>
-
-</ul>
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-</FORM>
-<%init>
-my (@actions, $description);
-
-my $Scrips = new RT::Scrips ($session{'CurrentUser'});
-$Scrips->LimitToGlobal();
-
-
-
-
-if ($NewScripAction and $NewScripCondition) {
- my $NewScrip = new RT::Scrip($session{'CurrentUser'});
-
- my ($retval, $msg) = $NewScrip->Create ( ScripAction => $NewScripAction,
- ScripCondition => $NewScripCondition,
- Stage => 'TransactionCreate',
- Queue => 0,
- Template => $NewScripTemplate);
- if (defined $retval) {
- push @actions, $msg;
- }
- else {
- push @actions, $msg;
- }
-}
-
-# {{{ deal with modifying and deleting existing scrips
-my ($key );
-foreach $key (keys %ARGS) {
- # {{{ if we're trying to delete the scrip
- if ($key =~ /^DeleteScrip-(\d+)/) {
- my $id = $1;
- my $scrip = new RT::Scrip($session{'CurrentUser'});
- $scrip->Load($id);
- my ($retval, $msg) = $scrip->Delete;
- if ($retval) {
- push @actions, "Scrip deleted";
- }
- else {
- push @actions, $msg;
- }
- }
- # }}}
-}
-# }}}
-</%init>
-
-<%ARGS>
-$NewScripCondition => undef
-$NewScripAction => undef
-$NewScripTemplate => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/Template.html b/rt/webrt/Admin/Global/Template.html
deleted file mode 100755
index 856d2ee8f..000000000
--- a/rt/webrt/Admin/Global/Template.html
+++ /dev/null
@@ -1,66 +0,0 @@
-<& /Admin/Elements/Header, title => "Modify template ".$TemplateObj->id&>
-<& /Admin/Elements/SystemTabs &>
-<& /Elements/ListActions, actions => \@results &>
-
-<& /Elements/TitleBoxStart, title => $title &>
-
-<FORM METHOD=POST ACTION="Template.html">
-%if ($create ) {
-<INPUT TYPE=HIDDEN NAME=template VALUE="new">
-% } else {
-<INPUT TYPE=HIDDEN NAME=template VALUE="<%$TemplateObj->Id%>">
-% }
-
-%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
-
-
-Name: <input name="Name" VALUE="<%$TemplateObj->Name%>" SIZE=20><BR>
-Description: <input name="Description" VALUE="<%$TemplateObj->Description%>" SIZE=80><BR>
-
-<TEXTAREA NAME=Content ROWS=25 COLS=80 WRAP=SOFT>
-<%$TemplateObj->Content%></TEXTAREA>
-
-<& /Elements/TitleBoxEnd&>
-<&/Elements/Submit&>
-</FORM>
-
-
-
-<%INIT>
-
-my $TemplateObj = new RT::Template($session{'CurrentUser'});
-my ($title, @results);
-
-if ($create) {
- $title = "Create a template";
-}
-
-else {
- if ($template eq 'new') {
- my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name);
- Abort("Could not create template: $msg") unless ($val);
- push @results, $msg;
- $title = 'Created template ' . $TemplateObj->Name();
- }
- else {
- $TemplateObj->Load($template) || Abort('No Template');
- $title = 'Editing template ' . $TemplateObj->Name();
- }
-
-
-}
-if ($TemplateObj->Id()) {
- my @attribs = qw( Description Content Queue Name);
- my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $TemplateObj,
- ARGSRef => \%ARGS);
- push @results, @aresults;
-}
-</%INIT>
-<%ARGS>
-$Queue => undef
-$template => undef
-$create => undef
-$Name => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/Templates.html b/rt/webrt/Admin/Global/Templates.html
deleted file mode 100755
index cf388e521..000000000
--- a/rt/webrt/Admin/Global/Templates.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit system templates' &>
-<& /Admin/Elements/SystemTabs &>
-
-<& /Elements/TitleBoxStart, title => 'Edit system templates' &>
-<UL>
-<LI><A href="Template.html?create=1&Queue=0">Create a new template</A><BR><BR>
-
-
-%while (my $TemplateObj = $Templates->Next) {
-
-<LI><A HREF="Template.html?template=<%$TemplateObj->id()%>"><%$TemplateObj->id()%>/<%$TemplateObj->Name%>: <%$TemplateObj->Description%></a><BR>
-
-%}
-
-<& /Elements/TitleBoxEnd &>
-<%INIT>
-
-my $Templates = RT::Templates->new($session{'CurrentUser'});
-$Templates->LimitToGlobal();
-
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/UserRights.html b/rt/webrt/Admin/Global/UserRights.html
deleted file mode 100755
index 351f4b8c6..000000000
--- a/rt/webrt/Admin/Global/UserRights.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Modify System ACLS' &>
-<& /Admin/Elements/SystemTabs &>
-
-<& /Elements/ListActions, actions => \@results &>
- <FORM METHOD=POST action="UserRights.html">
-
-
-<h2>Modify global rights for users</h2>
-<TABLE>
-% while (my $UserObj = $Users->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <A HREF="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$UserObj->id%>"><% $UserObj->Name %></A>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $UserObj,
- PrincipalType => 'User',
- Scope => 'System' &>
-
- </TD>
- </TR>
-
-% }
- </TABLE>
-
- <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &>
- </FORM>
-
-<%INIT>
-
- my @results = ProcessACLChanges(\@CheckACL, \%ARGS);
-
- # Find out which users we want to display ACL selects for
- my $Users = new RT::Users($session{'CurrentUser'});
-
- $Users->LimitToPrivileged();
-
-</%INIT>
-
-<%ARGS>
-@CheckACL => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Global/index.html b/rt/webrt/Admin/Global/index.html
deleted file mode 100755
index 5907ed1e8..000000000
--- a/rt/webrt/Admin/Global/index.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin/Global configuration' &>
-<& /Admin/Elements/SystemTabs &>
diff --git a/rt/webrt/Admin/Groups/Members.html b/rt/webrt/Admin/Groups/Members.html
deleted file mode 100644
index 4b0e0d04f..000000000
--- a/rt/webrt/Admin/Groups/Members.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<& /Admin/Elements/Header, Title => "RT/Admin/Edit the group ". $Group->Name &>
-<& /Admin/Elements/GroupTabs, GroupObj => $Group &>
-<& /Elements/ListActions, actions => \@results &>
-
-
-<& /Elements/TitleBoxStart, title => 'Editing membership for group '.$Group->Name &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Members.html" METHOD=POST>
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-<TABLE WIDTH="100%">
-<TR>
-<TD>
-Add members
-</TD>
-<TD>
-Current members
-</TD>
-</TR>
-
-<TR>
-<TD VALIGN=TOP>
-<& /Admin/Elements/SelectUsers, Name => "AddMembers" &>
-</TD>
-<TD VALIGN=TOP>
-% if ($Group->MembersObj->Count == 0 ) {
-<i>(No members)</i>
-% } else {
-(Check box to delete group member)
-<UL>
-% while (my $member = $Group->MembersObj->Next()) {
-<LI><INPUT TYPE=CHECKBOX Name="DeleteMember-<%$member->UserObj->id%>">
-<%$member->UserObj->Name%> (<%$member->UserObj->RealName%>)
-% }
-% }
-</UL>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-</form>
-
-
-<%INIT>
-
-my $Group = new RT::Group($session{'CurrentUser'});
-$Group->Load($id) || Abort('Could not load group');
-
-my (@results);
-
-my $key;
-foreach $key (keys %ARGS) {
-
-if ($key =~ /^DeleteMember-(\d+)$/) {
- my $id = $1;
- my ($val,$msg) = $Group->DeleteMember($id);
- push (@results, $msg);
-}
-}
-
-# Make sure AddMembers is always an array
-my @AddMembers = (ref $AddMembers eq 'ARRAY') ? @{$AddMembers} : ($AddMembers);
-
-foreach my $member (@AddMembers) {
- next unless ($member);
- my ($val, $msg) = $Group->AddMember($member);
- push (@results, $msg);
-}
-
-
-</%INIT>
-
-<%ARGS>
-$AddMembers => undef
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Groups/Modify.html b/rt/webrt/Admin/Groups/Modify.html
deleted file mode 100644
index 7104a6937..000000000
--- a/rt/webrt/Admin/Groups/Modify.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-
-<& /Admin/Elements/GroupTabs, GroupObj => $Group &>
-<& /Elements/ListActions, actions => \@results &>
-
-
-<& /Elements/TitleBoxStart, title => $title &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Groups/Modify.html" METHOD=POST>
-
-%unless ($Group->Id) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
-% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Group->Id%>">
-% }
-<TABLE>
-<TR><TD ALIGN=RIGHT>
-Name:
-</TD>
-<TD><INPUT name="Name" value="<%$Group->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-Description:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$Group->Description%>" size=60></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/Submit &>
-</form>
-<%INIT>
-
-my ($title);
-my (@results);
-
-my $Group = new RT::Group($session{'CurrentUser'});
-
-if ($Create) {
- $title = "Create a new group";
-}
-
-else {
-
- if ($id eq 'new' ) {
-
- $Group->Create(Name => "$Name") || Abort ("Group could not be created.");
- $id = $Group->Id;
- }
- else {
- $Group->Load($id) || Abort('Could not load group');
- }
-
-
- if ($id) {
- $title = "Modify the group ". $Group->Name;
-
- }
-
- # If the create failed
- else {
- $title = "Create a new group";
- $Create = 1;
- }
-
-}
-
-if ($id) {
-
- my @fields = qw(Description Name );
- my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
- Object => $Group,
- ARGSRef => \%ARGS );
- push (@results,@fieldresults);
-}
-
-
-</%INIT>
-
-
-<%ARGS>
-$Create => undef
-$Name => undef
-$Description => undef
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Groups/Rights.html b/rt/webrt/Admin/Groups/Rights.html
deleted file mode 100644
index 5c842a301..000000000
--- a/rt/webrt/Admin/Groups/Rights.html
+++ /dev/null
@@ -1 +0,0 @@
-Not yet implemented....
diff --git a/rt/webrt/Admin/Groups/index.html b/rt/webrt/Admin/Groups/index.html
deleted file mode 100644
index d419e7f73..000000000
--- a/rt/webrt/Admin/Groups/index.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-<& /Admin/Elements/Header, Title => 'Admin/Groups' &>
-<& /Admin/Elements/Tabs, current_tab => 'Admin/Groups/' &>
-
-<& /Elements/TitleBoxStart, title => 'Select a group' &>
-
-Pseudogroups:<BR>
-<UL>
-%while ( $Group = $PseudoGroups->Next) {
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name%></a><BR>
-%}
-
-</UL>
-
-Groups:<BR>
-<UL>
-<LI><A HREF="Modify.html?Create=1">Create a new group</A><BR><BR></LI>
-%while ( $Group = $Groups->Next) {
-<LI><A HREF="Modify.html?id=<%$Group->id%>"><%$Group->Name%></a><BR>
-%}
-</UL>
-
-<& /Elements/TitleBoxEnd &>
-<%INIT>
-my ($Group);
-my $PseudoGroups = new RT::Groups($session{'CurrentUser'});
-$PseudoGroups->LimitToPseudo;
-my $Groups = new RT::Groups($session{'CurrentUser'});
-$Groups->LimitToReal;
-
-</%INIT>
-<%ARGS>
-</%ARGS>
diff --git a/rt/webrt/Admin/KeywordSelects/Modify.html b/rt/webrt/Admin/KeywordSelects/Modify.html
deleted file mode 100644
index e753c6622..000000000
--- a/rt/webrt/Admin/KeywordSelects/Modify.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin KeywordSelects' &>
-<& /Admin/Elements/Tabs &>
-
-<& /Admin/Elements/ModifyKeywordSelect, Create=>$Create, id=>$id, Parent=>$Parent, ObjectType=>$ObjectType, ObjectField=>$ObjectField, ObjectValue=>$ObjectValue, Single=>$Single, SingleMagic=>$SingleMagic, Generations=>$Generations &>
-
-<%ARGS>
-$Create => undef
-$id => undef
-$Parent => undef
-$ObjectType => undef
-$ObjectField => undef
-$ObjectValue => undef
-$Single => undef
-$SingleMagic => undef
-$Generations => undef
-</%ARGS>
-
diff --git a/rt/webrt/Admin/KeywordSelects/index.html b/rt/webrt/Admin/KeywordSelects/index.html
deleted file mode 100644
index ba3da9f0c..000000000
--- a/rt/webrt/Admin/KeywordSelects/index.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin KeywordSelects' &>
-<& /Admin/Elements/Tabs, current_tab => 'Admin/KeywordSelects/' &>
-
-A <B>KeywordSelect</B> is a link between a <B>Keyword</B> and a object
-(currently just <B>Tickets</B>), titled by the <I>Name</I> field of the Keyword such that:
-<ul>
-<li>Object display will contain a field, titled with the <I>Name</I> field of
-the <B>Keyword</B> and showing any descendent keywords.
-<li>Object creation for this field will contain a field, titled with the
-<I>Name</I> field of the <B>Keyword</B> and containing the descendents of
-the <B>Keyword</B> as choices.
-<li>Searches for this object type will contain a selection field titled with
-the <I>Name</I> field of the <B>Keyword</B> and containing the descendents
-of the <B>Keyword</B> as choices.
-<TABLE WIDTH=100%>
-
-
-
- <TD VALIGN=TOP>
- <h2>Create KeywordSelect</h2>
- <FORM NAME="ModifyKeywordSelect" METHOD="POST" ACTION="<%$RT::WebPath%>/Admin/KeywordSelects/Modify.html">
- [<%$title |n %>]
- <BR>
-
- <INPUT TYPE="hidden" NAME="id" VALUE="<% $id %>">
- Keyword
- <SELECT NAME="Parent">
-
-%while ( $parent = $parents->Next ) {
-
- <OPTION VALUE="<% $parent->id %>" <% defined($KeywordSelect->Parent) && $parent->id == $KeywordSelect->Parent ? ' SELECTED' : '' %>><% $parent->Name %></OPTION>
-
-% }
-
- </SELECT>
- <BR>
- Object
- <SELECT NAME="ObjectType">
- <OPTION SELECTED>Ticket</OPTION>
- </SELECT>
- <BR>
-
-%foreach $queue ( keys %queues ) {
- addOption("<% $queues{$queue} %>", "<% $queue %>", false, <% $queue == $KeywordSelect->ObjectValue ? 'true' : 'false' %> )
-%}
- }
-}
-</SCRIPT>
-
- Limit to <SELECT NAME="ObjectField" onChange="ChangeObjectValue(this)">
- <OPTION VALUE="" <% $KeywordSelect->ObjectField ? '' : ' SELECTED' %>>(none)</OPTION>
- <OPTION VALUE="Queue" <% $KeywordSelect->ObjectField eq 'Queue' ? ' SELECTED' : '' %>>Queue</OPTION>
- </SELECT>
- <SELECT NAME="ObjectValue">
- <OPTION VALUE="<% $KeywordSelect->ObjectValue %>">
- <% $KeywordSelect->ObjectField ? $queues{$KeywordSelect->ObjectValue} : "(n/a)" %></OPTION>
- </SELECT><BR>
- <INPUT TYPE="hidden" NAME="SingleMagic" VALUE="1">
- <INPUT TYPE="checkbox" NAME="Single" VALUE="1" <% $KeywordSelect->Single ? ' CHECKED' : '' %>>Allow single selection only<BR>
- Limit to <INPUT TYPE="text" NAME="Generations" SIZE="2" VALUE="<% $KeywordSelect->Generations %>"> generations (0 = no limit)<BR>
- <& /Elements/Submit, Label => $submit &>
-
-</FORM>
-
-<%INIT>
-
-
-my $KeywordSelect = new RT::KeywordSelect($session{CurrentUser});
-
-my($title, $submit);
-
-if ( $Create ) {
- $title = "Create a new KeywordSelect";
- $submit = "Create";
- $id = "new";
-} else {
- if ( $id eq 'new' ) {
- $id = $KeywordSelect->Create (
- Parent => $Parent,
- ObjectType => $ObjectType,
- ObjectField => $ObjectField,
- ObjectValue => $ObjectValue,
- Single => $Single,
- Generations => $Generations,
- ) or Abort "can't create KeywordSelect";
- } else {
- $KeywordSelect->Load($id) || Abort("Can't load keyword id $id");
- #false laziness
- $KeywordSelect->SetParent($Parent) if defined($Parent);
- $KeywordSelect->SetObjectType($ObjectType) if defined($ObjectType);
- $KeywordSelect->SetObjectField($ObjectField) if defined($ObjectField);
- $KeywordSelect->SetObjectValue($ObjectValue) if defined($ObjectValue);
- $KeywordSelect->SetSingle($Single) if defined($SingleMagic);
- $KeywordSelect->SetGenerations($Generations) if defined($Generations);
- }
- $title = "Modify the KeywordSelect <B>". $KeywordSelect->KeywordObj->Name. "</B>";
- $submit = "Modify";
-
-}
-
- my $parents = new RT::Keywords($session{CurrentUser});
- $parents->UnLimit;
- my $parent;
-
-my $queues = new RT::Queues($session{CurrentUser});
-$queues->UnLimit;
-
-my %queues;
-my $queue;
-$queues{$queue->id} = $queue->Name while $queue = $queues->Next;
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Create => undef
-$Parent => undef
-$ObjectType => undef
-$ObjectField => undef
-$ObjectValue => undef
-$Single => undef
-$SingleMagic => undef
-$Generations => undef
-</%ARGS>
-
-
- <& /Admin/Elements/ModifyKeywordSelect, 'Create'=>'1' &>
- </TD>
-
- <TD VALIGN=TOP>
- <H2>Modify KeywordSelect</H2>
-
- <& /Admin/Elements/SelectModifyKeywordSelect &>
- </TD>
-</TR>
-
-</TABLE>
diff --git a/rt/webrt/Admin/Keywords/Modify.html b/rt/webrt/Admin/Keywords/Modify.html
deleted file mode 100644
index bb7e2db8c..000000000
--- a/rt/webrt/Admin/Keywords/Modify.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/Tabs &>
-
-
-<& /Elements/TitleBoxStart, title => %$title &>
-<FORM METHOD="POST" ACTION="<%$RT::WebPath%>/Admin/Keywords/Modify.html">
-<INPUT TYPE="hidden" NAME="id" VALUE="<% $id %>">
-Keyword <INPUT NAME="Name" VALUE="<% $Keyword->Name %>"><BR>
-
-Parent <SELECT NAME="Parent">
- <OPTION VALUE=""<% defined($Keyword->Parent) ? '' : ' SELECTED' %>>-</OPTION>
-%while ( $parent = $parents->Next ) {
- <OPTION VALUE="<% $parent->id %>"<% defined($Keyword->Parent) && $parent->id == $Keyword->Parent ? ' SELECTED' : '' %>><% $parent->Name %></OPTION>
-%}
-</SELECT>
-
-
-New children of this keyword. one per line.
-<TEXTAREA NAME="Kids" ROWS=4><% $kidstring %></TEXTAREA>
-<BR>
-
-<& /Elements/Submit, Label => $submit &>
-</FORM>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-
-my $Keyword = new RT::Keyword($session{CurrentUser});
-my ($title, $submit, %kids, $kid);
-
-if ( $Create ) {
- $title = "Create a new Keyword";
- $submit = "Create";
- $id = "new";
- %kids = ();
- $Parent = ''; #silence
-}
-else {
- if ( $id eq 'new' ) {
- $id = $Keyword->Create( Name => $Name, Parent => $Parent )
- or Abort("can't create keyword Name=>$Name, Parent=>$Parent");
- } else {
- $Keyword->Load($id) || Abort("Can't load keyword id $id");
-
- #foreach my $field ( grep eval "defined(\$$_)", qw( Name Parent )) {
- # eval "\$Keyword->Set(\$field=>\$$field); #sigh
- #}
-
- $Keyword->SetName($Name) if defined($Name);
- $Keyword->SetParent($Parent) if defined($Parent);
- }
-
- $title = "Modify the Keyword <B>". $Keyword->Name. "</B>";
- $submit = "Modify";
-}
-
-
-my $kids = $Keyword->Children(new RT::Keywords($session{CurrentUser}));
-
-$kids{$kid->Name} = $kid while $kid = $kids->Next;
-
-if ( defined($Kids) ) {
- my %newkids;
-
- %newkids = map { $_=>1 } split(/\r/, $Kids);
-
- }
- foreach ( grep { ! defined($newkids{$_}) } keys %kids ) {
- $kids{$_}->Delete;
- delete $kids{$_};
- }
- foreach ( grep { ! defined($kids{$_}) } keys %newkids ) {
- $kids{$_} = new RT::Keyword($session{CurrentUser});
- $kids{$_}->Create( Name => $_, Parent => $id )
- or Abort("can't create keyword Name=>$_, Parent=>$id");
- }
-
-}
-
-
-my $parent;
-my $parents = new RT::Keywords($session{CurrentUser});
-$parents->UnLimit;
-
-my $kidstring = join("\r", keys %kids);
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Create => undef
-$Name => undef
-$Parent => undef
-$Kids => undef
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Keywords/index.html b/rt/webrt/Admin/Keywords/index.html
deleted file mode 100644
index 12814ec03..000000000
--- a/rt/webrt/Admin/Keywords/index.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<& /Elements/Header, Title => 'Admin/Keywords' &>
-<& /Admin/Elements/Tabs, current_tab => 'Admin/Keywords/' &>
-
-<& /Elements/ListActions, actions => \@Actions &>
-
-<& /Elements/TitleBoxStart, title => 'Keywords' &>
-<a href="<%$RT::WebPath%>/Admin/Keywords/?RootId=<%$Root->Parent%>"><%$Root->Path%></a>
-<UL>
-<FORM METHOD=POST ACTION="index.html">
-<input type=hidden name=RootId value="<%$RootId%>">
-
-
-% while (my $key = $Keywords->Next) {
- <LI>
-% if ($Edit == $key->id) {
- <input name="KeyName-<%$key->id%>" value="<%$key->Name%>">
- <input type=submit value="Update">
- <input type=submit name="Disable-<%$key->id%>" value="Disable">
-% } else {
- <A HREF="?RootId=<%$key->id%>"><%$key->Name%></A>
-% if ($key->Disabled) {
- <input type=submit name="Enable-<%$key->id%>" value="Enable">
-% } else {
- [<a href="?Edit=<%$key->id%>&RootId=<%$Root->Id%>">edit</a>]
-% }
-% }
-
-
- </LI>
-% }
- <LI>
- <input name="KeyName-New"> <input type=submit value="Add">
-</UL>
-<BR>
- <input type="checkbox" name="ShowDisabled"> Include disabled items in listing.
- <input type=submit value="Go!">
-
-</FORM>
-
-<& /Elements/TitleBoxEnd &>
-<%INIT>
-my (@Actions);
-
-if ($ARGS{'KeyName-New'}) {
- my $NewKey = new RT::Keyword($session{'CurrentUser'});
- my ($val, $msg) = $NewKey->Create( Parent => $RootId, Name => $ARGS{'KeyName-New'});
- push (@Actions, $msg);
-}
-
-my $arg;
-foreach $arg (keys %ARGS) {
- if ($arg =~ /^Disable-(\d*)$/) {
- my $id = $1;
- my $keyword = new RT::Keyword($session{'CurrentUser'});
- $keyword->Load($id);
- my ($val, $msg) = $keyword->SetDisabled(1);
- push (@Actions, $msg);
-
-
- }
- elsif ($arg =~ /^Enable-(\d*)$/) {
- my $id = $1;
- my $keyword = new RT::Keyword($session{'CurrentUser'});
- $keyword->Load($id);
- my ($val, $msg) = $keyword->SetDisabled(0);
- push (@Actions, $msg);
- }
- elsif ($arg =~ /^KeyName-(\d*)$/) {
- my $id = $1;
- my $keyword = new RT::Keyword ($session{'CurrentUser'});
- $keyword->Load($id);
- if ($keyword->Name() ne $ARGS{"$arg"}) {
- my ($val, $msg) = $keyword->SetName($ARGS{"$arg"});
- push (@Actions, $msg);
- }
- if (($ARGS{"KeyParent-$id"}) &&
- ($keyword->Parent ne $ARGS{"KeyParent-$id"})) {
- my ($val, $msg) = $keyword->SetParent($ARGS{"KeyParent-$id"});
- push (@Actions, $msg);
- }
- }
-}
-
-
-my $Root = new RT::Keyword($session{'CurrentUser'});
-my $Keywords;
-#If we have a root load it.
-if ($RootId != 0) {
- $Root->Load($RootId);
- $Keywords = $Root->Children();
-
-}
-else {
- $Keywords = new RT::Keywords($session{'CurrentUser'});
- $Keywords->LimitToParent(0);
-}
-
-if ($ShowDisabled) {
- $Keywords->{'find_disabled_rows'} = 1;
-}
-
-
-
-
-</%INIT>
-<%ARGS>
-$RootId => 0
-$Edit => undef
-$ShowDisabled => 0
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/Create.html b/rt/webrt/Admin/Queues/Create.html
deleted file mode 100755
index b39d6590c..000000000
--- a/rt/webrt/Admin/Queues/Create.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Create a queue' &>
- <h1>Create a queue</h1>
-
-<& /Admin/Elements/ModifyQueue, QueueObj => $QueueObj &>
-
-<%INIT>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Create(Name => "$Name");
-</%INIT>
-
-<%ARGS>
-$Name => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/GroupRights.html b/rt/webrt/Admin/Queues/GroupRights.html
deleted file mode 100755
index a2c669083..000000000
--- a/rt/webrt/Admin/Queues/GroupRights.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Modify group rights for queue '. $QueueObj->Name &>
-<& /Admin/Elements/QueueTabs, id => $id &>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="GroupRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
-
-
-
-<& /Elements/TitleBoxStart, title => 'Modify group rights for queue '.$QueueObj->Name &>
-
-<TABLE>
-<TR><TD>Pseudogroups</TD></TR>
-% while (my $GroupObj = $PseudoGroups->Next()) {
-
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $GroupObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj,
- PrincipalType => 'Group',
- QueueObj => $QueueObj,
- Scope => 'Queue' &>
-
- </TD>
- </TR>
-
-% }
-
-<TR><TD>Groups</TD></TR>
-
-% while (my $GroupObj = $Groups->Next()) {
-
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $GroupObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $GroupObj,
- PrincipalType => 'Group',
- QueueObj => $QueueObj,
- Scope => 'Queue' &>
-
- </TD>
- </TR>
-
-% }
-
- </TABLE>
-
- <& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &>
- </FORM>
-
-<%INIT>
-
-#Update the acls.
-my @results = ProcessACLChanges(\@CheckACL, \%ARGS);
-
-# {{{ Deal with setting up the display of current rights.
-
-# {{{ do basic initialization.
-
-#Define vars used in html above
-my ($GroupObj);
-
-my ($right);
-
-
-if (!defined $id) {
- Abort("No Queue defined");
-}
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($id) ||
- Abort("Couldn't load queue $id");
-
- # Find out which groups we want to display ACL selects for.
- my $Groups = new RT::Groups($session{'CurrentUser'});
- #TODO: limit this to non-pseudogroups
- $Groups->LimitToReal();
-
-
- my $PseudoGroups = new RT::Groups($session{'CurrentUser'});
- #TODO: limit this to non-pseudogroups
- $PseudoGroups->LimitToPseudo;
-
-
-# }}}
-
-
- # }}}
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$UserString => undef
-$UserOp => undef
-$UserField => undef
-@CheckACL => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/Keywords.html b/rt/webrt/Admin/Queues/Keywords.html
deleted file mode 100644
index 7809805c5..000000000
--- a/rt/webrt/Admin/Queues/Keywords.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit keywords' &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id &>
-
-<& /Elements/ListActions, actions => \@actions &>
-
-<& /Elements/TitleBoxStart, title => $description &>
-
-<h2>Global Keyword Selections</h2>
-<& /Admin/Elements/ListGlobalKeywordSelects &>
-<BR>
-
- <FORM METHOD=POST ACTION="Keywords.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<%$id%>">
-
-% if ($KeywordSelects->Count > 0 ) {
-
-
-<h2>Queue Keyword Selections</h2>
-<TABLE>
-<TR><TD>Delete</TD></TR>
-% while (my $keywordselect = $KeywordSelects->Next ) {
-<TR>
- <TD><INPUT TYPE="CHECKBOX" NAME="KeywordSelect-<%$keywordselect->Id%>-Delete"></TD>
- <TD><& /Admin/Elements/SelectKeywordSelect, KeywordSelect => $keywordselect &></TD>
-</TR>
-% }
-</TABLE>
-% }
-
-Add a keyword selection to this queue:
-%my $ks = new RT::KeywordSelect($session{'CurrentUser'});
-<ul>
-<li><& /Admin/Elements/SelectKeywordSelect, KeywordSelect => $ks, NamePrefix => 'new' &></li>
-</ul>
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-
-</FORM>
-<%init>
-my (@actions);
-
-
-
-my $KeywordSelects = new RT::KeywordSelects ($session{'CurrentUser'});
-unless ($id =~ /^\d+$/) {
- Abort("$id isn't a valid Queue id.");
-}
-
-unless ($KeywordSelects->LimitToQueue($id)) {
- Abort("Couldn't load KeywordSelects.");
-}
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($id);
-
-my $description = "Modify Keyword selections for queue '". $QueueObj->Name ."'";
-
-
-
-# {{{ if we're trying to create a new keyword select
-
-if ($ARGS{'KeywordSelect-new-Name'}) {
- my $NewKeywordSelect = new RT::KeywordSelect($session{'CurrentUser'});
-
- my ($retval, $msg) = $NewKeywordSelect->Create ( Keyword => $ARGS{'KeywordSelect-new-Keyword'},
- ObjectField => 'Queue',
- ObjectType => 'Ticket',
- ObjectValue => $QueueObj->Id,
- Name => $ARGS{'KeywordSelect-new-Name'},
- Single => $ARGS{'KeywordSelect-new-Single'},
- Depth => $ARGS{'KeywordSelect-new-Depth'}
- );
- push (@actions, $msg);
-}
-# }}}
-# {{{ if we're trying to delete the keywordselect
-foreach my $key (keys %ARGS) {
- if ($key =~ /^KeywordSelect-(\d+)-Delete$/) {
- my $id = $1;
- my $keywordselect = new RT::KeywordSelect($session{'CurrentUser'});
- $keywordselect->Load($id) || push @actions, "Couldn't load keywordSelect";
- my ($val, $msg) = $keywordselect->SetDisabled(1);
- if ($val) {
- push @actions, 'KeywordSelect disabled.';
- }
- else {
- push @actions, $msg;
- }
- }
-}
-# }}}
-# {{{ if we're modifying keyword selects
-my @fields = qw(Name Keyword Single Depth);
-
-while (my $ks = $KeywordSelects->Next) {
- foreach my $field (@fields) {
- if (defined ($ARGS{"KeywordSelect-".$ks->Id."-".$field}) &&
- ($ARGS{"KeywordSelect-".$ks->Id."-".$field} ne $ks->$field())) {
-
- my $method = "Set$field";
- my ($val, $msg) = $ks->$method($ARGS{"KeywordSelect-".$ks->Id."-".$field});
- push @actions, "Keyword Select ". $ks->Name."/$field:".$msg;
- }
- }
-}
-# }}}
-
-</%init>
-
-<%ARGS>
-$id => undef #some identifier that a Queue could
-
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/Modify.html b/rt/webrt/Admin/Queues/Modify.html
deleted file mode 100755
index 7a200df92..000000000
--- a/rt/webrt/Admin/Queues/Modify.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin/Queue/Basics' &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->id &>
-<& /Elements/ListActions, actions => \@results &>
-
-
-
-<& /Elements/TitleBoxStart, title => $title &>
-
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Queues/Modify.html" METHOD=POST>
-%if ($Create ) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
-% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
-% }
-
-<TABLE>
-<TR><TD ALIGN=RIGHT>
-Queue Name:
-</TD>
-<TD><INPUT name="Name" value="<%$QueueObj->Name%>"></TD>
-</TR><TR>
-<TD ALIGN=RIGHT>
-Description:</TD><TD COLSPAN=3><INPUT name="Description" value="<%$QueueObj->Description%>" size=60></TD></TR>
-<TR>
-<TD ALIGN=RIGHT>
-Correspondence Address:
-</TD><TD>
-<INPUT name="CorrespondAddress" value="<%$QueueObj->CorrespondAddress%>">
-<BR><font size="-1"><i>(If left blank, will default to <%$RT::CorrespondAddress%></i></font>
-</TD>
-<TD ALIGN=RIGHT>
-
-Comment Address: </TD><TD>
-<INPUT NAME="CommentAddress" value="<%$QueueObj->CommentAddress%>">
-<BR><font size="-1"><i>(If left blank, will default to <%$RT::CommentAddress%></i></font>
-</TD>
-</TR><TR>
-
-<TD ALIGN=RIGHT>
-Priority starts at:
-</TD><TD><INPUT NAME="InitialPriority" value="<%$QueueObj->InitialPriority %>">
-</TD>
-<TD ALIGN=RIGHT>
-Over time, priority moves toward:
-</TD><TD><INPUT NAME="FinalPriority" value="<%$QueueObj->FinalPriority %>">
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT>
-Requests should be due in:
-</TD><TD>
-<INPUT NAME="DefaultDueIn" VALUE="<%$QueueObj->DefaultDueIn%>"> days.
-</TD>
-</TR>
-<TR>
-<TD>
-</TD>
-<TD COLSPAN=4><INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>> Enabled (Unchecking this box disables this queue)<BR>
-</TD>
-</TR>
-
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-</form>
-
-
-
-<%INIT>
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-my ($title, @results, $Disabled, $EnabledChecked);
-
-if ($Create) {
- $title = "Create a queue";
-}
-
-else {
- if ($id eq 'new') {
- my ($val, $msg) = $QueueObj->Create(Name => $Name);
- if ($val == 0 ) {
- Abort("Could not create queue: $msg");
- }
- else {
- push @results, $msg;
- }
- }
- else {
- $QueueObj->Load($id) || $QueueObj->Load($Name) || Abort("Couldn't load queue '$Name'");
- }
- $title = 'Editing Configuration for queue '.$QueueObj->Name;
-
-}
-if ($QueueObj->Id()) {
-my @attribs= qw(Description CorrespondAddress CommentAddress Name
- InitialPriority FinalPriority DefaultDueIn);
-
- @results = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $QueueObj,
- ARGSRef => \%ARGS);
-
-}
-
-#we're asking about enabled on the web page but really care about disabled.
-if ($Enabled == 1) {
- $Disabled = 0;
-}
-else {
- $Disabled = 1;
-}
-if ( ($SetEnabled) and ( $Disabled != $QueueObj->Disabled) ) {
- my ($code, $msg) = $QueueObj->SetDisabled($Disabled);
- push @results, 'Enabled status '. $msg;
-}
-
-unless ($QueueObj->Disabled()) {
- $EnabledChecked ="CHECKED";
-}
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$result => undef
-$Name => undef
-$Create => undef
-$Description => undef
-$CorrespondAddress => undef
-$CommentAddress => undef
-$InitialPriority => undef
-$FinalPriority => undef
-$DefaultDueIn => undef
-$SetEnabled => undef
-$Enabled => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/People.html b/rt/webrt/Admin/Queues/People.html
deleted file mode 100755
index b495400ed..000000000
--- a/rt/webrt/Admin/Queues/People.html
+++ /dev/null
@@ -1,161 +0,0 @@
-<& /Elements/Header, Title => 'Modify people related to queue ' . $QueueObj->Name &>
-<& /Admin/Elements/QueueTabs, id => $id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-
-<FORM METHOD=POST ACTION="People.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$QueueObj->Id%>">
-<& /Elements/TitleBoxStart, title => 'Modify watchers for queue \''.$QueueObj->Name ."'", width => "100%" &>
-
-<TABLE WIDTH=100%>
-<TR>
-<TD VALIGN=TOP >
-
-<h3>Current watchers</h3>
-<i>(Check box to delete)</i><br><BR>
-
-
-Cc:
-
-<ul>
-
-%# Print out a placeholder if there are none.
-%if ($cc->Count == 0 ) {
-<li><i>none</i>
-% }
-
-%while (my $watcher=$cc->Next) {
-<li>
-<INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
-%# account
-%if ($watcher->IsUser) {
-<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->OwnerObj->id%>">
-<%$watcher->OwnerObj->RealName%></a>:
-%} else {
-Email address:
-%}
-<i><%$watcher->Email%></i>
-%}
-</ul>
-
-
-Administrative Cc:
-<UL>
-%# Print out a placeholder if there are none.
-%if ($admincc->Count == 0 ) {
-<li><i>none</i>
-% }
-
-%while (my $watcher=$admincc->Next) {
-<li><INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
-%# account
-%if ($watcher->IsUser) {
-<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->OwnerObj->id%>">
-<%$watcher->OwnerObj->RealName%></a>:
-%} else {
-Email address:
-%}
-<i><%$watcher->Email%></i>
-%}
-</UL>
-</TD>
-
-<TD VALIGN=TOP>
-<h3>New watchers</h3>
-Find people whose<BR>
-<& /Elements/SelectUsers &>
-
-<BR>
-Add new watchers:<br>
-
-% if ($msg) {
-<i><%$msg%></i>
-% } elsif ($Users) {
-<ul>
-% while (my $u = $Users->Next ) {
-<li><&/Elements/SelectWatcherType, Scope=>'queue', Name => "WatcherTypeUser".$u->Id &> <%$u->Name%>
-(<%$u->RealName%>)
-% }
-</ul>
-% }
-
-</TD>
-</TR>
-</TABLE>
-
-
-
-
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => 'Save Changes', Caption => "If you've updated anything above, be sure to" &>
-</form>
-
-<%INIT>
-
-my ($field, @results, $User, $Users, $watcher, $key, $msg);
-# {{{ Load the queue
-#If we get handed two ids, mason will make them an array. bleck.
-# We want teh first one. Just because there's no other sensible way
-# to deal
-
-
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($id) || Abort("Couldn't load queue '$id'");
-# }}}
-
-# {{{ Delete deletable watchers
-
-foreach $key (keys %ARGS) {
- if (($key =~ /^DelWatcher(\d*)$/) and
- ($ARGS{$key})) {
- $RT::Logger->debug("Deleting watcher $1\n");
- my ($code, $msg) = $QueueObj->DeleteWatcher($1);
-
- push @results, $msg;
- }
-}
-# }}}
-
-# {{{ Add new watchers
-foreach $key (keys %ARGS) {
- #They're in this order because otherwise $1 gets clobbered :/
- if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and
- ($key =~ /^WatcherTypeUser(\d*)$/) ) {
- $RT::Logger->debug("Adding a watcher $1 to ".$ARGS{$key}."\n");
- my ($code, $msg) =
- $QueueObj->AddWatcher(Type => $ARGS{$key},
- Owner => $1);
- push @results, $msg;
- }
-}
-
-# }}}
-
-
-
-my $admincc = $QueueObj->AdminCc;
-my $cc = $QueueObj->Cc;
-
-
-if (!$ARGS{'UserString'}) {
-$msg = "No users selected.";
- }
-else {
- $Users = new RT::Users($session{'CurrentUser'});
- $Users->Limit(FIELD => $ARGS{'UserField'},
- VALUE => $ARGS{'UserString'},
- OPERATOR => $ARGS{'UserOp'});
- }
-</%INIT>
-
-<%ARGS>
-$UserField => 'Name'
-$UserOp => '='
-$UserString => undef
-$Type => undef
-$id => undef
-</%ARGS>
-
diff --git a/rt/webrt/Admin/Queues/Scrips.html b/rt/webrt/Admin/Queues/Scrips.html
deleted file mode 100755
index 95b8c4378..000000000
--- a/rt/webrt/Admin/Queues/Scrips.html
+++ /dev/null
@@ -1,111 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit scrips' &>
-<& /Admin/Elements/QueueTabs, id => $QueueObj->Id &>
-
-<& /Elements/ListActions, actions => \@actions &>
-
-<& /Elements/TitleBoxStart, title => $description &>
-
-<h2>Global Scrips</h2>
-<& /Admin/Elements/ListGlobalScrips &>
-<BR>
- <FORM METHOD=POST ACTION="Scrips.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE=<%$id%>>
-<h2>Queue Scrips</h2>
-% if ($Scrips->Count > 0 ) {
-<TABLE>
-<TR>
-<TD>Delete
-</TD>
-<TD>
-</TR>
-% while (my $scrip = $Scrips->Next ) {
-<TR>
-<TD>
-<INPUT TYPE="CHECKBOX" NAME="DeleteScrip-<%$scrip->Id%>">
-</TD>
-<TD>
-<% $scrip->ConditionObj->Name %>
-<% $scrip->ActionObj->Name %> with template
-<% $scrip->TemplateObj->Name %>
-</TD>
-</TR>
-% }
-</TABLE>
-% }
-<BR>
-<h2>Add a scrip to this queue</h2>
-Condition: <& /Admin/Elements/SelectScripCondition, Name => 'NewScripCondition' &>
- Action: <& /Admin/Elements/SelectScripAction, Name => 'NewScripAction' &>
- Template: <& /Admin/Elements/SelectTemplate, Name => 'NewScripTemplate', DefaultQueue => $id &>
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
-</FORM>
-<%init>
-my (@actions, $description);
-
-my $Scrips = new RT::Scrips ($session{'CurrentUser'});
-unless ($id =~ /^\d+$/) {
- Abort("$id isn't a valid Queue id.");
-}
-
-unless ($Scrips->LimitToQueue($id)) {
- Abort("Couldn't load Scrips.");
- }
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($id);
-
-if ($QueueObj->id) {
- $description = "Modify scrips for queue '". $QueueObj->Name ."'";
-}
-else {
- $description = "Modify global scrips";
-}
-
-
-if ($NewScripAction and $NewScripCondition) {
- my $NewScrip = new RT::Scrip($session{'CurrentUser'});
-
- my ($retval, $msg) = $NewScrip->Create ( ScripAction => $NewScripAction,
- ScripCondition => $NewScripCondition,
- Stage => 'TransactionCreate',
- Queue => $id,
- Template => $NewScripTemplate);
- if (defined $retval) {
- push @actions, $msg;
- }
- else {
- push @actions, $msg;
- }
-}
-
-# {{{ deal with modifying and deleting existing scrips
-my ($key );
-foreach $key (keys %ARGS) {
- # {{{ if we're trying to delete the scrip
- if ($key =~ /^DeleteScrip-(\d+)/) {
- my $id = $1;
- my $scrip = new RT::Scrip($session{'CurrentUser'});
- $scrip->Load($id);
- my ($retval, $msg) = $scrip->Delete;
- if ($retval) {
- push @actions, 'Scrip deleted';
- }
- else {
- push @actions, $msg;
- }
- }
- # }}}
-
-
-}
-# }}}
-</%init>
-
-<%ARGS>
-$NewScripCondition => undef
-$NewScripAction => undef
-$NewScripTemplate => undef
-$id => undef #some identifier that a Queue could
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/Template.html b/rt/webrt/Admin/Queues/Template.html
deleted file mode 100755
index 61ee418a6..000000000
--- a/rt/webrt/Admin/Queues/Template.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<& /Admin/Elements/Header, title => "Modify template ".$TemplateObj->id&>
-<& /Admin/Elements/QueueTabs, id => $Queue &>
-<& /Elements/ListActions, actions => \@results &>
-
-<& /Elements/TitleBoxStart, title => $title &>
-
-<FORM METHOD=POST ACTION="Template.html">
-%if ($create ) {
-<INPUT TYPE=HIDDEN NAME=template VALUE="new">
-% } else {
-<INPUT TYPE=HIDDEN NAME=template VALUE="<%$TemplateObj->Id%>">
-% }
-
-%# hang onto the queue id
-<INPUT TYPE=HIDDEN name="Queue" value="<%$Queue%>">
-
-
-Name: <input name="Name" VALUE="<%$TemplateObj->Name%>" SIZE=20><BR>
-Description: <input name="Description" VALUE="<%$TemplateObj->Description%>" SIZE=80><BR>
-
-<TEXTAREA NAME=Content ROWS=25 COLS=80 WRAP=SOFT>
-<%$TemplateObj->Content%></TEXTAREA>
-
-<& /Elements/TitleBoxEnd&>
-<&/Elements/Submit&>
-</FORM>
-
-
-
-<%INIT>
-
-my $TemplateObj = new RT::Template($session{'CurrentUser'});
-my ($title, @results);
-
-if ($create) {
- $title = "Create a template";
-}
-
-else {
- if ($template eq 'new') {
- my ($val, $msg) = $TemplateObj->Create(Queue => $Queue, Name => $Name);
- Abort("Could not create template: $msg") unless ($val);
- push @results, $msg;
- $title = 'Created template ' . $TemplateObj->Name();
- }
- else {
- $TemplateObj->Load($template) || Abort('No Template');
- $title = 'Editing template ' . $TemplateObj->Name();
- }
-
-
-}
-if ($TemplateObj->Id()) {
- $Queue = $TemplateObj->Queue;
-
- my @attribs = qw( Description Content Queue Name);
- my @aresults = UpdateRecordObject( AttributesRef => \@attribs,
- Object => $TemplateObj,
- ARGSRef => \%ARGS);
- push @results, @aresults;
-}
-</%INIT>
-<%ARGS>
-$Queue => undef
-$template => undef
-$create => undef
-$Name => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/Templates.html b/rt/webrt/Admin/Queues/Templates.html
deleted file mode 100755
index 218d41dc9..000000000
--- a/rt/webrt/Admin/Queues/Templates.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Edit templates for '.$Queue->Name &>
-<& /Admin/Elements/QueueTabs, id => $Queue->id &>
-
-<& /Elements/TitleBoxStart, title => 'Edit templates for '.$Queue->Name &>
-<UL>
-<LI><A href="Template.html?create=1&Queue=<%$Queue->id%>">Create a new template</A><BR><BR>
-
-%while (my $TemplateObj = $Templates->Next) {
-
-<LI><A HREF="Template.html?Queue=<%$id%>&template=<%$TemplateObj->id()%>"><%$TemplateObj->id()%>/<%$TemplateObj->Name%>: <%$TemplateObj->Description%></a><BR>
-
-%}
-
-<& /Elements/TitleBoxEnd &>
-<%INIT>
-
-my $Queue = new RT::Queue($session{'CurrentUser'});
-$Queue->Load($id);
-my $Templates = $Queue->Templates;
-
-</%INIT>
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/UserRights.html b/rt/webrt/Admin/Queues/UserRights.html
deleted file mode 100755
index 75d9cb282..000000000
--- a/rt/webrt/Admin/Queues/UserRights.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Modify user rights for queue '. $QueueObj->Name &>
-<& /Admin/Elements/QueueTabs, id => $id &>
-<& /Elements/ListActions, actions => \@results &>
-
- <FORM METHOD=POST ACTION="UserRights.html">
- <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
-
-<& /Elements/TitleBoxStart, title => 'Modify user rights for queue '.$QueueObj->Name &>
-
-<TABLE>
-
-% while (my $UserObj = $Users->Next()) {
- <TR ALIGN=RIGHT>
- <TD VALIGN=TOP>
- <% $UserObj->Name %>
- </TD>
- <TD>
- <& /Admin/Elements/SelectRights, PrincipalObj => $UserObj,
- PrincipalType => 'User',
- Scope => 'Queue',
- QueueObj => $QueueObj &>
- </TD>
- </TR>
-% }
- </TABLE>
-
- <& /Elements/TitleBoxEnd &>
- <& /Elements/Submit, Caption => "Be sure to save your changes", Reset => 1 &>
-
- </FORM>
-
-<%INIT>
-
- #Update the acls.
- my @results = ProcessACLChanges(\@CheckACL, \%ARGS);
-
-# {{{ Deal with setting up the display of current rights.
-
-# {{{ do basic initialization.
-
-#Define vars used in html above
-my ($GroupObj);
-
-my ($right);
-
-
-if (!defined $id) {
- Abort("No Queue defined");
-}
-
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($id) ||
- Abort("Couldn't load queue $id");
-
-# Find out which users we want to display ACL selects for
-my $Users = new RT::Users($session{'CurrentUser'});
-$Users->LimitToPrivileged();
-
-# }}}
-
-
-# }}}
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$UserString => undef
-$UserOp => undef
-$UserField => undef
-@CheckACL => undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Queues/index.html b/rt/webrt/Admin/Queues/index.html
deleted file mode 100755
index 52dfb73c8..000000000
--- a/rt/webrt/Admin/Queues/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin queues' &>
-<& /Admin/Elements/Tabs, current_tab => 'Admin/Queues/' &>
-
-
-<& /Elements/TitleBoxStart, title => 'Select a queue' &>
-
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
-
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Queues/">
-
-<input type="checkbox" name="FindDisabledQueues"> Include disabled queues in listing.
-<BR>
-<div align=right><input type=submit value="Go!"></div>
-</FORM>
-</TD>
-<TD VALIGN=TOP>
-<UL>
-% if ($session{'CurrentUser'}->HasSystemRight('AdminQueue')) {
-<LI><A HREF="<%$RT::WebPath%>/Admin/Queues/Modify.html?Create=1">Create a new queue</A><BR><BR></LI>
-</UL>
-% }
-
-<%$caption%><BR>
-<UL>
-%if ($queues->Count == 0) {
-<LI> <i>No queues matching search criteria found.</i>
-% }
-%while ( $queue = $queues->Next) {
-<LI><A HREF="Modify.html?id=<%$queue->id%>"><%$queue->Name%></a></LI>
-%}
-
-</UL>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-my ($queue, $caption);
-my $queues = new RT::Queues($session{'CurrentUser'});
-$queues->UnLimit();
-
-if ($FindDisabledQueues) {
- $queues->{'find_disabled_rows'} = 1;
-}
-
-</%INIT>
-<%ARGS>
-$FindDisabledQueues => 0
-</%ARGS>
diff --git a/rt/webrt/Admin/Users/Modify.html b/rt/webrt/Admin/Users/Modify.html
deleted file mode 100755
index b6daed49b..000000000
--- a/rt/webrt/Admin/Users/Modify.html
+++ /dev/null
@@ -1,259 +0,0 @@
-<& /Admin/Elements/Header, Title => $title &>
-<& /Admin/Elements/UserTabs, id => $id, current_subtab => '/Admin/Elements/Modify.html?id='.$id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM ACTION="<%$RT::WebPath%>/Admin/Users/Modify.html" METHOD=POST>
-%if ($Create) {
-<INPUT TYPE=HIDDEN NAME=id VALUE="new">
-% } else {
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$UserObj->Id%>">
-% }
-
-<TABLE WIDTH=100% BORDER=0>
-<TR>
-
-<TD VALIGN=TOP ROWSPAN=2>
-<& /Elements/TitleBoxStart, title => 'Identity' &>
-
-Username: <input name="Name" value="<%$UserObj->Name%>"> <b>(required)</b> <BR>
-Email: <input name="EmailAddress" value="<%$UserObj->EmailAddress%>"><BR>
-Real Name: <input name="RealName" value="<%$UserObj->RealName%>"> <BR>
-Nickname: <input name="NickName" value="<%$UserObj->NickName%>">
-<BR>
-Unix login: <input name="Gecos" value="<%$UserObj->Gecos%>">
-<BR>
-Extra info: <textarea name="FreeformContactInfo" cols=20 rows=5><%$UserObj->FreeformContactInfo%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
-</TD>
-<TD VALIGN=TOP>
-<& /Elements/TitleBoxStart, title => 'Access control' &>
-<INPUT TYPE=HIDDEN NAME="SetEnabled" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Enabled" VALUE="1" <%$EnabledChecked%>>
-Let this user access RT<BR>
-
-
-<INPUT TYPE=HIDDEN NAME="SetPrivileged" VALUE="1">
-<INPUT TYPE=CHECKBOX NAME="Privileged" VALUE="1" <%$PrivilegedChecked%>> Let this user be granted rights<BR>
-
-% unless ($RT::WebExternalAuth) {
-<TABLE>
-<TR>
-<TD ALIGN=RIGHT>
-New Password:
-</TD>
-<TD ALIGN=LEFT>
-<input type=password name="Pass1">
-</TD>
-</TR>
-<TR><TD ALIGN=RIGHT>
-Retype Password:
-</TD>
-<TD>
-<input type=password name="Pass2">
-</TD>
-</TR>
-</TABLE>
-% }
-<& /Elements/TitleBoxEnd &>
-</TD>
-<TR>
-
-<TD VALIGN=TOP>
-<& /Elements/TitleBoxStart, title => 'Location' &>
-Organization: <input name="Organization" value="<%$UserObj->Organization%>">
-<BR>
-Address1: <input name="Address1" value="<%$UserObj->Address1%>">
-<BR>
-Address2: <input name="Address2" value="<%$UserObj->Address2%>">
-<BR>
-City: <input name="City" value="<%$UserObj->City%>" size=14>
-
-State: <input name="State" value="<%$UserObj->State%>" size=3>
-
-Zip: <input name="Zip" value="<%$UserObj->Zip%>" size=9>
-<BR>
-Country: <input name="Country" value="<%$UserObj->Country%>">
-<BR>
-
-
-<& /Elements/TitleBoxEnd &>
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=2 VALIGN=TOP>
-
-
-<& /Elements/TitleBoxStart, title => 'Phone numbers' &>
-Home: <input name="HomePhone" value="<%$UserObj->HomePhone%>" size=13>
-
-Work: <input name="WorkPhone" value="<%$UserObj->WorkPhone%>" size=13>
-
-Mobile: <input name="MobilePhone" value="<%$UserObj->MobilePhone%>" size=13>
-
-Pager: <input name="PagerPhone" value="<%$UserObj->PagerPhone%>" size=13>
-<& /Elements/TitleBoxEnd &>
-<BR>
-<& /Elements/TitleBoxStart, title => 'Comments about this user' &>
-<TEXTAREA name="Comments" COLS=80 ROWS=5 WRAP=VIRTUAL><%$UserObj->Comments%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
-
-
-%if ($UserObj->Privileged) {
-<BR>
-<& /Elements/TitleBoxStart, title => 'Signature' &>
-<TEXTAREA COLS=80 ROWS=5 name="Signature" WRAP=HARD>
-<%$UserObj->Signature%></TEXTAREA>
-<& /Elements/TitleBoxEnd &>
-% }
-
-</TD>
-
-</TR>
-</TABLE>
-
-
-<& /Elements/Submit &>
-</form>
-
-
-<%INIT>
-
-my $UserObj = new RT::User($session{'CurrentUser'});
-my ($title, $PrivilegedChecked, $EnabledChecked, $Disabled, $result, @results);
-
-my ($val, $msg);
-
-if ($Create) {
- $title = "Create a new user";
-}
-else {
-
- if ($id eq 'new') {
- ($val, $msg) = $UserObj->Create( Name => $Name,
- EmailAddress => $ARGS{'EmailAddress'}
- );
- if ($val) {
- push @results, $msg;
- } else {
- push @results, 'User could not be created: '. $msg;
- }
-
- }
- else {
- $UserObj->Load($id) || $UserObj->Load($Name) || Abort("Couldn't load user '$Name'");
- $val = $UserObj->Id();
- }
-
- if ($val) {
- $title = "Modify the user ". $UserObj->Name;
- }
-
- # If the create failed
- else {
- $title = "Create a new user";
- $Create = 1;
- }
-
-
-
-}
-
-
-
-
-# If we have a user to modify, lets try.
-if ($UserObj->Id) {
-
- my @fields = qw(Name Comments Signature EmailAddress FreeformContactInfo
- Organization RealName NickName Lang EmailEncoding WebEncoding
- ExternalContactInfoId ContactInfoSystem Gecos ExternalAuthId
- AuthSystem HomePhone WorkPhone MobilePhone PagerPhone Address1
- Address2 City State Zip Country
- );
-
- my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields,
- Object => $UserObj,
- ARGSRef => \%ARGS );
- push (@results,@fieldresults);
-
-
-# {{{ Deal with special fields: Privileged, Enabled and Password
-if ( ($SetPrivileged) and ( $Privileged != $UserObj->Privileged) ) {
-my ($code, $msg) = $UserObj->SetPrivileged($Privileged);
- push @results, 'Privileged status: '. $msg;
-}
-
-#we're asking about enabled on the web page but really care about disabled.
-if ($Enabled == 1) {
- $Disabled = 0;
-}
-else {
- $Disabled = 1;
-}
-if ( ($SetEnabled) and ( $Disabled != $UserObj->Disabled) ) {
- my ($code, $msg) = $UserObj->SetDisabled($Disabled);
- push @results, 'Enabled status '. $msg;
-}
-
-
-#TODO: make this report errors properly
-if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$UserObj->IsPassword($Pass1))) {
- my ($code, $msg);
- ($code, $msg) = $UserObj->SetPassword($Pass1);
- push @results, 'Password: '. $msg;
-}
-
-# }}}
-}
-
-
-# {{{ Do some setup for the ui
-unless ($UserObj->Disabled()) {
- $EnabledChecked ="CHECKED";
-}
-
-if ($UserObj->Privileged()) {
- $PrivilegedChecked = "CHECKED";
-}
-
-# }}}
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-$Name => undef
-$Comments => undef
-$Signature => undef
-$EmailAddress => undef
-$FreeformContactInfo => undef
-$Organization => undef
-$RealName => undef
-$NickName => undef
-$Privileged => undef
-$SetPrivileged => undef
-$Enabled => undef
-$SetEnabled => undef
-$Lang => undef
-$EmailEncoding => undef
-$WebEncoding => undef
-$ExternalContactInfoId => undef
-$ContactInfoSystem => undef
-$Gecos => undef
-$ExternalAuthId => undef
-$AuthSystem => undef
-$HomePhone => undef
-$WorkPhone => undef
-$MobilePhone => undef
-$PagerPhone => undef
-$Address1 => undef
-$Address2 => undef
-$City => undef
-$State => undef
-$Zip => undef
-$Country => undef
-$Pass1 => undef
-$Pass2=> undef
-$Create=> undef
-</%ARGS>
diff --git a/rt/webrt/Admin/Users/Prefs.html b/rt/webrt/Admin/Users/Prefs.html
deleted file mode 100755
index 4a9fc5cdf..000000000
--- a/rt/webrt/Admin/Users/Prefs.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<& /Elements/Header, Title=>"User view" &>
-
-<& /Elements/ViewUser, User=>$u &>
-
-%if ($session{CurrentUser} && ($session{CurrentUser}->Id == $id)) {
- <& /Elements/TitleBoxStart, title => '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="Update signature">
-</form>
- <& /Elements/TitleBoxEnd &>
- <form method=post>
- Open tickets (from listing) in another window: <input type="checkbox" name="NewWindowOption" <%exists $session{NewWindowOption} && "CHECKED"%>><br>
- Open tickets (from listing) in a new window: <input type="checkbox" name="AlwaysNewWindowOption" <%exists $session{AlwaysNewWindowOption} && "CHECKED"%>><br>
- <input type="submit" name="NewWindowSetting" value="New window setting">
- </form>
-%}
-
- <& /Elements/TitleBoxStart, title => 'Email' &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="Email" value="<% $u->EmailAddress %>"><input type="submit" value="Update email">
-</form>
- <& /Elements/TitleBoxEnd &>
- <& /Elements/TitleBoxStart, title => 'Real Name' &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="RealName" value="<% $u->RealName %>"><input type="submit" value="Update name">
-</form>
- <& /Elements/TitleBoxEnd &>
-
- <& /Elements/TitleBoxStart, title => 'User ID' &>
-<form method=post>
-<input type="hidden" name="id" value="<%$id%>">
-<input name="Name" value="<% $u->Name %>"><input type="submit" value="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 "Couldn't load that user ($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/webrt/Admin/Users/Rights.html b/rt/webrt/Admin/Users/Rights.html
deleted file mode 100644
index 3b94f9157..000000000
--- a/rt/webrt/Admin/Users/Rights.html
+++ /dev/null
@@ -1 +0,0 @@
-Placeholder
diff --git a/rt/webrt/Admin/Users/index.html b/rt/webrt/Admin/Users/index.html
deleted file mode 100755
index 383513710..000000000
--- a/rt/webrt/Admin/Users/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<& /Admin/Elements/Header, Title => 'Admin users' &>
-<& /Admin/Elements/Tabs, current_tab => 'Admin/Users/' &>
-
-
-<& /Elements/TitleBoxStart, title => 'Select a user' &>
-
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
-
-<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/">
-
-Find people whose <& /Elements/SelectUsers &><BR>
-<input type="checkbox" name="FindDisabledUsers"> Include disabled users in search.
-<BR>
-<div align=right><input type=submit value="Go!"></div>
-</FORM>
-</TD>
-<TD VALIGN=TOP>
-<UL>
-% if ($session{'CurrentUser'}->HasSystemRight('AdminUsers')) {
-<LI><A HREF="<%$RT::WebPath%>/Admin/Users/Modify.html?Create=1">Create a new user</A><BR><BR></LI>
-</UL>
-% }
-
-<%$caption%><BR>
-<UL>
-%if ($users->Count == 0) {
-<LI> <i>No users matching search criteria found.</i>
-% }
-%while ( $user = $users->Next) {
-<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || '(no name listed)'%></a></LI>
-%}
-
-</UL>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-my ($user, $caption);
-my $users = new RT::Users($session{'CurrentUser'});
-
-if ($FindDisabledUsers) {
- $users->{'find_disabled_rows'} = 1;
-}
-
-unless (defined $UserString) {
- $users->LimitToPrivileged();
- $caption = "Privileged users";
-}
-else {
- $caption = "Users matching search criteria";
-
- if ($UserString) {
- $users->Limit( FIELD => $UserField,
- OPERATOR => $UserOp,
- VALUE => $UserString);
-
-}
-}
-</%INIT>
-<%ARGS>
-$UserString => undef
-$UserOp => '='
-$UserField => 'Name'
-$IdLike => undef
-$EmailLike => undef
-$FindDisabledUsers => 0
-</%ARGS>
diff --git a/rt/webrt/Admin/index.html b/rt/webrt/Admin/index.html
deleted file mode 100755
index 1ed973f7e..000000000
--- a/rt/webrt/Admin/index.html
+++ /dev/null
@@ -1,4 +0,0 @@
- <& /Admin/Elements/Header, Title => 'RT Administration' &>
-<& /Admin/Elements/Tabs &>
-
-
diff --git a/rt/webrt/Elements/Checkbox b/rt/webrt/Elements/Checkbox
deleted file mode 100755
index 964c482ba..000000000
--- a/rt/webrt/Elements/Checkbox
+++ /dev/null
@@ -1,17 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/Checkbox,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<INPUT TYPE="Checkbox" NAME ="<%$Name%>" <%$IsChecked%>>
-
-<%ARGS>
-$Name => undef
-$Default => undef
-$True => undef
-$False => undef
-$IsChecked => undef
-</%ARGS>
-
-<%INIT>
-$IsChecked =
- ($Default && $Default =~ /checked/i)
- ? " CHECKED " : "";
-1;
-</%INIT>
diff --git a/rt/webrt/Elements/CreateTicket b/rt/webrt/Elements/CreateTicket
deleted file mode 100644
index 1270f6ebe..000000000
--- a/rt/webrt/Elements/CreateTicket
+++ /dev/null
@@ -1 +0,0 @@
-<FORM ACTION="<% $RT::WebPath%>/Ticket/Create.html"><input type=submit value="New ticket in">&nbsp;<& /Elements/SelectNewTicketQueue &></FORM>
diff --git a/rt/webrt/Elements/CustomHomepageHeader b/rt/webrt/Elements/CustomHomepageHeader
deleted file mode 100644
index e69de29bb..000000000
--- a/rt/webrt/Elements/CustomHomepageHeader
+++ /dev/null
diff --git a/rt/webrt/Elements/Error b/rt/webrt/Elements/Error
deleted file mode 100755
index ec2cf511f..000000000
--- a/rt/webrt/Elements/Error
+++ /dev/null
@@ -1,23 +0,0 @@
-<& /Elements/Header, Code => $Code, Why => $Why &>
-<& /Elements/Tabs &>
-<& /Elements/TitleBoxStart, title => $Title &>
-<%$Why%>
-<br>
-<font size=-1>
-<%$Details%>
-</font>
-<& /Elements/TitleBoxEnd &>
-</body>
-</HTML>
-
-
-<%args>
-$Code => undef
-$Details => undef
-$Title => "RT Error"
-$Why => "the calling component did not specify why"
-</%args>
-
-<%INIT>
-$RT::Logger->error("WebRT: $Why ($Details)");
-</%INIT>
diff --git a/rt/webrt/Elements/Footer b/rt/webrt/Elements/Footer
deleted file mode 100755
index 776c219bb..000000000
--- a/rt/webrt/Elements/Footer
+++ /dev/null
@@ -1,10 +0,0 @@
-% if ($Debug) {
-<HR>
-<b>Time to display: <%time - $m->{'rt_base_time'} %></b>
-% }
-</BODY>
-</HTML>
-
-<%ARGS>
-$Debug => 0
-</%ARGS>
diff --git a/rt/webrt/Elements/GotoTicket b/rt/webrt/Elements/GotoTicket
deleted file mode 100644
index 21d2bcdf8..000000000
--- a/rt/webrt/Elements/GotoTicket
+++ /dev/null
@@ -1 +0,0 @@
-<FORM ACTION="<%$RT::WebPath%>/Ticket/Display.html"><input type=submit value="Goto ticket">&nbsp;<input size=5 name=id></FORM>
diff --git a/rt/webrt/Elements/Header b/rt/webrt/Elements/Header
deleted file mode 100755
index 471331be2..000000000
--- a/rt/webrt/Elements/Header
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<HTML>
-<HEAD>
-<TITLE><%$Title%></TITLE>
-<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
-
-%# TODO this gets called from error. but I have no idea what it might
-%# be used for. can we whack it? -jesse
-% if ($Code) {
-<META HTTP-EQUIV VALUE="<%$Code%> <%$Why%>">
-% }
-% if ($Refresh > 0) {
-<META HTTP-EQUIV="REFRESH" CONTENT="<%$Refresh%>">
-% }
-
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css">
-</HEAD>
-<BODY BGCOLOR="<%$BgColor%>">
-% if ($ShowBar) {
-<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 BGCOLOR="#993333">
-<TR VALIGN=TOP>
-<TD><IMG SRC="<%$RT::LogoURL%>" alt="RT"></TD>
-<TD VALIGN=CENTER ALIGN=LEFT>
-<font size=+2 color="#ffffff">
-<B>
-<%$Title%>
-</B>
-</font>
-</TD>
-<TD ALIGN=RIGHT>
-<font color="#ffffff">
-% if ($session{'CurrentUser'}) {
-Signed in as <b><%$session{'CurrentUser'}->Name%></b>.<BR>
-% if ($session{'CurrentUser'}->HasSystemRight('ModifySelf')) {
-[<A class='inverse' HREF="<%$RT::WebPath%>/User/Prefs.html" >Preferences</A>]
-% }
-% unless ($RT::WebExternalAuth) {
-[<A class='inverse' HREF="<%$RT::WebPath%>/NoAuth/Logout.html">Logout</a>]
-% }
-% } else {
-Not logged in.
-% }
-</font>
-</TD>
-</TR>
-</TABLE>
-
-<BR>
-% }
-<%ARGS>
-$Title => 'WebRT'
-$Code => undef
-$Refresh => undef
-$Why => undef
-$BgColor => '#ffffff'
-$ShowBar => 1
-</%ARGS>
-<%INIT>
-$Title = "RT/$RT::rtname: ".$Title;
-</%INIT>
-
diff --git a/rt/webrt/Elements/ListActions b/rt/webrt/Elements/ListActions
deleted file mode 100755
index 3fc9b0ba5..000000000
--- a/rt/webrt/Elements/ListActions
+++ /dev/null
@@ -1,14 +0,0 @@
-% if (@actions ) {
-<& /Elements/TitleBoxStart, title => 'Results' &>
-<UL>
-% foreach my $action (@actions) {
-% next unless ($action);
-<LI><%$action%></LI>
-% }
-</UL>
-<& /Elements/TitleBoxEnd &>
-<BR>
-% }
-<%ARGS>
-@actions => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/Login b/rt/webrt/Elements/Login
deleted file mode 100755
index 27ec98281..000000000
--- a/rt/webrt/Elements/Login
+++ /dev/null
@@ -1,69 +0,0 @@
-<& /Elements/Header, Title=>"Login" , &>
-
-<DIV ALIGN=CENTER>
-% if ($Error) {
-<& /Elements/TitleBoxStart, title => 'Error' &>
-<% $Error %>
-<& /Elements/TitleBoxEnd &>
-% }
-<BR>
-<& /Elements/TitleBoxStart, width=> "40%", titleright => "RT $RT::VERSION for $RT::rtname", title => 'Login' ,
-contentbg=>"#cccccc" &>
-
-
-% unless ($RT::WebExternalAuth) {
-<FORM METHOD=POST >
-<TABLE BORDER=0 WIDTH=100%>
-<TR ALIGN=RIGHT>
-<TD ALIGN=RIGHT>Username:</TD><TD ALIGN=LEFT><input name=user value="<%$user%>"></TD></TR>
-<TR><TD ALIGN=RIGHT>Password:</TD><TD ALIGN=LEFT><input type=password name=pass></TD></TR>
-<TR><TD colspan=2 align=right>
-<input type=submit Value="Login">
-</TD></TR>
-</TABLE>
-<&/Elements/TitleBoxEnd&>
-% # From mason 1.0.1 forward, this doesn't work. in fact, it breaks things.
-% if (0) {
-% # The code below iterates through everything in the passed in arguments
-% # Preserving all the old parameters
-% # This would be easier, except mason is 'smart' and calls multiple values
-% # arrays rather than multiple hash keys
-% my $key; my $val;
-% foreach $key (keys %ARGS) {
-% if (($key ne 'user') and ($key ne 'pass')) {
-% if (ref($ARGS{$key}) =~ /ARRAY/) {
-% foreach $val (@{$ARGS{$key}}) {
-<input type=hidden name="<%$key %>" value="<% $val %>">
-% }
-% }
-% else {
-<input type="hidden" name="<% $key %>" value="<% $ARGS{$key} %>">
-% }
-% }
-%}
-% }
-</FORM>
-% }
-</DIV>
-
-<BR>
-<!-- TODO: not yet implemented
-If you've forgotten your username or password, RT can <A
-href="/NoAuth/Reminder.html">send you a reminder</a>.
--->
-<BR>
-<HR>
-RT is &copy; Copyright 1996-2002 Jesse Vincent &lt;jesse@bestpractical.com&gt;. It is
-distributed under <a href="http://www.gnu.org/copyleft/gpl.html">Version 2 of the GNU General Public License.</a>
-
-
-<%ARGS>
-$user => ""
-$pass => undef
-$goto => undef
-$Error => undef
-</%ARGS>
-
-<%INIT>
-SetContentType('text/html');
-</%INIT>
diff --git a/rt/webrt/Elements/MessageBox b/rt/webrt/Elements/MessageBox
deleted file mode 100644
index aa081a380..000000000
--- a/rt/webrt/Elements/MessageBox
+++ /dev/null
@@ -1,30 +0,0 @@
-<TEXTAREA COLS=<%$Width%> ROWS=15 WRAP=HARD NAME="<%$Name%>"><% $Default %><%$message%><%$signature%></TEXTAREA>
-<%INIT>
-
-my ($message);
-
-if ($MessageURI) {
- my $code;
- ($code, $Default)=RT::Link->GetContent($MessageURI);
-}
-if ($QuoteTransaction) {
- my $transaction=RT::Transaction->new($session{'CurrentUser'});
- $transaction->Load($QuoteTransaction);
- $message=$transaction->Content(Quote => 1);
-}
-
-my $signature = '';
-if ($session{'CurrentUser'}->UserObj->Signature) {
- $signature = "-- \n".$session{'CurrentUser'}->UserObj->Signature;
-}
-
-</%INIT>
-<%ARGS>
-$QuoteTransaction => undef
-$Name => 'Content'
-$Default => ''
-$DefaultURI => undef
-$Width => 72
-$MessageURI => undef
-</%ARGS>
-
diff --git a/rt/webrt/Elements/MyRequests b/rt/webrt/Elements/MyRequests
deleted file mode 100644
index 67817296c..000000000
--- a/rt/webrt/Elements/MyRequests
+++ /dev/null
@@ -1,45 +0,0 @@
-<& /Elements/TitleBoxStart, title => "25 highest priority tickets I requested..." &>
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
-<TR>
-<TH align=right>#</TH>
-<TH align=left>Subject</TH>
-<TH align=left>Queue</TH>
-<TH align=left>Status</TH>
-<TH align=left>Owner</TH>
-<TH>&nbsp;</TH>
-</TR>
-% while (my $Ticket = $MyTickets->Next) {
-<TR>
-<TD ALIGN=RIGHT>
-<%$Ticket->Id%>
-</TD>
-<TD>
-<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>">
-<%$Ticket->Subject || '[no subject]'%>
-</A>
-</TD>
-<TD>
-<%$Ticket->QueueObj->Name%>
-</TD><TD>
-<%$Ticket->Status%>
-</TD><TD>
-<%$Ticket->OwnerObj->Name%>
-</TD><TD ALIGN=RIGHT>
-[<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>">Display</A>]
-</TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-
-<%INIT>
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{'CurrentUser'});
-$MyTickets->LimitRequestor(VALUE => $session{'CurrentUser'}->EmailAddress);
-$MyTickets->LimitStatus(VALUE => "open");
-$MyTickets->LimitStatus(VALUE => "new");
-$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC');
-$MyTickets->RowsPerPage(25);
-
-</%INIT>
diff --git a/rt/webrt/Elements/MyTickets b/rt/webrt/Elements/MyTickets
deleted file mode 100644
index 64a2ba7cc..000000000
--- a/rt/webrt/Elements/MyTickets
+++ /dev/null
@@ -1,43 +0,0 @@
-<& /Elements/TitleBoxStart, title => "25 highest priority tickets I own..." &>
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
-<TR>
-<TH ALIGN=RIGHT>#</TH>
-<TH ALIGN=LEFT>Subject</TH>
-<TH ALIGN=LEFT>Queue</TH>
-<TH ALIGN=LEFT>Status</TH>
-<TH ALIGN=LEFT>&nbsp;</TH>
-</TR>
-% while (my $Ticket = $MyTickets->Next) {
-<TR>
-<TD ALIGN=RIGHT>
-<%$Ticket->Id%>
-</TD>
-<TD>
-<A HREF="<% $RT::WebPath %>/Ticket/Display.html?id=<%$Ticket->Id%>">
-<%$Ticket->Subject || '[no subject]'%>
-</A>
-</TD>
-<TD>
-<%$Ticket->QueueObj->Name%>
-</TD><TD>
-<%$Ticket->Status%>
-</TD>
-<TD ALIGN=RIGHT>
-[<A HREF="<% $RT::WebPath %>/Ticket/Update.html?id=<%$Ticket->Id%>">Update</A>]
-</TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-
-<%INIT>
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{'CurrentUser'});
-$MyTickets->LimitOwner(VALUE => $session{'CurrentUser'}->Id);
-$MyTickets->LimitStatus(VALUE => "open");
-$MyTickets->LimitStatus(VALUE => "new");
-$MyTickets->OrderBy(FIELD => 'Priority', ORDER => 'DESC');
-$MyTickets->RowsPerPage(25);
-
-</%INIT>
diff --git a/rt/webrt/Elements/Quicksearch b/rt/webrt/Elements/Quicksearch
deleted file mode 100644
index d44c996fa..000000000
--- a/rt/webrt/Elements/Quicksearch
+++ /dev/null
@@ -1,41 +0,0 @@
-<& /Elements/TitleBoxStart, title => "Find new/open tickets", titleright => "<A class='inverse' href=\"$RT::WebPath/Search/Listing.html?NewSearch=1\">Advanced Search</A>" &>
-
-<TABLE BORDER=0 cellspacing=0 cellpadding=1 WIDTH=100%>
-<tr>
- <th align=left>Queue</th>
- <th align=left><font size=-1>New</font></th>
- <th align=left><font size=-1>Open</font></th>
- <th align=left><font size=-1>Stalled</font></th>
-</tr>
-
-<%PERL>
-while (my $queue = $Queues->Next) {
- $Tickets->ClearRestrictions;
- $Tickets->LimitStatus(VALUE => "open");
- $Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
- my $open = $Tickets->Count();
-
- $Tickets->ClearRestrictions;
- $Tickets->LimitStatus(VALUE => "new");
- $Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
- my $new = $Tickets->Count();
-
- $Tickets->ClearRestrictions;
- $Tickets->LimitStatus(VALUE => "stalled");
- $Tickets->LimitQueue(VALUE => $queue->id, OPERATOR => '=');
- my $stalled = $Tickets->Count();
-</%PERL>
-<TR><TD><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$queue->Name%></a></TD>
-<TD><%$new%></TD>
-<TD><%$open%></TD>
-<TD><%$stalled%></TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-<%INIT>
-my $Queues = new RT::Queues($session{'CurrentUser'});
-$Queues->UnLimit();
-my $Tickets = new RT::Tickets ($session{'CurrentUser'});
-</%INIT>
diff --git a/rt/webrt/Elements/Refresh b/rt/webrt/Elements/Refresh
deleted file mode 100644
index 6949d8c24..000000000
--- a/rt/webrt/Elements/Refresh
+++ /dev/null
@@ -1,22 +0,0 @@
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="-1"
-%unless ($Default) {
- SELECTED
-%}
->Don't refresh this page.</OPTION>
-%foreach my $value (@refreshevery) {
-<OPTION VALUE="<%$value%>"
-% if ($value == $Default) {
-SELECTED
-% }
->Refresh this page every <%$value/60%> minutes.
-%}
-</SELECT>
-
-<%INIT>
-my @refreshevery = qw(120 300 600 1200 3600 7200);
-</%INIT>
-<%ARGS>
-$Name => undef
-$Default => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/Section b/rt/webrt/Elements/Section
deleted file mode 100755
index 067311d9e..000000000
--- a/rt/webrt/Elements/Section
+++ /dev/null
@@ -1,11 +0,0 @@
-<TABLE WIDTH=100%>
-<TR>
-<TD>
-<font size=+4><%$title%></font>
-</TD>
-</TR>
-</TABLE>
-
-<%ARGS>
-$title => undef
-</%ARGS> \ No newline at end of file
diff --git a/rt/webrt/Elements/SelectBoolean b/rt/webrt/Elements/SelectBoolean
deleted file mode 100755
index 93b78ce76..000000000
--- a/rt/webrt/Elements/SelectBoolean
+++ /dev/null
@@ -1,24 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectBoolean,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="<%$TrueVal%>" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="<%$FalseVal%>" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
-
-<%ARGS>
-$Name => undef
-$True => "is"
-$Default => 'true'
-$TrueVal => 1
-$FalseVal => 0
-$False => "isn't"
-</%ARGS>
-
-<%INIT>
-my ($TrueDefault, $FalseDefault);
-if ($Default && $Default !~ /true/i) {
- $FalseDefault = "SELECTED";
-}
-else {
- $TrueDefault = "SELECTED";
-}
-</%INIT>
diff --git a/rt/webrt/Elements/SelectDate b/rt/webrt/Elements/SelectDate
deleted file mode 100755
index 6fafbf170..000000000
--- a/rt/webrt/Elements/SelectDate
+++ /dev/null
@@ -1,25 +0,0 @@
-<INPUT NAME="<%$Name%>" VALUE="<%$Default%>" size=16>
-
-<%init>
-unless ((defined $Default) or
- ($current <= 0)) {
- my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
- localtime($current);
- $Default = sprintf("%04d-%02d-%02d %02d:%02d",
- $year+1900,$mon+1,$mday,
- $hour,$min);
-}
-
-unless ($Name) {
- $Name = $menu_prefix. "_Date";
-}
-</%init>
-
-<%args>
-
-$ShowTime => undef
-$menu_prefix=>''
-$current=>time
-$Default => undef
-$Name => undef
-</%args>
diff --git a/rt/webrt/Elements/SelectDateRelation b/rt/webrt/Elements/SelectDateRelation
deleted file mode 100755
index c5849c8e2..000000000
--- a/rt/webrt/Elements/SelectDateRelation
+++ /dev/null
@@ -1,14 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectDateRelation,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="&lt;"><%$Before%></OPTION>
-<OPTION VALUE="="><%$On%></OPTION>
-<OPTION VALUE="&gt;"><%$After%></OPTION>
-</SELECT>
-
-<%ARGS>
-$Name => undef
-$Default => undef
-$Before => 'Before'
-$On => 'On'
-$After => 'After'
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectDateType b/rt/webrt/Elements/SelectDateType
deleted file mode 100755
index 65c0e9b4b..000000000
--- a/rt/webrt/Elements/SelectDateType
+++ /dev/null
@@ -1,12 +0,0 @@
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="Created">Created</OPTION>
-<OPTION VALUE="Started">Started</OPTION>
-<OPTION VALUE="Resolved">Resolved</OPTION>
-<OPTION VALUE="Told">Last Contacted</OPTION>
-<OPTION VALUE="LastUpdated">Last Updated</OPTION>
-<OPTION VALUE="StartsBy">Starts By</OPTION>
-<OPTION VALUE="Due">Due</OPTION>
-</SELECT>
-<%ARGS>
-$Name => 'DateType'
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectEqualityOperator b/rt/webrt/Elements/SelectEqualityOperator
deleted file mode 100755
index f93dc1af2..000000000
--- a/rt/webrt/Elements/SelectEqualityOperator
+++ /dev/null
@@ -1,18 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectEqualityOperator,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<SELECT NAME ="<%$Name%>">
-% while (my $option = shift @Options) {
-% my $value = shift @Values;
-<OPTION VALUE="<%$value%>"
-% if ($Default eq '$value') {
-SELECTED
-% }
-><%$option%></OPTION>
-% }
-</SELECT>
-
-<%ARGS>
-$Name => undef
-@Options => ('less than', 'equal to', 'greater than', 'not equal to')
-@Values => qw(< = > !=)
-$Default => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectKeyword b/rt/webrt/Elements/SelectKeyword
deleted file mode 100644
index c4bd9e1aa..000000000
--- a/rt/webrt/Elements/SelectKeyword
+++ /dev/null
@@ -1,38 +0,0 @@
-<SELECT NAME=<%$Name%> <%$Size%> <%$Multiple%>>
-<OPTION VALUE="">-</OPTION>
-<OPTION VALUE="NULL">(empty)</OPTION>
-% foreach my $kid ( keys %{$Descendents} ) {
-<OPTION VALUE="<% $kid %>"
-%if ($kid == $Default) {
-SELECTED
-%}
-><% $Descendents->{$kid} %></OPTION>
-% }
-</SELECT>
-
-
-<%INIT>
-
-unless (defined $KeywordObj) {
- $KeywordObj = new RT::Keyword($session{'CurrentUser'});
- $KeywordObj->Load($Root);
-}
-my $Descendents = $KeywordObj->Descendents();
-
-if ($Multiple) {
- $Multiple = "MULTIPLE";
-}
-if ($Size) {
- $Size="SIZE=$Size";
-}
-
-
-</%INIT>
-<%ARGS>
-$Multiple => undef
-$Size => undef
-$Name => 'Keyword'
-$KeywordObj => undef
-$Root => 0
-$Default => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectKeywordOptions b/rt/webrt/Elements/SelectKeywordOptions
deleted file mode 100644
index f56dfe52c..000000000
--- a/rt/webrt/Elements/SelectKeywordOptions
+++ /dev/null
@@ -1,18 +0,0 @@
-<PERL>
-while (my $keyword = $keywords->Next()) {
- my ($selected);
- if $keyword->Id == $default
-</PERL>
-<OPTION VALUE="<%$keyword->id%>"><% '-' x $depth %><%$keyword->Name%></OPTION>
-<& SelectKeywordOptions, depth => ($depth+1), root => $keyword->id &>
-%}
-<%INIT>
-
-my $keywords = new RT::Keywords($session{'CurrentUser'});
-$keywords->LimitToParent($root);
-
-</%INIT>
-<%ARGS>
-$root => undef
-$depth => 0
-</%ARGS> \ No newline at end of file
diff --git a/rt/webrt/Elements/SelectLinkType b/rt/webrt/Elements/SelectLinkType
deleted file mode 100644
index 22cde3dff..000000000
--- a/rt/webrt/Elements/SelectLinkType
+++ /dev/null
@@ -1,16 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectLinkType,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-<SELECT NAME ="<%$Name%>">
-% foreach ('MemberOf', 'DependsOn', 'RefersTo') { # TODO: Merging!
-<OPTION VALUE="<%$_%>"><%$_%></OPTION>
-% }
-</SELECT>
-
-<%ARGS>
-$Name => "LinkType"
-$Default => undef
-</%ARGS>
-
-<%INIT>
-# TODO handle Default
-</%INIT>
diff --git a/rt/webrt/Elements/SelectMatch b/rt/webrt/Elements/SelectMatch
deleted file mode 100644
index 7f3a94fae..000000000
--- a/rt/webrt/Elements/SelectMatch
+++ /dev/null
@@ -1,31 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectMatch,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="LIKE" <%$LikeDefault%>><%$Like%></OPTION>
-<OPTION VALUE="NOT LIKE" <%$NotLikeDefault%>><%$NotLike%></OPTION>
-<OPTION VALUE="=" <%$TrueDefault%>><%$True%></OPTION>
-<OPTION VALUE="!=" <%$FalseDefault%>><%$False%></OPTION>
-</SELECT>
-
-<%ARGS>
-$Name => undef
-$Like => 'contains'
-$NotLike => "doesn't contain"
-$True => 'is'
-$False => "isn't"
-$Default => undef
-</%ARGS>
-<%INIT>
-my ($TrueDefault, $FalseDefault, $LikeDefault, $NotLikeDefault);
-if ($Default && $Default !~ /true/i) {
- $FalseDefault = "SELECTED";
-}
-elsif ($Default && $Default !~ /false/i) {
- $TrueDefault = "SELECTED";
-}
-elsif ($Default && $Default !~ /notlike/i) {
- $NotLikeDefault = "SELECTED";
-}
-else {
- $LikeDefault = "SELECTED";
-}
-</%INIT>
diff --git a/rt/webrt/Elements/SelectNewTicketQueue b/rt/webrt/Elements/SelectNewTicketQueue
deleted file mode 100755
index 9f5cd2871..000000000
--- a/rt/webrt/Elements/SelectNewTicketQueue
+++ /dev/null
@@ -1,9 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectNewTicketQueue,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<& SelectQueue, Name => $Name, Verbose => $Verbose, Default => $Default,
- ShowAllQueues => 0, ShowNullOption => 0 &>
-
-<%ARGS>
-$Name => 'Queue'
-$Verbose => undef
-$Default => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectOwner b/rt/webrt/Elements/SelectOwner
deleted file mode 100755
index 59ebf3631..000000000
--- a/rt/webrt/Elements/SelectOwner
+++ /dev/null
@@ -1,22 +0,0 @@
-<SELECT NAME="<%$Name%>">
-<OPTION VALUE="">-</OPTION>
-<OPTION <% ($RT::Nobody->Id() == $Default) && "SELECTED" %> VALUE="<%$RT::Nobody->Id%>"><%$RT::Nobody->Name%></OPTION>
-%while ( my $User = $Users->Next()) {
-% if ((!defined $QueueObj) || ($User->HasQueueRight(Right => 'OwnTicket', QueueObj => $QueueObj, TicketObj => $TicketObj))){
-<OPTION VALUE="<%$User->Id()%>" <% ($User->Id() == $Default) && "SELECTED" %>><%$User->Name()%></OPTION>
-% }
-%}
-</SELECT>
-
-<%INIT>
-my $Users = RT::Users->new($session{CurrentUser});
-$Users->LimitToPrivileged;
-</%INIT>
-
-<%ARGS>
-$QueueObj => undef
-$Name => undef
-$Default => undef
-$User => undef
-$TicketObj => undef
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectQueue b/rt/webrt/Elements/SelectQueue
deleted file mode 100755
index d63b17b4e..000000000
--- a/rt/webrt/Elements/SelectQueue
+++ /dev/null
@@ -1,38 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectQueue,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-% if ($Lite) {
-<INPUT NAME="<%$Name%>" size=25 DEFAULT="<%$d->Name%>">
-% } else {
-<SELECT NAME ="<%$Name%>">
-% if ($ShowNullOption) {
-<OPTION VALUE="">-</OPTION>
-% }
-% while (my $queue=$q->Next) {
-% if ($ShowAllQueues || $queue->CurrentUserHasRight('CreateTicket')) {
-<OPTION VALUE="<%$queue->Id%>" <%($queue->Id == $Default) && 'SELECTED'%>><%$queue->Name%>
-% if (($Verbose) and ($queue->Description) ){
-(<%$queue->Description%>)
-% }
-</OPTION>
-% }
-% }
-</SELECT>
-% }
-<%ARGS>
-$ShowNullOption => 1
-$ShowAllQueues => 1
-$Name => undef
-$Verbose => undef
-$Default => undef
-$Lite => 0
-</%ARGS>
-
-<%INIT>
-
-my $q=new RT::Queues($session{'CurrentUser'});
-$q->UnLimit;
-
-my $d = new RT::Queue($session{'CurrentUser'});
-$d->Load($Default);
-
-</%INIT>
diff --git a/rt/webrt/Elements/SelectResultsPerPage b/rt/webrt/Elements/SelectResultsPerPage
deleted file mode 100644
index 0699c6868..000000000
--- a/rt/webrt/Elements/SelectResultsPerPage
+++ /dev/null
@@ -1,22 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectResultsPerPage,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-%# TODO: Better default handling
-
-<SELECT NAME ="<%$Name%>">
-% foreach my $value (@values) {
-<OPTION VALUE="<%$value%>" <% $value == $Default && 'SELECTED' %>>
-<% shift @labels %>
-</OPTION>
-% }
-</SELECT>
-
-<%INIT>
-my @values = qw(0 10 25 50 100);
-my @labels = qw(Unlimited 10 25 50 100);
-</%INIT>
-<%ARGS>
-
-$Name => undef
-$Default => 50
-
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectSortOrder b/rt/webrt/Elements/SelectSortOrder
deleted file mode 100644
index 6dc900631..000000000
--- a/rt/webrt/Elements/SelectSortOrder
+++ /dev/null
@@ -1,18 +0,0 @@
-<SELECT NAME="<%$Name%>">
-%foreach my $order (@orders) {
-<OPTION VALUE="<%$order%>" <%$order eq $Default && 'SELECTED' %>>
-<% shift @order_names %>
-</OPTION>
-% }
-</SELECT>
-
-<%INIT>
-my @orders = qw (ASC DESC);
-my @order_names = qw (Ascending Descending);
-
-</%INIT>
-
-<%ARGS>
-$Name => 'SortOrder'
-$Default => 'ASC'
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectStatus b/rt/webrt/Elements/SelectStatus
deleted file mode 100755
index 92df7c619..000000000
--- a/rt/webrt/Elements/SelectStatus
+++ /dev/null
@@ -1,17 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectStatus,v 1.1 2002-08-12 06:17:08 ivan Exp $
-
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="">-</OPTION>
-%foreach my $status (@status) {
-<OPTION VALUE="<%$status%>" <%($Default eq $status) && 'SELECTED'%>><%$status%></OPTION>
-% }
-</SELECT>
-<%ONCE>
-my $queue = new RT::Queue($session{'CurrentUser'});
-my @status = $queue->StatusArray();
-</%ONCE>
-<%ARGS>
-$Name => undef
-$Default => undef
-
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectTicketSortBy b/rt/webrt/Elements/SelectTicketSortBy
deleted file mode 100644
index 02021decc..000000000
--- a/rt/webrt/Elements/SelectTicketSortBy
+++ /dev/null
@@ -1,15 +0,0 @@
-<SELECT NAME="<%$Name%>">
-% foreach my $field (@sortfields) {
-<OPTION VALUE="<%$field%>" <%$field eq $Default && 'SELECTED'%>><%$field%></OPTION>
-% }
-</SELECT>
-
-<%INIT>
-my $tickets = new RT::Tickets($session{'CurrentUser'});
-my @sortfields = $tickets->SortFields();
-
-</%INIT>
-<%ARGS>
-$Name => 'SortTicketsBy'
-$Default => 'id'
-</%ARGS>
diff --git a/rt/webrt/Elements/SelectUsers b/rt/webrt/Elements/SelectUsers
deleted file mode 100755
index f517d3510..000000000
--- a/rt/webrt/Elements/SelectUsers
+++ /dev/null
@@ -1,8 +0,0 @@
-<select name="UserField">
-<option value="Name">User Id
-<option value="EmailAddress">Email
-<option value="RealName">Name
-<option value="Organization">Organization
-</select>
-<& /Elements/SelectMatch, Name=> 'UserOp' &>
-<input size=8 name="UserString">
diff --git a/rt/webrt/Elements/SelectWatcherType b/rt/webrt/Elements/SelectWatcherType
deleted file mode 100644
index 5a855192c..000000000
--- a/rt/webrt/Elements/SelectWatcherType
+++ /dev/null
@@ -1,26 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Elements/Attic/SelectWatcherType,v 1.1 2002-08-12 06:17:08 ivan Exp $
-%# portions Copyright 2000 Tobias Brox <tobix@fsck.com>
-%# Request Tracker is Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<SELECT NAME ="<%$Name%>">
-<OPTION VALUE="none">-</OPTION>
-%# Make nice options:
-%for my $option (@types) {
-<OPTION VALUE="<%$option%>" <%$option eq $Default && "SELECTED"%>><%$option%></OPTION>
-%}
-</SELECT>
-
-<%INIT>
-my @types;
-if ($Scope =~ 'queue') {
- @types = qw(Cc AdminCc);
-}
-else {
- @types = qw(Requestor Cc AdminCc);
-}
-</%INIT>
-<%ARGS>
-$Default=>undef
-$Scope => 'ticket'
-$Name => 'WatcherType'
-</%ARGS>
diff --git a/rt/webrt/Elements/ShadedBox b/rt/webrt/Elements/ShadedBox
deleted file mode 100755
index 334b57975..000000000
--- a/rt/webrt/Elements/ShadedBox
+++ /dev/null
@@ -1,5 +0,0 @@
-<div align="left"><span class=label><%$title |n %></span><br><b><%$content |n %></b></div>
-<%ARGS>
-$title => undef
-$content => "&nbsp;"
-</%ARGS>
diff --git a/rt/webrt/Elements/Submit b/rt/webrt/Elements/Submit
deleted file mode 100755
index 7b75e9e98..000000000
--- a/rt/webrt/Elements/Submit
+++ /dev/null
@@ -1,44 +0,0 @@
-<TABLE WIDTH=100% BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 >
-<TR>
-% if ($Reset) {
-<TD>
-<FONT COLOR=#ffd800 >
-<INPUT TYPE=RESET VALUE="<%$ResetLabel%>">
-</FONT>
-</TD>
-%}
-<TD>
-&nbsp;
-</TD>
-<TD ALIGN=RIGHT VALIGN=CENTER>
-
-<FONT COLOR=#ffd800>
-
-% if ($AlternateLabel) {
-<B><%$AlternateCaption%>
-<INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
-%}
-VALUE='<%$AlternateLabel%>'></B>
-% }
-
-<B><%$Caption%>
-<INPUT TYPE=SUBMIT
-%if ($Name) {
-NAME="<%$Name%>"
-% }
- VALUE='<%$Label%>'></B></FONT>
-</TD>
-</TR>
-</TABLE>
-<%ARGS>
-$color => "#336699"
-$Caption => undef
-$AlternateCaption => undef
-$AlternateLabel => undef
-$Label => 'Submit'
-$Name => undef
-$Reset => undef
-$ResetLabel => 'Reset'
-</%ARGS>
diff --git a/rt/webrt/Elements/Tabs b/rt/webrt/Elements/Tabs
deleted file mode 100755
index 6eacf391a..000000000
--- a/rt/webrt/Elements/Tabs
+++ /dev/null
@@ -1,133 +0,0 @@
-<TABLE WIDTH=100%>
- <TR>
- <TD VALIGN=TOP>
- <TABLE cellspacing=1>
- <TR>
-% foreach $tab (sort keys %{$toptabs}) {
- <TD ALIGN=CENTER>
- <font size=+1>
- [<A
-% if ($current_toptab eq $toptabs->{$tab}->{'path'}) {
-class='currenttab'
-% }
- HREF="<%$RT::WebPath%>/<% $toptabs->{$tab}->{'path'}%>"><% $toptabs->{$tab}->{'title'}%></A>]
-
-
- </font>
- </TD>
-% }
- </TR>
- </TABLE>
-<BR>
-% if ($tabs_scalar) {
-<% $tabs_scalar |n%>
-% }
-% if ($tabs) {
-
- <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
- <TR>
-% foreach $tab (sort keys %{$tabs}) {
- <TD ALIGN=CENTER VALIGN=TOP>
-[<A
-% if ($current_tab eq $tabs->{$tab}->{'path'}) {
-class='currenttab'
-% }
-HREF="<%$RT::WebPath%>/<% $tabs->{$tab}->{'path'}%>"><% $tabs->{$tab}->{'title'}%></A>]</TD>
-%}
- </TR>
- </TABLE>
-%}
-
-<BR>
-% if ($subtabs_scalar) {
-<% $subtabs_scalar |n%>
-% }
-% if ($subtabs) {
- <TABLE>
- <TR>
-% foreach $tab (sort keys %{$subtabs}) {
- <TD ALIGN=CENTER>
- [<A HREF="<%$RT::WebPath%>/<% $subtabs->{$tab}->{'path'}%>"><% $subtabs->{$tab}->{'title'}%></A>]
- </TD>
-%}
- </TR>
- </TABLE>
-%}
- </TD>
- <TD VALIGN=TOP ALIGN=RIGHT>
-<TABLE>
-<TR>
-
-% foreach $action (sort keys %{$topactions}) {
-<TD><font size=-1><%$topactions->{"$action"}->{'html'} |n %></font></TD>
-% }
-</TR>
-</TABLE>
-
-
-
-% if ($actions) {
-<TABLE><TR>
-% foreach $action (sort keys %{$actions}) {
-<TD>
-<FONT SIZE=-1>
-% if ($actions->{"$action"}->{'html'}) {
-<%$actions->{"$action"}->{'html'} |n%>
-% } else {
-<A HREF="<%$RT::WebPath%>/<% $actions->{$action}->{'path'}%>"><% $actions->{$action}->{'title'}%></A>
-% }
-</FONT>
-</TD>
-% }
-</TR></TABLE>
-% }
-
-% if ($subactions_scalar) {
-<% $subactions_scalar |n%>
-% }
-% if ($subactions) {
-<BR>|&nbsp;
-% foreach $action (sort keys %{$subactions}) {
-<%$subactions->{"$action"}->{'html'} |n%>&nbsp;|
-% }
-% }
- </TD>
- </TR>
- </TABLE>
-
-
-<%INIT>
-my ($tab, $action);
-my $toptabs = { A => { title => 'Home',
- path => '',
- },
- B => { title => 'Search',
- path => 'Search/Listing.html'
- },
-
- D => { title => 'Configuration',
- path => 'Admin/'
- }
- };
-
-
-my $topactions = {
- A => { html => $m->scomp('/Elements/CreateTicket')
- },
- B => { html => $m->scomp('/Elements/GotoTicket')
- }
- };
-</%INIT>
-<%ARGS>
-$current_toptab => "none"
-$current_tab => "none"
-$current_subtab => "none"
-$tabs => undef
-$tabs_scalar => undef
-$subtabs => undef
-$actions => undef
-$subactions => undef
-$subtabs_scalar => undef
-$subactions_scalar => undef
-</%ARGS>
-
diff --git a/rt/webrt/Elements/TitleBoxEnd b/rt/webrt/Elements/TitleBoxEnd
deleted file mode 100755
index bdd41065a..000000000
--- a/rt/webrt/Elements/TitleBoxEnd
+++ /dev/null
@@ -1,10 +0,0 @@
-</TD></TR></TABLE>
-</TD>
-</TR>
-<TR><TD COLSPAN=4><IMG SRC="<%$RT::WebImagesURL%>spacer.gif" height=1 ALT="&nbsp;"width=1></TD>
-</TABLE>
-<%ARGS>
-$title => undef
-$content => undef
-</%ARGS>
-
diff --git a/rt/webrt/Elements/TitleBoxStart b/rt/webrt/Elements/TitleBoxStart
deleted file mode 100755
index 6d0f1f91a..000000000
--- a/rt/webrt/Elements/TitleBoxStart
+++ /dev/null
@@ -1,20 +0,0 @@
-<TABLE CLASS="<%$class%>" BGCOLOR="<%$color%>" CELLSPACING=0 BORDER=0 CELLPADDING=0 WIDTH="<%$width%>">
-<TR><TD ROWSPAN=2><IMG SRC="<%$RT::WebImagesURL%>spacer.gif" width=1 height=1 ALT=""></TD>
-<TD valign=middle align=left bgcolor="<%$color%>">&nbsp;<font size=-1 color="#ffffff"><b><% $title_href && "<A CLASS=\"$title_class\" HREF=\"$title_href\">"|n%><%$title |n %><% $title_href && "</A>" |n%></b></font></TD>
-<TD ALIGN="right" valign=middle bgcolor="<%$color%>"><FONT color="#ffffff" SIZE=-1><%$titleright |n %></FONT>&nbsp;</TD>
-<TD ROWSPAN=2><IMG SRC="<%$RT::WebImagesURL%>spacer.gif" width=1 height=1 ALT=""></TD></TR>
-<TR><TD COLSPAN=2 bgcolor="<%$contentbg%>" valign=top align=left WIDTH=100%>
-<TABLE CELLPADDING=2 WIDTH=100%><TR><TD>
-<%ARGS>
-$width => "100%"
-$class => undef
-
-$title_href => undef
-$title => undef
-$title_class => undef
-
-$titleright_href => undef
-$titleright => undef
-$contentbg => "#dddddd"
-$color => "#336699"
-</%ARGS>
diff --git a/rt/webrt/Elements/ViewUser b/rt/webrt/Elements/ViewUser
deleted file mode 100644
index 92446e6ef..000000000
--- a/rt/webrt/Elements/ViewUser
+++ /dev/null
@@ -1,29 +0,0 @@
-
-<& /Elements/TitleBoxStart,
- title => "<a class='inverse' href=\"$RT::WebPath/Search/Listing.html?LimitRequestorById=1&IdOfRequestor=".$User->id."\">Tickets from $name</a>",
- titleright=> "<a class='inverse' href=\"$RT::WebPath/EditUserComments.html?id=".$User->id."\">Comments about $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 || "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->LimitRequestor(VALUE => $User->EmailAddress);
-
-
-</%INIT>
diff --git a/rt/webrt/Elements/dayMenu b/rt/webrt/Elements/dayMenu
deleted file mode 100755
index 6591b05d2..000000000
--- a/rt/webrt/Elements/dayMenu
+++ /dev/null
@@ -1,19 +0,0 @@
-<%doc>-------------------------------------------------------------------
-dayMenu: Display a pulldown menu of days of the month (1 to 31)
-
-Optional arguments:
-$menu_name - Name of menu, defaults to 'day'
-$current - Selected day value (1 to 31)
--------------------------------------------------------------------</%doc>
-
-<select name="<% $menu_name %>">
-<option value="-1">-
-% foreach my $day (1..31) {
-<option value="<% $day %>" <% $day==$current ? "selected" : "" %>><% sprintf("%02d",$day) %>
-% }
-</select>
-
-<%args>
-$menu_name=>'day'
-$current=>undef
-</%args>
diff --git a/rt/webrt/Elements/monthMenu b/rt/webrt/Elements/monthMenu
deleted file mode 100755
index b9a71d3f9..000000000
--- a/rt/webrt/Elements/monthMenu
+++ /dev/null
@@ -1,37 +0,0 @@
-<%doc>-------------------------------------------------------------------
-monthMenu: Display a pulldown menu of months
-
-Optional arguments:
-$menu_name - Name of menu, defaults to 'month'
-$current - Selected month value (1 to 12)
-$format - Choice of month labels:
- 'full' (January, February, ...)
- 'short' (Jan, Feb, ...)
- 'numeric' (1, 2, ...)
- Defaults to 'full'. The format only affects appearance; the menu
- values are always numeric.
--------------------------------------------------------------------</%doc>
-
-<select name="<% $menu_name %>">
-<option value="-1">-
-% foreach my $month (1..12) {
-<option value="<% $month %>" <% $month==$current ? "selected" : "" %>>
-% if ($format eq 'full') {
-<% $month_names[$month-1] %>
-% } elsif ($format eq 'short') {
-<% substr($month_names[$month-1],0,3) %>
-% } elsif ($format eq 'numeric') {
-<% sprintf("%02d",$month) %>
-% }
-% }
-</select>
-
-<%init>
-my @month_names = qw(January February March April May June July August September October November December);
-</%init>
-
-<%args>
-$menu_name=>'month'
-$current=>undef
-$format=>'full'
-</%args>
diff --git a/rt/webrt/Elements/yearMenu b/rt/webrt/Elements/yearMenu
deleted file mode 100755
index 4a0e7a772..000000000
--- a/rt/webrt/Elements/yearMenu
+++ /dev/null
@@ -1,24 +0,0 @@
-<%doc>-------------------------------------------------------------------
-yearMenu: Display a pulldown menu of years.
-
-Optional arguments:
-$menu_name - Name of menu, defaults to 'year'
-$current - Selected year value
-$min - Minimum year appearing in menu; defaults to current year
-$max - Maximum year appearing in menus; defaults to $min plus 10.
--------------------------------------------------------------------</%doc>
-
-<select name="<% $menu_name %>">
-<option value="-1">-
-% foreach my $year ($min..$max) {
-<option value="<% $year %>" <% $year==$current ? "selected" : "" %>>
-<% $year %>
-% }
-</select>
-
-<%args>
-$menu_name=>'year'
-$current=>(localtime)[5]+1900
-$min=>(localtime)[5]+1900-1
-$max=>$min+10
-</%args>
diff --git a/rt/webrt/NoAuth/Logout.html b/rt/webrt/NoAuth/Logout.html
deleted file mode 100755
index a00ae9675..000000000
--- a/rt/webrt/NoAuth/Logout.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>RT: Logout</TITLE>
- <META HTTP-EQUIV="Refresh" CONTENT="0;URL=<%$RT::WebPath%>/">
-</HEAD>
-<BODY>
-<p>You have been logged out of RT.
-
-
-<br>
-<br>
-<A HREF="<%$RT::WebPath%>/">You're welcome to login again</a>
-
-
-<%PERL>
-if (defined %session) {
- %session = undef;
-}
-$m->abort();
-</%PERL>
-
-
diff --git a/rt/webrt/NoAuth/Reminder.html b/rt/webrt/NoAuth/Reminder.html
deleted file mode 100755
index a814a912f..000000000
--- a/rt/webrt/NoAuth/Reminder.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<& /Elements/Header, title => 'Password Reminder' &>
-
-Not yet implemented.
diff --git a/rt/webrt/NoAuth/images/rt.jpg b/rt/webrt/NoAuth/images/rt.jpg
deleted file mode 100644
index a137a932b..000000000
--- a/rt/webrt/NoAuth/images/rt.jpg
+++ /dev/null
Binary files differ
diff --git a/rt/webrt/NoAuth/images/spacer.gif b/rt/webrt/NoAuth/images/spacer.gif
deleted file mode 100644
index 5bfd67a2d..000000000
--- a/rt/webrt/NoAuth/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/rt/webrt/NoAuth/webrt.css b/rt/webrt/NoAuth/webrt.css
deleted file mode 100755
index a71d05720..000000000
--- a/rt/webrt/NoAuth/webrt.css
+++ /dev/null
@@ -1,102 +0,0 @@
-BODY, TD {font-family: Helvetica, Arial, sans-serif}
-TD {border-color: #cccccc }
-
-BLOCKQUOTE.message {
- font-size: 80%;
- font-family: "Helvetica", sans-serif;
-}
-
-
-BODY {
- color: #000;
- background: #FFFFFF;
- font-family: "Helvetica", sans-serif;
-
-
-}
-
-TD, TH { /* ns workaround */
- font-family: "Helvetica", sans-serif;
-}
-
-TR.oddline {
- background-color : #eeeeee;
-}
-
-H1, H2, H3 {
- margin-top: 0.2em;
- color: #336699;
- font-family: "Helvetica", sans-serif;
-
- clear: both;
-}
-
-
-DIV.endmatter { margin-left: -7% }
-
-
-
-A { font-weight: bold;
- color: #000000;
- /* border: none -- breaks NS 4.x */ }
-
-.currenttab { background-color: #cccccc; }
-
-.inverse { color: #ffffff; }
-
-
-
-A:link IMG, A:visited IMG { border-style: none }
-
-A IMG { color: white } /* The only way to hide the border in NS 4.x */
-
-.hide {
- display: none;
- color: white;
-}
-
-SPAN.date { font-size: 0.8em }
-
-SPAN.attribution {
- font-weight: bold
-}
-
-SPAN.label { font-size: 0.8em;
-}
-
-BLOCKQUOTE {
- font-style: italic;
- /* color: #990; */
-}
-
-ADDRESS {
- text-align: right;
- font-weight: bold;
- font-style: italic
-}
-
-BLOCKQUOTE P { /* Try to avoid space above the attribution */
- margin-bottom: 0;
-}
-BLOCKQUOTE ADDRESS {
- margin: 0;
-}
-
-.motto, .motto A {font: italic 120%/1.3 Georgia, serif; color: #990}
-
-.emphasized {
- font-weight: bold
-}
-
-/* Why o why does this break Netscape 4.x?
-IMG {
- border: none
-}
-*/
-
-P.map-also { font-style: italic; margin-left: 15%; text-align: right }
-
-.oddline {
-background-color : #eeeeee;
-
-}
diff --git a/rt/webrt/Search/Bulk.html b/rt/webrt/Search/Bulk.html
deleted file mode 100755
index ac688d7cd..000000000
--- a/rt/webrt/Search/Bulk.html
+++ /dev/null
@@ -1,186 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/Bulk.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-<& /Elements/Header, Title => "Bulk ticket update" &>
-<& /Elements/Tabs &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM METHOD=POST>
-<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=0>
-<TR>
-<TH>Update</TH>
-%foreach my $col (@cols) {
-% my $colalias = $col;
-% $colalias =~ s/(Obj\-\>|)(Name|AsString)//;
-
-<TH ><% $colalias %>&nbsp;</TH>
-%}
-</TR>
-
-<%PERL>
-
-my $i;
-
-
-
-$session{'tickets'}->RedoSearch();
-while (my $Ticket = $session{'tickets'}->Next) {
- $i++;
- if ($i % 2) {
- $bgcolor = "#dddddd";
- }
- else {
- $bgcolor = "#ffffff";
- }
- </%PERL>
-<TR bgcolor="<%$bgcolor%>">
-<TD><input type=checkbox name="UpdateTicket<%$Ticket->Id%>" CHECKED></TD>
-%# The ticket view is controlled by config.pm, WebOptions
-%foreach my $col (@cols) {
-<TD>
-% if ($col eq 'id') {
-<A HREF="<% $RT::WebPath%>/Ticket/Display.html?id=<%$Ticket->Id%>"><%$Ticket->Id()%></A>
-% }
-%else {
-<% eval "\$Ticket->$col()" %>&nbsp;
-%}
-</TD>
-%}
-</TR>
-%}
-
-
-
-</TABLE>
-
-<HR>
-
-
-<& /Elements/TitleBoxStart, title => 'Update selected tickets' &>
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
-<UL>
-<li> Make Owner <& /Elements/SelectOwner, Name => "Owner" &>
-(<input type=checkbox name="ForceOwnerChange"> Force change)
-<li> Add Requestor <INPUT Name="AddRequestor" SIZE=20>
-<li> Remove Requestor <INPUT Name="DeleteRequestor" SIZE=20>
-<li> Add Cc <INPUT Name="AddCc" SIZE=20>
-<li> Remove Cc <INPUT Name="DeleteCc" SIZE=20>
-<li> Add AdminCc <INPUT Name="AddAdminCc" SIZE=20>
-<li> Remove AdminCc <INPUT Name="DeleteAdminCc" SIZE=20>
-</UL>
-</TD>
-<TD VALIGN=TOP>
-<UL>
-<li> Make subject <INPUT Name="Subject" SIZE=20>
-<li> Make priority <INPUT Name="Priority" SIZE=4>
-<li> Make queue <& /Elements/SelectQueue, Name => "Queue" &>
-
-<li>Make Status <& /Elements/SelectStatus, Name => "Status" &>
-
-
-
-<li> Make date Starts <& /Elements/SelectDate, Name => "Starts_Date", ShowTime => 0, Default => '' &>
-<li> Make date Started <& /Elements/SelectDate, Name => "Started_Date", ShowTime => 0, Default => '' &>
-<li> Make date Told <& /Elements/SelectDate, Name => "Told_Date", ShowTime => 0, Default => '' &>
-<li> Make date Due <& /Elements/SelectDate, Name => "Due_Date", ShowTime => 0, Default => '' &>
-<li> Make date Resolved <& /Elements/SelectDate, Name => "Resolved_Date", ShowTime => 0, Default => '' &>
-
-
-% while ( my $KeywordSelect = $KeywordSelects->Next ) {
-
-<li> Add <% $KeywordSelect->Name %> <& /Elements/SelectKeyword, Name => "AddToKeywordSelect".$KeywordSelect->id, KeywordObj => $KeywordSelect->KeywordObj &>
-<li> Remove <% $KeywordSelect->Name %> <& /Elements/SelectKeyword, Name => "DeleteFromKeywordSelect".$KeywordSelect->id, KeywordObj => $KeywordSelect->KeywordObj &>
-% }
-
-</UL>
-
-
-</TD>
-</TR>
-</table>
-<& /Elements/TitleBoxEnd&>
-<& /Elements/TitleBoxStart, title => 'Add comments or replies to selected tickets' &>
-<table>
-<tr><td align=right>Update Type:</td>
-<td><select name="UpdateType">
- <option value="private" >Comments (not sent to requestors)</option>
-<option value="response" >Response to requestors</option>
-</select>
-</td></tr>
-<tr><td align=right>Subject:</td><td> <input name="UpdateSubject" size=60 value=""></td></tr>
- <tr><td align=right>Attach:</td><td><input name="UpdateAttachment" type="file"></td></tr>
- <tr><td colspan="2">
- <& /Elements/MessageBox, Name=>"UpdateContent"&>
- </td></tr>
- </table>
-<& /Elements/TitleBoxEnd &>
-
-
-
-
-<& /Elements/Submit &>
-
-
-</FORM>
-<%INIT>
-
-# Iterate through the ARGS hash and remove anything with a null value.
-map ($ARGS{$_} =~ /^$/ && (delete $ARGS{$_}), keys %ARGS);
-
-my ($bgcolor, @results);
-my @cols = qw(id Status Priority Subject QueueObj->Name OwnerObj->Name RequestorsAsString DueAsString );
-
-Abort("No search to operate on.") unless ($session{'tickets'});
-
-
-my $do_comment_reply=0;
-# Prepare for ticket updates
-$ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
-chomp ($ARGS{'UpdateContent'}) ;
-
-if ($ARGS{'UpdateContent'} &&
- $ARGS{'UpdateContent'} ne '' &&
- $ARGS{'UpdateContent'} ne "-- \n" .
- $session{'CurrentUser'}->UserObj->Signature) {
- $do_comment_reply=1;
-}
-
-my $KeywordSelects = new RT::KeywordSelects $session{'CurrentUser'};
-foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
- $KeywordSelects->LimitToQueue($_);
-}
-
-$KeywordSelects->IncludeGlobals;
-
-
-#Iterate through each ticket we've been handed
-
-while (my $Ticket = $session{'tickets'}->Next) {
- $RT::Logger->debug( "Checking Ticket ".$Ticket->Id ."\n");
- next unless ($ARGS{"UpdateTicket".$Ticket->Id});
- $RT::Logger->debug ("Matched\n");
- #Update the basics.
- my @basicresults = ProcessTicketBasics(TicketObj => $Ticket, ARGSRef => \%ARGS);
- my @dateresults = ProcessTicketDates(TicketObj => $Ticket, ARGSRef => \%ARGS);
- my @watchresults = ProcessTicketWatchers(TicketObj => $Ticket, ARGSRef => \%ARGS);
- my @selectresults = ProcessTicketObjectKeywords(TicketObj => $Ticket, ARGSRef => \%ARGS);
-
-
- my @updateresults;
- if ($do_comment_reply) {
- ProcessUpdateMessage(TicketObj => $Ticket, ARGSRef => \%ARGS, Actions => \
-@updateresults);
- }
- my @tempresults = (@watchresults, @basicresults, @dateresults, @updateresults);
- @tempresults = map { "Ticket ".$Ticket->Id. ": ".$_ } @tempresults;
-
-
- #Update the keyword selects
- #Update the watchers
- $RT::Logger->debug(join("\n",@tempresults));
- @results = (@results, @tempresults);
-}
-
-</%INIT>
diff --git a/rt/webrt/Search/Listing.html b/rt/webrt/Search/Listing.html
deleted file mode 100755
index da927fec7..000000000
--- a/rt/webrt/Search/Listing.html
+++ /dev/null
@@ -1,134 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/Listing.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-<& /Elements/Header, Title => "Search", Refresh => $session{'tickets_refresh_interval'} &>
-<& /Elements/Tabs, current_toptab => 'Search/Listing.html' &>
-
-
-% unless ($ARGS{'Action'} eq 'Refine') {
-<TABLE WIDTH=100% border=0 cellpadding=3 CELLSPACING=1>
-<TR>
-%foreach my $col (@{Config(\%ARGS, 'QueueListingCols')}) {
-<TH>
-
-<%PERL>
-my ($order);
- my $attr = $col->{'TicketAttribute'};
- $attr =~ s/Obj->(Name|AsString|AgeAsString)//g;
- if ($session{'tickets_sort_order'} =~ /^asc$/i) {
- $order = 'DESC';
- } else {
- $order = 'ASC';
- }
-</%PERL>
-
-% if (grep (/^$attr$/i, $session{'tickets'}->SortFields)) {
-<A
-% if ($attr eq $session{'tickets_sort_by'}) {
-class="currenttab"
-% }
-HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$attr%>&TicketsSortOrder=<%$order%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">
-<%$col->{Header}%>
-</A>
-% } else {
-<% $col->{Header} %>
-% }
-</TH>
-%}
-</TR>
-
-<%PERL>
-
-my $i;
-
-$session{'tickets'}->RedoSearch();
-while (my $Ticket = $session{'tickets'}->Next) {
- $i++;
- if ($i % 2) {
- $bgcolor = "#dddddd";
- }
- else {
- $bgcolor = "#ffffff";
- }
- </%PERL>
-<TR bgcolor="<%$bgcolor%>" >
-%# The ticket view is controlled by config.pm, WebOptions
-%foreach my $col (@{Config(\%ARGS,'QueueListingCols')}) {
-<TD><& TicketCell , Ticket=>$Ticket, Column=>$col &></TD>
-%}
-</TR>
-%}
-
-
-
-</TABLE>
-
-<div align=center>
-<font size=2>
-<a href="Listing.html?GotoPage=1">First page</a>
-&nbsp;&nbsp;
-<a href="Listing.html?GotoPage=Prev">&lt;Previous page</a>
-&nbsp;&nbsp;
-<a href="Listing.html?GotoPage=Next">Next page&gt;</a>
-%#&nbsp;&nbsp;<form method=get action="Listing.html">Goto page <input name=GotoPage size=2></form>
-</font>
-</div>
-% if ($session{'tickets'}->Count()) {
-<div align=right>
-<a href="Bulk.html">Update all these tickets at once</a>
-</div>
-% }
-<HR>
-
-% } #endif {$ARGS{'Action'} eq 'Refine')
-<TABLE WIDTH="100%">
-<TR>
-<TD VALIGN="TOP">
-<& /Elements/TitleBoxStart, title => 'Search Criteria'&>
-
-<A HREF="<% $RT::WebPath%>/Search/Listing.html?ClearRestrictions=1">New search</a><br>
-<A HREF="<% $RT::WebPath%>/Search/Listing.html?Bookmark=<%$session{'tickets'}->FreezeLimits()|u%>&TicketsSortBy=<%$session{'tickets_sort_by'}%>&TicketsSortOrder=<%$session{'tickets_sort_order'}%>&RowsPerPage=<%$session{'tickets_rows_per_page'}%>">Bookmarkable URL for this search</a>
-<BR>
-<BR>
-% my %restrictions=$session{'tickets'}->DescribeRestrictions();
-% my %seen_restrictions=();
-% foreach $row (keys %restrictions){
-% my $tmp=$restrictions{"$row"};
-% if( ! defined( $seen_restrictions{"$tmp"} ) ){
-<%$restrictions{"$row"}%> <A HREF="<% $RT::WebPath%>/Search/Listing.html?DeleteRestriction=<%$row%>">[delete]</a><br>
-% } else {
-% $session{'tickets'}->DeleteRestriction($row);
-<b>Deleted Duplicate Restriction <i><%$tmp%></i></b><br>
-% }
-% $seen_restrictions{"$tmp"}++;
-%}
-<& /Elements/TitleBoxEnd&>
-</TD>
-<TD>
-
-<& PickRestriction &>
-
-</TD>
-</TR>
-</TABLE>
-
-<%INIT>
-
-my $bgcolor;
-require RT::Interface::Web;
-
-$session{'i'}++;
-if ($session{'tickets'}) {
- if ( ($ARGS{'ClearRestrictions'}) ||
- ($ARGS{'NewSearch'}) ) {
- $session{'tickets'}->ClearRestrictions;
- }
-
- if ($ARGS{'DeleteRestriction'}) {
- $session{'tickets'}->DeleteRestriction($ARGS{'DeleteRestriction'});
- }
-}
-&ProcessSearchQuery(ARGS=>\%ARGS);
-
-my $row;
-
-</%INIT>
diff --git a/rt/webrt/Search/PickRestriction b/rt/webrt/Search/PickRestriction
deleted file mode 100755
index 82f576c1f..000000000
--- a/rt/webrt/Search/PickRestriction
+++ /dev/null
@@ -1,112 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/PickRestriction,v 1.1 2002-08-12 06:17:09 ivan Exp $
-<FORM ACTION="Listing.html" METHOD="GET">
-<INPUT TYPE=HIDDEN NAME="Bookmark" VALUE="<% $session{'tickets'}->FreezeLimits()|u %>">
-<& /Elements/TitleBoxStart, title => 'Refine Search'&>
-<INPUT TYPE=HIDDEN NAME="CompileRestriction" VALUE=1>
-
-<ul>
-<li>Owner is <& /Elements/SelectBoolean, Name => "OwnerOp",
- TrueVal=> '=',
- FalseVal => '!='
-&>
-<& /Elements/SelectOwner, Name => "ValueOfOwner" &>
-
-<li>
-Requestor email address
-<& /Elements/SelectMatch, Name => "RequestorOp" &>
-<INPUT Name="ValueOfRequestor" SIZE=20>
-
-<li>
-Subject <& /Elements/SelectMatch, Name => "SubjectOp" &>
-<INPUT Name="ValueOfSubject" SIZE=20>
-
-<li>Queue <& /Elements/SelectBoolean, Name => "QueueOp" ,
- True => "is",
- False => "isn't",
- TrueVal=> '=',
- FalseVal => '!=' &>
-<& /Elements/SelectQueue, Name => "ValueOfQueue" &>
-
-
-<li>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>Ticket content
-<& /Elements/SelectBoolean, Name => "ContentOp",
- True => "matches",
- False => "does not match",
- TrueVal => 'LIKE',
- FalseVal => 'NOT LIKE'
-&>
-<Input Name="ValueOfContent" Size=20>
-
-<li>Status
-<& /Elements/SelectBoolean, Name => "StatusOp",
- True => "is",
- False => "isn't",
- TrueVal=> '=',
- FalseVal => '!='
-&>
-<& /Elements/SelectStatus, Name => "ValueOfStatus" &>
-
-% while ( my $KeywordSelect = $KeywordSelects->Next ) {
-
-<li><% $KeywordSelect->Name %>
- <& /Elements/SelectBoolean, Name => "KeywordSelectOp". $KeywordSelect->id,
- True => "is", False => "isn't",
- TrueVal=> '=', FalseVal => '!=' &>
-
-<& /Elements/SelectKeyword, Name => "KeywordSelect".$KeywordSelect->id,
- KeywordObj => $KeywordSelect->KeywordObj
- &>
-% }
-
-</UL>
-
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/TitleBoxStart, title => 'Ordering and sorting'&>
-
-<UL>
-
-<li>Results per page <& /Elements/SelectResultsPerPage, Name => "RowsPerPage",
- Default => $session{'tickets_rows_per_page'} || '50'
-&>
-
-<li>Sort results by <& /Elements/SelectTicketSortBy, Name => "TicketsSortBy",
- Default => $session{'tickets_sort_by'}
-&>
-<& /Elements/SelectSortOrder, Name => 'TicketsSortOrder', Default => $session{'tickets_sort_order'} &>
-
-<li> <& /Elements/Refresh, Name => 'RefreshSearchInterval' , Default => $session{'tickets_refresh_interval'} &>
-
-
-</UL>
-
-
-</DIV>
-
-
-
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/Submit, Label => 'Show Results', AlternateLabel => 'Refine', Name => 'Action'&>
-
-</FORM>
-
-
- <%INIT>
- my $KeywordSelects = new RT::KeywordSelects $session{'CurrentUser'};
- foreach ( $session{'tickets'}->RestrictionValues('Queue') ) {
- $KeywordSelects->LimitToQueue($_);
- }
-
- $KeywordSelects->IncludeGlobals;
-</%INIT>
diff --git a/rt/webrt/Search/RestrictSearch.html b/rt/webrt/Search/RestrictSearch.html
deleted file mode 100755
index 977308e3b..000000000
--- a/rt/webrt/Search/RestrictSearch.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<& /Elements/Header, Title=>"Compile Restrictions" &>
-<& /Elements/Tabs &>
-<& PickRestriction &>
diff --git a/rt/webrt/Search/TicketCell b/rt/webrt/Search/TicketCell
deleted file mode 100644
index aaded88e9..000000000
--- a/rt/webrt/Search/TicketCell
+++ /dev/null
@@ -1,28 +0,0 @@
-%#$Header: /home/cvs/cvsroot/freeside/rt/webrt/Search/Attic/TicketCell,v 1.1 2002-08-12 06:17:09 ivan Exp $
-<% $link |n%><%$Column->{Constant} || eval("\$Ticket->$Column->{TicketAttribute}") || "-" %><% $endlink|n %>
-<%INIT>
-
-my $link = "";
-my $endlink = "";
-if ($Column->{TicketLink}) {
- $link = "<A HREF=\"";
- if ($Column->{TicketLink} == 1 ) {
- $link .= "../Ticket/Display.html?";
- }
- else {
- $link .= $Column->{TicketLink};
- }
-
- $link .= "id=".$Ticket->Id . $Column->{ExtraLinks};
-
- if ($session{NewWindowOption}) {
- $link .= "TARGET=\"TicketDisplay".$session{AlwaysNewWindowOption} && (time() . rand(1024))."\" ";
- }
- $link .= "\">";
- $endlink = "</a>";
-}
-</%INIT>
-<%ARGS>
-$Ticket => undef
-$Column => undef
-</%ARGS>
diff --git a/rt/webrt/SelfService/Attachment/dhandler b/rt/webrt/SelfService/Attachment/dhandler
deleted file mode 100644
index 0d646cc0b..000000000
--- a/rt/webrt/SelfService/Attachment/dhandler
+++ /dev/null
@@ -1,27 +0,0 @@
-<%perl>
- my ($ticket, $trans,$attach, $filename);
- my $arg = $m->dhandler_arg; # get rest of path
- if ($arg =~ '^(\d+)/(\d+)') {
- $trans = $1;
- $attach = $2;
- }
- else {
- Abort("Corrupted attachment URL.");
- }
- my $AttachmentObj = new RT::Attachment($session{'CurrentUser'});
- $AttachmentObj->Load($attach) || Abort("Attachment '$attach' could not be loaded");
-
-
- unless ($AttachmentObj->id) {
- Abort("Bad attachment id. Couldn't find attachment '$attach'\n");
- }
- unless ($AttachmentObj->TransactionId() == $trans ) {
- Abort("Bad transaction number for attachment. $trans should be".$AttachmentObj->TransactionId() ."\n");
-
- }
- my $content_type = $AttachmentObj->ContentType || 'text/plain';
- SetContentType($content_type);
- $m->out($AttachmentObj->Content);
- $m->abort;
-</%perl>
-
diff --git a/rt/webrt/SelfService/Closed.html b/rt/webrt/SelfService/Closed.html
deleted file mode 100644
index a35936092..000000000
--- a/rt/webrt/SelfService/Closed.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<& /SelfService/Elements/Header, title => 'RT Self Service / Closed Tickets' &>
-
-<& /SelfService/Elements/MyRequests, status => ['resolved'], friendly_status =>
-'closed' &>
diff --git a/rt/webrt/SelfService/Create.html b/rt/webrt/SelfService/Create.html
deleted file mode 100755
index 60110cb5a..000000000
--- a/rt/webrt/SelfService/Create.html
+++ /dev/null
@@ -1,63 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/SelfService/Attic/Create.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-
-<& Elements/Header, Title => "Create a request" &>
-
-
-<FORM ACTION="Display.html" METHOD="POST" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
-<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => "Create a new ticket" &>
-
-<TABLE>
-<TR>
-<TD>
-Queue:
-</TD>
-<TD>
-<& /Elements/SelectNewTicketQueue, Verbose => 'True' &>
-</TD>
-</TR>
-<TR>
-<TD>
-Requestors:
-</TD>
-<TD>
-<INPUT Name="Requestors" Value="<%$session{CurrentUser}->EmailAddress%>" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD>
-Cc:
-</TD>
-<TD>
- <INPUT NAME="Cc" SIZE=20>
-</TD>
-</TR>
-<TR>
-<TD>
-Subject:
-</TD>
-<TD>
-<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="">
-</TD>
-</TR>
-<TR>
-<TD>
-Attach file:
-</TD>
-<TD>
-<INPUT Name="Attach" type=file>
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=2>
-Describe the issue below:<br>
-<& /Elements/MessageBox &>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => "Create ticket"&>
-
-
-</FORM>
diff --git a/rt/webrt/SelfService/Display.html b/rt/webrt/SelfService/Display.html
deleted file mode 100755
index 2d44f148e..000000000
--- a/rt/webrt/SelfService/Display.html
+++ /dev/null
@@ -1,190 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/SelfService/Attic/Display.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2001 Jesse Vincent <jesse@fsck.com>
-
-<& /SelfService/Elements/Header, Title => 'Display ticket #'.$Ticket->id &>
-
-
-<& /Elements/ListActions, actions => \@results &>
-
-<TABLE>
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Ticket Id
- </TD>
- <TD>
- <%$Ticket->Id%>
- </TD>
- </TR>
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Requestors
- </TD>
- <TD>
- <%$Ticket->RequestorsAsString%>
- </TD>
- </TR>
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Cc
- </TD>
- <TD>
- <%$Ticket->CcAsString%>
- </TD>
- </TR>
-
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Status
- </TD>
- <TD>
- <%$Ticket->Status%>
- </TD>
- </TR>
-
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Queue
- </TD>
- <TD>
- <%$Ticket->QueueObj->Name%> (<%$Ticket->QueueObj->Description%>)
- </TD>
- </TR>
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Priority
- </TD>
- <TD>
- <%$Ticket->Priority %>
- </TD>
- </TR>
-
-% if ($Ticket->TimeWorked) {
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- Worked
- </TD>
- <TD>
- <%$Ticket->TimeWorked %> minutes
- </TD>
- </TR>
-% }
-
-% my $selects = $Ticket->QueueObj->KeywordSelects;
-% while (my $select = $selects->Next) {
- <TR>
- <TD VALIGN=TOP WIDTH="20%" ALIGN=RIGHT>
- <%$select->Name%>
- </TD>
- <TD>
-% my $object_keywords = $Ticket->KeywordsObj($select->id);
-% while (my $keyword = $object_keywords->Next) {
- <%$keyword->KeywordObj->RelativePath($select->KeywordObj)%>
-% }
-%}
- </TD>
- </TR>
-
-
-
-
- </TABLE>
-<TABLE BORDER=0 CELLSPACING=0>
-% my ($i);
-%while (my $Transaction = $Transactions->Next) {
-% $i++;
-% if ($Transactions->IsLast) {
- <a name="lasttrans"></a>
-% }
- <& /Ticket/Elements/ShowTransaction, Transaction => $Transaction,
- RowNum => $i,
- Ticket => $Ticket &>
-
-%}
-</TABLE>
-
-
-<%INIT>
-
-my ($field, @results);
-
-# {{{ Load the ticket
-#If we get handed two ids, mason will make them an array. bleck.
-# We want teh first one. Just because there's no other sensible way
-# to deal
-my @id = (ref $id eq 'ARRAY') ? @{$id} : ($id);
-
-
-my $Ticket = new RT::Ticket($session{'CurrentUser'});
-if ($id[0] eq 'new') {
- # {{{ Create a new ticket
-
- my $Queue = new RT::Queue($session{'CurrentUser'});
- unless ($Queue->Load($ARGS{'Queue'})) {
- $m->comp('Error.html', Why => 'Queue not found');
- $m->abort;
- }
-
- unless ($Queue->CurrentUserHasRight('CreateTicket')) {
- $m->comp('Error.html', Why => 'You have no permission to create tickets in that queue.');
- $m->abort;
- }
-
- my @Requestors = split(/,/,$ARGS{'Requestors'});
- my @Cc = split(/,/,$ARGS{'Cc'});
-
-
- my $MIMEObj = MakeMIMEEntity ( Subject => $ARGS{'Subject'},
- From => $ARGS{'From'},
- Cc => $ARGS{'Cc'},
- Body => $ARGS{'Content'},
- AttachmentFieldName => 'Attach');
-
- #TODO in Create_Details.html: priorities and due-date
- my ($id, $Trans, $ErrMsg)= $Ticket->Create(Queue=>$ARGS{Queue},
- Requestor=> \@Requestors,
- Cc => \@Cc,
- Subject=>$ARGS{Subject},
- MIMEObj => $MIMEObj
- );
- unless ($id && $Trans) {
- $m->comp('Error.html', Why => $ErrMsg);
- $m->abort();
- }
-
- push(@results, $ErrMsg);
-
- # }}}
-}
-else {
- unless ($Ticket->Load($id[0])) {
- $m->comp('Error.html', Why =>"Couldn't load ticket '$id'");
- $m->abort();
- }
-}
-# }}}
-
-unless ($session{'CurrentUser'}->HasQueueRight ( TicketObj => $Ticket,
- Right => 'ShowTicket')) {
- $m->comp('Error.html', Why => "No permission to display that ticket");
- $m->abort();
-}
-
-my ($code, $msg);
-
-#Update the status
-if ((defined $ARGS{'Status'}) and
- ($ARGS{'Status'} ne $Ticket->Status)) {
- ($code, $msg) = $Ticket->SetStatus($ARGS{'Status'});
- push @results, "$msg";
-}
-
-ProcessUpdateMessage(ARGSRef=>\%ARGS, Actions=>\@results, TicketObj=>$Ticket);
-
-my $Transactions = $Ticket->Transactions;
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/SelfService/Elements/GotoTicket b/rt/webrt/SelfService/Elements/GotoTicket
deleted file mode 100755
index 0c0c8b67a..000000000
--- a/rt/webrt/SelfService/Elements/GotoTicket
+++ /dev/null
@@ -1 +0,0 @@
-<FORM ACTION="<%$RT::WebPath%>/SelfService/Display.html"><input type=submit value="Goto ticket">&nbsp;<input size=4 name=id></FORM>
diff --git a/rt/webrt/SelfService/Elements/Header b/rt/webrt/SelfService/Elements/Header
deleted file mode 100755
index ecf58f461..000000000
--- a/rt/webrt/SelfService/Elements/Header
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
-<HTML>
-<HEAD>
-<TITLE><%$Title%></TITLE>
-% if ($Code) {
-<META NAME="HTTP-EQUIV" VALUE="<%$Code%> <%$Why%>">
-% }
-
-<link rel="stylesheet" href="<%$RT::WebPath%>/NoAuth/webrt.css" type="text/css">
-</HEAD>
-<BODY BGCOLOR="<%$BgColor%>">
-<TABLE BORDER=0 WIDTH=100% CELLSPACING=0 BGCOLOR="#993333">
-<TR VALIGN=TOP>
-<TD WIDTH=32>
- <IMG SRC="<%$RT::LogoURL%>" alt="RT">
-</TD>
-<TD VALIGN=CENTER ALIGN=LEFT>
-<font size=+2 color=#ffffff>
-<B>
-<%$Title%>
-</B>
-</font>
-</TD>
-<TD ALIGN=RIGHT>
-<font color="#ffffff">
-% if ($session{'CurrentUser'} ) {
-Signed in as <b><%$session{'CurrentUser'}->Name%></b>.<BR>
-% if ($session{'CurrentUser'}->HasSystemRight('ModifySelf')) {
-[<A class='inverse' HREF="<%$RT::WebPath%>/SelfService/Prefs.html" >Preferences</A>]
-% }
-% unless ($RT::WebExternalAuth) {
- [<A class='inverse' HREF="<%$RT::WebPath%>/NoAuth/Logout.html">Logout</a>]
-% }
-% } else {
-Not logged in.
-% }
-</font>
-</TD>
-</TR>
-</TABLE>
-
-<BR>
-<& /SelfService/Elements/Tabs &>
-
-<%ARGS>
-$Title => ''
-$Code => undef
-$Why => undef
-$BgColor => '#ffffff'
-</%ARGS>
-<%INIT>
-$Title = "RT/$RT::rtname: ".$Title;
-</%INIT>
-
diff --git a/rt/webrt/SelfService/Elements/MyRequests b/rt/webrt/SelfService/Elements/MyRequests
deleted file mode 100644
index ce268d58d..000000000
--- a/rt/webrt/SelfService/Elements/MyRequests
+++ /dev/null
@@ -1,41 +0,0 @@
-<& /Elements/TitleBoxStart, title => "Your $friendly_status requests" &>
-<TABLE BORDER=0 cellspacing=1 cellpadding=1 BGCOLOR="#eeeeee" WIDTH=100%>
-<TR>
-<TH>Subject</TH>
-<TH>Status</TH>
-<TH>Owner</TH>
-<TH>&nbsp;</TH>
-</TR>
-<TR>
-% while (my $Ticket = $MyTickets->Next) {
-<TR>
-<TD>
-<%$Ticket->Id%>: <%$Ticket->Subject%>
-</TD>
-<TD>
-<%$Ticket->Status%>
-</TD><TD>
-<%$Ticket->OwnerObj->Name%>
-</TD><TD ALIGN=RIGHT>
-[<A HREF="<% $RT::WebPath %>/SelfService/Display.html?id=<%$Ticket->Id%>">Details</A>]
-</TD>
-</TR>
-% }
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-
-<%INIT>
-my $MyTickets;
-$MyTickets = new RT::Tickets ($session{'CurrentUser'});
-$MyTickets->LimitRequestor(VALUE => $session{'CurrentUser'}->EmailAddress);
-
-foreach my $status (@status) {
-
- $MyTickets->LimitStatus(VALUE => $status);
-}
-</%INIT>
-<%ARGS>
-$friendly_status => 'open'
-@status => ('open', 'new', 'stalled')
-</%ARGS>
diff --git a/rt/webrt/SelfService/Elements/Tabs b/rt/webrt/SelfService/Elements/Tabs
deleted file mode 100644
index d689d8a72..000000000
--- a/rt/webrt/SelfService/Elements/Tabs
+++ /dev/null
@@ -1,49 +0,0 @@
-<TABLE WIDTH=100%>
-<TR>
-% foreach $tab (sort keys %{$tabs}) {
-<TD ALIGN=CENTER>
-[<A HREF="<%$RT::WebPath%>/<% $tabs->{"$tab"}->{'path'}%>"><% $tabs->{"$tab"}->{'title'}%></A>]
-</TD>
-%}
-
-% if ($actions) {
-
-<TD ALIGN=RIGHT>
-<TABLE><TR>
-% foreach my $action (sort keys %{$actions}) {
-<TD>
-<FONT SIZE=-1>
-% if ($actions->{"$action"}->{'html'}) {
-<%$actions->{"$action"}->{'html'} |n%>
-% } else {
-<A HREF="<%$RT::WebPath%>/<% $actions->{$action}->{'path'}%>"><% $actions->{$action}->{'title'}%></A>
-% }
-</FONT>
-</TD>
-% }
-</TR>
-</TABLE>
-</TD>
-%}
-</TR>
-</TABLE>
-<hr>
-<%INIT>
-my ($tab);
-my $tabs = { A => { title => 'Open requests',
- path => 'SelfService/',
- },
- B => { title => 'Closed requests',
- path => 'SelfService/Closed.html',
- },
- C => { title => 'New request',
- path => 'SelfService/Create.html'
- }
- };
-my $actions = {
- B => { html => $m->scomp('GotoTicket')
- }
- };
-</%INIT>
-
-
diff --git a/rt/webrt/SelfService/Error.html b/rt/webrt/SelfService/Error.html
deleted file mode 100755
index 19b79e68b..000000000
--- a/rt/webrt/SelfService/Error.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<& /SelfService/Elements/Header, Title => 'Error' &>
-<& /Elements/TitleBoxStart, title => $Title &>
-<%$Why%>
-<br>
-<font size=-1>
-<%$Details%>
-</font>
-<& /Elements/TitleBoxEnd &>
-</body>
-</HTML>
-
-
-<%args>
-$Code => undef
-$Details => undef
-$Title => "RT Error"
-$Why => "the calling component did not specify why"
-</%args>
-
-<%INIT>
-$RT::Logger->error("WebRT: $Why ($Details)");
-</%INIT>
diff --git a/rt/webrt/SelfService/Prefs.html b/rt/webrt/SelfService/Prefs.html
deleted file mode 100755
index 9c614e9fd..000000000
--- a/rt/webrt/SelfService/Prefs.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<& /SelfService/Elements/Header, title => 'Preferences' &>
-
-<& /Elements/ListActions, actions => \@results &>
-<form method=post>
-
-% unless ($RT::WebExternalAuth) {
-<& /Elements/TitleBoxStart, title => 'Change password' &>
-New password: <input type=password name="NewPass1" size=16>
-Confirm: <input type=password name="NewPass2" size=16>
-<& /Elements/TitleBoxEnd &>
-<BR>
-% }
-<& /Elements/TitleBoxStart, title => 'Signature' &>
-
-<TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $session{'CurrentUser'}->UserObj->Signature %></TEXTAREA>
-<br>
-<BR>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
- </form>
-
-
-<%INIT>
-my @results;
-
-if ($NewPass1) {
- if ($NewPass1 ne $NewPass2) {
- push (@results, "Passwords did not match.");
- }
- else {
- my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetPassword($NewPass1);
- push (@results, "Password: ".$msg);
- }
-}
-if ($Signature) {
- $Signature =~ s/(\r\n|\r)/\n/g;
- if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
- my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
- push (@results, "Signature: ".$msg);
- }
-}
-#A hack to make sure that session gets rewritten.
-
-$session{'i'}++;
-</%INIT>
-
-<%ARGS>
-$Signature => undef
-$NewPass1 => undef
-$NewPass2 => undef
-</%ARGS>
diff --git a/rt/webrt/SelfService/Update.html b/rt/webrt/SelfService/Update.html
deleted file mode 100755
index 17f1618a3..000000000
--- a/rt/webrt/SelfService/Update.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<& /SelfService/Elements/Header, Title => 'Update ticket #'.$Ticket->id &>
-
-
-<FORM ACTION="Display.html" METHOD=POST ENCTYPE="multipart/form-data">
-
-Status:
-<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &>
-<input type=hidden name="UpdateType" value="response">
-
-Subject: <input name="UpdateSubject" size=60 value="Re: <% $Ticket->Subject %>"> <br>
-Attach: <input name="UpdateAttachment" type=file><br>
-<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
- <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
-
-
-<& /Elements/Submit &>
- </FORM>
-
-
-
-<%INIT>
-
-my $Ticket = LoadTicket($id);
-
-my $title = "Update ticket #" . $Ticket->id;
-
-$DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
-
-
-Abort("No permission to view update ticket")
- unless ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
- $Ticket->CurrentUserHasRight('ModifyTicket') );
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Action => undef
-$DefaultStatus => undef
-</%ARGS>
diff --git a/rt/webrt/SelfService/index.html b/rt/webrt/SelfService/index.html
deleted file mode 100644
index a377d8cff..000000000
--- a/rt/webrt/SelfService/index.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<& /SelfService/Elements/Header, title => 'Self Service' &>
-
-<& /SelfService/Elements/MyRequests &>
diff --git a/rt/webrt/Ticket/Attachment/dhandler b/rt/webrt/Ticket/Attachment/dhandler
deleted file mode 100644
index 0d646cc0b..000000000
--- a/rt/webrt/Ticket/Attachment/dhandler
+++ /dev/null
@@ -1,27 +0,0 @@
-<%perl>
- my ($ticket, $trans,$attach, $filename);
- my $arg = $m->dhandler_arg; # get rest of path
- if ($arg =~ '^(\d+)/(\d+)') {
- $trans = $1;
- $attach = $2;
- }
- else {
- Abort("Corrupted attachment URL.");
- }
- my $AttachmentObj = new RT::Attachment($session{'CurrentUser'});
- $AttachmentObj->Load($attach) || Abort("Attachment '$attach' could not be loaded");
-
-
- unless ($AttachmentObj->id) {
- Abort("Bad attachment id. Couldn't find attachment '$attach'\n");
- }
- unless ($AttachmentObj->TransactionId() == $trans ) {
- Abort("Bad transaction number for attachment. $trans should be".$AttachmentObj->TransactionId() ."\n");
-
- }
- my $content_type = $AttachmentObj->ContentType || 'text/plain';
- SetContentType($content_type);
- $m->out($AttachmentObj->Content);
- $m->abort;
-</%perl>
-
diff --git a/rt/webrt/Ticket/Create.html b/rt/webrt/Ticket/Create.html
deleted file mode 100755
index 2c61de03a..000000000
--- a/rt/webrt/Ticket/Create.html
+++ /dev/null
@@ -1,199 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Attic/Create.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<& /Elements/Header, Title => "Create a new ticket" &>
-<& /Elements/Tabs, current_toptab => "Ticket/Create.html" &>
-<FORM ACTION="Display.html" METHOD="POST" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN Name="id" VALUE="new">
-<A NAME="top">
-
-
-[<a class="currenttab">Show basics</a>] [<A HREF="#detail">Show details</a>]
-<BR>
-<& /Elements/TitleBoxStart, contentbg => "#cccccc", title => "Create a new ticket"&>
-<div align=right><input type=submit value="Create"></div>
-<TABLE border=0 cellpadding=0 cellspacing=0>
-<TR><TD>Queue</TD>
-<TD><% $QueueObj->Name %>
-<INPUT TYPE=HIDDEN NAME=Queue Value="<%$QueueObj->Name%>">
-</TD>
-<TD>Status:
-</TD>
-<TD>
-<& /Elements/SelectStatus, Name => "Status", Default=> 'new' &>
-</TD>
-<TD>
-Owner:
-</TD>
-<TD>
-<& /Elements/SelectOwner, Name => "ValueOfOwner", QueueObj => $QueueObj &>
-</TD>
-</TR>
-<TR>
-<TD>
-Requestors:
-</TD>
-<TD COLSPAN=5>
-<INPUT Name="Requestors" Value="<%$session{CurrentUser}->EmailAddress%>" SIZE=40>
-</TD>
-</TR>
-<TR>
-<TD>
-Cc:
-</TD>
-<TD COLSPAN=5>
- <INPUT NAME="Cc" SIZE=40>
-</TD>
-</TR>
-<TR>
-<TD>
-Admin Cc:
-</TD>
-<TD COLSPAN=5>
- <INPUT NAME="AdminCc" SIZE=40>
-</TD>
-</TR>
-<TR>
-<TD>
-Subject:
-</TD>
-<TD COLSPAN=5>
-<INPUT Name="Subject" SIZE=60 MAXSIZE=100 value="">
-</TD>
-</TR>
-<TR>
-<TD>
-Attach file:
-</TD>
-<TD COLSPAN=5>
-<INPUT TYPE=FILE NAME="Attach">
-</TD>
-</TR>
-<TR>
-<TD COLSPAN=6>
-Describe the issue below:<br>
-<& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
-
-<BR>
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT COLSPAN=2>
-</TD>
-</TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => "Create"&>
-
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-
-<A NAME="detail">
- [<A HREF="#top">Show basics</a>] [<a class="currenttab">Show details</a>]
-<BR>
-<TABLE WIDTH="100%" BORDER=0>
-<TR>
-<TD WIDTH="50%" VALIGN=TOP>
-
- <& /Elements/TitleBoxStart, title => 'The Basics',
- title_class=> 'inverse',
- color => "#993333" &>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT>Priority:</TD><TD><input size=3 name="InitialPriority" value="<%$QueueObj->InitialPriority%>"></TD></TR>
-<TR><TD ALIGN=RIGHT>Final Priority:</TD><TD><input size=3 name="FinalPriority" value="<%$QueueObj->FinalPriority%>"></TD></TR>
-<TR><TD ALIGN=RIGHT>Time Worked:</TD><TD><input size=3 name="TimeWorked"></TD></TR>
-<TR><TD ALIGN=RIGHT>Time Left:</TD><TD><input size=3 name="TimeLeft"></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
-<BR>
-
-
- <& /Elements/TitleBoxStart,
- title_class=> 'inverse',
- title => "Keyword Selections", color => "#993300"
- &>
-<TABLE BORDER=0>
-% while ( my $KeywordSelect = $KeywordSelects->Next ) {
-% my $Descendents = $KeywordSelect->KeywordObj->Descendents;
- <TR><TD ALIGN=RIGHT>
- <% $KeywordSelect->Name %></TD><TD>
- <INPUT TYPE="hidden" NAME="KeywordSelectMagic<% $KeywordSelect->id %>" VALUE="1">
- <SELECT NAME="KeywordSelect-<% $KeywordSelect->id %>"
- <% $KeywordSelect->Single ? "" : " MULTIPLE " %> SIZE=5>
-%#
-%# All of this cruft is so we have a 'no keyword' selector for single
-%# keywords that's only selected when there's no value.
-%
-% foreach my $kid ( keys %{$Descendents} ) {
- <OPTION VALUE="<% $kid %>"><% $Descendents->{$kid} %></OPTION>
-% }
-% if ( $KeywordSelect->Single) {
-<OPTION VALUE="" SELECTED>(empty)</OPTION>
-% }
- </SELECT>
- </TD></TR>
-% }
-
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-
-</TD>
-
-<TD VALIGN="TOP">
-<& /Elements/TitleBoxStart, title => "Dates",
- title_class=> 'inverse',
- color => "#663366" &>
-
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT>Starts:</TD><TD><input size=10 name="Starts"></TD></TR>
-<TR><TD ALIGN=RIGHT>Due:</TD><TD><input size=10 name="Due"></TD></TR>
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
-<& /Elements/TitleBoxStart, title => 'Relationships',
- title_class=> 'inverse',
- titleright => '', color=> "#336633" &>
-
-<i>(Enter ticket ids or URLs, seperated with spaces)</i>
-<TABLE BORDER=0>
-<TR><TD ALIGN=RIGHT>Depends on</TD><TD><input size=10 name="new-DependsOn"></TD></TR>
-<TR><TD ALIGN=RIGHT>Depended on by</TD><TD><input size=10 name="DependsOn-new"></TD></TR>
-<TR><TD ALIGN=RIGHT>Parents</TD><TD><input size=10 name="new-MemberOf"></TD></TR>
-<TR><TD ALIGN=RIGHT>Children</TD><TD><input size=10 name="MemberOf-new"></TD></TR>
-<TR><TD ALIGN=RIGHT>Refers to</TD><TD><input size=10 name="new-RefersTo"></TD></TR>
-<TR><TD ALIGN=RIGHT>Referred to by</TD><TD><input size=10 name="RefersTo-new"></TD></TR>
-
-
-</TABLE>
-<& /Elements/TitleBoxEnd &>
-<BR>
-
-</TD>
-</TR>
-</TABLE>
-<& /Elements/Submit, Label => "Create"&>
-</FORM>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
-
-<%INIT>
-my $QueueObj = new RT::Queue($session{'CurrentUser'});
-$QueueObj->Load($Queue) || Abort("Queue could not be loaded.");
-my $KeywordSelects = $QueueObj->KeywordSelects;
-
-</%INIT>
-
-<%ARGS>
-$DependsOn => undef
-$DependedOnBy => undef
-$MemberOf => undef
-$QuoteTransaction => undef
-$Queue => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Display.html b/rt/webrt/Ticket/Display.html
deleted file mode 100755
index cb0dc2501..000000000
--- a/rt/webrt/Ticket/Display.html
+++ /dev/null
@@ -1,152 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Attic/Display.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<& /Elements/Header, Title => "Ticket #".$Ticket->Id ." ".$Ticket->Subject &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket, current_tab => 'Ticket/Display.html?id='.$Ticket->id &>
-
-<& /Elements/ListActions, actions => \@Actions &>
-
-<& /Ticket/Elements/ShowSummary, Ticket => $Ticket &>
-
-
-<BR>
-<& /Ticket/Elements/ShowHistory ,
- Ticket => $Ticket,
- Collapsed => $ARGS{'Collapsed'},
- ShowHeaders => $ARGS{'ShowHeaders'} &>
-
-
-<%ARGS>
-$id => undef
-$Create => undef
-$ShowHeaders => undef
-$Collapsed => undef
-</%ARGS>
-
-<%INIT>
-
-
- my ($linkid, $message, $tid, $Ticket, @Actions);
-
-$Ticket = new RT::Ticket($session{'CurrentUser'});
-
-unless ($id) {
- Abort('No ticket specified');
-}
-
-if ($ARGS{'id'} eq 'new') {
- # {{{ Create a new ticket
-
- my $Queue = new RT::Queue($session{'CurrentUser'});
- unless ($Queue->Load($ARGS{'Queue'})) {
- Abort('Queue not found');
- }
-
- unless ($Queue->CurrentUserHasRight('CreateTicket')) {
- Abort('You have no permission to create tickets in that queue.');
- }
-
- my $due = new RT::Date($session{'CurrentUser'});
- $due->Set(Format => 'unknown', Value => $ARGS{'Due'});
- my $starts = new RT::Date($session{'CurrentUser'});
- $starts->Set(Format => 'unknown', Value => $ARGS{'Starts'});
-
-
- my @Requestors = split(/,/,$ARGS{'Requestors'});
- my @Cc = split(/,/,$ARGS{'Cc'});
- my @AdminCc = split(/,/,$ARGS{'AdminCc'});
-
- my $MIMEObj = MakeMIMEEntity( Subject => $ARGS{'Subject'},
- From => $ARGS{'From'},
- Cc => $ARGS{'Cc'},
- Body => $ARGS{'Content'},
- AttachmentFieldName => 'Attach');
-
-
- my %create_args = (
- Queue=>$ARGS{Queue},
- Owner=>$ARGS{ValueOfOwner},
- InitialPriority=> $ARGS{InitialPriority},
- FinalPriority=> $ARGS{FinalPriority},
- TimeLeft => $ARGS{TimeLeft},
- TimeWorked => $ARGS{TimeWorked},
- Requestor=> \@Requestors,
- Cc => \@Cc,
- AdminCc => \@AdminCc,
- Subject=>$ARGS{Subject},
- Status=>$ARGS{Status},
- Due => $due->ISO,
- Starts => $starts->ISO,
- MIMEObj => $MIMEObj
- );
-
-
- # we need to get any KeywordSelect-<integer> fields into %create_args..
- grep { $_ =~ /^KeywordSelect-/ && {$create_args{$_} = $ARGS{$_}}} %ARGS;
-
- my ($id, $Trans, $ErrMsg)= $Ticket->Create(%create_args);
- unless ($id && $Trans) {
- Abort($ErrMsg);
- }
- my @linktypes = qw( DependsOn MemberOf RefersTo );
-
- 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;
- }
-
- foreach my $luri (split (/ /,$ARGS{"$linktype-new"})) {
- my ($val, $msg) = $Ticket->AddLink( Base => $luri,
- Type => $linktype);
-
- push @Actions, $msg;
- }
- }
- # don't try to change queue to the current queue
- delete $ARGS{'Queue'};
-
- push(@Actions, $ErrMsg);
- unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view newly created ticket #".$Ticket->id.".");
- }
- # }}}
-}
-
-else {
- $Ticket = LoadTicket($ARGS{'id'});
- unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
- }
-
-
-if (defined $ARGS{'Action'}) {
- if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
- my $action = $1;
- my ($res, $msg)=$Ticket->$action();
- push(@Actions, $msg);
- }
-}
- $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
-
- if ($ARGS{'UpdateContent'} &&
- $ARGS{'UpdateContent'} ne '' &&
- $ARGS{'UpdateContent'} ne "-- \n" .
- $session{'CurrentUser'}->UserObj->Signature
- ) {
- ProcessUpdateMessage(ARGSRef=>\%ARGS,
- Actions=>\@Actions,
- TicketObj=>$Ticket);
- }
-#Process status updates
-my @BasicActions = ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$Ticket);
-
-push (@Actions, @BasicActions);
-}
-</%INIT>
-
-
-
-
diff --git a/rt/webrt/Ticket/Elements/AddWatchers b/rt/webrt/Ticket/Elements/AddWatchers
deleted file mode 100755
index 053cff122..000000000
--- a/rt/webrt/Ticket/Elements/AddWatchers
+++ /dev/null
@@ -1,54 +0,0 @@
-<BR>
-<%$msg%><br>
-
-Add new watchers:<br>
-
-<table>
-% if ($Users) {
-<tr><td>
-Type
-</td><td>
-Username
-</td></tr>
-% while (my $u = $Users->Next ) {
-<tr><td><&/Elements/SelectWatcherType, Name => "WatcherTypeUser".$u->Id &></td><td><%$u->Name%> (<%$u->RealName%>)</td></tr>
-% }
-% }
-
-<tr><td>
-Type
-</td><td>
-Email
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail1" &>
-</td><td>
-<input name="WatcherAddressEmail1" size=15>
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail2" &>
-</td><td>
-<input name="WatcherAddressEmail2" size=15>
-</td></tr>
-<tr><td>
-<&/Elements/SelectWatcherType, Name => "WatcherTypeEmail3" &>
-</td><td>
-<input name="WatcherAddressEmail3" size=15>
-</td></tr>
-</table>
-
-<%INIT>
-my ($msg, $Users);
-if ($UserString) {
- $Users = new RT::Users($session{'CurrentUser'});
- $Users->Limit(FIELD => $UserField,
- VALUE => $UserString,
- OPERATOR => $UserOp);
- }
-</%INIT>
-
-<%ARGS>
-$UserField => 'Name'
-$UserOp => '='
-$UserString => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditBasics b/rt/webrt/Ticket/Elements/EditBasics
deleted file mode 100755
index 12142879e..000000000
--- a/rt/webrt/Ticket/Elements/EditBasics
+++ /dev/null
@@ -1,62 +0,0 @@
-<TABLE>
-<TR>
-<TD COLSPAN=6>
- Subject<BR>
- <input name=Subject value="<%$TicketObj->Subject|h%>" SIZE=50>
-</TD>
-</TR>
-<TR>
-<TD>
-<& /Elements/ShadedBox,
- title => 'Status',
- content => $SelectStatus
-&>
-</TD>
-<TD>
-
-<& /Elements/ShadedBox,
- title => 'Time Worked',
- content => "<input name=TimeWorked value=\"".$TicketObj->TimeWorked."\" SIZE=5>"
-&>
-
-</TD>
-<TD>
-<& /Elements/ShadedBox,
- title => 'Time Left',
- content => "<input name=TimeLeft value=\"".$TicketObj->TimeLeft."\" SIZE=5>"
-&>
-</TD>
-<TD>
-<& /Elements/ShadedBox,
- title => 'Priority',
- content => "<input name=Priority value=\"".$TicketObj->Priority."\" SIZE=3>"
-&>
-
-</TD>
-<TD>
-<& /Elements/ShadedBox,
- title => 'Final Priority',
- content => "<input name=FinalPriority value=\"".$TicketObj->FinalPriority."\" SIZE=3>"
-&>
-
-
-</TD>
-<TD>
-<& /Elements/ShadedBox,
- title => 'Queue',
- content => "$SelectQueue"
- &>
-</TD>
-</TR>
-</TABLE>
-
-<%INIT>
-#It's hard to do this inline, so we'll preload the html of the selectstatus in here.
-my $SelectStatus = $m->scomp("/Elements/SelectStatus", Name => 'Status', Default=> $TicketObj->Status);
-my $SelectQueue = $m->scomp("/Elements/SelectQueue", Name => 'Queue', Default =>$TicketObj->QueueObj->Id);
-
-</%INIT>
-<%ARGS>
-
-$TicketObj => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditDates b/rt/webrt/Ticket/Elements/EditDates
deleted file mode 100755
index f04130bde..000000000
--- a/rt/webrt/Ticket/Elements/EditDates
+++ /dev/null
@@ -1,46 +0,0 @@
-<TABLE>
-<TR>
-<TD>
-Starts:
-</TD>
-<TD>
-<& /Elements/SelectDate, menu_prefix => 'Starts', current => 0 &>
- (<% $TicketObj->StartsObj->AsString %>)
-</TD>
-</TR>
-<TR>
-<TD>
-Started:
-</TD>
-<TD>
-<& /Elements/SelectDate, menu_prefix => 'Started', current => 0 &> (<%$TicketObj->StartedObj->AsString %>)
-
-
-
-</TD>
-</TR>
-
-<TR>
-<TD>
-Last Contact:
-</TD>
-<TD>
-<& /Elements/SelectDate, menu_prefix => 'Told', current => 0 &> (<% $TicketObj->ToldObj->AsString %>)
-
-</TD>
-</TR>
-<TR>
-<TD>
-Due:
-</TD>
-<TD>
-
-<& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
-</TD>
-</TR>
-
-</TABLE>
-<%ARGS>
-$TicketObj => undef
-</%ARGS>
-
diff --git a/rt/webrt/Ticket/Elements/EditKeywordSelects b/rt/webrt/Ticket/Elements/EditKeywordSelects
deleted file mode 100644
index 34ade9f25..000000000
--- a/rt/webrt/Ticket/Elements/EditKeywordSelects
+++ /dev/null
@@ -1,45 +0,0 @@
-
-<TABLE>
- <TR>
-% while ( my $KeywordSelect = $KeywordSelects->Next ) {
-% my $CurrentKeywords = $TicketObj->KeywordsObj($KeywordSelect->id);
-% my $Descendents = $KeywordSelect->KeywordObj->Descendents;
- <TD VALIGN=TOP>
- <% $KeywordSelect->Name %>
- <BR>
- <INPUT TYPE="hidden" NAME="KeywordSelectMagic<% $KeywordSelect->id %>" VALUE="1">
- <SELECT NAME="KeywordSelect<% $KeywordSelect->id %>"
- <% $KeywordSelect->Single ? "" : " MULTIPLE " %> SIZE=5>
-%#
-%#
-%# All of this cruft is so we have a 'no keyword' selector for single
-%# keywords that's only selected when there's no value.
-%
-% my $selected_keywords = 0;
-% foreach my $kid ( keys %{$Descendents} ) {
-% my $selected = 0;
-% if ($CurrentKeywords->HasEntry($kid)) { $selected_keywords++; $selected=1;}
- <OPTION VALUE="<% $kid %>"
- <% $selected && 'SELECTED'%>>
- <% $Descendents->{$kid} %>
- </OPTION>
-% }
-% if ( $KeywordSelect->Single) {
-<OPTION VALUE="" <% ($selected_keywords == 0) && 'SELECTED' %> >(empty)</OPTION>
-% }
- </SELECT>
- </TD>
-% }
- </TR>
-
-</TABLE>
-
-
-<%INIT>
-my $KeywordSelects = $TicketObj->QueueObj->KeywordSelects;
-</%INIT>
-
-<%ARGS>
-$TicketObj => undef
-</%ARGS>
-
diff --git a/rt/webrt/Ticket/Elements/EditLinks b/rt/webrt/Ticket/Elements/EditLinks
deleted file mode 100755
index b0296fce1..000000000
--- a/rt/webrt/Ticket/Elements/EditLinks
+++ /dev/null
@@ -1,109 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Elements/Attic/EditLinks,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
-<h3>New Relationships</h3>
-<i>Enter tickets or URIs to link tickets to. Seperate multiple entries with spaces.</i><br>
-<TABLE>
-<TR><TD>Merge into:</TD><TD><input name="<%$Ticket->Id%>-MergeInto"> <i>(only one ticket)</i></TD></TR>
-<TR><TD>Depends on:</TD><TD><input name="<%$Ticket->Id%>-DependsOn"></TD></TR>
-<TR><TD>Depended on by:</TD><TD><input name="DependsOn-<%$Ticket->Id%>"></TD></TR>
-<TR><TD>Parents:</TD><TD><input name="<%$Ticket->Id%>-MemberOf"></TD></TR>
-<TR><TD>Children:</TD><TD> <input name="MemberOf-<%$Ticket->Id%>"></TD></TR>
-<TR><TD>Refers to:</TD><TD><input name="<%$Ticket->Id%>-RefersTo"></TD></TR>
-<TR><TD>Referred to by:</TD><TD> <input name="RefersTo-<%$Ticket->Id%>"></TD></TR>
-</TABLE>
-</TD>
-<TD VALIGN=TOP WIDTH=50%>
-<h3>Current Relationships</h3>
-<i>(Check boxes to delete)</i><br>
-
-Depends on:<BR>
-<UL>
-% while (my $link = $Ticket->DependsOn->Next) {
-% my $member = $link->TargetObj;
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-
-% }
-</UL>
-
-Depended on by:<BR>
-<UL>
-% while (my $link = $Ticket->DependedOnBy->Next) {
-% my $member = $link->BaseObj;
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-% }
-</UL>
-
-Parents:<BR>
-<UL>
-% while (my $link = $Ticket->MemberOf->Next) {
-% my $member = $link->TargetObj;
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-
-% }
-</UL>
-
-Children:<BR>
-<UL>
-% while (my $link = $Ticket->Members->Next) {
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
-% my $member = $link->BaseObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-% }
-</UL>
-
-
-Refers to:<BR>
-<UL>
-% while (my $link = $Ticket->RefersTo->Next) {
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink--<%$link->Type%>-<%$link->Target%>">
-% if ($link->TargetIsLocal) {
-% my $member = $link->TargetObj;
-
-<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->TargetAsHREF%>"><%$link->Target%></A>
-% }
-%}
-</UL>
-
-Referred to by:<BR>
-<UL>
-% while (my $link = $Ticket->ReferredToBy->Next) {
-<LI>
-<INPUT TYPE=CHECKBOX NAME="DeleteLink-<%$link->Base%>-<%$link->Type%>-">
-% if ($link->BaseIsLocal) {
-% 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->BaseAsHREF%>"><%$link->Base%></A>
-%}
-% }
-</UL>
-
-
-</TD>
-</TR>
-</TABLE>
-
-
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditPeople b/rt/webrt/Ticket/Elements/EditPeople
deleted file mode 100755
index 4f69af970..000000000
--- a/rt/webrt/Ticket/Elements/EditPeople
+++ /dev/null
@@ -1,37 +0,0 @@
-
-<TABLE>
-<TR>
-<TD VALIGN=TOP>
-
-<h3>New watchers</h3>
-Find people whose<BR>
-<& /Elements/SelectUsers &>
-<input type=submit name="OnlySearchForPeople" value="Go!">
-
-<& AddWatchers, Ticket => $Ticket, UserString => $UserString,
- UserOp => $UserOp, UserField => $UserField &>
-</TD><TD VALIGN=TOP>
-<h3>Owner</h3>
-Owner: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id &>
-<h3>Current watchers</h3>
-(Check box to delete)<br>
-
-Requestors:
-<& EditWatchers, TicketObj => $Ticket, Type => 'requestors' &>
-
-Cc:
-<& EditWatchers, TicketObj => $Ticket, Type => 'cc' &>
-
-Administrative Cc:
-<& EditWatchers, TicketObj => $Ticket, Type => 'admincc' &>
-
-</TD>
-</TR>
-</TABLE>
-
-<%ARGS>
-$UserField => undef
-$UserOp => undef
-$UserString => undef
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/EditWatchers b/rt/webrt/Ticket/Elements/EditWatchers
deleted file mode 100755
index 00185e8f9..000000000
--- a/rt/webrt/Ticket/Elements/EditWatchers
+++ /dev/null
@@ -1,46 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Elements/Attic/EditWatchers,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<ul>
-
-%# Print out a placeholder if there are none.
-%if ($watchers->Count == 0 ) {
-<li><i>none</i>
-% }
-
-
-%while (my $watcher=$watchers->Next) {
-<li>
-<INPUT TYPE=CHECKBOX NAME="DelWatcher<%$watcher->id%>" UNCHECKED>
-%#If there's a principal backing this user, lets give a link to their
-%# account
-%if ($watcher->IsUser) {
-<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$watcher->OwnerObj->id%>">
-<%$watcher->OwnerObj->RealName%></a>:
-%} else {
-Email address:
-%}
-<i><%$watcher->Email%></i>
-%}
-</ul>
-<%INIT>
-my ($watchers, $watcher, $set);
-if ($Type =~ /^request/i) {
- $watchers = $TicketObj->Requestors;
- }
-elsif ($Type =~ /^admin/i) {
- $watchers = $TicketObj->AdminCc;
- }
-elsif ($Type =~ /^cc/i) {
- $watchers = $TicketObj->Cc;
- }
-else { $watchers = $TicketObj->Watchers;
- }
-</%INIT>
-<%ARGS>
-$TicketObj => undef
-$Type => undef
-</%ARGS>
-
-
-
diff --git a/rt/webrt/Ticket/Elements/ShowBasics b/rt/webrt/Ticket/Elements/ShowBasics
deleted file mode 100755
index 97c84c9d0..000000000
--- a/rt/webrt/Ticket/Elements/ShowBasics
+++ /dev/null
@@ -1,29 +0,0 @@
- <TABLE WIDTH="100%">
- <TR>
- <TD VALIGN=TOP WIDTH="20%">
- <& /Elements/ShadedBox, title => 'Id' , content => $Ticket->Id &>
- </TD>
- <TD VALIGN=TOP WIDTH="20%"> <& /Elements/ShadedBox, title => 'Status' , content => $Ticket->Status &>
- </TD>
- <TD VALIGN=TOP WIDTH="20%">
- <& /Elements/ShadedBox, title => 'Worked' , content => $TimeWorked ." min" &>
- </TD>
- <TD VALIGN=TOP WIDTH="20%">
- <& /Elements/ShadedBox, title => 'Priority', content=> $Ticket->Priority."/".$Ticket->FinalPriority &>
- </TD>
- <TD VALIGN=TOP WIDTH="20%">
- <& /Elements/ShadedBox, title => 'Queue', content=> $Ticket->QueueObj->Name &>
- </TD>
-
-
- </TR>
- </TABLE>
-<%INIT>
-my $TimeWorked = $Ticket->TimeWorked;
-if ($Ticket->TimeLeft > 0 ) {
- $TimeWorked = $Ticket->TimeWorked."/".$Ticket->TimeLeft;
-}
-</%INIT>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowDates b/rt/webrt/Ticket/Elements/ShowDates
deleted file mode 100755
index e17e31355..000000000
--- a/rt/webrt/Ticket/Elements/ShowDates
+++ /dev/null
@@ -1,54 +0,0 @@
-<TABLE>
-<TR>
-<TD>
-Created:
-</TD>
-<TD>
-<% $Ticket->CreatedObj->AsString %>
-</TD>
-</TR>
-<TR>
-<TD>
-Starts:
-</TD>
-<TD>
-<% $Ticket->StartsObj->AsString %> <BR>
-</TD>
-</TR>
-<TR>
-<TD>
-Started:
-</TD>
-<TD>
-<% $Ticket->StartedObj->AsString %>
-</TD>
-</TR>
-
-<TR>
-<TD>
-<a href="Display.html?id=<%$Ticket->id%>&Action=SetTold">Last Contact</a>:
-</TD>
-<TD>
-<% $Ticket->ToldObj->AsString %>
-</TD>
-</TR>
-<TR>
-<TD>
-Due:
-</TD>
-<TD><% $Ticket->DueObj->AsString %>
-</TD>
-</TR>
-<TR>
-<TD>
-Updated:
-</TD>
-<TD>
-<A HREF="#lasttrans">
-<% $Ticket->LastUpdated ? ($Ticket->LastUpdatedAsString ." by ".$Ticket->LastUpdatedByObj->Name) : "Never" | h %></a>
-</TD>
-</TR>
-</TABLE>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowDependencies b/rt/webrt/Ticket/Elements/ShowDependencies
deleted file mode 100755
index 488652f83..000000000
--- a/rt/webrt/Ticket/Elements/ShowDependencies
+++ /dev/null
@@ -1,18 +0,0 @@
-Depends on:<BR>
-% while (my $Link = $Ticket->DependsOn->Next) {
-% my $member = $Link->TargetObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
- <br>
-% }
-Depended on by:<BR>
-% while (my $Link = $Ticket->DependedOnBy->Next) {
-% my $member = $Link->TargetObj;
-<a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
- <br>
-% }
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowHistory b/rt/webrt/Ticket/Elements/ShowHistory
deleted file mode 100755
index 155eaaabd..000000000
--- a/rt/webrt/Ticket/Elements/ShowHistory
+++ /dev/null
@@ -1,43 +0,0 @@
-<TABLE BORDER=0 width="100%">
-<TR>
-<TD ALIGN=LEFT>
-% if ($ShowTitle) {
-<font size=+3>History</font>
-% }
-&nbsp;</TD>
-<TD align=right><font size=-1>Display mode:
-% if ($ShowHeaders == $Ticket->Id) {
-[<A HREF="<%$URIFile%>?id=<%$Ticket->id%>">Brief headers</a>]
-<b>[Full headers]</b>
-% } else {
-<b>[Brief headers]</b>
-[<A HREF="<%$URIFile%>?ShowHeaders=<%$Ticket->Id%>&id=<%$Ticket->id%>">Full headers</a>]
-% }
-</font>
-</TD>
-</TR>
-</TABLE>
-
-<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=2 BORDER=0>
-% while (my $Transaction = $Transactions->Next) {
-% $i++;
-% if ($Transactions->IsLast) {
- <a name="lasttrans"></a>
-% }
- <& ShowTransaction, Ticket => $Ticket, Transaction => $Transaction, ShowHeaders => $ShowHeaders, Collapsed => $Collapsed, RowNum => $i &>
-% }
-</TABLE>
-<%INIT>
-
-my $Transactions = $Ticket->Transactions;
-my $i;
-
-
-</%INIT>
-<%ARGS>
-$URIFile => 'Display.html'
-$Ticket => undef
-$ShowHeaders => undef
-$Collapsed => undef
-$ShowTitle => 1
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowKeywordSelects b/rt/webrt/Ticket/Elements/ShowKeywordSelects
deleted file mode 100644
index 4f8a1786b..000000000
--- a/rt/webrt/Ticket/Elements/ShowKeywordSelects
+++ /dev/null
@@ -1,26 +0,0 @@
-<TABLE>
-% while ( my $KeywordSelect = $KeywordSelects->Next ) {
- <TR>
- <TD VALIGN=TOP>
- <% $KeywordSelect->Name %><BR>
- </TD>
- <TD VALIGN=TOP>
- <UL>
-% my $Keywords = $Ticket->KeywordsObj($KeywordSelect->Id);
-% while (my $Keyword = $Keywords->Next) {
- <li><% $Keyword->KeywordObj->RelativePath($KeywordSelect->KeywordObj) |n %></li>
-
-% }
- </ul>
- </TD>
- </TR>
-% }
-</TABLE>
-
-<%INIT>
-my $KeywordSelects = $Ticket->QueueObj->KeywordSelects;
-</%INIT>
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowLinks b/rt/webrt/Ticket/Elements/ShowLinks
deleted file mode 100755
index 49795959e..000000000
--- a/rt/webrt/Ticket/Elements/ShowLinks
+++ /dev/null
@@ -1,61 +0,0 @@
-Depends on:<BR>
-<UL>
-% while (my $Link = $Ticket->DependsOn->Next) {
-% my $member = $Link->TargetObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-
-% }
-</UL>
-
-Depended on by:<BR>
-<UL>
-% while (my $Link = $Ticket->DependedOnBy->Next) {
-% my $member = $Link->BaseObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-% }
-</UL>
-Parents:<BR>
-<UL>
-% while (my $Link = $Ticket->MemberOf->Next) {
-% my $member = $Link->TargetObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%>
-[<%$member->Status%>]
-
-% }
-</UL>
-
-Children:<BR>
-<& /Ticket/Elements/ShowMembers, Ticket => $Ticket &>
-<BR>
-Refers to:<BR>
-<UL>
-% while (my $Link = $Ticket->RefersTo->Next) {
-<LI>
-% if ($Link->TargetIsLocal) {
-% my $member = $Link->TargetObj;
-
-<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->TargetAsHREF%>"><%$Link->Target%></A>
-% }
-%}
-</UL>
-
-Referred to by:<BR>
-<UL>
-% while (my $Link = $Ticket->ReferredToBy->Next) {
-<LI>
-% if ($Link->BaseIsLocal) {
-% 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->BaseAsHREF%>"><%$Link->Base%></A>
-%}
-% }
-</UL>
-
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowMemberOf b/rt/webrt/Ticket/Elements/ShowMemberOf
deleted file mode 100755
index df5dc92b0..000000000
--- a/rt/webrt/Ticket/Elements/ShowMemberOf
+++ /dev/null
@@ -1,12 +0,0 @@
-<UL>
-% my $memberof = $Ticket->MemberOf;
-% while (my $member_of = $memberof->Next) {
-<LI><a href="/Ticket/Display.html?id=<%$member_of->Id%>"><%$member_of->Id%></a>: <%$member_of->Subject%> [<%$member_of->Status%>]
-% }
-</UL>
-
-<%INIT>
-</%INIT>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowMembers b/rt/webrt/Ticket/Elements/ShowMembers
deleted file mode 100755
index 0a6f12377..000000000
--- a/rt/webrt/Ticket/Elements/ShowMembers
+++ /dev/null
@@ -1,22 +0,0 @@
-% if ($members->Count) {
-<UL>
-% while (my $link = $members->Next) {
-% my $member= $link->BaseObj;
-<LI><a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: <%$member->Subject%> [<%$member->Status%>]<br>
-% if ($depth < 8) {
-<&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
-% }
-% }
-</UL>
-% }
-
-<%INIT>
-
-my $members = $Ticket->Members;
-
-</%INIT>
-
-<%ARGS>
-$Ticket => undef
-$depth => 1
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowPeople b/rt/webrt/Ticket/Elements/ShowPeople
deleted file mode 100755
index ff35f484d..000000000
--- a/rt/webrt/Ticket/Elements/ShowPeople
+++ /dev/null
@@ -1,12 +0,0 @@
-Owner<BR>
-&nbsp;<B><%$Ticket->OwnerObj->Name%></B><BR>
-Requestors<BR>
-&nbsp;<B><%$Ticket->RequestorsAsString%></B><BR>
-Cc<BR>
-&nbsp;<B><%$Ticket->CcAsString%></B><BR>
-AdminCc<BR>
-&nbsp;<B><%$Ticket->AdminCcAsString%></B>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
-
diff --git a/rt/webrt/Ticket/Elements/ShowReferences b/rt/webrt/Ticket/Elements/ShowReferences
deleted file mode 100755
index 37e2fdece..000000000
--- a/rt/webrt/Ticket/Elements/ShowReferences
+++ /dev/null
@@ -1,27 +0,0 @@
-<UL>
-% while (my $Link = $Ticket->RefersTo->Next) {
-<LI>
-% if ($Link->TargetIsLocal) {
-% my $member = $Link->TargetObj;
-
-<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
-% } else {
-<A HREF="<%$Link->TargetAsHREF%>"><%$Link->Target%></A>
-% }
-%}
-
-
-
-% while (my $Link = $Ticket->ReferredToBy->Next) {
-<LI>
-% if ($Link->BaseIsLocal) {
-% my $member = $Link->BaseObj;
-<a href="/Ticket/Display.html?id=<%$member->Id%>"><%$member->Id%></a>: (<%$member->OwnerObj->Name%>) <%$member->Subject%> [<%$member->Status%>]<br>
-% } else {
-<A HREF="<%$Link->BaseAsHREF%>"><%$Link->Base%></A>
-%}
-% }
-</UL>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowRequestor b/rt/webrt/Ticket/Elements/ShowRequestor
deleted file mode 100644
index fcbe71df1..000000000
--- a/rt/webrt/Ticket/Elements/ShowRequestor
+++ /dev/null
@@ -1,35 +0,0 @@
-<%PERL>
-my $people = $Ticket->Requestors;
-while (my $requestor=$people->Next) {
-if (($requestor->Owner ) && (my $user=$requestor->OwnerObj)) {
-my $name=$user->RealName || $user->EmailAddress;
-my $tickets = new RT::Tickets($session{'CurrentUser'});
-$tickets->LimitRequestor(VALUE => $user->EmailAddress);
-$tickets->LimitStatus( VALUE => 'open');
-$tickets->LimitStatus( VALUE => 'new');
-$tickets->RowsPerPage(25);
-$tickets->OrderBy(FIELD => 'Priority',
- ORDER => 'DESC');
-</%PERL>
-
-% unless ($user->Privileged) {
-<& /Elements/TitleBoxStart,
- title => "<a class='inverse' href=\"$RT::WebPath/Admin/Users/Modify.html?id=".$user->id."\">More about $name</a>" &>
-
-Comments about this user:<BR>
-<B><% ($user->Comments || "No comment entered about this user") %></B><BR>
-
-This user's 25 highest priority tickets:<BR>
-<UL>
-%while (my $w=$tickets->Next) {
-<LI><%$w->Id%>: <a href="<%$RT::WebPath%>/Ticket/Display.html?id=<%$w->id%>"><%$w->Subject%></a> (<%$w->Status%>)
-%}
-</UL>
-<& /Elements/TitleBoxEnd &>
-
-% }
-% }
-%}
-<%ARGS>
-$Ticket=>undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ShowSummary b/rt/webrt/Ticket/Elements/ShowSummary
deleted file mode 100755
index b80ceb4fd..000000000
--- a/rt/webrt/Ticket/Elements/ShowSummary
+++ /dev/null
@@ -1,61 +0,0 @@
- <TABLE WIDTH="100%" >
- <TR>
- <TD VALIGN=TOP >
- <& /Elements/TitleBoxStart, title => 'The Basics',
- title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#993333" &>
- <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
-
- <BR>
-
- <& /Elements/TitleBoxStart,
- title_href =>"$RT::WebPath/Ticket/Modify.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- title => "Keyword Selections", color => "#993300"
- &>
- <& /Ticket/Elements/ShowKeywordSelects, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
-
-
-
- <BR>
- <& /Elements/TitleBoxStart, title => 'Relationships',
- title_href => "$RT::WebPath/Ticket/ModifyLinks.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- titleright => '', color=> "#336633" &>
- <& /Ticket/Elements/ShowLinks, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- </TD>
- <BR>
- <TD VALIGN=TOP >
-
- <& /Elements/TitleBoxStart, title => "Dates",
- title_href =>"$RT::WebPath/Ticket/ModifyDates.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#663366" &>
- <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <BR>
- <& /Elements/TitleBoxStart, title => 'People',
- title_href =>"$RT::WebPath/Ticket/ModifyPeople.html?id=".$Ticket->Id,
- title_class=> 'inverse',
- color => "#333399" &>
- <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
- <& /Elements/TitleBoxEnd &>
- <BR>
-
- <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
-
-
- </TD>
- </TR>
- </TABLE>
-<%ARGS>
-$Ticket => undef
-</%ARGS>
-
-
-
-
diff --git a/rt/webrt/Ticket/Elements/ShowTransaction b/rt/webrt/Ticket/Elements/ShowTransaction
deleted file mode 100755
index a0da008b3..000000000
--- a/rt/webrt/Ticket/Elements/ShowTransaction
+++ /dev/null
@@ -1,162 +0,0 @@
-<TR bgcolor="<%$rowbgcolor%>">
-<TD bgcolor="<%$bgcolor%>"><A NAME="#<%$Transaction->Id%>"></A>&nbsp&nbsp;</TD>
-<TD>&nbsp&nbsp;</TD>
-<TD><font size=-2><% $transdate|n %></font>&nbsp;</TD>
-<TD ALIGN="LEFT"><b><%$Transaction->CreatorObj->Name%> - <%$TicketString%> <%$Transaction->BriefDescription%>
-
-</b></TD>
-<TD><%$TimeTaken%>&nbsp;</TD>
-<TD ALIGN="RIGHT"><font size=-1><%$titlebar_commands|n%></font></TD>
-</TR>
-<%PERL>
-
-unless ($Collapsed) {
- $attachments->GotoFirstItem;
- while (my $message=$attachments->Next) {
- #we don't want to show any empty transactions, unless they have kids
- next unless (length $message->Content || $message->Children->Count);
- my ($headers, $content);
-
- </%PERL>
-
-
-<%PERL>
- if ($message->Parent == 0) {
- if ($ShowHeaders == $Ticket->Id) {
- $headers = $message->Headers;
- } else {
- $headers = $message->NiceHeaders;
- }
- chomp $headers;
- $headers .= "\n\n" if ($headers);
- }
- # 13456 is a random # of about the biggest size we want to see inline text
- my $MAX_INLINE_BODY = 13456;
- if ($message->ContentType =~ m{^(text/plain|message|text$)}i &&
- length($message->Content)< $MAX_INLINE_BODY ) {
-
- $content = $message->Content;
-
- my $wrapper = new Text::Wrapper (columns=>85);
- $content = $wrapper->wrap($content);
- $content =~ s/&/&amp;/g;
- $content =~ s/</&lt;/g;
- $content =~ s/>/&gt;/g;
- $content =~ s!((?:http|https|ftp|mailto):\S*?)([\s"']|&gt;|\.[\n])!<A HREF=\"$1\" TARGET=new>$1</A>$2!g;
-
-
- }
- else {
- $content = "&nbsp;";
- }
-
-</%PERL>
-<TR BGCOLOR="<%$rowbgcolor%>">
- <TD BGCOLOR="<%$bgcolor%>">&nbsp;&nbsp;</TD>
- <TD>&nbsp&nbsp;</TD>
- <TD COLSPAN=3 VALIGN=TOP>
- <PRE>
-<%$headers%><%$content|n%>
-</PRE>
- </TD>
- <TD VALIGN=TOP ALIGN=RIGHT>
-
-% if ($message->Parent == 0 ) {
-<BR>
-% }
-<%PERL>
-my $size = length($message->Content());
-
-if ($size) {
- if ($size > 1024) {
- $size = int($size/102.4)/10 . "k";
- }
- else {
- $size = $size ."b";
- }
-</%PERL>
-<font size=-1><A HREF="Attachment/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename%>">Download <%$message->Filename|| '(untitled)'%></a> <% $size %></font>
-% }
-</TD>
-</TR>
-% }
-% }
-
-
-
-<%ARGS>
-$Ticket => undef
-$Transaction => undef
-$ShowHeaders => undef
-$Collapsed => undef
-$ShowTitleBarCommands => 1
-$RowNum => 1
-</%ARGS>
-
-<%INIT>
-
-
-my ($TimeTaken, $TicketString, $bgcolor, $rowbgcolor);
-
-my $transdate = $Transaction->CreatedAsString();
-$transdate =~ s/\s/&nbsp;/g;
-
-if ($RowNum % 2) {
- $rowbgcolor="#cccccc";
-} else {
- $rowbgcolor="#ffffff";
-}
-
-if ($Transaction->Type =~ /^(Create|Correspond|Comment$)/) {
- if ($Transaction->IsInbound) {
- $bgcolor="#336699";
- }
- else {
- $bgcolor="#339999";
- }
-} elsif (($Transaction->Field =~ /^Owner$/) or
- ($Transaction->Type =~ /^(AddWatcher|DelWatcher)$/)) {
- $bgcolor="#333399";
-
-} elsif ($Transaction->Type =~ /^(AddLink|DeleteLink)$/) {
- $bgcolor="#336633";
-} elsif ($Transaction->Type =~ /^(Status|Set|Keyword|Told)$/) {
- if ($Transaction->Field =~ /^(Told|Starts|Started|Due)$/) {
- $bgcolor="#663366";
- }
- else {
- $bgcolor="#993333";
- }
-}
-else {
- $bgcolor="#cccccc";
-}
-
-if ($Ticket->Id != $Transaction->Ticket) {
- $TicketString = "Ticket ".$Transaction->Ticket .": ";
-}
-
-if ($Transaction->TimeTaken > 0) {
- $TimeTaken = $Transaction->TimeTaken." min"
-}
-my $attachments = $Transaction->Attachments;
-
-my $titlebar_commands='&nbsp;';
-
-# If the transaction has anything attached to it at all
-if ($Transaction->Message->First && $ShowTitleBarCommands) {
- if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) {
- $titlebar_commands .=
- "[<a href=\"Update.html?id=".
- $Transaction->Ticket . "&QuoteTransaction=".$Transaction->Id.
- "&Action=Respond\">Reply</a>]&nbsp;";
- }
- if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) {
- $titlebar_commands .=
- "[<a href=\"Update.html?id=".$Transaction->Ticket.
- "&QuoteTransaction=".$Transaction->Id.
- "&Action=Comment\">Comment</a>]";
- }
-}
-
-</%INIT>
diff --git a/rt/webrt/Ticket/Elements/Tabs b/rt/webrt/Ticket/Elements/Tabs
deleted file mode 100755
index 8cce197de..000000000
--- a/rt/webrt/Ticket/Elements/Tabs
+++ /dev/null
@@ -1,126 +0,0 @@
-<& /Elements/Tabs, tabs => $tabs, actions => $actions, current_tab => $current_tab, tabs_scalar => $tabs_scalar &>
-<%INIT>
-
- my $id = $Ticket->id();
- my $tabs_scalar = '';
- my $tabs = {
- A => { title => 'Display',
- path => "Ticket/Display.html?id=".$id,
- },
-
- Ab => { title => 'History',
- path => "Ticket/History.html?id=".$id,
- },
- B => { title => 'Basics',
- path => "Ticket/Modify.html?id=".$id,
- },
-
- C => { title => 'Dates',
- path => "Ticket/ModifyDates.html?id=".$id,
- },
-
- D => { title => 'People',
- path => "Ticket/ModifyPeople.html?id=".$id,
- },
- E => { title => 'Links',
- path => "Ticket/ModifyLinks.html?id=".$id,
- },
- F => { title => 'Jumbo',
- path => "Ticket/ModifyAll.html?id=".$id,
- },
-
- };
-
-my $actions;
-if ($Ticket->CurrentUserHasRight('ModifyTicket') or
- $Ticket->CurrentUserHasRight('CommentOnTicket')) {
- $actions->{'Comment'} =
- {
- title => 'Comment',
- path => "Ticket/Update.html?Action=Comment&id=".$id,
- }
- };
-
-if ($Ticket->CurrentUserHasRight('ModifyTicket') or
- $Ticket->CurrentUserHasRight('ReplyToTicket')) {
- $actions->{'Reply'} =
- {
- title => 'Reply',
- path => "Ticket/Update.html?Action=Respond&id=".$id,
- }
- };
-
-if ($Ticket->CurrentUserHasRight('OwnTicket')) {
- if ($Ticket->OwnerObj->id == $RT::Nobody->id) {
- $actions->{'Take'} =
- {
- path => "Ticket/Display.html?Action=Take&id=".$id,
- title => 'Take'
- };
- }
- elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id) {
- $actions->{'Steal'} =
- {
- path => "Ticket/Display.html?Action=Steal&id=".$id,
- title => 'Steal'
- };
- }
-}
-
-if ($Ticket->CurrentUserHasRight('ModifyTicket')) {
- if ($Ticket->Status ne 'resolved') {
- $actions->{'Resolve'} =
- {
-
- path => "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=".$id,
- title => 'Resolve'
- };
- }
- if ($Ticket->Status ne 'open') {
- $actions->{'Open'} =
- {
- path => "Ticket/Display.html?Status=open&id=". $id,
- title => 'Open'
- };
- }
-}
-
-
-
-
-if (defined $session{'tickets'}) {
- my $items = $session{'tickets'}->ItemsArrayRef();
- my @indexs = grep(($items->[$_]->id == $Ticket->Id), 0 .. $#{$items});
-
- if ($items->[0]) {
-
- if ($items->[$indexs[0]]->id == $Ticket->Id) {
- # Don't display prev links if we're on the first ticket
- if ( $items->[0]->id != $Ticket->id ) {
- $tabs_scalar .= '[<A HREF="Display.html?id='.
- $items->[0]->id.
- '">&lt;&lt; First</a>] ';
- $tabs_scalar .= '[<A HREF="Display.html?id='.
- $items->[$indexs[0]-1]->id.
- '">&lt; Prev</a>] ';
- }
- # Don't display next links if we're on the last ticket
- if ( $Ticket->id != $items->[-1]->id ) {
- $tabs_scalar .= '[<A HREF="Display.html?id='.
- $items->[$indexs[0]+1]->id.
- '">Next &gt;</a>] ';
- $tabs_scalar .= '[<A HREF="Display.html?id='.
- $items->[-1]->id.
- '">Last &gt;&gt</a>]';
- }
- $tabs_scalar .= "<BR><BR>";
- }
- }
-}
-</%INIT>
-
-
-<%ARGS>
-$Ticket => undef
-$current_tab => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/Elements/ToolBar b/rt/webrt/Ticket/Elements/ToolBar
deleted file mode 100755
index 108e2f784..000000000
--- a/rt/webrt/Ticket/Elements/ToolBar
+++ /dev/null
@@ -1,3 +0,0 @@
-<%ARGS>
-$Ticket => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/History.html b/rt/webrt/Ticket/History.html
deleted file mode 100755
index e0a5fe15a..000000000
--- a/rt/webrt/Ticket/History.html
+++ /dev/null
@@ -1,30 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Attic/History.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<& /Elements/Header, Title => "Ticket History #".$Ticket->Id ." ".$Ticket->Subject &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket, current_tab => 'Ticket/History.html?id='.$Ticket->id &>
-
-<BR>
-
-<& /Ticket/Elements/ShowHistory , Ticket => $Ticket, ShowHeaders => $ARGS{'ShowHeaders'}, URIFile => 'History.html' &>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
-
-<%INIT>
-
-
-
-my $Ticket = LoadTicket ($id);
-
-unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
-}
-
-</%INIT>
-
-
-
-
diff --git a/rt/webrt/Ticket/Modify.html b/rt/webrt/Ticket/Modify.html
deleted file mode 100755
index 7a8a79216..000000000
--- a/rt/webrt/Ticket/Modify.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<& /Elements/Header, Title => 'Modify ticket #'.$TicketObj->Id &>
-<& /Ticket/Elements/Tabs, Ticket => $TicketObj, current_tab => "Ticket/Modify.html?id=".$TicketObj->Id &>
-
-<& /Elements/ListActions, actions => \@results &>
-<FORM METHOD=POST ACTION="Modify.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-
-<& /Elements/TitleBoxStart, title => 'Modify ticket #'.$TicketObj->Id,
- color=> "#993333", width => "100%" &>
-<& Elements/EditBasics, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/TitleBoxStart, title => 'Keywords', color =>"#993333"&>
-<& Elements/EditKeywordSelects, TicketObj=>$TicketObj &>
-<& /Elements/TitleBoxEnd &>
-
-<& /Elements/Submit, Label => 'Save Changes', Caption => "If you've updated anything above, be sure to", color => "#993333" &>
-</form>
-<%INIT>
-
-my $TicketObj = LoadTicket($id);
-
-my @results = ProcessTicketBasics(TicketObj => $TicketObj, ARGSRef => \%ARGS);
-my @okresults = ProcessTicketObjectKeywords(TicketObj => $TicketObj, ARGSRef => \%ARGS);
-
-push (@results, @okresults);
-
-# TODO: display the results, even if we can't display the ticket
-
-unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
-}
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/ModifyAll.html b/rt/webrt/Ticket/ModifyAll.html
deleted file mode 100755
index ad913739d..000000000
--- a/rt/webrt/Ticket/ModifyAll.html
+++ /dev/null
@@ -1,124 +0,0 @@
-<& /Elements/Header, Title => "Ticket #".$Ticket->Id ." Jumbo update: ".$Ticket->Subject &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket , current_tab => "Ticket/ModifyAll.html?id=".$Ticket->Id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM METHOD=POST ACTION="ModifyAll.html" ENCTYPE="multipart/form-data">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
-
-
-<& /Elements/TitleBoxStart, title => 'Modify ticket #'.$Ticket->Id, color=> "#993333", width => "100%" &>
-<& Elements/EditBasics, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
-
-<BR>
-
-<& /Elements/TitleBoxStart, title => 'Dates', width => "100%", color => "#663366" &>
-<& Elements/EditDates, TicketObj => $Ticket &>
-<& /Elements/TitleBoxEnd &>
-
-<BR>
-
-<& /Elements/TitleBoxStart, title => 'Keywords', color =>"#993333"&>
-<& Elements/EditKeywordSelects, TicketObj=>$Ticket &>
-<& /Elements/TitleBoxEnd &>
-
-<BR>
-
-<& /Elements/TitleBoxStart, title => 'People',width => "100%", color=> "#333399" &>
-<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &>
-<& /Elements/TitleBoxEnd &>
-
-<BR>
-
-<& /Elements/TitleBoxStart, title => 'Relationships', color => "#336633"&>
-<& Elements/EditLinks, Ticket => $Ticket &>
-<& /Elements/TitleBoxEnd &>
-
-<BR>
-
-<& /Elements/TitleBoxStart, title => 'Update ticket' &>
-<hr>
-Update Type: <select name="UpdateType">
-% if ($CanComment) {
- <option value="private" >Comments (Not sent to requestors)</option>
-% }
-% if ($CanRespond) {
- <option value="response">Response to requestors</option>
-% }
-</select>
-<br>
-
-Subject: <input name="UpdateSubject" size=60 value=""> <br>
-Attach: <input name="UpdateAttachment" type=file> <br>
-<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
-<& /Elements/TitleBoxEnd &>
-
-
-<& /Elements/Submit, Label => 'Save Changes', Caption => "If you've updated anything above, be sure to", color => "#333399" &>
-</form>
-
-<%INIT>
-
-
-
-my $Ticket = LoadTicket($id);
-
-my $CanRespond = 0;
-my $CanComment = 0;
-
-
-$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
- $Ticket->CurrentUserHasRight('ModifyTicket') );
-
-$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
- $Ticket->CurrentUserHasRight('ModifyTicket') );
-
-
-my (@wresults, @results, @okresults, @dresults, @lresults);
-
-unless ($OnlySearchForPeople) {
- @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
- @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
- @okresults = ProcessTicketObjectKeywords(TicketObj => $Ticket, ARGSRef => \%ARGS);
-
- @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
- @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
-
- $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
-
- if ($ARGS{'UpdateContent'} &&
- $ARGS{'UpdateContent'} ne '' &&
- $ARGS{'UpdateContent'} ne "-- \n" .
- $session{'CurrentUser'}->UserObj->Signature
- ) {
- ProcessUpdateMessage(TicketObj => $Ticket,
- ARGSRef=>\%ARGS,
- Actions=>\@results);
- }
-}
-push @results, @wresults;
-push @results, @dresults;
-push @results, @lresults;
-push @results, @okresults;
-
-# If they've gone and moved the ticket to somewhere they can't see, etc...
-# TODO: display the results, even if we can't display the ticket.
-
-unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
-}
-
-
-</%INIT>
-
-
-
-<%ARGS>
-$OnlySearchForPeople => undef
-$UserField => undef
-$UserOp => undef
-$UserString => undef
-$id => undef
-</%ARGS>
-
diff --git a/rt/webrt/Ticket/ModifyDates.html b/rt/webrt/Ticket/ModifyDates.html
deleted file mode 100755
index b2ecb68fb..000000000
--- a/rt/webrt/Ticket/ModifyDates.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<& /Elements/Header, Title => 'Modify dates for #'. $TicketObj->Id &>
-<& /Ticket/Elements/Tabs, Ticket => $TicketObj, current_tab => "Ticket/ModifyDates.html?id=".$TicketObj->Id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM METHOD=POST ACTION="ModifyDates.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$TicketObj->Id%>">
-<& /Elements/TitleBoxStart, title => 'Modify dates for ticket #'.$TicketObj->Id, width => "100%", color => "#663366" &>
-
-<& Elements/EditDates, TicketObj => $TicketObj &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#663366" &>
-</form>
-
-
-<%INIT>
-
-my $TicketObj = LoadTicket($id);
-my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS);
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/ModifyLinks.html b/rt/webrt/Ticket/ModifyLinks.html
deleted file mode 100755
index 14c939d43..000000000
--- a/rt/webrt/Ticket/ModifyLinks.html
+++ /dev/null
@@ -1,31 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Ticket/Attic/ModifyLinks.html,v 1.1 2002-08-12 06:17:09 ivan Exp $
-%# Copyright 1996-2000 Jesse Vincent <jesse@fsck.com>
-
-<& /Elements/Header, Title => "Link ticket ".$Ticket->Id &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket, current_tab => "Ticket/ModifyLinks.html?id=".$Ticket->Id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<form action="ModifyLinks.html" method="post">
-<input type="hidden" name="id" value="<%$Ticket->id%>">
-
-<& /Elements/TitleBoxStart, title => 'Edit Relationships', color => "#336633"&>
-<& Elements/EditLinks, Ticket => $Ticket &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, color => "#336633", Caption=> 'Save changes' &>
-</form>
-
-
-
-
-<%INIT>
-
-my $Ticket = LoadTicket($id);
-my @results = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
-
-</%INIT>
-
-
-<%ARGS>
-$id => undef
-</%ARGS>
diff --git a/rt/webrt/Ticket/ModifyPeople.html b/rt/webrt/Ticket/ModifyPeople.html
deleted file mode 100755
index fecf09192..000000000
--- a/rt/webrt/Ticket/ModifyPeople.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<& /Elements/Header, Title => 'Modify people related to ticket # ' . $Ticket->id &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket , current_tab => "Ticket/ModifyPeople.html?id=".$Ticket->Id &>
-
-<& /Elements/ListActions, actions => \@results &>
-
-<FORM METHOD=POST ACTION="ModifyPeople.html">
-<INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>">
-<& /Elements/TitleBoxStart, title => 'Modify people related to ticket #'.$Ticket->Id, width => "100%", color=> "#333399" &>
-<& Elements/EditPeople, Ticket => $Ticket, UserField => $UserField, UserString => $UserString, UserOp => $UserOp &>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit, Label => 'Save Changes', Caption => "If you've updated anything above, be sure to", color => "#333399" &>
-</form>
-
-<%INIT>
-
-my (@results, @wresults);
-
-my $Ticket = LoadTicket($id);
-
-# if we're trying to search for watchers and nothing else
-unless ($OnlySearchForPeople) {
- @results = ProcessTicketBasics( TicketObj => $Ticket, ARGSRef => \%ARGS);
- @wresults = ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS);
-}
-
-push @results, @wresults;
-</%INIT>
-
-
-
-<%ARGS>
-$OnlySearchForPeople => undef
-$UserField => undef
-$UserOp => undef
-$UserString => undef
-$id => undef
-</%ARGS>
-
diff --git a/rt/webrt/Ticket/Update.html b/rt/webrt/Ticket/Update.html
deleted file mode 100755
index be2266663..000000000
--- a/rt/webrt/Ticket/Update.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<& /Elements/Header, Title=> $title &>
-<& /Ticket/Elements/Tabs, Ticket => $Ticket &>
-<& /Elements/TitleBoxStart, title => "Update ticket" &>
-
-<FORM ACTION="Display.html" NAME="TicketUpdate"
- METHOD=POST enctype="multipart/form-data">
-
-<TABLE>
-<TR><TD>
-<a href="ModifyPeople.html?id=<%$Ticket->Id%>">Ticket watchers</A></TD><TD align=right>
-Requestor:
-</TD><TD>
-<b><% $Ticket->RequestorsAsString %></b>
-</TD></TR>
-<TR><TD>&nbsp;</TD><TD align=right>
-Cc:
-</TD><TD>
-<b><% $Ticket->CcAsString %></b>
-</TD></TR>
-<TR><TD>&nbsp;</TD><TD align=right>
-AdminCc:
-</TD><TD>
-<b><% $Ticket->AdminCcAsString %></b>
-</TD></TR>
-</TR>
-</TABLE>
-<hr>
-
-<TABLE BORDER=0>
-
-<tr><td align=right>Status:</td>
-<td>
-<& /Elements/SelectStatus, Name=>"Status", Default => $DefaultStatus &>
-Owner:
-<& /Elements/SelectOwner, Name=>"Owner", Default => $Ticket->OwnerObj->Id(), QueueObj => $Ticket->QueueObj, TicketObj => $Ticket &>
-Worked: <input size=4 name="UpdateTimeWorked"> minutes</td></tr>
-<tr><td align=right>Update Type:</td>
-<td><select name="UpdateType">
-% if ($CanComment) {
- <option value="private" <%$CommentDefault%>>Comments (Not sent to requestors)</option>
-% }
-% if ($CanRespond) {
- <option value="response" <%$ResponseDefault%>>Response to requestors</option>
-% }
-</select>
-</td></tr>
-<tr><td align=right>Subject:</td><td> <input name="UpdateSubject" size=60 value="<%$Ticket->Subject()%>"></td></tr>
-<tr><td align=right>Cc:</td><td> <input name="UpdateCc" size=60><BR>
-<i><font size=-2>(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.)</font></i>
-</td></tr>
-<tr><td align=right>Bcc:</td><td> <input name="UpdateBcc" size=60><BR>
-<i><font size=-2>(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.)</font></i>
-</td></tr>
-<tr><td align=right>Attach:</td><td><input name="UpdateAttachment" type="file"></td></tr>
-</table>
-<& /Elements/MessageBox, Name=>"UpdateContent", QuoteTransaction=>$ARGS{QuoteTransaction} &>
- <INPUT TYPE=HIDDEN NAME=id VALUE="<%$Ticket->Id%>"><br>
-
-
-
-
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
- </FORM>
-
-
-
-<%INIT>
-
-my $CanRespond = 0;
-my $CanComment = 0;
-my $title;
-
-my $Ticket = LoadTicket($id);
-
-
-if ($DefaultStatus eq 'resolved') {
- $title = "Resolve";
-} else {
- $title = "Update";
-}
-
-$title .= " ticket #" . $Ticket->id . " (" .$Ticket->Subject.")";
-
-# Things needed in the template - we'll do the processing here, just
-# for the convinience:
-my $CommentDefault=$Action eq "Comment" ? "SELECTED" : "";
-my $ResponseDefault=$Action eq "Respond" ? "SELECTED" : "";
-
-$DefaultStatus = $Ticket->Status() unless ($DefaultStatus);
-
-$CanRespond = 1 if ( $Ticket->CurrentUserHasRight('ReplyToTicket') or
- $Ticket->CurrentUserHasRight('ModifyTicket') );
-
-$CanComment = 1 if ( $Ticket->CurrentUserHasRight('CommentOnTicket') or
- $Ticket->CurrentUserHasRight('ModifyTicket') );
-
-
-
-
-
-</%INIT>
-
-<%ARGS>
-$id => undef
-$Action => undef
-$DefaultStatus => undef
-</%ARGS>
diff --git a/rt/webrt/User/Prefs.html b/rt/webrt/User/Prefs.html
deleted file mode 100755
index d769977f9..000000000
--- a/rt/webrt/User/Prefs.html
+++ /dev/null
@@ -1,53 +0,0 @@
-<& /Elements/Header, Title=>"Preferences" &>
-<& /Elements/Tabs &>
-
-<& /Elements/ListActions, actions => \@results &>
-<form method=post>
-
-% unless ($RT::WebExternalAuth) {
-<& /Elements/TitleBoxStart, title => 'Change password' &>
-New password: <input type=password name="NewPass1" size=16>
-Confirm: <input type=password name="NewPass2" size=16>
-<& /Elements/TitleBoxEnd &>
-<BR>
-% }
-<& /Elements/TitleBoxStart, title => 'Signature' &>
-<INPUT TYPE=HIDDEN NAME="SignatureMagic" VALUE=1>
-<TEXTAREA COLS=72 ROWS=4 WRAP=HARD NAME="Signature"><% $session{'CurrentUser'}->UserObj->Signature %></TEXTAREA>
-<br>
-<BR>
-<& /Elements/TitleBoxEnd &>
-<& /Elements/Submit &>
- </form>
-
-
-<%INIT>
-my @results;
-
-if ($NewPass1) {
- if ($NewPass1 ne $NewPass2) {
- push (@results, "Passwords did not match.");
- }
- else {
- my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetPassword($NewPass1);
- push (@results, "Password: ".$msg);
- }
-}
-if ($Signature || $SignatureMagic) {
- $Signature =~ s/(\r\n|\r)/\n/g;
- if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
- my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
- push (@results, "Signature: ".$msg);
- }
-}
-#A hack to make sure that session gets rewritten.
-
-$session{'i'}++;
-</%INIT>
-
-<%ARGS>
-$Signature => undef
-$SignatureMagic => undef
-$NewPass1 => undef
-$NewPass2 => undef
-</%ARGS>
diff --git a/rt/webrt/autohandler b/rt/webrt/autohandler
deleted file mode 100755
index 16cdbc79b..000000000
--- a/rt/webrt/autohandler
+++ /dev/null
@@ -1,73 +0,0 @@
-%# $Header: /home/cvs/cvsroot/freeside/rt/webrt/Attic/autohandler,v 1.1 2002-08-12 06:17:08 ivan Exp $
-<& /Elements/Footer, %ARGS &>
-
-<%INIT>
-
-$m->{'rt_base_time'} = time;
-
-#if it's a noauth file, don't ask for auth.
-if ($m->base_comp->path =~ '^/+NoAuth/') {
- $m->call_next();
- $m->abort();
-}
-
-# If RT is configured for external auth, let's get REMOTE_USER
-# We intentionally don't test for REMOTE_USER to meet our policy
-elsif ($RT::WebExternalAuth){
-
- $user = $ENV{'REMOTE_USER'};
- $session{'CurrentUser'} = RT::CurrentUser->new();
- $session{'CurrentUser'}->Load($user);
- unless ($session{'CurrentUser'}->id() ) {
- delete $session{'CurrentUser'};
- $m->comp('/Elements/Login', %ARGS, Error=> 'You are not an authorized user');
- $m->abort();
- }
-}
-
-# If the user is loging in, let's authenticate
-elsif (defined ($user) && defined ($pass)){
-
- $session{'CurrentUser'} = RT::CurrentUser->new();
- $session{'CurrentUser'}->Load($user);
- unless ($session{'CurrentUser'}->id() ) {
- delete $session{'CurrentUser'};
- $m->comp('/Elements/Login', %ARGS, Error=> 'Your username or password is incorrect');
- $m->abort();
- };
- unless ($session{'CurrentUser'}->IsPassword($pass)) {
- delete $session{'CurrentUser'};
-
- $m->comp('/Elements/Login', Error => 'Your username or password is incorrect', %ARGS);
- $m->abort();
- }
-}
-
-
-#If we've got credentials, lets serve the file up.
-if ( (defined $session{'CurrentUser'}) and
- ( $session{'CurrentUser'}->Id) ) {
-
- # If the user isn\'t privileged, they can only see SelfService
- if ((! $session{'CurrentUser'}->Privileged) and
- ($m->base_comp->path !~ '^/+SelfService/') ) {
- $m->comp('/SelfService/index.html');
- $m->abort();
- }
- else {
- $m->call_next;
- }
-}
-
-#If we have no credentials
-else {
- $m->comp('/Elements/Login', %ARGS);
- $m->abort();
-}
-
-</%INIT>
-
-<%ARGS>
-$user => undef
-$pass => undef
-</%ARGS>
diff --git a/rt/webrt/index.html b/rt/webrt/index.html
deleted file mode 100644
index 0c1091abb..000000000
--- a/rt/webrt/index.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<& /Elements/Header, Title=>"Start page", Refresh => $session{'home_refresh_interval'} &>
-<& /Elements/Tabs, current_toptab => '' &>
-<TABLE BORDER=0 WIDTH=100%>
-<TR VALIGN=TOP>
-<TD WIDTH=70%>
-<& /Elements/CustomHomepageHeader, %ARGS &>
-<& /Elements/MyTickets &>
-<BR>
-<& /Elements/MyRequests &>
-</TD>
-<TD>
-<& /Elements/Quicksearch &>
-<BR>
-<form method=get action="index.html">
-<& /Elements/Refresh, Name => 'HomeRefreshInterval', Default => $session {'home_refresh_interval'} &>
-<div align=right><input type=submit value="Go!"></div>
-</form>
-</TD>
-</TR>
-</TABLE>
-<%init>
-if ($ARGS{'HomeRefreshInterval'}) {
- $session{'home_refresh_interval'} = $ARGS{'HomeRefreshInterval'};
-}
-</%init>