[otrs-cvs] ITSMChangeManagement/Kernel/System ITSMChange.pm, 1.284, 1.285

"CVS commits notifications of OTRS.org" <[email protected]> Fri, 31 May 2013 13:59:35 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMChangeManagement/Kernel/System
In directory lancelot:/tmp/cvs-serv9561/Kernel/System

Modified Files:
	ITSMChange.pm 
Log Message:
Fixed bug# 8803 - Lock does not work for all workorder states.

Author: ub

Index: ITSMChange.pm
===================================================================
RCS file: /home/cvs/ITSMChangeManagement/Kernel/System/ITSMChange.pm,v
retrieving revision 1.284
retrieving revision 1.285
diff -2 -u -d -r1.284 -r1.285
--- ITSMChange.pm	5 Feb 2013 20:25:51 -0000	1.284
+++ ITSMChange.pm	31 May 2013 13:59:30 -0000	1.285
@@ -2513,10 +2513,20 @@
         );
 
-        # set as default state current state and all possible end states
-        my $EndStateIDsRef = $Self->{StateMachineObject}->StateTransitionGetEndStates(
-            StateID => $Change->{ChangeStateID},
-            Class   => 'ITSM::ChangeManagement::Change::State',
-        ) || [];
-        my @NextStateIDs = sort ( @{$EndStateIDsRef}, $Change->{ChangeStateID} );
+        # set as default state current change state
+        my @NextStateIDs = ( $Change->{ChangeStateID} );
+
+        # check if reachable change end states should be allowed for locked change states
+        my $ChangeEndStatesAllowed
+            = $Self->{ConfigObject}->Get('ITSMChange::StateLock::AllowEndStates');
+
+        if ($ChangeEndStatesAllowed) {
+
+            # set as default state current state and all possible end states
+            my $EndStateIDsRef = $Self->{StateMachineObject}->StateTransitionGetEndStates(
+                StateID => $Change->{ChangeStateID},
+                Class   => 'ITSM::ChangeManagement::Change::State',
+            ) || [];
+            @NextStateIDs = sort ( @{$EndStateIDsRef}, $Change->{ChangeStateID} );
+        }
 
         # get possible next states if no state lock
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log