[Rt-commit] rt branch 5.0/clean-up-bulk-update-messages created. rt-5.0.2-244-g1438b1bc45
BPS Git Server
git at git.bestpractical.com
Mon May 23 20:32:29 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".
The branch, 5.0/clean-up-bulk-update-messages has been created
at 1438b1bc45b737736d8dcf26912238f26a2988d4 (commit)
- Log -----------------------------------------------------------------
commit 1438b1bc45b737736d8dcf26912238f26a2988d4
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue May 24 04:08:36 2022 +0800
Avoid adding duplicated prefixes like "Ticket ID: " on bulk update pages
At least for core field updates, the messages already contain prefixes
like "Ticket ID: " added in RT::Record::_UpdateAttributes.
Previously the prefix was "Asset #ID: " on asset bulk update, which was
inconsistent with ticket bulk update and RT::Record::_UpdateAttributes.
This commit tweaks it to be "Asset ID: " accordingly.
diff --git a/share/html/Asset/Search/Bulk.html b/share/html/Asset/Search/Bulk.html
index 0027cba7ca..91bd53782a 100644
--- a/share/html/Asset/Search/Bulk.html
+++ b/share/html/Asset/Search/Bulk.html
@@ -304,7 +304,9 @@ elsif ( $ARGS{Update} ) {
push @tmp_res, ProcessObjectCustomFieldUpdates( Object => $asset, ARGSRef => \%ARGS );
push @tmp_res, ProcessRecordLinks( RecordObj => $asset, RecordId => 'Asset', ARGSRef => \%ARGS );
push @tmp_res, ProcessRecordBulkCustomFields( RecordObj => $asset, ARGSRef => \%ARGS );
- push @results, map { loc( "Asset #[_1]: [_2]", $asset->id, $_ ) } @tmp_res;
+
+ my $prefix = loc('Asset') . ' ' . $asset->Id . ': ';
+ push @results, map { /^$prefix/ ? $_ : loc( "Asset [_1]: [_2]", $asset->id, $_ ) } @tmp_res;
}
MaybeRedirectForResults(
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index a62e6b3042..e639a6afaa 100644
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -550,8 +550,8 @@ unless ( $ARGS{'AddMoreAttach'} ) {
@updateresults, @linkresults, @cfresults
);
- @tempresults =
- map { loc( "Ticket [_1]: [_2]", $Ticket->Id, $_ ) } @tempresults;
+ my $prefix = loc('Ticket') . ' ' . $Ticket->Id . ': ';
+ @tempresults = map { /^$prefix/ ? $_ : loc( "Ticket [_1]: [_2]", $Ticket->Id, $_ ) } @tempresults;
@results = ( @results, @tempresults );
}
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list