[Rt-commit] rt branch, 4.0/lifecyles-vs-approvals, updated. rt-4.0.0rc6-142-g1a585a5
Ruslan Zakirov
ruz at bestpractical.com
Thu Mar 17 11:25:53 EDT 2011
The branch, 4.0/lifecyles-vs-approvals has been updated
via 1a585a58fcb4395a9956bdc399c29d1f0c38262e (commit)
via 8e36fc69ad4ba71e91ad9d0e1579cf94e17c58e4 (commit)
from 63dfbbbffe0ff77bdd29e16acbb0c3f3a6bf482b (commit)
Summary of changes:
etc/RT_Config.pm.in | 10 ++++++++++
etc/initialdata | 1 +
etc/upgrade/4.0.0rc7/content | 21 +++++++++++++++++++++
3 files changed, 32 insertions(+), 0 deletions(-)
create mode 100644 etc/upgrade/4.0.0rc7/content
- Log -----------------------------------------------------------------
commit 8e36fc69ad4ba71e91ad9d0e1579cf94e17c58e4
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Mar 17 18:01:04 2011 +0300
document special statuses for approvals
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 45014df..7c74d1d 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1946,6 +1946,16 @@ When tickets are merged status of the ticket that merged
is changed by force to this. It should be one of inactive
statuses. 'resolved' or its equivalent is the best candidate.
+=item approved
+
+When an approval accepted status of depending tickets changed
+to this value.
+
+=item denied
+
+When an approval denied status of depending tickets changed
+to this value.
+
=back
=head2 Transitions between statuses and UI actions
commit 1a585a58fcb4395a9956bdc399c29d1f0c38262e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Mar 17 18:23:22 2011 +0300
set lifecycle for approvals on DB init and upgrade
diff --git a/etc/initialdata b/etc/initialdata
index d677d06..747b77b 100755
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -19,6 +19,7 @@
CorrespondAddress => "",
CommentAddress => "", },
{ Name => '___Approvals',
+ Lifecycle => 'approvals',
Description => 'A system-internal queue for the approvals system',
Disabled => 2, } );
diff --git a/etc/upgrade/4.0.0rc7/content b/etc/upgrade/4.0.0rc7/content
new file mode 100644
index 0000000..d0d210b
--- /dev/null
+++ b/etc/upgrade/4.0.0rc7/content
@@ -0,0 +1,21 @@
+ at Initial = (
+ sub {
+ $RT::Logger->debug("Going to set lifecycle for approvals");
+
+ my $queue = RT::Queue->new( RT->SystemUser );
+ $queue->Load('___Approvals');
+ unless ( $queue->id ) {
+ $RT::Logger->warning("There is no ___Approvals queue in the DB");
+ return 1;
+ }
+
+ return 1 if $queue->Lifecycle->Name eq 'approvals';
+
+ my ($status, $msg) = $queue->SetLifecycle('approvals');
+ unless ( $status ) {
+ $RT::Logger->error("Couldn't set lifecycle for '___Approvals' queue: $msg");
+ return 0;
+ }
+ return 1;
+ },
+);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list