[Bug 20760] New: Advanced Cataloging Editor - Rancor - AuthorisedValues are incorrectly fetched
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Bug ID: 20760 Summary: Advanced Cataloging Editor - Rancor - AuthorisedValues are incorrectly fetched Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: nick@bywatersolutions.com Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl /svc/cataloguing/framework fetches the frameworks and needed authorised values. Currently the authorised values are fetched incorrectly fields suing authorised values don't generate the correct helpers To recreate: 1 - Map a marc field to an authorised value in the default framework - say 300$c -> CCODE 2 - Open the advanced cataloguing editor 3 - Create a new field 300$c - note there is no dropdown 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define 5 - Note the many instance of Koha::Schema::ResultSet::AuthorisedValueCategory->HASH... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 75291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75291&action=edit Bug 20760: Correctly fetch authorised values for rancor To test: 1 - Map a marc field to an authorised value in the default framework - say 300$c -> CCODE 2 - Open the advanced cataloguing editor 3 - Create a new field 300$c - note there is no dropdown 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define 5 - Note the many instance of Koha::Schema::ResultSet::AuthorisedValueCategory->HASH... 6 - Apply patch 7 - Restart memcached and plack 8 - reload/recreate record in rancor 9 - Note that 300$c is now a dropdown as expected 10 - repeate 4 11 - note the authorised values look correct in response -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 75291 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75291 Bug 20760: Correctly fetch authorised values for rancor Review of attachment 75291: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20760&attachment=75291) ----------------------------------------------------------------- ::: svc/cataloguing/framework @@ +53,4 @@
}
my $branch_limit = C4::Context->userenv ? C4::Context->userenv->{"branch"} : ""; +my $results = Koha::AuthorisedValues->search({ branchcode => $branch_limit },{ order_by => "lib" });
Will this behave the same if branch_limit is q{}? Perhaps an if to define the passed hashref would be safer? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |mtompset@hotmail.com --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Putting to In Discussion until comment #2 is answered. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think you should "just" call C4::Koha::GetAuthorisedValues, it deals with library limitations, and results are cached. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 75779 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75779&action=edit [ALTERNATIVE PATCH] Bug 20760: Fill authorised values in svc framework -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I still do not see the dropdown lists but I think it's the way to go. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 75779 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75779 [ALTERNATIVE PATCH] Bug 20760: Fill authorised values in svc framework Review of attachment 75779: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20760&attachment=75779) ----------------------------------------------------------------- ::: svc/cataloguing/framework @@ +53,5 @@
}
+my $avs = C4::Koha::GetAuthorisedValues(); +for my $av ( @$avs ) { + push @{ $authorised_values->{$av->{category}} }, { value => $av->{authorised_value}, lib => $av->{lib} };
The other version had order_by lib. This uses order by category first. Perhaps add a sort? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #7)
Comment on attachment 75779 [details] [review] [ALTERNATIVE PATCH] Bug 20760: Fill authorised values in svc framework
Review of attachment 75779 [details] [review]: -----------------------------------------------------------------
::: svc/cataloguing/framework @@ +53,5 @@
}
+my $avs = C4::Koha::GetAuthorisedValues(); +for my $av ( @$avs ) { + push @{ $authorised_values->{$av->{category}} }, { value => $av->{authorised_value}, lib => $av->{lib} };
The other version had order_by lib. This uses order by category first. Perhaps add a sort?
I do not see the point, read again the 3 lines you are quoting ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #7)
Comment on attachment 75779 [details] [review] [ALTERNATIVE PATCH] Bug 20760: Fill authorised values in svc framework
Review of attachment 75779 [details] [review]: -----------------------------------------------------------------
::: svc/cataloguing/framework @@ +53,5 @@
}
+my $avs = C4::Koha::GetAuthorisedValues(); +for my $av ( @$avs ) { + push @{ $authorised_values->{$av->{category}} }, { value => $av->{authorised_value}, lib => $av->{lib} };
The other version had order_by lib. This uses order by category first. Perhaps add a sort?
I do not think it is needed. We are pushing into @{$hash->{$category}}, and template site we are using the keys of this hash separately. I will not help to sort by category. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75291|0 |1 is obsolete| | Attachment #75779|0 |1 is obsolete| | --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 76003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76003&action=edit Bug 20760: Fill authorised values in svc framework To test: 1 - Map a marc field to an authorised value in the default framework - say 300$c -> CCODE 2 - Open the advanced cataloguing editor 3 - Create a new field 300$c - note there is no dropdown 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define 5 - Note the many instance of Koha::Schema::ResultSet::AuthorisedValueCategory->HASH... 6 - Apply patch 7 - Restart memcached and plack 8 - reload/recreate record in rancor 9 - Note that 300$c is now a dropdown as expected 10 - repeate 4 11 - note the authorised values look correct in response Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- I agree with Joubu, we don't need the sort and his patch is better (as usual, *sigh*) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76003|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 76004 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76004&action=edit Bug 20760: Fill authorised values in svc framework To test: 1 - Map a marc field to an authorised value in the default framework - say 300$c -> CCODE 2 - Open the advanced cataloguing editor 3 - Create a new field 300$c - note there is no dropdown 4 - browse to: /cgi-bin/koha/svc/cataloguing/framework?callback=define 5 - Note the many instance of Koha::Schema::ResultSet::AuthorisedValueCategory->HASH... 6 - Apply patch 7 - Restart memcached and plack 8 - reload/recreate record in rancor 9 - Note that 300$c is now a dropdown as expected 10 - repeate 4 11 - note the authorised values look correct in response Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works as expected and passes all tests. I'm happy with it and Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #16 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20760 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org