[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, master, updated. 0.13-3-g465c045

Dustin Graves dustin at bestpractical.com
Mon Sep 12 20:04:30 EDT 2016


The branch, master has been updated
       via  465c04528f2d2944d5c746b22223c2bfc524a07a (commit)
       via  a122b2a32e7c060bf27827fe1aa0ed54e66506cc (commit)
       via  113e9dcc36283289c788629b1825a2f371242b69 (commit)
      from  91f0fda78a06a43879e111a7a491823d51e81167 (commit)

Summary of changes:
 .../{Ticket => }/Elements/EditCustomFields/MassageCustomFields |  2 +-
 .../Ticket/Elements/EditCustomFields/MassageCustomFields       |  2 +-
 lib/RT/Extension/MandatoryOnTransition/Test.pm.in              | 10 ----------
 xt/mandatory_on_create.t                                       |  2 +-
 4 files changed, 3 insertions(+), 13 deletions(-)
 copy html/Callbacks/RT-Extension-MandatoryOnTransition/{Ticket => }/Elements/EditCustomFields/MassageCustomFields (80%)

- Log -----------------------------------------------------------------
commit 113e9dcc36283289c788629b1825a2f371242b69
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Sep 12 22:53:24 2016 +0000

    add MassageCustomFields callback for RT 4.4.x
    
    in RT 4.4.0, /Tickets/Elements/EditCustomFields was deprecated in favor
    of /Elements/EditCustomFields

diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields b/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields
new file mode 100644
index 0000000..8418d5c
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields
@@ -0,0 +1,11 @@
+<%args>
+$CustomFields
+$Named => []
+</%args>
+<%init>
+return if RT->Config->Get('ShowAllCustomFieldsOnMandatoryUpdate');
+return unless @$Named;
+
+$CustomFields->Limit( FIELD => 'Name', VALUE => $_, SUBCLAUSE => 'names', ENTRYAGGREGRATOR => 'OR' )
+    for @$Named;
+</%init>

commit a122b2a32e7c060bf27827fe1aa0ed54e66506cc
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Sep 12 22:57:30 2016 +0000

    avoid "Case sensitive search by CustomFields.Name" warnings

diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields b/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields
index 8418d5c..6a6dfdd 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Elements/EditCustomFields/MassageCustomFields
@@ -6,6 +6,6 @@ $Named => []
 return if RT->Config->Get('ShowAllCustomFieldsOnMandatoryUpdate');
 return unless @$Named;
 
-$CustomFields->Limit( FIELD => 'Name', VALUE => $_, SUBCLAUSE => 'names', ENTRYAGGREGRATOR => 'OR' )
+$CustomFields->Limit( FIELD => 'Name', VALUE => $_, SUBCLAUSE => 'names', ENTRYAGGREGRATOR => 'OR', CASESENSITIVE => 1 )
     for @$Named;
 </%init>
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditCustomFields/MassageCustomFields b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditCustomFields/MassageCustomFields
index 8418d5c..6a6dfdd 100644
--- a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditCustomFields/MassageCustomFields
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditCustomFields/MassageCustomFields
@@ -6,6 +6,6 @@ $Named => []
 return if RT->Config->Get('ShowAllCustomFieldsOnMandatoryUpdate');
 return unless @$Named;
 
-$CustomFields->Limit( FIELD => 'Name', VALUE => $_, SUBCLAUSE => 'names', ENTRYAGGREGRATOR => 'OR' )
+$CustomFields->Limit( FIELD => 'Name', VALUE => $_, SUBCLAUSE => 'names', ENTRYAGGREGRATOR => 'OR', CASESENSITIVE => 1 )
     for @$Named;
 </%init>

commit 465c04528f2d2944d5c746b22223c2bfc524a07a
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Sep 12 23:21:39 2016 +0000

    use established RT::Handle::cmp_version instead of custom RT::Extension::MandatoryOnTransition::Test::RTAtorNewerThan

diff --git a/lib/RT/Extension/MandatoryOnTransition/Test.pm.in b/lib/RT/Extension/MandatoryOnTransition/Test.pm.in
index 1757bb1..c3d08b5 100644
--- a/lib/RT/Extension/MandatoryOnTransition/Test.pm.in
+++ b/lib/RT/Extension/MandatoryOnTransition/Test.pm.in
@@ -48,14 +48,4 @@ CONFIG
     require RT::Extension::MandatoryOnTransition;
 }
 
-sub RTAtorNewerThan{
-    my $version = shift;
-    my ($my_major, $my_minor, $my_sub) = split(/\./, $version);
-    my ($major, $minor, $sub) = split(/\./, $RT::VERSION);
-    return ($my_major >= $major
-            and $my_minor >= $minor
-            and $my_sub >= $sub)
-            ? 1 : 0;
-}
-
 1;
diff --git a/xt/mandatory_on_create.t b/xt/mandatory_on_create.t
index a635e4f..6511c86 100644
--- a/xt/mandatory_on_create.t
+++ b/xt/mandatory_on_create.t
@@ -32,7 +32,7 @@ diag "Test mandatory fields on create";
                           fields => { Queue => 'General',},
                         }, 'Click button to create ticket');
 
-    if (RT::Extension::MandatoryOnTransition::Test::RTAtorNewerThan('4.4.0')){
+    if (RT::Handle::cmp_version( '4.4.0', $RT::VERSION) <= 0) {
         $m->title_is('Create a new ticket in General');
     }
     else{

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


More information about the Bps-public-commit mailing list