diff options
Diffstat (limited to 'rt/etc')
-rw-r--r-- | rt/etc/RT_Config.pm | 269 | ||||
-rw-r--r-- | rt/etc/RT_Config.pm.in | 2 | ||||
-rw-r--r-- | rt/etc/RT_SiteConfig.pm | 36 | ||||
-rw-r--r-- | rt/etc/schema.Oracle | 398 | ||||
-rw-r--r-- | rt/etc/upgrade/2.1.71 | 211 |
5 files changed, 277 insertions, 639 deletions
diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm index 5386a8e05..7f7eadcca 100644 --- a/rt/etc/RT_Config.pm +++ b/rt/etc/RT_Config.pm @@ -17,7 +17,7 @@ use RT::Config; # {{{ Base Configuration -# $rtname the string that RT will look for in mail messages to +# $rtname is 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. @@ -26,6 +26,28 @@ use RT::Config; Set($rtname , "example.com"); + +# This regexp controls what subject tags RT recognizes as its own. +# If you're not dealing with historical $rtname values, you'll likely +# never have to enable this feature. +# +# Be VERY CAREFUL with it. Note that it overrides $rtname for subject +# token matching and that you should use only "non-capturing" parenthesis +# grouping. For example: +# +# Set($EmailSubjectTagRegex, qr/(?:example.com|example.org)/i ); +# +# and NOT +# +# Set($EmailSubjectTagRegex, qr/(example.com|example.org)/i ); +# +# This setting would make RT behave exactly as it does without the +# setting enabled. +# +# Set($EmailSubjectTagRegex, qr/\Q$rtname\E/i ); + + + # 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. @@ -42,14 +64,12 @@ Set($Timezone , 'US/Eastern'); # }}} -# }}} - # {{{ Database Configuration # Database driver beeing used. Case matters # Valid types are "mysql", "Oracle" and "Pg" -Set($DatabaseType , 'mysql'); +Set($DatabaseType , 'Pg'); # The domain name of your database server # If you're running mysql and it's on localhost, @@ -62,13 +82,13 @@ Set($DatabaseRTHost , 'localhost'); Set($DatabasePort , ''); #The name of the database user (inside the database) -Set($DatabaseUser , 'rt_user'); +Set($DatabaseUser , 'freeside'); # Password the DatabaseUser should use to access the database -Set($DatabasePassword , 'rt_pass'); +Set($DatabasePassword , ''); # The name of the RT's database on your database server -Set($DatabaseName , 'rt3'); +Set($DatabaseName , 'freeside'); # If you're using Postgres and have compiled in SSL support, # set DatabaseRequireSSL to 1 to turn on SSL communication @@ -89,7 +109,7 @@ Set($OwnerEmail , 'root'); Set($LoopsToRTOwner , 1); -# If $StoreLoopss is defined, RT will record messages that it believes +# If $StoreLoops 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 @@ -106,12 +126,12 @@ Set($StoreLoops , undef); Set($MaxAttachmentSize , 10000000); # $TruncateLongAttachments: if this is set to a non-undef value, -# RT will truncate attachments longer than MaxAttachmentLength. +# RT will truncate attachments longer than MaxAttachmentSize. Set($TruncateLongAttachments , undef); # $DropLongAttachments: if this is set to a non-undef value, -# RT will silently drop attachments longer than MaxAttachmentLength. +# RT will silently drop attachments longer than MaxAttachmentSize. Set($DropLongAttachments , undef); @@ -135,8 +155,12 @@ Set($RTAddressRegexp , '^rt\@example.com$'); # (These values are passed to the CanonicalizeEmailAddress subroutine in RT/User.pm) # By default, that routine performs a s/$Match/$Replace/gi on any address passed to it -Set($CanonicalizeEmailAddressMatch , 'subdomain.example.com$'); -Set($CanonicalizeEmailAddressReplace , 'example.com'); +#Set($CanonicalizeEmailAddressMatch , '@subdomain\.example\.com$'); +#Set($CanonicalizeEmailAddressReplace , '@example.com'); + +# set this to true and the create new user page will use the values that you +# enter in the form but use the function CanonicalizeUserInfo in User_Local.pm +Set($CanonicalizeOnCreate , 0); # If $SenderMustExistInExternalDatabase is true, RT will refuse to # create non-privileged accounts for unknown users if you are using @@ -175,7 +199,7 @@ Set($CommentAddress , 'RT_CommentAddressNotSet'); # 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' +# if you use 'sendmail' rather than 'sendmailpipe' Set($MailCommand , 'sendmailpipe'); @@ -186,6 +210,11 @@ Set($MailCommand , 'sendmailpipe'); # These options are good for most sendmail wrappers and workalikes Set($SendmailArguments , "-oi -t"); +# $SendmailBounceArguments defines what flags to pass to $Sendmail +# assuming RT needs to send an error (ie. bounce). + +Set($SendmailBounceArguments , '-f "<>"'); + # These arguments are good for sendmail brand sendmail 8 and newer #Set($SendmailArguments,"-oi -t -ODeliveryMode=b -OErrorMode=m"); @@ -216,12 +245,23 @@ Set($UseFriendlyToLine , 0); # are WatcherType and TicketId. Set($FriendlyToLineFormat, "\"%s of $RT::rtname Ticket #%s\":;"); -# By default RT doesn't notify the person who performs an update, as they +# By default, RT doesn't notify the person who performs an update, as they # already know what they've done. If you'd like to change this behaviour, # Set $NotifyActor to 1 Set($NotifyActor, 0); +# By default, RT records each message it sends out to its own internal database.# To change this behaviour, set $RecordOutgoingEmail to 0 + +Set($RecordOutgoingEmail, 1); + +# VERP support (http://cr.yp.to/proto/verp.txt) +# uncomment the following two directives to generate envelope senders +# of the form ${VERPPrefix}${originaladdress}@${VERPDomain} +# (i.e. rt-jesse=fsck.com@rt.example.com ) This currently only works +# with sendmail and sendmailppie. +# Set($VERPPrefix, 'rt-'); +# Set($VERPDomain, $RT::Organization); # }}} @@ -247,33 +287,78 @@ Set($LogToFile , undef); Set($LogDir, '/opt/rt3/var/log'); Set($LogToFileNamed , "rt.log"); #log to rt.log +# If true generates stack traces to file log or screen +# never generates traces to syslog + +Set($LogStackTraces , 0); + +# On Solaris or UnixWare, set to ( socket => 'inet' ). Options here +# override any other options RT passes to Log::Dispatch::Syslog. +# Other interesting flags include facility and logopt. (See the +# Log::Dispatch::Syslog documentation for more information.) (Maybe +# ident too, if you have multiple RT installations.) + +@LogToSyslogConf = () unless (@LogToSyslogConf); + +# RT has rudimentary SQL statement logging support if you have +# DBIx-SearchBuilder 1.31_1 or higher; simply set $StatementLog to be +# the level that you wish SQL statements to be logged at. +Set($StatementLog, undef); + # }}} # {{{ Web interface configuration +# This determines the default stylesheet the RT web interface will use. +# RT ships with two valid values by default: +# +# 3.5-default The totally new, default layout for RT 3.5 +# 3.4-compat A 3.4 compatibility stylesheet to make RT 3.5 look +# (mostly) like 3.4 +# +# This value actually specifies a directory in share/html/NoAuth/css/ +# from which RT will try to load the file main.css (which should +# @import any other files the stylesheet needs). This allows you to +# easily and cleanly create your own stylesheets to apply to RT. + +Set($WebDefaultStylesheet, '3.5-default'); + # 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 / +# your server, you should set $WebPath to the path you'll be +# serving RT at. +# $WebPath requires a leading / but no trailing /. +# +# In most cases, you should leave $WebPath set to '' (an empty value). Set($WebPath , ""); +# If we're running as a superuser, run on port 80 +# Otherwise, pick a high port for this user. + +Set($WebPort , 80);# + ($< * 7274) % 32766 + ($< && 1024)); + # This is the Scheme, server and port for constructing urls to webrt # $WebBaseURL doesn't need a trailing / -Set($WebBaseURL , "http://RT::WebBaseURL.not.configured:80"); +Set($WebBaseURL , "http://localhost:$WebPort"); Set($WebURL , $WebBaseURL . $WebPath . "/"); # $WebImagesURL points to the base URL where RT can find its images. -Set($WebImagesURL , $WebURL . "NoAuth/images/"); +Set($WebImagesURL , $WebPath . "/NoAuth/images/"); + +# $LogoURL points to the URL of the RT logo displayed in the web UI -# $RTLogoURL points to the URL of the RT logo displayed in the web UI +Set($LogoURL , $WebImagesURL . "bplogo.gif"); -Set($LogoURL , $WebImagesURL . "rt.jpg"); +# WebNoAuthRegex - What portion of RT's URLspace should not require +# authentication. +Set($WebNoAuthRegex, qr!^/rt(?:/+NoAuth/| + /+REST/\d+\.\d+/NoAuth/)!x ); # For message boxes, set the entry box width and what type of wrapping # to use. @@ -284,11 +369,31 @@ Set($MessageBoxWidth , 72); # Default wrapping: "HARD" (choices "SOFT", "HARD") Set($MessageBoxWrap, "HARD"); +# Support implicit links in WikiText custom fields? A true value +# causes InterCapped or ALLCAPS words in WikiText fields to +# automatically become links to searches for those words. If used on +# RTFM articles, it links to the RTFM article with that name. +Set($WikiImplicitLinks, 0); + # if TrustHTMLAttachments is not defined, we will display them # as text. This prevents malicious HTML and javascript from being # sent in a request (although there is probably more to it than that) Set($TrustHTMLAttachments , undef); +# Should RT redistribute correspondence that it identifies as +# machine generated? A true value will do so; setting this to '0' +# will cause no such messages to be redistributed. +# You can also use 'privileged' (the default), which will redistribute +# only to privileged users. This helps to protect against malformed +# bounces and loops caused by autocreated requestors with bogus addresses. +Set($RedistributeAutoGeneratedMessages, 'privileged'); + +# If PreferRichText is set to a true value, RT will show HTML/Rich text +# messages in preference to their plaintext alternatives. RT "scrubs" the +# html to show only a minimal subset of HTML to avoid possible contamination +# by cross-site-scripting attacks. +Set($PreferRichText, undef); + # If $WebExternalAuth is defined, RT will defer to the environment's # REMOTE_USER variable. @@ -316,32 +421,98 @@ Set($WebExternalAuto , undef); # Set($WebSessionClass , 'Apache::Session::File'); + +# By default, RT's session cookie isn't marked as "secure" Some web browsers +# will treat secure cookies more carefully than non-secure ones, being careful +# not to write them to disk, only send them over an SSL secured connection +# and so on. To enable this behaviour, set # $WebSecureCookies to a true value. +# NOTE: You probably don't want to turn this on _unless_ users are only connecting +# via SSL encrypted HTTP connections. + +Set($WebSecureCookies, 0); + + +# By default, RT clears its database cache after every page view. +# This ensures that you've always got the most current information +# when working in a multi-process (mod_perl or FastCGI) Environment +# Setting $WebFlushDbCacheEveryRequest to '0' will turn this off, +# which will speed RT up a bit, at the expense of a tiny bit of data +# accuracy. + +Set($WebFlushDbCacheEveryRequest, '1'); + + # $MaxInlineBody is the maximum attachment size that we want to see # inline when viewing a transaction. 13456 is a random sane-sounding # default. Set($MaxInlineBody, 13456); -# $MyTicketsLength is the length of the table on the front page. -# For some people, the default of 10 isn't big enough to get a feel for -# how much work needs to be done before you get some time off. +# $DefaultSummaryRows is default number of rows displayed in for search +# results on the frontpage. + +Set($DefaultSummaryRows, 10); + +# By default, RT shows newest transactions at the bottom of the ticket +# history page, if you want see them at the top set this to '0'. + +Set($OldestTransactionsFirst, '1'); + +# By default, RT shows images attached to incoming (and outgoing) ticket updates +# inline. Set this variable to 0 if you'd like to disable that behaviour + +Set($ShowTransactionImages, 1); -Set($MyTicketsLength, 10); + +# $HomepageComponents is an arrayref of allowed components on a user's +# customized homepage ("RT at a glance"). + +Set($HomepageComponents, [qw(QuickCreate Quicksearch MyAdminQueues MySupportQueues MyReminders RefreshHomepage)]); # @MasonParameters is the list of parameters for the constructor of # HTML::Mason's Apache or CGI Handler. This is normally only useful -# for debugging, eg. profiling individual components with -# (preamble => 'my $p = MasonX::Profiler->new($m, $r);'); +# for debugging, eg. profiling individual components with: +# use MasonX::Profiler; # available on CPAN +# @MasonParameters = (preamble => 'my $p = MasonX::Profiler->new($m, $r);'); @MasonParameters = () unless (@MasonParameters); +# $DefaultSearchResultFormat is the default format for RT search results +Set ($DefaultSearchResultFormat, qq{ + '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#', + '<B><A HREF="$RT::WebPath/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject', + Status, + QueueName, + OwnerName, + Priority, + '__NEWLINE__', + '', + '<small>__Requestors__</small>', + '<small>__CreatedRelative__</small>', + '<small>__ToldRelative__</small>', + '<small>__LastUpdatedRelative__</small>', + '<small>__TimeLeft__</small>'}); + +# If $SuppressInlineTextFiles is set to a true value, then uploaded +# text files (text-type attachments with file names) are prevented +# from being displayed in-line when viewing a ticket's history. + +Set($SuppressInlineTextFiles, undef); + +# If $DontSearchFileAttachments is set to a true value, then uploaded +# files (attachments with file names) are not searched during full-content +# ticket searches. + +Set($DontSearchFileAttachments, undef); + + # }}} # {{{ RT UTF-8 Settings # An array that contains languages supported by RT's internationalization -# interface. Defaults to all *.po lexicons; set it to qw(en ja) will make -# RT bilingual instead of multilingual, but will save same memory. +# interface. Defaults to all *.po lexicons; setting it to qw(en ja) will make +# RT bilingual instead of multilingual, but will save some memory. @LexiconLanguages = qw(*) unless (@LexiconLanguages); @@ -371,4 +542,46 @@ Set($AmbiguousDayInPast , 1); # }}} +# {{{ Miscellaneous RT Settings + +# You can define new statuses and even reorder existing statuses here. +# WARNING. DO NOT DELETE ANY OF THE DEFAULT STATUSES. If you do, RT +# will break horribly. The statuses you add must be no longer than +# 10 characters. + +@ActiveStatus = qw(new open stalled) unless @ActiveStatus; +@InactiveStatus = qw(resolved rejected deleted) unless @InactiveStatus; + +# Backward compatability setting. Add/Delete Link used to record one +# transaction and run one scrip. Set this value to 1 if you want +# only one of the link transactions to have scrips run. +Set($LinkTransactionsRun1Scrip , 0); + +# When this feature is enabled an user need ModifyTicket right on both +# tickets to link them together, otherwise he can have right on any of +# two. +Set($StrictLinkACL, 1); + +# }}} + + +# {{{ Development Mode +# +# RT comes with a "Development mode" setting. +# This setting, as a convenience for developers, turns on +# all sorts of development options that you most likely don't want in +# production: +# +# * Turns off Mason's 'static_source' directive. By default, you can't +# edit RT's web ui components on the fly and have RT magically pick up +# your changes. (It's a big performance hit) +# +# * More to come +# + +Set($DevelMode, '0'); + +# }}} + + 1; diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index a451921f0..cf089fb8d 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -357,7 +357,7 @@ Set($LogoURL , $WebImagesURL . "bplogo.gif"); # WebNoAuthRegex - What portion of RT's URLspace should not require # authentication. -Set($WebNoAuthRegex, qr!^(?:/+NoAuth/| +Set($WebNoAuthRegex, qr!^/rt(?:/+NoAuth/| /+REST/\d+\.\d+/NoAuth/)!x ); # For message boxes, set the entry box width and what type of wrapping diff --git a/rt/etc/RT_SiteConfig.pm b/rt/etc/RT_SiteConfig.pm index f5cc2985b..c3d6a66ce 100644 --- a/rt/etc/RT_SiteConfig.pm +++ b/rt/etc/RT_SiteConfig.pm @@ -14,5 +14,39 @@ # # perl -c /path/to/your/etc/RT_SiteConfig.pm -Set( $rtname, 'example.com'); +#Set( $rtname, 'example.com'); + +# These settings should have been inserted by the initial Freeside install. +# Sometimes you may want to change domain, timezone, or freeside::URL later, +# everything else should probably stay untouched. + +$RT::rtname = '%%%RT_DOMAIN%%%'; +$RT::Organization = '%%%RT_DOMAIN%%%'; + +$RT::Timezone = '%%%RT_TIMEZONE%%%'; + +$RT::WebExternalAuth = 1; +$RT::WebFallbackToInternal = 1; #no +$RT::WebExternalAuto = 1; + +$RT::URI::freeside::IntegrationType = 'Internal'; +$RT::URI::freeside::URL = '%%%FREESIDE_URL%%%'; + +$RT::URI::freeside::URL =~ m(^(https?://[^/]+)(/.*)$)i; +$RT::WebBaseURL = $1; +$RT::WebPath = "$2/rt"; + +Set($DatabaseHost , ''); + +# These settings are user-editable. + +#old, RT 3.4 style (deprecated, useless): +#$RT::MyTicketsLength = 10; +#NEW, RT 3.6 style (uncomment to use): +#Set($DefaultSummaryRows, 10); + +$RT::QuickCreateLong = 0; #set to true to cause quick ticket creation to + #redirect to the "long" ticket creation screen + #instead of just creating a ticket with the subject. + 1; diff --git a/rt/etc/schema.Oracle b/rt/etc/schema.Oracle deleted file mode 100644 index 569d80cc4..000000000 --- a/rt/etc/schema.Oracle +++ /dev/null @@ -1,398 +0,0 @@ - -CREATE SEQUENCE ATTACHMENTS_seq; -CREATE TABLE Attachments ( - id NUMBER(11,0) - CONSTRAINT Attachments_Key PRIMARY KEY, - TransactionId NUMBER(11,0) NOT NULL, - Parent NUMBER(11,0) DEFAULT 0 NOT NULL, - MessageId VARCHAR2(160), - Subject VARCHAR2(255), - Filename VARCHAR2(255), - ContentType VARCHAR2(80), - ContentEncoding VARCHAR2(80), - Content CLOB, - Headers CLOB, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE -); -CREATE INDEX Attachments2 ON Attachments (TransactionId); -CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId); - - -CREATE SEQUENCE QUEUES_seq; -CREATE TABLE Queues ( - id NUMBER(11,0) - CONSTRAINT Queues_Key PRIMARY KEY, - Name VARCHAR2(200) CONSTRAINT Queues_Name_Unique UNIQUE NOT NULL, - Description VARCHAR2(255), - CorrespondAddress VARCHAR2(120), - CommentAddress VARCHAR2(120), - InitialPriority NUMBER(11,0) DEFAULT 0 NOT NULL, - FinalPriority NUMBER(11,0) DEFAULT 0 NOT NULL, - DefaultDueIn NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE, - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); - CREATE INDEX Queues1 ON Queues (LOWER('Name')); -CREATE INDEX Queues2 ON Queues (Disabled); - - -CREATE SEQUENCE LINKS_seq; -CREATE TABLE Links ( - id NUMBER(11,0) - CONSTRAINT Links_Key PRIMARY KEY, - Base VARCHAR2(240), - Target VARCHAR2(240), - Type VARCHAR2(20) NOT NULL, - LocalTarget NUMBER(11,0) DEFAULT 0 NOT NULL, - LocalBase NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE -); -CREATE UNIQUE INDEX Links1 ON Links (Base, Target, Type); -CREATE INDEX Links2 ON Links (Base, Type); -CREATE INDEX Links3 ON Links (Target, Type); -CREATE INDEX Links4 ON Links(Type,LocalBase); - - -CREATE SEQUENCE PRINCIPALS_seq; -CREATE TABLE Principals ( - id NUMBER(11,0) - CONSTRAINT Principals_Key PRIMARY KEY, - PrincipalType VARCHAR2(16), - ObjectId NUMBER(11,0), - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); -CREATE UNIQUE INDEX Principals2 ON Principals (ObjectId); - - -CREATE SEQUENCE GROUPS_seq; -CREATE TABLE Groups ( - id NUMBER(11,0) - CONSTRAINT Groups_Key PRIMARY KEY, - Name VARCHAR2(200), - Description VARCHAR2(255), - Domain VARCHAR2(64), - Type VARCHAR2(64), - Instance NUMBER(11,0) DEFAULT 0 -- NOT NULL --- Instance VARCHAR2(64) -); -CREATE INDEX Groups1 ON Groups (LOWER('Domain'), Instance, LOWER('Type'), id); -CREATE INDEX Groups2 ON Groups (LOWER('Type'), Instance, LOWER('Domain')); - - -CREATE SEQUENCE SCRIPCONDITIONS_seq; -CREATE TABLE ScripConditions ( - id NUMBER(11, 0) - CONSTRAINT ScripConditions_Key PRIMARY KEY, - Name VARCHAR2(200), - Description VARCHAR2(255), - ExecModule VARCHAR2(60), - Argument VARCHAR2(255), - ApplicableTransTypes VARCHAR2(60), - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - - -CREATE SEQUENCE TRANSACTIONS_seq; -CREATE TABLE Transactions ( - id NUMBER(11,0) - CONSTRAINT Transactions_Key PRIMARY KEY, - ObjectType VARCHAR2(255), - ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL, - TimeTaken NUMBER(11,0) DEFAULT 0 NOT NULL, - Type VARCHAR2(20), - Field VARCHAR2(40), - OldValue VARCHAR2(255), - NewValue VARCHAR2(255), - ReferenceType VARCHAR2(255), - OldReference NUMBER(11,0), - NewReference NUMBER(11,0), - Data VARCHAR2(255), - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE -); -CREATE INDEX Transactions1 ON Transactions (ObjectType, ObjectId); - - -CREATE SEQUENCE SCRIPS_seq; -CREATE TABLE Scrips ( - id NUMBER(11,0) - CONSTRAINT Scrips_Key PRIMARY KEY, - Description VARCHAR2(255), - ScripCondition NUMBER(11,0) DEFAULT 0 NOT NULL, - ScripAction NUMBER(11,0) DEFAULT 0 NOT NULL, - ConditionRules CLOB, - ActionRules CLOB, - CustomIsApplicableCode CLOB, - CustomPrepareCode CLOB, - CustomCommitCode CLOB, - Stage VARCHAR2(32), - Queue NUMBER(11,0) DEFAULT 0 NOT NULL, - Template NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - - -CREATE SEQUENCE ACL_seq; -CREATE TABLE ACL ( - id NUMBER(11,0) - CONSTRAINT ACL_Key PRIMARY KEY, - PrincipalType VARCHAR2(25) NOT NULL, - PrincipalId NUMBER(11,0) NOT NULL, - RightName VARCHAR2(25) NOT NULL, - ObjectType VARCHAR2(25) NOT NULL, - ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL, - DelegatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - DelegatedFrom NUMBER(11,0) DEFAULT 0 NOT NULL -); -CREATE INDEX ACL1 ON ACL(RightName, ObjectType, ObjectId, PrincipalType, PrincipalId); - - -CREATE SEQUENCE GROUPMEMBERS_seq; -CREATE TABLE GroupMembers ( - id NUMBER(11,0) - CONSTRAINT GroupMembers_Key PRIMARY KEY, - GroupId NUMBER(11,0) DEFAULT 0 NOT NULL, - MemberId NUMBER(11,0) DEFAULT 0 NOT NULL -); -CREATE UNIQUE INDEX GroupMembers1 ON GroupMembers (GroupId, MemberId); - - -CREATE SEQUENCE CachedGroupMembers_seq; -CREATE TABLE CachedGroupMembers ( - id NUMBER(11,0) - CONSTRAINT CachedGroupMembers_Key PRIMARY KEY, - GroupId NUMBER(11,0), - MemberId NUMBER(11,0), - Via NUMBER(11,0), - ImmediateParentId NUMBER(11,0), - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); -CREATE INDEX DisGrouMem ON CachedGroupMembers (GroupId, MemberId, Disabled); -CREATE INDEX GrouMem ON CachedGroupMembers (GroupId, MemberId); - - -CREATE SEQUENCE USERS_seq; -CREATE TABLE Users ( - id NUMBER(11,0) - CONSTRAINT Users_Key PRIMARY KEY, - Name VARCHAR2(200) CONSTRAINT Users_Name_Unique - unique NOT NULL, - Password VARCHAR2(40), - Comments CLOB, - Signature CLOB, - EmailAddress VARCHAR2(120), - FreeFormContactInfo CLOB, - Organization VARCHAR2(200), - RealName VARCHAR2(120), - NickName VARCHAR2(16), - Lang VARCHAR2(16), - EmailEncoding VARCHAR2(16), - WebEncoding VARCHAR2(16), - ExternalContactInfoId VARCHAR2(100), - ContactInfoSystem VARCHAR2(30), - ExternalAuthId VARCHAR2(100), - AuthSystem VARCHAR2(30), - Gecos VARCHAR2(16), - HomePhone VARCHAR2(30), - WorkPhone VARCHAR2(30), - MobilePhone VARCHAR2(30), - PagerPhone VARCHAR2(30), - Address1 VARCHAR2(200), - Address2 VARCHAR2(200), - City VARCHAR2(100), - State VARCHAR2(100), - Zip VARCHAR2(16), - Country VARCHAR2(50), - Timezone VARCHAR2(50), - PGPKey CLOB, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); --- CREATE UNIQUE INDEX Users1 ON Users (Name); - -CREATE INDEX Users2 ON Users( LOWER('Name')); -CREATE INDEX Users4 ON Users (LOWER('EmailAddress')); - - -CREATE SEQUENCE TICKETS_seq; -CREATE TABLE Tickets ( - id NUMBER(11, 0) - CONSTRAINT Tickets_Key PRIMARY KEY, - EffectiveId NUMBER(11,0) DEFAULT 0 NOT NULL, - Queue NUMBER(11,0) DEFAULT 0 NOT NULL, - Type VARCHAR2(16), - IssueStatement NUMBER(11,0) DEFAULT 0 NOT NULL, - Resolution NUMBER(11,0) DEFAULT 0 NOT NULL, - Owner NUMBER(11,0) DEFAULT 0 NOT NULL, - Subject VARCHAR2(200) DEFAULT '[no subject]', - InitialPriority NUMBER(11,0) DEFAULT 0 NOT NULL, - FinalPriority NUMBER(11,0) DEFAULT 0 NOT NULL, - Priority NUMBER(11,0) DEFAULT 0 NOT NULL, - TimeEstimated NUMBER(11,0) DEFAULT 0 NOT NULL, - TimeWorked NUMBER(11,0) DEFAULT 0 NOT NULL, - Status VARCHAR2(10), - TimeLeft NUMBER(11,0) DEFAULT 0 NOT NULL, - Told DATE, - Starts DATE, - Started DATE, - Due DATE, - Resolved DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); -CREATE INDEX Tickets1 ON Tickets (Queue, Status); -CREATE INDEX Tickets2 ON Tickets (Owner); -CREATE INDEX Tickets4 ON Tickets (id, Status); -CREATE INDEX Tickets5 ON Tickets (id, EffectiveId); -CREATE INDEX Tickets6 ON Tickets (EffectiveId, Type); - - -CREATE SEQUENCE SCRIPACTIONS_seq; -CREATE TABLE ScripActions ( - id NUMBER(11,0) - CONSTRAINT ScripActions_Key PRIMARY KEY, - Name VARCHAR2(200), - Description VARCHAR2(255), - ExecModule VARCHAR2(60), - Argument VARCHAR2(255), - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - - -CREATE SEQUENCE TEMPLATES_seq; -CREATE TABLE Templates ( - id NUMBER(11,0) - CONSTRAINT Templates_Key PRIMARY KEY, - Queue NUMBER(11,0) DEFAULT 0 NOT NULL, - Name VARCHAR2(200) NOT NULL, - Description VARCHAR2(255), - Type VARCHAR2(16), - Language VARCHAR2(16), - TranslationOf NUMBER(11,0) DEFAULT 0 NOT NULL, - Content CLOB, - LastUpdated DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE -); - - -CREATE SEQUENCE OBJECTCUSTOMFIELDS_seq; -CREATE TABLE ObjectCustomFields ( - id NUMBER(11,0) - CONSTRAINT ObjectCustomFields_Key PRIMARY KEY, - CustomField NUMBER(11,0) NOT NULL, - ObjectId NUMBER(11,0) NOT NULL, - SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - - -CREATE SEQUENCE OBJECTCUSTOMFIELDVALUES_seq; -CREATE TABLE ObjectCustomFieldValues ( - id NUMBER(11,0) - CONSTRAINT ObjectCustomFieldValues_Key PRIMARY KEY, - CustomField NUMBER(11,0) NOT NULL, - ObjectType VARCHAR2(25) NOT NULL, - ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL, - SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL, - Content VARCHAR2(255), - LargeContent CLOB, - ContentType VARCHAR2(80), - ContentEncoding VARCHAR2(80), - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE, - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); - -CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content); -CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,ObjectId); - -CREATE SEQUENCE CUSTOMFIELDS_seq; -CREATE TABLE CustomFields ( - id NUMBER(11,0) - CONSTRAINT CustomFields_Key PRIMARY KEY, - Name VARCHAR2(200), - Type VARCHAR2(200), - MaxValues NUMBER(11,0) DEFAULT 0 NOT NULL, - Pattern VARCHAR2(255), - Repeated NUMBER(11,0) DEFAULT 0 NOT NULL, - Description VARCHAR2(255), - SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL, - LookupType VARCHAR2(255), - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE, - Disabled NUMBER(11,0) DEFAULT 0 NOT NULL -); - - -CREATE SEQUENCE CUSTOMFIELDVALUES_seq; -CREATE TABLE CustomFieldValues ( - id NUMBER(11,0) - CONSTRAINT CustomFieldValues_Key PRIMARY KEY, - CustomField NUMBER(11,0), - Name VARCHAR2(200), - Description VARCHAR2(255), - SortOrder NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - -CREATE INDEX CustomFieldValues1 ON CustomFieldValues (CustomField); - -CREATE SEQUENCE ATTRIBUTES_seq; -CREATE TABLE Attributes ( - id NUMBER(11,0) PRIMARY KEY, - Name VARCHAR2(255) NOT NULL, - Description VARCHAR2(255), - Content CLOB, - ContentType VARCHAR(16), - ObjectType VARCHAR2(25) NOT NULL, - ObjectId NUMBER(11,0) DEFAULT 0 NOT NULL, - Creator NUMBER(11,0) DEFAULT 0 NOT NULL, - Created DATE, - LastUpdatedBy NUMBER(11,0) DEFAULT 0 NOT NULL, - LastUpdated DATE -); - -CREATE INDEX Attributes1 on Attributes(Name); -CREATE INDEX Attributes2 on Attributes(ObjectType, ObjectId); - - -CREATE TABLE sessions ( - id VARCHAR2(32) - CONSTRAINT Sessions_Key PRIMARY KEY, - a_session CLOB, - LastUpdated DATE -); - diff --git a/rt/etc/upgrade/2.1.71 b/rt/etc/upgrade/2.1.71 deleted file mode 100644 index cb89a3ac3..000000000 --- a/rt/etc/upgrade/2.1.71 +++ /dev/null @@ -1,211 +0,0 @@ -@Queues = ( { - Name => '___Approvals', - Description => 'A system-internal queue for the approvals system', - Disabled => 2, - } -); - - - - - -# {{{ Templates -@Templates = ( - { - Queue => '___Approvals', - Name => "New Pending Approval", # loc - Description => "Notify Owners and AdminCcs of new items pending their approval", # loc - Content => 'Subject: New Pending Approval: {$Ticket->Subject} - -Greetings, - -There is a new item pending your approval: "{$Ticket->Subject()}", -a summary of which appears below. - -Please visit {$RT::WebURL}Approvals/Display.html?id={$Ticket->id} -to approve or reject this ticket, or {$RT::WebURL}Approvals/ to -batch-process all your pending approvals. - -------------------------------------------------------------------------- -{$Transaction->Content()} -' - }, -); - -# }}} - -1; - -@ScripActions = ( - { Name => 'Open Tickets', - Description => 'Open tickets on correspondence', - ExecModule => 'AutoOpen' }, - -); - - @Scrips = ( - { ScripCondition => 'On Correspond', - ScripAction => 'Open Tickets', - Template => 'Blank', - Queue => '0' - }, - { ScripCondition => 'On Create', - ScripAction => 'AutoReply To Requestors', - Template => 'AutoReply' }, - { ScripCondition => 'On Create', - ScripAction => 'Notify AdminCcs', - Template => 'Transaction' }, - { ScripCondition => 'On Correspond', - ScripAction => 'Notify AdminCcs', - Template => 'Admin Correspondence' }, - { ScripCondition => 'On Correspond', - ScripAction => 'Notify Requestors And Ccs', - Template => 'Correspondence' }, - { ScripCondition => 'On Correspond', - ScripAction => 'Notify Other Recipients', - Template => 'Correspondence' }, - { ScripCondition => 'On Comment', - ScripAction => 'Notify AdminCcs As Comment', - Template => 'Admin Comment' }, - { ScripCondition => 'On Comment', - ScripAction => 'Notify Other Recipients As Comment', - Template => 'Correspondence' }, - { ScripCondition => 'On Resolve', - ScripAction => 'Notify Requestors', - Template => 'Resolved' }, - - - { - Description => "When an approval ticket is created, notify the Owner and AdminCc of the item awaiting their approval", # loc - Queue => '___Approvals', - ScripCondition => 'On Create', - ScripAction => 'Notify AdminCcs', - Template => 'New Pending Approval' - }, - { - Description => "If an approval is rejected, reject the original and delete pending approvals", # loc - Queue => '___Approvals', - ScripCondition => 'On Status Change', - ScripAction => 'User Defined', - CustomCommitCode => q[ -# ------------------------------------------------------------------- # -return(1) unless ( lc($self->TransactionObj->NewValue) eq "rejected" or - lc($self->TransactionObj->NewValue) eq "deleted" ); - -my $links = $self->TicketObj->DependedOnBy; -foreach my $link (@{ $links->ItemsArrayRef }) { - my $obj = $link->BaseObj; - if ($obj->QueueObj->IsActiveStatus($obj->Status)) { - if ($obj->Type eq 'ticket') { - $obj->Correspond( - Content => $self->loc("Your request was rejected."), - ); - $obj->SetStatus( - Status => 'rejected', - Force => 1, - ); - } - else { - $obj->SetStatus( - Status => 'deleted', - Force => 1, - ); - } - } -} - -$links = $self->TicketObj->DependsOn; -foreach my $link (@{ $links->ItemsArrayRef }) { - my $obj = $link->TargetObj; - if ($obj->QueueObj->IsActiveStatus($obj->Status)) { - $obj->SetStatus( - Status => 'deleted', - Force => 1, - ); - } -} - -return 1; -# ------------------------------------------------------------------- # - ], - CustomPrepareCode => '1', - Template => 'Admin Comment', - }, - { - Description => "When a ticket has been approved by any approver, add correspondence to the original ticket", # loc - Queue => '___Approvals', - ScripCondition => 'On Resolve', - ScripAction => 'User Defined', - CustomPrepareCode => 'return(1);', - CustomCommitCode => q[ -# ------------------------------------------------------------------- # -return(1) unless ($self->TicketObj->Type eq 'approval'); - -foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) { - $obj->Correspond( - Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc - $self->TransactionObj->CreatorObj->Name, - ) . "\n" . $self->loc( "Approver's notes: [_1]", # loc - $self->TicketObj->Transactions->Last->Content, - ), - _reopen => 0, - ); -} - -return 1; -# ------------------------------------------------------------------- # - ], - Template => 'Admin Comment' - }, - { - Description => "When a ticket has been approved by all approvers, add correspondence to the original ticket", # loc - Queue => '___Approvals', - ScripCondition => 'On Resolve', - ScripAction => 'User Defined', - CustomPrepareCode => 'return(1);', - CustomCommitCode => q[ -# ------------------------------------------------------------------- # -# Find all the tickets that depend on this (that this is approving) - -my $Ticket = $self->TicketObj; -my @TOP = $Ticket->AllDependedOnBy( Type => 'ticket' ); -my $links = $Ticket->DependedOnBy; - -while (my $link = $links->Next) { - my $obj = $link->BaseObj; - next if ($obj->HasUnresolvedDependencies( Type => 'approval' )); - - if ($obj->Type eq 'ticket') { - $obj->Correspond( - Content => $self->loc("Your request has been approved."), - _reopen => 0, - ); - } - elsif ($obj->Type eq 'code') { - my $code = $obj->Transactions->First->Content; - my $rv; - - foreach my $TOP (@TOP) { - local $@; - $rv++ if eval $code; - $RT::Logger->error("Cannot eval code: $@") if $@; - } - - if ($rv or !@TOP) { - $obj->SetStatus( Status => 'resolved', Force => 1,); - } - else { - $obj->SetStatus( Status => 'rejected', Force => 1,); - } - } -} - -return 1; -# ------------------------------------------------------------------- # - ], - Template => 'Admin Comment', - }, -); - -# }}} - |