[Bps-public-commit] RT-Extension-PreviewInSearch branch show-history-page-initial-callback updated. 0.06-2-gfc4901a
BPS Git Server
git at git.bestpractical.com
Tue Jan 30 21:29:43 UTC 2024
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-PreviewInSearch".
The branch, show-history-page-initial-callback has been updated
via fc4901a47384456f5a36ca6ee4f85001192b1182 (commit)
from b458017274798fe1607de469f12e8afde8286953 (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 fc4901a47384456f5a36ca6ee4f85001192b1182
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jan 30 16:29:15 2024 -0500
Update doc and patches to fix paths in history
See also b458017274
diff --git a/lib/RT/Extension/PreviewInSearch.pm b/lib/RT/Extension/PreviewInSearch.pm
index cfe6126..b78789e 100644
--- a/lib/RT/Extension/PreviewInSearch.pm
+++ b/lib/RT/Extension/PreviewInSearch.pm
@@ -53,7 +53,7 @@ May need root permissions
For RT 5 prior to 5.0.6, apply the patches:
- patch -d /opt/rt5 -p1 < 0001-Add-ModifyPaths-Callback.patch
+ patch -d /opt/rt5 -p1 < 0001-Add-Initial-callback-for-PreviewInSearch.patch
=item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
diff --git a/patches/0001-Add-Initial-callback-for-PreviewInSearch.patch b/patches/0001-Add-Initial-callback-for-PreviewInSearch.patch
new file mode 100644
index 0000000..bb363a3
--- /dev/null
+++ b/patches/0001-Add-Initial-callback-for-PreviewInSearch.patch
@@ -0,0 +1,28 @@
+From 497efc020db5d3de4b05623a3392a5c29a3e1535 Mon Sep 17 00:00:00 2001
+From: Brad Embree <brad at bestpractical.com>
+Date: Wed, 13 Dec 2023 07:29:58 -0800
+Subject: [PATCH] Add Initial callback for PreviewInSearch
+
+The PreviewInSearch extension needed a callback to modify various paths
+to ticket pages so they worked correctly from the preview on the search
+results page.
+---
+ share/html/Elements/ShowHistoryPage | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/share/html/Elements/ShowHistoryPage b/share/html/Elements/ShowHistoryPage
+index f6aa296e87..ab1cf3737e 100644
+--- a/share/html/Elements/ShowHistoryPage
++++ b/share/html/Elements/ShowHistoryPage
+@@ -56,6 +56,8 @@ $ShowHeaders => 0
+ $PathPrefix => ''
+ </%ARGS>
+ <%INIT>
++$m->callback( CallbackName => 'Initial', ARGSRef => \%ARGS, Object => $Object, Transactions => $Transactions, Attachments => $Attachments, AttachmentContent => $AttachmentContent );
++
+ my $trans_content = {};
+ my $trans_attachments = {};
+
+--
+2.39.3 (Apple Git-145)
+
diff --git a/patches/0001-Add-ModifyPaths-Callback.patch b/patches/0001-Add-ModifyPaths-Callback.patch
deleted file mode 100644
index ec45cd6..0000000
--- a/patches/0001-Add-ModifyPaths-Callback.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/share/html/Elements/ShowHistoryPage b/share/html/Elements/ShowHistoryPage
-index f6aa296e8..7486a0276 100644
---- a/share/html/Elements/ShowHistoryPage
-+++ b/share/html/Elements/ShowHistoryPage
-@@ -136,6 +136,11 @@ while ( my $Transaction = $Transactions->Next ) {
- );
- next if $skip;
-
-+ $m->callback(
-+ ARGSRef => \%ARGS,
-+ CallbackName => 'ModifyPaths',
-+ );
-+
- # ARGS is first because we're clobbering the "Attachments" parameter
- $m->comp( 'ShowTransaction',
- %ARGS,
-----------------------------------------------------------------------
Summary of changes:
lib/RT/Extension/PreviewInSearch.pm | 2 +-
...-Add-Initial-callback-for-PreviewInSearch.patch | 28 ++++++++++++++++++++++
patches/0001-Add-ModifyPaths-Callback.patch | 16 -------------
3 files changed, 29 insertions(+), 17 deletions(-)
create mode 100644 patches/0001-Add-Initial-callback-for-PreviewInSearch.patch
delete mode 100644 patches/0001-Add-ModifyPaths-Callback.patch
hooks/post-receive
--
RT-Extension-PreviewInSearch
More information about the Bps-public-commit
mailing list