Bugzilla – Attachment 148067 Details for
Bug 30920
Add caching to C4::Biblio::GetAuthorisedValueDesc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query
Bug-30920-QA-follow-up-Use-getdirtycolumns-to-avoi.patch (text/plain), 1.20 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-03-10 12:10:16 UTC
(
hide
)
Description:
Bug 30920: (QA follow-up) Use get_dirty_columns to avoid DB query
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-03-10 12:10:16 UTC
Size:
1.20 KB
patch
obsolete
>From fa015a2add78ba86720ac9df68855e35fb03d27c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 10 Mar 2023 09:07:26 -0300 >Subject: [PATCH] Bug 30920: (QA follow-up) Use get_dirty_columns to avoid DB > query > >We can rely on DBIC's get_dirty_columns to check if the descriptions >have changed, and set things for flushing without an extra DB query. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/AuthorisedValue.pm | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm >index a1bdb31e2ae..0fc5f4cd1b6 100644 >--- a/Koha/AuthorisedValue.pm >+++ b/Koha/AuthorisedValue.pm >@@ -49,9 +49,13 @@ sub store { > $flush = 1; > } > else { >- my $self_from_storage = $self->get_from_storage; >- $flush = 1 if ( $self_from_storage->lib ne $self->lib ); >- $flush = 1 if ( $self_from_storage->lib_opac ne $self->lib_opac ); >+ my %updated_columns = $self->_result->get_dirty_columns; >+ >+ if ( exists $updated_columns{lib} >+ or exists $updated_columns{lib_opac} ) >+ { >+ $flush = 1; >+ } > } > > $self = $self->SUPER::store; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30920
:
135771
|
136292
|
136293
|
144817
|
144818
|
144819
|
148064
|
148065
|
148066
|
148067
|
148087
|
148088
|
148089
|
148090
|
148091
|
148092
|
148093
|
148094