[Bps-public-commit] RT-Extension-MandatoryOnTransition branch, master, updated. 0.09_01

Kevin Falcone falcone at bestpractical.com
Thu Jan 29 17:48:49 EST 2015


The branch, master has been updated
       via  5367dee44575c0fc6ec16b00f67c541af25ed51e (commit)
       via  c67000ac1d5dea39c61ddd51acab472f80dfc282 (commit)
       via  a7bd68c2a7841db056179976da35d6031f3fa006 (commit)
       via  e11d00ed388d966abdec91fce9cc12ee1599383d (commit)
       via  031e98fa8139510386ff48ec461e22a05b8bf8d6 (commit)
      from  8ad3fb77e78a8fe4cc3a49f68e568d3f24805824 (commit)

Summary of changes:
 Changes                                                    |  3 +++
 MANIFEST                                                   |  2 ++
 META.yml                                                   |  6 +++---
 README                                                     | 12 +++++++++---
 .../Ticket/Modify.html/Default                             |  7 +++++++
 .../Ticket/ModifyAll.html/Default                          |  9 +++++++++
 inc/Module/Install.pm                                      |  6 +++++-
 inc/Module/Install/Base.pm                                 |  2 +-
 inc/Module/Install/Can.pm                                  |  2 +-
 inc/Module/Install/Fetch.pm                                |  2 +-
 inc/Module/Install/Include.pm                              |  2 +-
 inc/Module/Install/Makefile.pm                             |  2 +-
 inc/Module/Install/Metadata.pm                             |  2 +-
 inc/Module/Install/RTx.pm                                  |  4 ++--
 inc/Module/Install/Win32.pm                                |  2 +-
 inc/Module/Install/WriteAll.pm                             |  2 +-
 lib/RT/Extension/MandatoryOnTransition.pm                  | 14 ++++++++++----
 17 files changed, 58 insertions(+), 21 deletions(-)
 create mode 100644 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
 create mode 100644 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default

- Log -----------------------------------------------------------------
commit 031e98fa8139510386ff48ec461e22a05b8bf8d6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 29 16:29:52 2015 -0500

    Update Module::Install:: bits

diff --git a/META.yml b/META.yml
index c305f9c..4c7bce9 100644
--- a/META.yml
+++ b/META.yml
@@ -8,7 +8,7 @@ configure_requires:
   ExtUtils::MakeMaker: 6.59
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.12'
+generated_by: 'Module::Install version 1.14'
 license: gplv2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,5 +26,5 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
 version: '0.09'
-x_module_install_rtx_version: '0.36'
+x_module_install_rtx_version: '0.37'
 x_requires_rt: 4.0.9
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 5460dd5..ff767fa 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -378,6 +378,7 @@ eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _read {
 	local *FH;
 	open( FH, '<', $_[0] ) or die "open($_[0]): $!";
+	binmode FH;
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
 	return $string;
@@ -386,6 +387,7 @@ END_NEW
 sub _read {
 	local *FH;
 	open( FH, "< $_[0]"  ) or die "open($_[0]): $!";
+	binmode FH;
 	my $string = do { local $/; <FH> };
 	close FH or die "close($_[0]): $!";
 	return $string;
@@ -416,6 +418,7 @@ eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
 sub _write {
 	local *FH;
 	open( FH, '>', $_[0] ) or die "open($_[0]): $!";
+	binmode FH;
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
@@ -425,6 +428,7 @@ END_NEW
 sub _write {
 	local *FH;
 	open( FH, "> $_[0]"  ) or die "open($_[0]): $!";
+	binmode FH;
 	foreach ( 1 .. $#_ ) {
 		print FH $_[$_] or die "print($_[0]): $!";
 	}
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index f9bf5de..4206347 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index b4e5e3b..9929b1b 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 54f14fb..3d8de76 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index 7224cff..f274f87 100644
--- a/inc/Module/Install/Include.pm
+++ b/inc/Module/Install/Include.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 81cddd5..66993af 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 2c66b1e..e547fa0 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 73e7245..97acf77 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.36';
+our $VERSION = '0.37';
 
 use FindBin;
 use File::Glob     ();
@@ -123,7 +123,7 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
-    if ( grep { /\d+\.\d+(\.\d+)?.*$/ } glob('etc/upgrade/*.*') ) {
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
         $has_etc{upgrade}++;
     }
 
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index e48c32d..9706e5f 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 409ef40..dbedc00 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.12';
+	$VERSION = '1.14';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

commit e11d00ed388d966abdec91fce9cc12ee1599383d
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 29 17:38:08 2015 -0500

    Shims to trigger on Basics and Jumbo
    
    This is mostly trivial, since we just pass args to the existing
    Update.html/BeforeUpdate
    
    The thing that makes it a little uglier is that the library code assumes
    that anything operating on a ticket is from Update.html rather than
    Create.html.  Except that only Update.html calls things
    UpdateTimeWorked, which Modify.html and ModifyAll.html call that
    TimeWorked.  However, ModifyAll.html calls Content UpdateContent like
    Update.html does, so we don't just want to use CORE_FOR_CREATE.
    
    For now, just clobber over it from these pages.  This calls for more arg
    passing about what fields or called, or just normalization of ARGSRef.
    
    The mobile UI has no Modify* so we don't need to add code there.

diff --git a/MANIFEST b/MANIFEST
index b86364d..cc4254b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4,6 +4,8 @@ html/Callbacks/RT-Extension-MandatoryOnTransition/m/ticket/reply/AfterWorked
 html/Callbacks/RT-Extension-MandatoryOnTransition/m/ticket/reply/BeforeUpdate
 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Create.html/BeforeCreate
 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Elements/EditCustomFields/MassageCustomFields
+html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
+html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/AfterWorked
 html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate
 inc/Module/Install.pm
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
new file mode 100644
index 0000000..91451b5
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Modify.html/Default
@@ -0,0 +1,7 @@
+<%INIT>
+# CORE_FOR_UPDATE assumes that any update to a Ticket is coming from Update.html
+# which calls TimeWorked UpdateTimeWorked
+$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
+$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
+</%INIT>
+<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate, %ARGS &>
diff --git a/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
new file mode 100644
index 0000000..43b0258
--- /dev/null
+++ b/html/Callbacks/RT-Extension-MandatoryOnTransition/Ticket/ModifyAll.html/Default
@@ -0,0 +1,9 @@
+<%INIT>
+# CORE_FOR_UPDATE assumes that any update to a Ticket is coming from Update.html
+# which calls TimeWorked UpdateTimeWorked
+# Luckily - while Jumbo contains a Content box, it's called UpdateContent like Update.html, rather than
+# Content like Create.html.
+$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeWorked} = "TimeWorked";
+$RT::Extension::MandatoryOnTransition::CORE_FOR_UPDATE{TimeTaken} = "TimeWorked";
+</%INIT>
+<& /Callbacks/RT-Extension-MandatoryOnTransition/Ticket/Update.html/BeforeUpdate, %ARGS &>

commit a7bd68c2a7841db056179976da35d6031f3fa006
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 29 17:42:49 2015 -0500

    We now work on Basics and Jumbo

diff --git a/README b/README
index 91c9cbd..73303c4 100644
--- a/README
+++ b/README
@@ -55,7 +55,10 @@ CAVEATS
     release.
 
   Not all pages where you can change status are supported
-    The ticket Basics page, for example. See "TODO" for others.
+    SelfService, for example. See "TODO" for others.
+
+    On 4.0, Basics and Jumbo are not supported because they do not have the
+    needed code, which is present in 4.2.
 
 INSTALLATION
     perl Makefile.PL
@@ -193,8 +196,6 @@ TODO
 
     Enforcement on other update pages
             SelfService - can't do it without patches to <form> POST + additional callbacks
-            Basics      - need to patch callback for skipping (at least)
-            Jumbo       - need to patch callback for skipping (at least)
 
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index 02af159..604ccac 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -72,7 +72,10 @@ Quick actions may be supported in a future release.
 
 =head2 Not all pages where you can change status are supported
 
-The ticket Basics page, for example.  See L</TODO> for others.
+SelfService, for example.  See L</TODO> for others.
+
+On 4.0, Basics and Jumbo are not supported because they do not have the
+needed code, which is present in 4.2.
 
 =head1 INSTALLATION
 
@@ -437,8 +440,6 @@ sub Config {
 =item Enforcement on other update pages
 
     SelfService - can't do it without patches to <form> POST + additional callbacks
-    Basics      - need to patch callback for skipping (at least)
-    Jumbo       - need to patch callback for skipping (at least)
 
 =back
 

commit c67000ac1d5dea39c61ddd51acab472f80dfc282
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 29 17:44:59 2015 -0500

    Document the CORE_FOR_UDPATE shenaigans
    
    Need a cleaner solution for this.  Possibly an arrayref of 'possible
    names' to search in, although that may be too broad?

diff --git a/README b/README
index 73303c4..e6d3be7 100644
--- a/README
+++ b/README
@@ -140,6 +140,11 @@ IMPLEMENTATION DETAILS
         mapping is skipped, the implication being that it isn't available
         during update.
 
+        If your core field is called different things on Update.html and
+        Modify.html you will need to modify the Modify.html/Default callback
+        so the the extension knows what field to use. Look at TimeWorked vs
+        UpdateTimeWorked for an example.
+
     %CORE_FOR_CREATE
         A mapping similar to %CORE_FOR_UPDATE but consulted during ticket
         creation. The same rules and restrictions apply.
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index 604ccac..3993c08 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -195,6 +195,11 @@ even if they are named exactly as listed in @CORE_SUPPORTED.  A supported
 field which doesn't appear in the mapping is skipped, the implication being
 that it isn't available during update.
 
+If your core field is called different things on Update.html and Modify.html
+you will need to modify the Modify.html/Default callback so the the
+extension knows what field to use.  Look at TimeWorked vs UpdateTimeWorked
+for an example.
+
 =item %CORE_FOR_CREATE
 
 A mapping similar to %CORE_FOR_UPDATE but consulted during ticket creation.

commit 5367dee44575c0fc6ec16b00f67c541af25ed51e
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Jan 29 17:47:08 2015 -0500

    Bump version for 0.09_01

diff --git a/Changes b/Changes
index 19c7a51..af695da 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.09_01 2015-01-29
+ - Support for Basics and Jumbo (Modify.html and ModifyAll.html)
+
 0.09 2014-09-30
  - Further MANIFEST fixes (..sigh)
 
diff --git a/META.yml b/META.yml
index 4c7bce9..eabfe63 100644
--- a/META.yml
+++ b/META.yml
@@ -25,6 +25,6 @@ requires:
   perl: 5.8.3
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: '0.09'
+version: 0.09_01
 x_module_install_rtx_version: '0.37'
 x_requires_rt: 4.0.9
diff --git a/lib/RT/Extension/MandatoryOnTransition.pm b/lib/RT/Extension/MandatoryOnTransition.pm
index 3993c08..4fd4f44 100644
--- a/lib/RT/Extension/MandatoryOnTransition.pm
+++ b/lib/RT/Extension/MandatoryOnTransition.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RT::Extension::MandatoryOnTransition;
 
-our $VERSION = '0.09';
+our $VERSION = '0.09_01';
 
 =head1 NAME
 

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


More information about the Bps-public-commit mailing list