Bugzilla – Attachment 117606 Details for
Bug 24446
Stockrotation: Update to use daterequested in branchtransfers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24446: (QA follow-up) Remove superflous store calls
Bug-24446-QA-follow-up-Remove-superflous-store-cal.patch (text/plain), 1.73 KB, created by
Jonathan Druart
on 2021-03-03 14:32:46 UTC
(
hide
)
Description:
Bug 24446: (QA follow-up) Remove superflous store calls
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-03 14:32:46 UTC
Size:
1.73 KB
patch
obsolete
>From d47a5ea9055f9244c2e88e6bf597c0bcd0c5dd96 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 18 Feb 2021 10:54:34 +0000 >Subject: [PATCH] Bug 24446: (QA follow-up) Remove superflous store calls > >The original code here called store after setting each field. Instead, >we set all the fields and call store at the end and save ourselves a few >database hits. >--- > Koha/StockRotationItem.pm | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/Koha/StockRotationItem.pm b/Koha/StockRotationItem.pm >index a3e49a00c7..6c6d99cd43 100644 >--- a/Koha/StockRotationItem.pm >+++ b/Koha/StockRotationItem.pm >@@ -202,14 +202,14 @@ sub advance { > my $stage = $self->stage; > my $new_stage; > if ( $self->indemand && !$self->fresh ) { >- $self->indemand(0)->store; # De-activate indemand >+ $self->indemand(0); # De-activate indemand > $new_stage = $stage; > } > else { > # New to rota? > if ( $self->fresh ) { > $new_stage = $self->stage->first_sibling || $self->stage; >- $self->fresh(0)->store; # Reset fresh >+ $self->fresh(0); # Reset fresh > } > # Last stage? > elsif ( !$stage->last_sibling ) { >@@ -229,7 +229,8 @@ sub advance { > } > > # Update stage and record transfer >- $self->stage_id( $new_stage->stage_id )->store; # Set new stage >+ $self->stage_id( $new_stage->stage_id ); # Set new stage >+ $self->store(); > $item->homebranch( $new_stage->branchcode_id )->store; # Update homebranch > $transfer = try { > $item->request_transfer( >-- >2.20.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 24446
:
105943
|
105944
|
105945
|
107246
|
107247
|
107248
|
107249
|
107250
|
107252
|
107253
|
107254
|
107255
|
107256
|
107301
|
107302
|
107303
|
107304
|
107305
|
110280
|
110281
|
110282
|
110283
|
110533
|
110534
|
110535
|
110536
|
110537
|
110538
|
110539
|
110540
|
110541
|
110542
|
111322
|
116557
|
116558
|
116559
|
116560
|
116561
|
116562
|
116563
|
116564
|
116565
|
116566
|
116567
|
116568
|
116569
|
116570
|
117589
|
117590
|
117591
|
117592
|
117593
|
117594
|
117595
|
117596
|
117597
|
117598
|
117599
|
117600
|
117601
|
117602
|
117603
|
117604
|
117605
| 117606 |
117607
|
120116