When receiving issues in serials subfield 2, a, and b are blank on the item form. This wasn't the case in 3.8 they used to fill in with the defaults like when in cataloging.
Also subfield o
*** Bug 9901 has been marked as a duplicate of this bug. ***
Created attachment 16933 [details] [review] Bug 9902 - item subfields not populating in 3.10 Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated
Created attachment 16938 [details] [review] Bug 9902 - item subfields not populating in 3.10 Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass!
Comment on attachment 16938 [details] [review] Bug 9902 - item subfields not populating in 3.10 Review of attachment 16938 [details] [review]: ----------------------------------------------------------------- ::: C4/Items.pm @@ +2663,1 @@ > $defaultvalue = $defaultvalues->{callnumber}; Hmm this doesn't make sense to me We have if do something else do the exact same thing couldnt that just be do the thing IE couldnt that just be $defaultvalue = $defaultvalues->{callnumber}; The comments do not match the code, that else will be triggered even if the item record does exist, if the has a callnumber, it will match the else. IE the whole IF and ELSE is a no op
Created attachment 17092 [details] [review] Bug 9902 - item subfields not populating in 3.10 Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass!
Created attachment 17093 [details] [review] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass!
(In reply to comment #7) > Created attachment 17093 [details] [review] [review] > Bug 9902 - item subfields not populating Thanks for addressing the review, ill retest now
Interestingly in 3.8.x we did if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) && $defaultvalues && $defaultvalues->{'branchcode'} ) { my $temp; if ($itemrecord) { $temp = $itemrecord->field($subfield); } unless ($temp) { $defaultvalue = $defaultvalues->{branchcode} if $defaultvalues; } } Bug 9116 removed these, and inadvertently caused this regression if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag && $defaultvalues && $defaultvalues->{'branchcode'} ) { - my $temp; - if ($itemrecord) { - $temp = $itemrecord->field($subfield); - } - unless ($temp) { - $defaultvalue = $defaultvalues->{branchcode} if $defaultvalues; + if ( $itemrecord and $defaultvalues and not $itemrecord->field($subfield) ) { + $defaultvalue = $defaultvalues->{branchcode}; } } You'll notice the new behaviour is not the same as the old one, basically the change in bug 9116 is fine for editing any item, but means that default values are never used on new items, causing the problem that Nicole discovered and Kyle fixed. We have a couple of choices, revert bug 9116 (probably hard to do now) as it was just a code cleaning fix that broke functionality, or use Kyle's patch. I think probably best to use Kyles patch. This does prove a good illustration of why code cleaning is good in theory, hard to get right in practice. http://blog.bigballofwax.co.nz/2012/07/31/yes-you-should-rewrite-it-no-not-like-that/
Created attachment 17114 [details] [review] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This seems to restore the former behaviour.
I agreee that this is an improvement, but I think we are still missing something - shelving location. I can specify that in the subscription, but it does not carry over.
Hmm, not sure what happened, but on retesting this it works for all listed fields.
Created attachment 17257 [details] [review] [PUSHED 3.12&master][PASSED QA] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This seems to restore the former behaviour. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests and QA script pass.
This patch has been pushed to master and 3.12.x.
I am not sure, but I fear this patch is responsible for a nasty software error when creating a basket with staged records. See BZ 10088 M. Saby
Was this pushed to 3.10.x? I don't think so and that's where this bug was found. Reopening. Close if I'm wrong.
This couldn't be pushed, because it caused another bug on 10088. I would like to see this solved with a patch for 3.10 specifically and the patch being signed off also making sure the problem from 10088 doesn't occur.
Created attachment 18454 [details] [review] [3.10.X] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This seems to restore the former behaviour.
Jonathan, did you see my comment 17? Bit worried about the problems with bug 10088.
Nicole, I submit a patch for the 3.10 branch. Could you test it please? Patch for 10088 has to be applied too! @Katrin, No I did not see your comment before submitting the patch, sorry :-/ But if 2 patches are pushed together, I expect not to have problem. Don't you think?
Created attachment 19388 [details] [review] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This seems to restore the former behaviour. Signed-off-by: Liz Rea <liz@catalyst.net.nz> signing for 3.10.x - restores former behaviour.
Created attachment 20089 [details] [review] [3.10.x][PASSED QA] Bug 9902 - item subfields not populating Test Plan: 1) Create a new serial with a default location, call number, and library ( the library will need to be any but the one you are logged in as ) 2) Click the "Recieve" button for this serial 3) Click "Click to add item" 4) Note those values are not populated 5) Apply the patch 6) Reload the page 7) Click "Click to add item" 8) Note those values are now populated Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All tests pass! Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> This seems to restore the former behaviour. Signed-off-by: Liz Rea <liz@catalyst.net.nz> signing for 3.10.x - restores former behaviour. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works nicely. Before applying the patch callnumber, location and branches are not carried over correctly. After applying the patch, this works as expected.
Pushed to 3.10.x, will be in 3.10.10