Created attachment 70808 [details]
item table
Created attachment 70809 [details]
authorized values
Hi Marjorie, can you check in your framework for 952$3 which authorised value it's mapped to? (In reply to Katrin Fischer from comment #3) > Hi Marjorie, can you check in your framework for 952$3 which authorised > value it's mapped to? Hi Katrin, There is no mapped authorised value to the 952 $ 3 field. have you been able to reproduce the problem of your board? Regards, Marjorie Hi Marjorie, are you sure? Your screenshots shows numeric values for materials, that's why I was asking. Do you enter them manually? (In reply to Katrin Fischer from comment #5) > Hi Marjorie, are you sure? Your screenshots shows numeric values for > materials, that's why I was asking. Do you enter them manually? Oh yes, i entered them manually. If i write "vol.1", it's correct but if I write only the numbers it displays the text of the authorized value of ORDER_CANCELLATION_REASON Marjorie Last question: Which version exactly? I will try to test :) (In reply to Katrin Fischer from comment #7) > Last question: Which version exactly? I will try to test :) Tested on 16.11.00 and 17.05.05. Thanks! Marjorie Hi Marjorie, can confirm this with the sample data on master! To test: - make sure sample data and configuration is loaded - edit any item - write 2 in the $3 materials specificed - check the details page normal view - it will display 'restocking' I think the error is in detail.pl around here: $mss = Koha::MarcSubfieldStructures->search({ frameworkcode => $fw, kohafield => 'items.materials', authorised_value => { not => undef } }); my %materials_map; use Data::Dumper; warn Dumper $mss->count; if ($mss->count) { my $materials_authvals = GetAuthorisedValues($mss->next->authorised_value); if ($materials_authvals) { foreach my $value (@$materials_authvals) { $materials_map{$value->{authorised_value}} = $value->{lib}; } } } Caused by commit 0b6f129ac32e5ea3a2d1357d8e19ba3e24519757 Bug 17250: Do not retrieve marc subfield structure when the authorised value is not defined (In reply to Jonathan Druart from comment #11) > Caused by commit 0b6f129ac32e5ea3a2d1357d8e19ba3e24519757 > Bug 17250: Do not retrieve marc subfield structure when the authorised > value is not defined Or maybe before... What we need is: select authorised_value from marc_subfield_structure where frameworkcode = "BKS" and kohafield = "items.materials" and authorised_value is not null and authorised_value != ""; But I am failing to translate this correctly at the moment. Created attachment 72100 [details] [review] Bug 20067: Fix false display of authorised value for materials on staff detail page Koha didn't check for a linked authorised value category for items.materials correctly which led to displaying false information on the detail page. To test: - before applying the patch: - make sure sample data and configuration is loaded - edit any item - write 2 in the $3 materials specificed - check the details page normal view - it will display 'restocking' - apply patch - check display, it should now show "2" - link 952$3 (MARC21) to ORDER_CANCELLATION_REASON - check display again, it should now show 'restocking' Created attachment 72101 [details] [review] Bug 20067: Fix other checks for linked authorised value categories The same pattern was used in other files, this patch fixes it. After getting some sleep... :) you defined twice the same key "!=" in the condition hashref. Koha::MarcSubfieldStructures->search( { frameworkcode => '', kohafield => 'items.materials', -or => [ { authorised_value => { not => undef } }, { authorised_value => { '!=' => '' } } ] } ); will generate SELECT `me`.`tagfield`, `me`.`tagsubfield`, `me`.`liblibrarian`, `me`.`libopac`, `me`.`repeatable`, `me`.`mandatory`, `me`.`kohafield`, `me`.`tab`, `me`.`authorised_value`, `me`.`authtypecode`, `me`.`value_builder`, `me`.`isurl`, `me`.`hidden`, `me`.`frameworkcode`, `me`.`seealso`, `me`.`link`, `me`.`defaultvalue`, `me`.`maxlength` FROM `marc_subfield_structure` `me` WHERE ( ( ( `authorised_value` IS NOT NULL OR `authorised_value` != ? ) AND `frameworkcode` = ? AND `kohafield` = ? ) ): '', '', 'items.materials' Which is what we want. Created attachment 72120 [details] [review] Bug 20067: Fix false display of authorised value for materials on staff detail page Koha didn't check for a linked authorised value category for Koha didn't check for a linked authorised value category for items.materials correctly which led to displaying false information on the detail page. To test: - before applying the patch: - make sure sample data and configuration is loaded - edit any item - write 2 in the $3 materials specificed - check the details page normal view - it will display 'restocking' - apply patch - check display, it should now show "2" - link 952$3 (MARC21) to ORDER_CANCELLATION_REASON - check display again, it should now show 'restocking' Created attachment 72121 [details] [review] Bug 20067: Fix other checks for linked authorised value categories The same pattern was used in other files, this patch fixes it. the tile of the ticket is not good. it is rather 'Display the description authorised valeur is you mapping with items.materials Created attachment 72991 [details] [review] Bug 20067: Fix false display of authorised value for materials on staff detail page Koha didn't check for a linked authorised value category for Koha didn't check for a linked authorised value category for items.materials correctly which led to displaying false information on the detail page. To test: - before applying the patch: - make sure sample data and configuration is loaded - edit any item - write 2 in the $3 materials specificed - check the details page normal view - it will display 'restocking' - apply patch - check display, it should now show "2" - link 952$3 (MARC21) to ORDER_CANCELLATION_REASON - check display again, it should now show 'restocking' Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Created attachment 72992 [details] [review] Bug 20067: Fix other checks for linked authorised value categories The same pattern was used in other files, this patch fixes it. Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Created attachment 73181 [details] [review] Bug 20067: Fix false display of authorised value for materials on staff detail page Koha didn't check for a linked authorised value category for Koha didn't check for a linked authorised value category for items.materials correctly which led to displaying false information on the detail page. To test: - before applying the patch: - make sure sample data and configuration is loaded - edit any item - write 2 in the $3 materials specificed - check the details page normal view - it will display 'restocking' - apply patch - check display, it should now show "2" - link 952$3 (MARC21) to ORDER_CANCELLATION_REASON - check display again, it should now show 'restocking' Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 73182 [details] [review] Bug 20067: Fix other checks for linked authorised value categories The same pattern was used in other files, this patch fixes it. Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 18.05, thanks to everybody involved! Awesome work all, backported to stable for 17.11.05 Conflict for 17.05.x in circ/circulation.pl. I will not risk to release in 17.05.11 |
Created attachment 70807 [details] notice view Hi, Is it normal contents of authorised values of the ORDER_CANCELLATION category are displayed in items table for the materials specified fields? Test plan: 1. Fill with 2 in a subfield 952 $3 and save item 2. Display item table in normal view 3. See column Materials specified which display authorised values instead of number 2 See attached images Regards Marjorie