[Bps-public-commit] rt-extension-quickupdate branch master updated. 1.01-5-g5cd2c55
BPS Git Server
git at git.bestpractical.com
Thu Feb 24 17:22:09 UTC 2022
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-quickupdate".
The branch, master has been updated
via 5cd2c55f2172d0de4dd9c52cd442fad146e3dbd8 (commit)
via c801f8c6d5a4251e5584db8c6d05ce6a2379a686 (commit)
via 9a97ff66d6c1718bfd492827bafe6d94372ca718 (commit)
via 074d029db47fde63c926c96f33cdb63a5e98e661 (commit)
via aaec836cd144f38a8072163193ec057c2befa145 (commit)
from e638cd23079e0291af2cdcc1f4bdc3dd9eaa82e7 (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 5cd2c55f2172d0de4dd9c52cd442fad146e3dbd8
Merge: e638cd2 c801f8c
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Feb 25 01:15:59 2022 +0800
Merge branch 'update-for-rt5'
commit c801f8c6d5a4251e5584db8c6d05ce6a2379a686
Author: Brad Embree <brad at bestpractical.com>
Date: Mon Jan 17 08:12:06 2022 -0800
Prep version 1.02
diff --git a/CHANGES b/CHANGES
index 1d58265..50a09c9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1.02 2022-02-24
+ - Add RT 5 compatibility
+
1.01 2016-10-26
- RT 4.4 compatibility
- Remove meaningless "-" option from queue dropdown
diff --git a/META.yml b/META.yml
index c044e98..986d59f 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.17'
+generated_by: 'Module::Install version 1.19'
license: gpl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,7 +22,7 @@ requires:
perl: 5.8.3
resources:
license: http://opensource.org/licenses/gpl-license.php
-version: '1.01'
+version: '1.02'
x_module_install_rtx_version: '0.43'
x_requires_rt: 4.0.0
-x_rt_too_new: 4.6.0
+x_rt_too_new: 5.2.0
diff --git a/Makefile.PL b/Makefile.PL
index 45b13f2..07c1843 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,7 +3,7 @@ use inc::Module::Install;
RTx('RT-Extension-QuickUpdate');
requires_rt('4.0.0');
-rt_too_new('4.6.0');
+rt_too_new('5.2.0');
sign();
WriteAll();
diff --git a/README b/README
index ffe0745..78204ed 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ DESCRIPTION
instead of needing to browse between tabs in order to do so.
RT VERSION
- Works with all releases of RT 4.
+ Works with RT 4.4, 5.0
INSTALLATION
perl Makefile.PL
@@ -15,7 +15,7 @@ INSTALLATION
make install
May need root permissions
- Edit your /opt/rt4/etc/RT_SiteConfig.pm
+ Edit your /opt/rt5/etc/RT_SiteConfig.pm
If you are using RT 4.2 or greater, add this line:
Plugin('RT::Extension::QuickUpdate');
@@ -27,7 +27,7 @@ INSTALLATION
or add RT::Extension::QuickUpdate to your existing @Plugins line.
Clear your mason cache
- rm -rf /opt/rt4/var/mason_data/obj
+ rm -rf /opt/rt5/var/mason_data/obj
Restart your webserver
@@ -44,7 +44,7 @@ BUGS
L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-QuickUpdate>.
LICENSE AND COPYRIGHT
- This software is Copyright (c) 2010-2016 by Best Practical Solutions
+ This software is Copyright (c) 2010-2022 by Best Practical Solutions
This is free software, licensed under:
diff --git a/lib/RT/Extension/QuickUpdate.pm b/lib/RT/Extension/QuickUpdate.pm
index fca8a61..456b4cf 100644
--- a/lib/RT/Extension/QuickUpdate.pm
+++ b/lib/RT/Extension/QuickUpdate.pm
@@ -2,7 +2,7 @@ package RT::Extension::QuickUpdate;
use strict;
use warnings;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
1;
@@ -18,7 +18,7 @@ needing to browse between tabs in order to do so.
=head1 RT VERSION
-Works with all releases of RT 4.
+Works with RT 4.4, 5.0
=head1 INSTALLATION
@@ -32,7 +32,7 @@ Works with all releases of RT 4.
May need root permissions
-=item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
+=item Edit your F</opt/rt5/etc/RT_SiteConfig.pm>
If you are using RT 4.2 or greater, add this line:
@@ -46,7 +46,7 @@ or add C<RT::Extension::QuickUpdate> to your existing C<@Plugins> line.
=item Clear your mason cache
- rm -rf /opt/rt4/var/mason_data/obj
+ rm -rf /opt/rt5/var/mason_data/obj
=item Restart your webserver
@@ -68,7 +68,7 @@ or via the web at
=head1 LICENSE AND COPYRIGHT
-This software is Copyright (c) 2010-2016 by Best Practical Solutions
+This software is Copyright (c) 2010-2022 by Best Practical Solutions
This is free software, licensed under:
commit 9a97ff66d6c1718bfd492827bafe6d94372ca718
Author: Brad Embree <brad at bestpractical.com>
Date: Mon Jan 17 08:05:50 2022 -0800
Convert to bootstrap for RT 5
diff --git a/html/Callbacks/QuickUpdate/Ticket/Elements/ShowSummary/RightColumnTop b/html/Callbacks/QuickUpdate/Ticket/Elements/ShowSummary/RightColumnTop
index b9bcd08..44ae29c 100644
--- a/html/Callbacks/QuickUpdate/Ticket/Elements/ShowSummary/RightColumnTop
+++ b/html/Callbacks/QuickUpdate/Ticket/Elements/ShowSummary/RightColumnTop
@@ -7,6 +7,10 @@ $Ticket
&>
<form action="<%$RT::WebPath%>/Ticket/Display.html" method="post">
<& /Ticket/Elements/QuickUpdate, Ticket => $Ticket, id => $Ticket->Id &>
- <div align="right"><input type="submit" class="button" value="Save" /></div>
+ <div class="form-row">
+ <div class="col-12">
+ <& /Elements/Submit, Label => loc("Save") &>
+ </div>
+ </div>
</form>
</&>
diff --git a/html/Ticket/Elements/QuickUpdate b/html/Ticket/Elements/QuickUpdate
index f94aacc..54e8998 100755
--- a/html/Ticket/Elements/QuickUpdate
+++ b/html/Ticket/Elements/QuickUpdate
@@ -45,6 +45,27 @@
%# END BPS TAGGED BLOCK }}}
<input type="hidden" class="hidden" name="id" value="<% $Ticket->id %>" />
+% if ( RT::Handle::cmp_version($RT::VERSION, '5.0.0') >= 0 ) {
+% # RT 5 version
+<div class="form-row">
+ <div class="label col-3"><&|/l&>Status</&>:</div>
+ <div class="value col-9"><& $status_comp, Name => 'Status', TicketObj => $Ticket, @extra &></div>
+</div>
+<div class="form-row">
+ <div class="label col-3"><&|/l&>Owner</&>:</div>
+ <div class="value col-9"><& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&></div>
+</div>
+<div class="form-row">
+ <div class="label col-3"><&|/l&>Priority</&>:</div>
+ <div class="value col-9"><& /Elements/SelectPriority, Name => 'Priority', QueueObj => $Ticket->QueueObj, Default => $Ticket->Priority &></div>
+</div>
+<div class="form-row">
+ <div class="label col-3"><&|/l&>Queue</&>:</div>
+ <div class="value col-9"><& /Elements/SelectQueue, Name => 'Queue', Default => $Ticket->QueueObj->Id, ShowNullOption => 0 &></div>
+</div>
+% }
+% else {
+% # RT 4 version
<table>
<tr>
<td class="label"><&|/l&>Status</&>:</td><td> <& $status_comp, Name => 'Status', TicketObj => $Ticket, @extra &> </td>
@@ -64,6 +85,7 @@
</td>
</tr>
</table>
+% }
<%INIT>
my $Ticket = LoadTicket($id);
commit 074d029db47fde63c926c96f33cdb63a5e98e661
Author: Brad Embree <brad at bestpractical.com>
Date: Mon Jan 17 08:02:03 2022 -0800
Add dot to inc for Module::Install
diff --git a/Makefile.PL b/Makefile.PL
index d7332c4..45b13f2 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,4 @@
+use lib '.';
use inc::Module::Install;
RTx('RT-Extension-QuickUpdate');
commit aaec836cd144f38a8072163193ec057c2befa145
Author: Brad Embree <brad at bestpractical.com>
Date: Mon Jan 17 07:59:45 2022 -0800
Update Module::Install
diff --git a/META.yml b/META.yml
index 9635398..c044e98 100644
--- a/META.yml
+++ b/META.yml
@@ -23,6 +23,6 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
version: '1.01'
-x_module_install_rtx_version: '0.38'
+x_module_install_rtx_version: '0.43'
x_requires_rt: 4.0.0
x_rt_too_new: 4.6.0
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index dbe10ca..7ba98c2 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.17';
+ $VERSION = '1.19';
# Storage for the pseudo-singleton
$MAIN = undef;
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 3d89918..9fa42c2 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.17';
+ $VERSION = '1.19';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index fc699b3..d65c753 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 3ee0aa1..3072b08 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Include.pm b/inc/Module/Install/Include.pm
index e8a73b8..13fdcd0 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index bc81e06..13a4464 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 29934cf..11bf971 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 80538d3..2889ece 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -6,9 +6,10 @@ use strict;
use warnings;
no warnings 'once';
+use Term::ANSIColor qw(:constants);
use Module::Install::Base;
use base 'Module::Install::Base';
-our $VERSION = '0.38';
+our $VERSION = '0.43';
use FindBin;
use File::Glob ();
@@ -53,7 +54,7 @@ sub RTx {
my @look = @INC;
unshift @look, grep {defined and -d $_} @try;
push @look, grep {defined and -d $_}
- map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
+ map { ( "$_/rt5/lib", "$_/lib/rt5", "$_/rt4/lib", "$_/lib/rt4", "$_/lib" ) } @prefixes;
last if eval {local @INC = @look; require RT; $RT::LocalLibPath};
warn
@@ -76,6 +77,22 @@ sub RTx {
$self->requires_rt('4.0.0');
}
+ my $package = $name;
+ $package =~ s/-/::/g;
+ if ( $RT::CORED_PLUGINS{$package} ) {
+ my ($base_version) = $RT::VERSION =~ /(\d+\.\d+\.\d+)/;
+ die RED, <<"EOT";
+
+**** Error: Your installed version of RT ($RT::VERSION) already
+ contains this extension in core, so you don't need to
+ install it.
+
+ Check https://docs.bestpractical.com/rt/$base_version/RT_Config.html
+ to configure it.
+
+EOT
+ }
+
# Installation locations
my %path;
my $plugin_path;
@@ -113,11 +130,29 @@ lexicons ::
.
}
+ my $remove_files;
+ if( $extra_args->{'remove_files'} ){
+ $self->include('Module::Install::RTx::Remove');
+ our @remove_files;
+ eval { require "./etc/upgrade/remove_files" }
+ or print "No remove file located, no files to remove\n";
+ $remove_files = join ",", map {"q(\$(DESTDIR)$plugin_path/$name/$_)"} @remove_files;
+ }
+
$self->include('Module::Install::RTx::Runtime') if $self->admin;
$self->include_deps( 'YAML::Tiny', 0 ) if $self->admin;
my $postamble = << ".";
install ::
\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Iinc -MModule::Install::RTx::Runtime -e"RTxPlugin()"
+.
+
+ if( $remove_files ){
+ $postamble .= << ".";
+\t\$(NOECHO) \$(PERL) -MModule::Install::RTx::Remove -e \"RTxRemove([$remove_files])\"
+.
+ }
+
+ $postamble .= << ".";
\t\$(NOECHO) \$(PERL) -MExtUtils::Install -e \"install({$args})\"
.
@@ -205,7 +240,7 @@ sub requires_rt {
my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
if ($sorted[-1] eq $version) {
- die <<"EOT";
+ die RED, <<"EOT";
**** Error: This extension requires RT $version. Your installed version
of RT ($RT::VERSION) is too old.
@@ -231,12 +266,12 @@ sub requires_rt_plugin {
unshift @INC, $path;
} else {
my $name = $self->name;
- warn <<"EOT";
+ my $msg = <<"EOT";
**** Warning: $name requires that the $plugin plugin be installed and
enabled; it does not appear to be installed.
-
EOT
+ warn RED, $msg, RESET, "\n";
}
$self->requires(@_);
}
@@ -246,9 +281,8 @@ sub rt_too_new {
my $name = $self->name;
$msg ||= <<EOT;
-**** Error: Your installed version of RT (%s) is too new; this extension
- only works with versions older than %s.
-
+**** Warning: Your installed version of RT (%s) is too new; this extension
+ has not been tested on your version of RT and may not work as expected.
EOT
$self->add_metadata("x_rt_too_new", $version) if $self->is_admin;
@@ -256,7 +290,7 @@ EOT
my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
if ($sorted[0] eq $version) {
- die sprintf($msg,$RT::VERSION,$version);
+ warn RED, sprintf($msg,$RT::VERSION), RESET, "\n";
}
}
@@ -279,4 +313,4 @@ sub _load_rt_handle {
__END__
-#line 428
+#line 484
diff --git a/inc/Module/Install/RTx/Runtime.pm b/inc/Module/Install/RTx/Runtime.pm
index 937949f..ae07502 100644
--- a/inc/Module/Install/RTx/Runtime.pm
+++ b/inc/Module/Install/RTx/Runtime.pm
@@ -33,6 +33,7 @@ sub RTxDatabase {
my $lib_path = File::Basename::dirname($INC{'RT.pm'});
my @args = (
+ "-I.",
"-Ilib",
"-I$RT::LocalLibPath",
"-I$lib_path",
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
index 3634ee0..3738232 100644
--- a/inc/Module/Install/ReadmeFromPod.pm
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -7,7 +7,7 @@ use warnings;
use base qw(Module::Install::Base);
use vars qw($VERSION);
-$VERSION = '0.26';
+$VERSION = '0.30';
{
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index dba25f9..f7aa615 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.17';
+ $VERSION = '1.19';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index d553bd7..2db861a 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.17';
+ $VERSION = '1.19';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff --git a/inc/YAML/Tiny.pm b/inc/YAML/Tiny.pm
index aa539f7..fb157a6 100644
--- a/inc/YAML/Tiny.pm
+++ b/inc/YAML/Tiny.pm
@@ -2,12 +2,12 @@
use 5.008001; # sane UTF-8 support
use strict;
use warnings;
-package YAML::Tiny; # git description: v1.68-2-gcc5324e
+package YAML::Tiny; # git description: v1.72-7-g8682f63
# XXX-INGY is 5.8.1 too old/broken for utf8?
# XXX-XDG Lancaster consensus was that it was sufficient until
# proven otherwise
-our $VERSION = '1.69';
+our $VERSION = '1.73';
#####################################################################
# The YAML::Tiny API.
@@ -374,7 +374,7 @@ sub _load_scalar {
while ( @$lines ) {
$lines->[0] =~ /^(\s*)/;
last unless length($1) >= $indent->[-1];
- push @multiline, substr(shift(@$lines), length($1));
+ push @multiline, substr(shift(@$lines), $indent->[-1]);
}
my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n";
@@ -570,10 +570,8 @@ sub _dump_file {
if ( _can_flock() ) {
# Open without truncation (truncate comes after lock)
my $flags = Fcntl::O_WRONLY()|Fcntl::O_CREAT();
- sysopen( $fh, $file, $flags );
- unless ( $fh ) {
- $self->_error("Failed to open file '$file' for writing: $!");
- }
+ sysopen( $fh, $file, $flags )
+ or $self->_error("Failed to open file '$file' for writing: $!");
# Use no translation and strict UTF-8
binmode( $fh, ":raw:encoding(UTF-8)");
@@ -871,4 +869,4 @@ delete $YAML::Tiny::{refaddr};
__END__
-#line 1489
+#line 1487
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 3 ++
META.yml | 8 ++--
Makefile.PL | 3 +-
README | 8 ++--
.../Ticket/Elements/ShowSummary/RightColumnTop | 6 ++-
html/Ticket/Elements/QuickUpdate | 22 +++++++++
inc/Module/Install.pm | 2 +-
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 | 54 ++++++++++++++++++----
inc/Module/Install/RTx/Runtime.pm | 1 +
inc/Module/Install/ReadmeFromPod.pm | 2 +-
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
inc/YAML/Tiny.pm | 14 +++---
lib/RT/Extension/QuickUpdate.pm | 10 ++--
20 files changed, 106 insertions(+), 43 deletions(-)
hooks/post-receive
--
rt-extension-quickupdate
More information about the Bps-public-commit
mailing list