[Bps-public-commit] rt-extension-dynamicwebpath branch master updated. 3ffef60ca742eabc837b6919ce900959a06c4f6d
BPS Git Server
git at git.bestpractical.com
Tue Feb 21 20:05:34 UTC 2023
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-dynamicwebpath".
The branch, master has been updated
via 3ffef60ca742eabc837b6919ce900959a06c4f6d (commit)
from 1b6d332ea1063c458c37568205b006dc7cac1d8e (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 3ffef60ca742eabc837b6919ce900959a06c4f6d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Feb 22 03:45:34 2023 +0800
Update WebPath/WebURL for links rendered by CollectionList
diff --git a/html/Callbacks/RT-Extension-DynamicWebPath/Elements/ColumnMap/Default b/html/Callbacks/RT-Extension-DynamicWebPath/Elements/ColumnMap/Default
new file mode 100644
index 0000000..7a35012
--- /dev/null
+++ b/html/Callbacks/RT-Extension-DynamicWebPath/Elements/ColumnMap/Default
@@ -0,0 +1,9 @@
+<%INIT>
+for my $item ( qw/WebPath WebURL/ ) {
+ $COLUMN_MAP->{$item}{value} = RT->Config->Get($item);
+}
+</%INIT>
+
+<%ARGS>
+$COLUMN_MAP
+</%ARGS>
diff --git a/xt/basic.t b/xt/basic.t
index 4e099a8..2c9a357 100644
--- a/xt/basic.t
+++ b/xt/basic.t
@@ -38,6 +38,9 @@ ok( $ret, $msg );
# Automatically logged in as root without Login page
$m->get_ok($url);
ok $m->logged_in_as("root"), "Logged in as root";
+ $m->follow_link_ok( { text => 'Users', id => 'admin-users' } );
+ $m->follow_link_ok( { text => 'root' } );
+ is( $m->uri->path, '/Admin/Users/Modify.html', 'User link matches empty WebPath' );
# Drop credentials
$m->auth('');
@@ -53,6 +56,10 @@ ok( $ret, $msg );
$m->get_ok( $url . '/rt/?user=root;pass=password' );
ok $m->logged_in_as("root"), "Logged in as root";
+ $m->follow_link_ok( { text => 'Users', id => 'admin-users' } );
+ $m->follow_link_ok( { text => 'root' } );
+ is( $m->uri->path, '/rt/Admin/Users/Modify.html', 'User link matches WebPath /rt' );
+
my $text = <<EOF;
From: root\@localhost
To: rt\@@{[RT->Config->Get('rtname')]}
-----------------------------------------------------------------------
Summary of changes:
.../RT-Extension-DynamicWebPath/Elements/ColumnMap/Default | 9 +++++++++
xt/basic.t | 7 +++++++
2 files changed, 16 insertions(+)
create mode 100644 html/Callbacks/RT-Extension-DynamicWebPath/Elements/ColumnMap/Default
hooks/post-receive
--
rt-extension-dynamicwebpath
More information about the Bps-public-commit
mailing list