[Bps-public-commit] rt-extension-spawnlinkedticketinqueue branch, master, updated. 0.06-3-g8b400e3

Kevin Falcone falcone at bestpractical.com
Fri Mar 7 16:35:41 EST 2014


The branch, master has been updated
       via  8b400e30757c2c7fe23942b8597aa671f1c02d15 (commit)
       via  a409cda32c3d21090d966c3616e3fd3190a3cd75 (commit)
       via  ea18183af6cbdd89d6148ee88d91a42583e1d6d7 (commit)
      from  75bf297137156c80a728d1758e23c70b87a136c0 (commit)

Summary of changes:
 Changes                                            | 24 ++++----
 META.yml                                           |  2 +-
 README                                             |  2 +-
 .../SpawnLinkedTicket/Elements/ShowLinks/Default   |  4 +-
 inc/Module/Install/RTx.pm                          | 64 ++++++++++++----------
 lib/RT/Extension/SpawnLinkedTicketInQueue.pm       |  4 +-
 6 files changed, 52 insertions(+), 48 deletions(-)

- Log -----------------------------------------------------------------
commit ea18183af6cbdd89d6148ee88d91a42583e1d6d7
Author: lurdan <lurdan at gmail.com>
Date:   Thu Mar 6 10:05:41 2014 +0900

    Fix wording of tickets relationships
    
    to lookup translations correctly.

diff --git a/html/Callbacks/SpawnLinkedTicket/Elements/ShowLinks/Default b/html/Callbacks/SpawnLinkedTicket/Elements/ShowLinks/Default
index 2645a50..2ce6787 100644
--- a/html/Callbacks/SpawnLinkedTicket/Elements/ShowLinks/Default
+++ b/html/Callbacks/SpawnLinkedTicket/Elements/ShowLinks/Default
@@ -56,8 +56,8 @@
 <select name="LinkType">
 <option value="DependsOn-new"><% loc('Depends on') %></option>
 <option value="new-DependsOn"><% loc('Depended on by') %></option>
-<option value="MemberOf-new"><% loc('Parent') %></option>
-<option value="new-MemberOf"><% loc('Child') %></option>
+<option value="MemberOf-new"><% loc('Parents') %></option>
+<option value="new-MemberOf"><% loc('Children') %></option>
 <option value="RefersTo-new"><% loc('Refers to') %></option>
 <option value="new-RefersTo"><% loc('Referred to by') %></option>
 </select>

commit a409cda32c3d21090d966c3616e3fd3190a3cd75
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Mar 7 16:34:22 2014 -0500

    update Module::Install::RTx

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index ac04c79..469eb42 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.32';
+our $VERSION = '0.32_02';
 
 use FindBin;
 use File::Glob     ();
@@ -136,7 +136,9 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
-    if ( -d 'etc/upgrade/' )    { $has_etc{upgrade}++; }
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
+        $has_etc{upgrade}++;
+    }
 
     $self->postamble("$postamble\n");
     unless ( $subdirs{'lib'} ) {
@@ -174,46 +176,50 @@ install ::
     }
 }
 
-# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
-{ my %word = (
-    a     => -4,
-    alpha => -4,
-    b     => -3,
-    beta  => -3,
-    pre   => -2,
-    rc    => -1,
-    head  => 9999,
-);
-sub cmp_version($$) {
-    my ($a, $b) = (@_);
-    my @a = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
-        split /([^0-9]+)/, $a;
-    my @b = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
-        split /([^0-9]+)/, $b;
-    @a > @b
-        ? push @b, (0) x (@a- at b)
-        : push @a, (0) x (@b- at a);
-    for ( my $i = 0; $i < @a; $i++ ) {
-        return $a[$i] <=> $b[$i] if $a[$i] <=> $b[$i];
-    }
-    return 0;
-}}
 sub requires_rt {
     my ($self,$version) = @_;
 
     # if we're exactly the same version as what we want, silently return
     return if ($version eq $RT::VERSION);
 
-    my @sorted = sort cmp_version $version,$RT::VERSION;
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
 
     if ($sorted[-1] eq $version) {
         # should we die?
-        warn "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+        die "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+    }
+}
+
+sub rt_too_new {
+    my ($self,$version,$msg) = @_;
+    $msg ||= "Your version %s is too new, this extension requires a release of RT older than %s\n";
+
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
+
+    if ($sorted[0] eq $version) {
+        die sprintf($msg,$RT::VERSION,$version);
+    }
+}
+
+# RT::Handle runs FinalizeDatabaseType which calls RT->Config->Get
+# On 3.8, this dies.  On 4.0/4.2 ->Config transparently runs LoadConfig.
+# LoadConfig requires being able to read RT_SiteConfig.pm (root) so we'd
+# like to avoid pushing that on users.
+# Fake up just enough Config to let FinalizeDatabaseType finish, and
+# anyone later calling LoadConfig will overwrite our shenanigans.
+sub _load_rt_handle {
+    unless ($RT::Config) {
+        require RT::Config;
+        $RT::Config = RT::Config->new;
+        RT->Config->Set('DatabaseType','mysql');
     }
+    require RT::Handle;
 }
 
 1;
 
 __END__
 
-#line 336
+#line 362

commit 8b400e30757c2c7fe23942b8597aa671f1c02d15
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Mar 7 16:34:45 2014 -0500

    Format Changes, update docs, bump version to 0.07

diff --git a/Changes b/Changes
index 54f7c82..31f1d6a 100644
--- a/Changes
+++ b/Changes
@@ -1,25 +1,23 @@
-0.06 2013-10-03
+0.07 2014-03-07
+ - Fix Child/Parent to be the localized strings available in RT
 
-    * fix compatibility with RT 4.2
+0.06 2013-10-03
+ - fix compatibility with RT 4.2
 
 0.05 2011-04-15
-
-     * fix compatibility with 3.8.10
-     * fix situation when WebPath config option is not empty
-     * use better query string generation
+ - fix compatibility with 3.8.10
+ - fix situation when WebPath config option is not empty
+ - use better query string generation
 
 0.04 2009-09-30
-
-     * fix rendering issues in different browsers
+ - fix rendering issues in different browsers
 
 0.03 2009-09-23
-
-     * return back missing Makefile.PL
+ - return back missing Makefile.PL
 
 0.02 2009-09-12
-
-     * documentation
+ - documentation
 
 0.01_01
+ - Initial Release
 
-     Initial Release
diff --git a/META.yml b/META.yml
index d2c89ce..075c09a 100644
--- a/META.yml
+++ b/META.yml
@@ -22,4 +22,4 @@ requires:
   perl: 5.8.3
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 0.06
+version: 0.07
diff --git a/README b/README
index 8baefdd..2628908 100644
--- a/README
+++ b/README
@@ -42,7 +42,7 @@ AUTHOR
     Kevin Falcone <falcone at bestpractical.com>
 
 LICENCE AND COPYRIGHT
-    Copyright (c) 2009-2013, Best Practical Solutions, LLC. All rights
+    Copyright (c) 2009-2014, Best Practical Solutions, LLC. All rights
     reserved.
 
     This module is free software; you can redistribute it and/or modify it
diff --git a/lib/RT/Extension/SpawnLinkedTicketInQueue.pm b/lib/RT/Extension/SpawnLinkedTicketInQueue.pm
index 43043c0..f61b238 100644
--- a/lib/RT/Extension/SpawnLinkedTicketInQueue.pm
+++ b/lib/RT/Extension/SpawnLinkedTicketInQueue.pm
@@ -1,6 +1,6 @@
 package RT::Extension::SpawnLinkedTicketInQueue;
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 use 5.008003;
 use warnings;
@@ -55,7 +55,7 @@ Kevin Falcone E<lt>falcone at bestpractical.comE<gt>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright (c) 2009-2013, Best Practical Solutions, LLC.  All rights reserved.
+Copyright (c) 2009-2014, Best Practical Solutions, LLC.  All rights reserved.
 
 This module is free software; you can redistribute it and/or
 modify it under the terms of version 2 of the GNU General Public License.

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



More information about the Bps-public-commit mailing list