Bugzilla – Attachment 108795 Details for
Bug 18501
Automatic refunds need protection from failure
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18501: Don't use paidfor for DB fields not mapped with a MARC field
Bug-18501-Dont-use-paidfor-for-DB-fields-not-mappe.patch (text/plain), 1.71 KB, created by
Jonathan Druart
on 2020-08-21 10:04:47 UTC
(
hide
)
Description:
Bug 18501: Don't use paidfor for DB fields not mapped with a MARC field
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-08-21 10:04:47 UTC
Size:
1.71 KB
patch
obsolete
>From aefb12ef0e123fb8a56c4e7433d7d3d34e7c75c2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 21 Aug 2020 12:02:07 +0200 >Subject: [PATCH] Bug 18501: Don't use paidfor for DB fields not mapped with a > MARC field > >On "Bug 25964: Prevent data loss when editing items from a MARC record" >we picked paidfor as an example, but it has a specific behaviour and is >now handled in Koha::Item->store. >Let's pick another one, new_status >--- > t/db_dependent/Items.t | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index 3da406ac9e..4e7fecb2e3 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -984,7 +984,7 @@ subtest 'ModItemFromMarc' => sub { > my $item = Koha::Items->find($itemnumber); > is( $item->itemlost, 1, 'itemlost picked from the item marc'); > >- $item->paidfor("this is something")->store; >+ $item->new_status("this is something")->store; > > my $updated_item_record = new MARC::Record; > $updated_item_record->append_fields( >@@ -996,8 +996,8 @@ subtest 'ModItemFromMarc' => sub { > > my $updated_item = ModItemFromMarc($updated_item_record, $biblio->biblionumber, $itemnumber); > is( $updated_item->{itemlost}, 0, 'itemlost should have been reset to the default value in DB' ); >- is( $updated_item->{paidfor}, "this is something", "Non mapped field has not been reset" ); >- is( Koha::Items->find($itemnumber)->paidfor, "this is something" ); >+ is( $updated_item->{new_status}, "this is something", "Non mapped field has not been reset" ); >+ is( Koha::Items->find($itemnumber)->new_status, "this is something" ); > > $schema->storage->txn_rollback; > }; >-- >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 18501
:
108004
|
108005
|
108006
|
108121
|
108122
|
108123
|
108167
|
108168
|
108169
|
108170
|
108193
|
108194
|
108195
|
108243
|
108248
|
108249
|
108291
|
108292
|
108293
|
108294
|
108295
|
108296
|
108297
|
108298
|
108299
|
108300
|
108301
|
108482
|
108483
|
108484
|
108485
|
108486
|
108487
|
108488
|
108489
|
108490
|
108491
|
108492
|
108493
|
108494
|
108575
|
108576
|
108577
|
108578
|
108579
|
108580
|
108581
|
108582
|
108583
|
108584
|
108585
|
108586
|
108596
|
108597
|
108598
|
108599
|
108600
|
108601
|
108602
|
108603
|
108604
|
108605
|
108606
|
108607
|
108608
|
108610
|
108611
|
108612
|
108613
|
108614
|
108615
|
108616
|
108617
|
108618
|
108619
|
108620
|
108621
|
108717
|
108732
|
108738
|
108739
|
108740
|
108741
|
108784
|
108785
|
108786
|
108787
|
108788
| 108795 |
111295