[Bps-public-commit] RT-Extension-MandatoryOnTransition branch allow-rules-only-for-ticket-creation created. 0.20-1-g87a7cd4

BPS Git Server git at git.bestpractical.com
Wed Sep 29 19:41:07 UTC 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-MandatoryOnTransition".

The branch, allow-rules-only-for-ticket-creation has been created
        at  87a7cd401639d24f4d70920afa196d5096dbbc92 (commit)

- Log -----------------------------------------------------------------
commit 87a7cd401639d24f4d70920afa196d5096dbbc92
Author: Steven Burr <steve at bestpractical.com>
Date:   Wed Sep 29 15:37:18 2021 -0400

    Allow rules that apply only on ticket creation
    
    MandatoryOnTransition supports '* -> foo' rules which can
    apply on ticket creation. However, the '*' as the 'from' status means
    that the rule would ALSO apply to ALL transitions that end up in the 'foo'
    status.
    
    A new flag value of '__CREATE__' is added to allow for the configuration
    of rules that apply ONLY on ticket creation. The config for the example
    above would be modified to '__CREATE__ -> foo' to apply only on
    creation.

diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Create.html/BeforeCreate b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Create.html/BeforeCreate
index 661d002..65460f5 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Create.html/BeforeCreate
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Create.html/BeforeCreate
@@ -11,7 +11,7 @@ $QueueObj->Load($Queue);
 
 my $errors_ref = RT::Extension::MandatoryOnTransition->CheckMandatoryFields(
     ARGSRef => $ARGSRef,
-    From    => "*",
+    From    => "__CREATE__",
     To      => $ARGSRef->{'Status'},
     Queue   => $QueueObj,
 );

-----------------------------------------------------------------------


hooks/post-receive
-- 
RT-Extension-MandatoryOnTransition


More information about the Bps-public-commit mailing list