[Bps-public-commit] RT-Extension-MandatoryOnTransition branch allow-rules-only-for-ticket-creation updated. 0.20-2-g1c4dc41
BPS Git Server
git at git.bestpractical.com
Tue Oct 5 13:47:35 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 updated
via 1c4dc4142de8b195c8a4e16ad817bd5c7ee8deb4 (commit)
from 87a7cd401639d24f4d70920afa196d5096dbbc92 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1c4dc4142de8b195c8a4e16ad817bd5c7ee8deb4
Author: Steven Burr <steve at bestpractical.com>
Date: Tue Oct 5 09:46:40 2021 -0400
Update docs for __CREATE__ rules
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index b811583..f5880cc 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -128,7 +128,19 @@ config option. This option takes the generic form of:
C<from> and C<to> are expected to be valid status names. C<from> may also be
C<*> which will apply to any status and also tickets about to be created with
-status C<to>.
+status C<to>. If you need to express rules that apply only on ticket creation
+and not on updates, you can use the special C<from> value of C<'__CREATE__'>.
+For example,
+
+ Set( %MandatoryOnTransition,
+ 'MyQueue' => {
+ '__CREATE__ -> open' => [ 'CF.MyField1' ],
+ '* -> open' => [ 'CF.MyField2', 'CF.MyField3' ],
+ },
+ );
+
+would require C<CF.MyField1> on ticket creation and C<CF.MyField2> and
+C<CF.MyField3> on any other transition to C<open>.
The fallback for queues without specific rules is specified with C<'*'> where
the queue name would normally be.
@@ -445,7 +457,8 @@ Accepts a paramhash of values:
Works for both create, where no ticket exists yet, and update on an
existing ticket. ARGSRef is required for both.
-For create, you must also pass Queue, From, and To.
+For create, you must also pass Queue, From, and To. In this case, the
+From status should be the special flag value of '__CREATE__'.
Update requires only Ticket and To since From can be fetched from the
ticket object.
-----------------------------------------------------------------------
Summary of changes:
lib/RT/Extension/MandatoryOnTransition.pm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
hooks/post-receive
--
RT-Extension-MandatoryOnTransition
More information about the Bps-public-commit
mailing list