[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2024-05-11 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Janusz Kaczmarek  changed:

   What|Removed |Added

 Blocks||36834


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36834
[Bug 36834] (Bug 29697 follow-up) Koha explodes when trying to open in Labeled
MARC view a bibliographic record with an invalid biblionumber
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2024-05-03 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Phil Ringnalda  changed:

   What|Removed |Added

 Blocks||24424


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24424
[Bug 24424] Advanced editor - interface hangs as "Loading" when given an
invalid bib number
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2024-02-13 Thread bugzilla-daemon--- via Koha-bugs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Fridolin Somers  changed:

   What|Removed |Added

 Blocks||35490


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35490
[Bug 35490] Remove GetMarcItem from C4::Biblio
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-10-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Martin Renvoize  changed:

   What|Removed |Added

 Blocks||34549


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34549
[Bug 34549] The cataloguing editor allows you to input invalid data
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-06-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Nick Clemens  changed:

   What|Removed |Added

 Blocks||33270


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33270
[Bug 33270] OAI-PMH should not die on record errors
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-06-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Nick Clemens  changed:

   What|Removed |Added

 Blocks||34014


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34014
[Bug 34014] There is no way to fix records with broken MARCXML
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-05-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||33069


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33069
[Bug 33069] File download from list in OPAC gives error
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Aleisha Amohia  changed:

   What|Removed |Added

 Blocks||33347


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33347
[Bug 33347] MARC preview broken when applying MARC modification template
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2023-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Nick Clemens  changed:

   What|Removed |Added

 Blocks||32798


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32798
[Bug 32798] build_oai_sets.pl passes wrong parameter to
Koha::Biblio::Metadata->record
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Status|Needs documenting   |RESOLVED
   Keywords|additional_work_needed  |
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-09-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Lucas Gass  changed:

   What|Removed |Added

 Status|Pushed to master|Needs documenting
 CC||lu...@bywatersolutions.com

--- Comment #137 from Lucas Gass  ---
Enhancement will not be backported to 22.05.x series

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #138804|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #136 from Tomás Cohen Arazi  ---
Created attachment 140008
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140008=edit
Bug 29697: (QA follow-up) Remove useless warning

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #135 from Tomás Cohen Arazi  ---
Created attachment 140007
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140007=edit
Bug 29697: (QA follow-up) Make tests less fragile

This patch makes the tests less fragile to existing data. It does so by
making sure that when checking if the item would be hidden by
OpacHiddenItems and lost status, the item is not skipped, and thus the
notforloan value, as retrieved from the search engine is picked for the
notforloan_count calculation.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #134 from Tomás Cohen Arazi  ---
Comment on attachment 138804
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138804
Bug 29697: WIP - fix t/db_dependent/Search.t

Review of attachment 138804:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=29697=138804)
-

::: t/db_dependent/Search.t
@@ +472,5 @@
> +Koha::Database::flush_schema_cache();
> +fixtures_ok [
> +Item => [
> +[qw( itemnumber )],
> +[ 1 ],

Getting picky but... This is not entirely correct.
When you look at data/marc21/zebraexport/large_biblio/exported_records.xml you
see there are 4 items defined on that record. The itemnumbers for them are 123,
124, 125 and 126. Two of them are set to be not for loan (i.e. $7 1 in this
case). That's why the test is expecting exactly 2 in the notforloancount return
value for searchResults.

This mock on the resultset 'fixes' the tests only because the ->count is
returning 2, so unrelated to the actual itemnumbers.

I think we should just do some simpler mocking. Will give it a try.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Andrew Nugged  changed:

   What|Removed |Added

 CC||nug...@gmail.com

--- Comment #133 from Andrew Nugged  ---
Some remnants in the master branch (I am trying to combine (oh that's the
challenge!) these changes with Bug 20447, that's why giving some parallel
feedback):

I see this left:

C4/Biblio.pm:
   56: EmbedItemsInMarcBiblio

I think that line is the only one that we have across all codebase, so just the
remnants.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Nick Clemens  changed:

   What|Removed |Added

 Attachment #139127|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #132 from Nick Clemens  ---
Created attachment 139127
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139127=edit
Bug 29697: (follow-up) Check against itemnumbers for visibility

No items are shoing on the opac because we are comparing the itemnumber to an
object

This patch simplies check against the itemnumber

Note: With this the inclusion of host_items it still broken as they won't be in
the
visible items list

Bug 31313 will fix this completely

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #131 from Jonathan Druart  ---
(those tests are a mess!)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #130 from Jonathan Druart  ---
The following change should fix the second failure but it does not.

diff --git a/C4/Search.pm b/C4/Search.pm
index 75da21a4e6a..21b33d85fe9 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1828,6 +1828,7 @@ sub searchResults {
 ->filter_by_visible_in_opac({ patron =>
$search_context->{patron} });
 unless ( $hi->count ) {
 push @hiddenitems, $item->{itemnumber};
+$notforloan_count++;
 $hideatopac_count++;
 next;


We are getting 
#  got: '3'
# expected: '2'

Help needed!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||additional_work_needed

--- Comment #129 from Jonathan Druart  ---
From this change in C4::Search::searchResults

-   # OPAC hidden items
+# OPAC hidden items
 if ($is_opac) {
-# hidden because lost
-if ($hidelostitems && $item->{itemlost}) {
+# hidden based on OpacHiddenItems syspref or because lost
+my $hi = Koha::Items->search( { itemnumber =>
$item->{itemnumber} } )
+->filter_by_visible_in_opac({ patron =>
$search_context->{patron} });
+unless ( $hi->count ) {
 push @hiddenitems, $item->{itemnumber};
 $hideatopac_count++;
 next;
 }
-# hidden based on OpacHiddenItems syspref
-my @hi = C4::Items::GetHiddenItemnumbers({ items=> [ $item ],
borcat => $search_context->{category} });
-if (scalar @hi) {
-push @hiddenitems, @hi;
-$hideatopac_count++;
-next;
-}
 }

We are actually dealing with lost items HERE, when we were only dealing with
"OpacHiddenItems" only prior to this change, and lost items where handled
later.
Is that a problem? I don't think so. Should we expect side-effects?

The previous patch fixes the first error. The other one is still failing as we
are expecting notforloan_count to be set.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #128 from Jonathan Druart  ---
Created attachment 138804
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138804=edit
Bug 29697: WIP - fix t/db_dependent/Search.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #127 from Jonathan Druart  ---
This broke t/db_dependent/Search.t for non-LIGHT_RUN (Koha_Master). The data
from koha-misc4dev are not inserted and there are no items in the DB. But those
tests expect items with itemnumber=1 and 2.


t/db_dependent/Search.t ..  
#   Failed test 'All records have at least one item available'  
#   at t/db_dependent/Search.t line 475.
#  got: 'false' 
# expected: 'true'  
Use of uninitialized value $fw in concatenation (.) or string at
t/db_dependent/Search.t line 494.   
Use of uninitialized value $fw in concatenation (.) or string at
t/db_dependent/Search.t line 503.   

#   Failed test ''notforloancount' == 2 (Bug 12419)'
#   at t/db_dependent/Search.t line 758.   
   
 #  got: '0'
# expected: '2' 
# Looks like you failed 2 tests of 92.  
t/db_dependent/Search.t .. 1/3  
#   Failed test 'MARC21 + DOM'  
#   at t/db_dependent/Search.t line 914.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #126 from Jonathan Druart  ---
(In reply to Tomás Cohen Arazi from comment #125)
> Follow-ups pushed to master. We owe you some beers Jonathan. Thanks!

I broke, I fix ;)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #125 from Tomás Cohen Arazi  ---
Follow-ups pushed to master. We owe you some beers Jonathan. Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Keywords|additional_work_needed  |

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #124 from Jonathan Druart  ---
(In reply to Tomás Cohen Arazi from comment #123)
> Created attachment 138090 [details] [review]
> Bug 29697: Fix t/db_dependent/Search.t
> 
> Signed-off-by: Tomas Cohen Arazi 

I have looked at the wrong data apparently, thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #138081|0   |1
is obsolete||

--- Comment #123 from Tomás Cohen Arazi  ---
Created attachment 138090
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138090=edit
Bug 29697: Fix t/db_dependent/Search.t

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #122 from Jonathan Druart  ---
Created attachment 138089
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138089=edit
Bug 29697: tracklinks should not explode on invalid marc record

Caught by t/db_dependent/www/regressions.t

#   Failed test '404 for itemnumber containing different URI'
#   at t/db_dependent/www/regressions.t line 124.
#  got: '500'
# expected: '404'

#   Failed test '302 for itemnumber with matching URI'
#   at t/db_dependent/www/regressions.t line 126.
#  got: '500'
# expected: '302'

#   Failed test '404 for itemnumber containing different URI'
#   at t/db_dependent/www/regressions.t line 139.
#  got: '500'
# expected: '404'

#   Failed test '302 for itemnumber with matching URI'
#   at t/db_dependent/www/regressions.t line 141.
#  got: '500'
# expected: '302'
# Looks like you failed 4 tests of 36.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #121 from Jonathan Druart  ---
Created attachment 138081
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138081=edit
Bug 29697: Fix t/db_dependent/Search.t

FIXME This does not seem correct.
I bet it was coming from a problem in our test data but apparently all
the items in
t/db_dependent/data/marc21/zebraexport/biblio/exported_records have a
952$9

I don't fully understand why we reach this code without itemnumber.

Not sure this is the correct fix

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #120 from Jonathan Druart  ---
Created attachment 138080
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138080=edit
Bug 29697: Fix t/Search.t

#   Failed test 'No tests run for subtest "searchResults PassItemMarcToXSLT
test"'
 #   at t/Search.t line 208.
 Undefined subroutine ::Biblio::EmbedItemsInMarcBiblio called at t/Search.t
line 194.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #119 from Jonathan Druart  ---
Created attachment 138079
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138079=edit
Bug 29697: Reintroduce wrongly removed import

#   Failed test 'No tests run for subtest "CancelHold"'
 #   at t/db_dependent/ILSDI_Services.t line 806.
 Undefined subroutine ::ILSDI::Services::CanReserveBeCanceledFromOpac called
at /kohadevbox/koha/C4/ILSDI/Services.pm line 941.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #118 from Jonathan Druart  ---
Created attachment 138078
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138078=edit
Bug 29697: Fix t/db_dependent/Exporter/Record.t

Not sure about the warn, we shouldn't need it as we are raising an
exception. But better (for now) than introducing regressions.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #138076|0   |1
is obsolete||

--- Comment #117 from Jonathan Druart  ---
Created attachment 138077
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138077=edit
Bug 29697: Replace some missing occurrences

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||additional_work_needed

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #116 from Jonathan Druart  ---
Created attachment 138076
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138076=edit
Bug 29697: Replace some missing occurrences

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||23247


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23247
[Bug 23247] Use EmbedItems in opac-MARCdetail.pl
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #115 from Tomás Cohen Arazi  ---
Pushed to master for 22.11.

Nice work everyone, thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Version(s)||22.11.00
released in||
 Status|Passed QA   |Pushed to master

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||31224


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31224
[Bug 31224] Koha::Biblio::Metadata->record should use the EmbedItems filter
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #114 from Tomás Cohen Arazi  ---
Created attachment 138057
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138057=edit
Bug 29697: (follow-up) Indexing a deleted record is not expected to crash

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #113 from Joonas Kylmälä  ---
(In reply to Jonathan Druart from comment #103)
> Last patch would benefit from a QA review but I don't want to set the status
> back to NQA and lose it for weeks.

Looks good to me, handing off to the release manager.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Attachment #137924|0   |1
is obsolete||

--- Comment #112 from Joonas Kylmälä  ---
Created attachment 137948
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137948=edit
Bug 29697: Don't crash ES reindex if a record is wrong

We don't want rebuild_elasticsearch.pl to crash if a record is wrong
(also fix ktd setup).
Note that now the script will output an error for the problematic
record, which is certainly the expected behaviour as we are doing it
already for authority records.

Signed-off-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #111 from Jonathan Druart  ---
Rebased against master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137894|0   |1
is obsolete||

--- Comment #110 from Jonathan Druart  ---
Created attachment 137924
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137924=edit
Bug 29697: Don't crash ES reindex if a record is wrong

We don't want rebuild_elasticsearch.pl to crash if a record is wrong
(also fix ktd setup).
Note that now the script will output an error for the problematic
record, which is certainly the expected behaviour as we are doing it
already for authority records.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137840|0   |1
is obsolete||

--- Comment #109 from Jonathan Druart  ---
Created attachment 137923
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137923=edit
Bug 29697: Deal with the degraded view in detail.pl

In detail.pl we must provide a degraded view with an error message about
invalid MARC::Record.
We are then forced to reproduce the GetMarcBiblio behaviour and call
StripNonXmlChars on the MARC::XML

Signed-off-by: Marcel de Rooy 
Rebased-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137839|0   |1
is obsolete||

--- Comment #108 from Jonathan Druart  ---
Created attachment 137922
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137922=edit
Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137838|0   |1
is obsolete||

--- Comment #107 from Jonathan Druart  ---
Created attachment 137921
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137921=edit
Bug 29697: Use flag embed_items

Includes:
Bug 29697: (follow-up) Use flag embed_items

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137837|0   |1
is obsolete||

--- Comment #106 from Jonathan Druart  ---
Created attachment 137920
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137920=edit
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy 

JD amended patch:
-my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
-foreach my $item (@items) {
+my $items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
+foreach my $item (@$items) {

-for my $itm (@items) {
+for my $itm (@$items) {

-$dat->{ITEM_RESULTS}   = \@items;
+$dat->{ITEM_RESULTS}   = $items;

-@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
-->filter_by_visible_in_opac( { patron =>
$patron } );
+@items_to_show = Koha::Items->search( { itemnumber => [ map {
$_->{itemnumber} } @all_items ] } )
+->filter_by_visible_in_opac( { patron =>
$patron } )->as_list;

-my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron });
+my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron })->as_list;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137836|0   |1
is obsolete||

--- Comment #105 from Jonathan Druart  ---
Created attachment 137919
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137919=edit
Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record

Signed-off-by: Marcel de Rooy 

JD Amended patch:
-# FIXME Special case here

-print "Biblio not found\n,";
+print "Biblio not found\n";

- my $biblio = Koha::Biblio->find($hostbiblionumber);
+ my $biblio = Koha::Biblios->find($hostbiblionumber);

Rebased-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #137835|0   |1
is obsolete||

--- Comment #104 from Jonathan Druart  ---
Created attachment 137918
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137918=edit
Bug 29697: Special case - opac not needed

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #103 from Jonathan Druart  ---
Last patch would benefit from a QA review but I don't want to set the status
back to NQA and lose it for weeks.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #102 from Jonathan Druart  ---
Created attachment 137894
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137894=edit
Bug 29697: Don't crash ES reindex if a record is wrong

We don't want rebuild_elasticsearch.pl to crash if a record is wrong
(also fix ktd setup).
Note that now the script will output an error for the problematic
record, which is certainly the expected behaviour as we are doing it
already for authority records.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #101 from Tomás Cohen Arazi  ---
(In reply to Joonas Kylmälä from comment #100)
> (In reply to Jonathan Druart from comment #99)
> > May need to be investigated before push.
> 
> In comment 81 the cause was deemed to be an invalid MARC record. However, as
> this breaks the development setup, and the automated test server / jenkins I
> presume, then to me this is FQA. We need to provide a patch along with this
> change that removes the invalid MARC record.

This is actually a behavior change we need to address on this patchset.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #100 from Joonas Kylmälä  ---
(In reply to Jonathan Druart from comment #99)
> May need to be investigated before push.

In comment 81 the cause was deemed to be an invalid MARC record. However, as
this breaks the development setup, and the automated test server / jenkins I
presume, then to me this is FQA. We need to provide a patch along with this
change that removes the invalid MARC record.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #99 from Jonathan Druart  ---
Looks like ktd is failing to setup if those patches are applied and
KOHA_ELASTICSEARCH is set to 1.


koha_1   | [942] Indexing biblios
koha_1   | Invalid data, cannot decode metadata object
(biblio_metadata.id=368, biblionumber=369, format=marcxml, schema=MARC21,
decoding_error=':8: parser error : PCDATA invalid Char value 31
koha_1   |   00aD15937
koha_1   | ^
koha_1   | :9: parser error : PCDATA invalid Char value 31
koha_1   |   00satmrnu0
koha_1   | ^
koha_1   | :9: parser error : PCDATA invalid Char value 31
koha_1   |   00satmrnu0
koha_1   |^
koha_1   | :9: parser error : PCDATA invalid Char value 31
koha_1   |   00satmrnu0
koha_1   |   ^
koha_1   | :9: parser error : PCDATA invalid Char value 31
koha_1   |   00satmrnu0
koha_1   |  ^
koha_1   | :10: parser error : PCDATA invalid Char value 31
koha_1   |   00ar19881981bdkldan
koha_1   | ^
koha_1   | :10: parser error : PCDATA invalid Char value 31
koha_1   |   00ar19881981bdkldan
koha_1   |^
koha_1   | :10: parser error : PCDATA invalid Char value 31
koha_1   |   00ar19881981bdkldan
db_1 | 2022-07-19  7:27:59 13 [Warning] Aborted connection 13 to db:
'koha_kohadev' user: 'koha_kohadev' host: '172.24.0.6' (Got an error reading
communication packets)
koha_1   |^')koha_koha_1 exited
with code 1


May need to be investigated before push.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Passed QA

--- Comment #98 from Joonas Kylmälä  ---
Rebased.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #97 from Joonas Kylmälä  ---
Created attachment 137840
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137840=edit
Bug 29697: Deal with the degraded view in detail.pl

In detail.pl we must provide a degraded view with an error message about
invalid MARC::Record.
We are then forced to reproduce the GetMarcBiblio behaviour and call
StripNonXmlChars on the MARC::XML

Signed-off-by: Marcel de Rooy 
Rebased-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #96 from Joonas Kylmälä  ---
Created attachment 137839
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137839=edit
Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #95 from Joonas Kylmälä  ---
Created attachment 137838
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137838=edit
Bug 29697: Use flag embed_items

Includes:
Bug 29697: (follow-up) Use flag embed_items

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #94 from Joonas Kylmälä  ---
Created attachment 137837
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137837=edit
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy 

JD amended patch:
-my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
-foreach my $item (@items) {
+my $items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
+foreach my $item (@$items) {

-for my $itm (@items) {
+for my $itm (@$items) {

-$dat->{ITEM_RESULTS}   = \@items;
+$dat->{ITEM_RESULTS}   = $items;

-@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
-->filter_by_visible_in_opac( { patron =>
$patron } );
+@items_to_show = Koha::Items->search( { itemnumber => [ map {
$_->{itemnumber} } @all_items ] } )
+->filter_by_visible_in_opac( { patron =>
$patron } )->as_list;

-my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron });
+my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron })->as_list;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #93 from Joonas Kylmälä  ---
Created attachment 137836
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137836=edit
Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record

Signed-off-by: Marcel de Rooy 

JD Amended patch:
-# FIXME Special case here

-print "Biblio not found\n,";
+print "Biblio not found\n";

- my $biblio = Koha::Biblio->find($hostbiblionumber);
+ my $biblio = Koha::Biblios->find($hostbiblionumber);

Rebased-by: Joonas Kylmälä 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Attachment #135797|0   |1
is obsolete||
 Attachment #135978|0   |1
is obsolete||
 Attachment #135979|0   |1
is obsolete||
 Attachment #135980|0   |1
is obsolete||
 Attachment #135981|0   |1
is obsolete||
 Attachment #135982|0   |1
is obsolete||

--- Comment #92 from Joonas Kylmälä  ---
Created attachment 137835
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137835=edit
Bug 29697: Special case - opac not needed

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-07-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Passed QA   |Patch doesn't apply

--- Comment #91 from Joonas Kylmälä  ---
Doesn't apply anymore.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

--- Comment #90 from Joonas Kylmälä  ---
(In reply to Jonathan Druart from comment #89)
> (In reply to Jonathan Druart from comment #83)
> > I missed the other comment anyway, so not ready for PQA.
> 
> Fixed.
> 
> Waiting for Joonas to approve comment 81.

All good now.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #89 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #83)
> I missed the other comment anyway, so not ready for PQA.

Fixed.

Waiting for Joonas to approve comment 81.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #88 from Jonathan Druart  ---
Created attachment 135982
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135982=edit
Bug 29697: Deal with the degraded view in detail.pl

In detail.pl we must provide a degraded view with an error message about
invalid MARC::Record.
We are then forced to reproduce the GetMarcBiblio behaviour and call
StripNonXmlChars on the MARC::XML

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #87 from Jonathan Druart  ---
Created attachment 135981
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135981=edit
Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #86 from Jonathan Druart  ---
Created attachment 135980
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135980=edit
Bug 29697: Use flag embed_items

Includes:
Bug 29697: (follow-up) Use flag embed_items

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #85 from Jonathan Druart  ---
Created attachment 135979
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135979=edit
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy 

JD amended patch:
-my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
-foreach my $item (@items) {
+my $items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
+foreach my $item (@$items) {

-for my $itm (@items) {
+for my $itm (@$items) {

-$dat->{ITEM_RESULTS}   = \@items;
+$dat->{ITEM_RESULTS}   = $items;

-@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
-->filter_by_visible_in_opac( { patron =>
$patron } );
+@items_to_show = Koha::Items->search( { itemnumber => [ map {
$_->{itemnumber} } @all_items ] } )
+->filter_by_visible_in_opac( { patron =>
$patron } )->as_list;

-my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron });
+my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron })->as_list;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135798|0   |1
is obsolete||
 Attachment #135799|0   |1
is obsolete||
 Attachment #135800|0   |1
is obsolete||
 Attachment #135801|0   |1
is obsolete||
 Attachment #135802|0   |1
is obsolete||

--- Comment #84 from Jonathan Druart  ---
Created attachment 135978
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135978=edit
Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record

Signed-off-by: Marcel de Rooy 

JD Amended patch:
-# FIXME Special case here

-print "Biblio not found\n,";
+print "Biblio not found\n";

- my $biblio = Koha::Biblio->find($hostbiblionumber);
+ my $biblio = Koha::Biblios->find($hostbiblionumber);

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #83 from Jonathan Druart  ---
I missed the other comment anyway, so not ready for PQA.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #82 from Jonathan Druart  ---
Joonas, I let you switch the status back to PQA if you agree with the previous
comment.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #81 from Jonathan Druart  ---
(In reply to Joonas Kylmälä from comment #80)
> I found another problem, after this patch the zebra rebuild doesn't work:
> 
> root@kohadevbox:koha(master)$ koha-shell kohadev
> $ perl misc/migration_tools/rebuild_zebra.pl -b
> error retrieving biblio 369 at misc/migration_tools/rebuild_zebra.pl line
> 689.

It is actually fixing a bug :)

Biblio 369 has a bad MARCXML, and so code is expecting this warning (before and
after this patch):

eval {
my $biblio = Koha::Biblios->find($record_number);
$marc = $biblio->metadata->record({ embed_items => 1 }); 
};
if ($@ || !$marc) {
# here we do warn since catching an exception
# means that the bib was found but failed
# to be parsed
warn "error retrieving biblio $record_number";
return;
}

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #80 from Joonas Kylmälä  ---
I found another problem, after this patch the zebra rebuild doesn't work:

root@kohadevbox:koha(master)$ koha-shell kohadev
$ perl misc/migration_tools/rebuild_zebra.pl -b
error retrieving biblio 369 at misc/migration_tools/rebuild_zebra.pl line 689.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #79 from Katrin Fischer  ---
Good catch, Joonas!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Joonas Kylmälä  changed:

   What|Removed |Added

 CC||joonas.kylm...@iki.fi
 Status|Passed QA   |Failed QA

--- Comment #78 from Joonas Kylmälä  ---
This patch series breaks easy analytic link creation. To reproduce:

1. Enable EasyAnalyticalRecords syspref
2. Go to any biblio page in the staff interface
3. Click New -> Analyze items
4. On one of the items for the biblio click "Create analytics"
5. Notice you get the following error:

> Can't use string ("Koha::Biblio") as a HASH ref while "strict refs" in use at 
> /kohadevbox/koha/Koha/Object.pm line 830

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #77 from Jonathan Druart  ---
Patches rebased against master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #76 from Jonathan Druart  ---
Created attachment 135802
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135802=edit
Bug 29697: Deal with the degraded view in detail.pl

In detail.pl we must provide a degraded view with an error message about
invalid MARC::Record.
We are then forced to reproduce the GetMarcBiblio behaviour and call
StripNonXmlChars on the MARC::XML

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #75 from Jonathan Druart  ---
Created attachment 135801
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135801=edit
Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #74 from Jonathan Druart  ---
Created attachment 135800
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135800=edit
Bug 29697: Use flag embed_items

Includes:
Bug 29697: (follow-up) Use flag embed_items

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #73 from Jonathan Druart  ---
Created attachment 135799
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135799=edit
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy 

JD amended patch:
-my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
-foreach my $item (@items) {
+my $items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
+foreach my $item (@$items) {

-for my $itm (@items) {
+for my $itm (@$items) {

-$dat->{ITEM_RESULTS}   = \@items;
+$dat->{ITEM_RESULTS}   = $items;

-@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
-->filter_by_visible_in_opac( { patron =>
$patron } );
+@items_to_show = Koha::Items->search( { itemnumber => [ map {
$_->{itemnumber} } @all_items ] } )
+->filter_by_visible_in_opac( { patron =>
$patron } )->as_list;

-my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron });
+my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron })->as_list;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #72 from Jonathan Druart  ---
Created attachment 135798
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135798=edit
Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record

Signed-off-by: Marcel de Rooy 

JD Amended patch:
-# FIXME Special case here

-print "Biblio not found\n,";
+print "Biblio not found\n";

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135668|0   |1
is obsolete||
 Attachment #135669|0   |1
is obsolete||
 Attachment #135670|0   |1
is obsolete||
 Attachment #135671|0   |1
is obsolete||
 Attachment #135672|0   |1
is obsolete||
 Attachment #135673|0   |1
is obsolete||

--- Comment #71 from Jonathan Druart  ---
Created attachment 135797
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135797=edit
Bug 29697: Special case - opac not needed

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #70 from Nick Clemens  ---
(In reply to Tomás Cohen Arazi from comment #69)
> (In reply to Marcel de Rooy from comment #44)
> > See also IRC
> > 
> > -my $marcrecord = C4::Biblio::GetMarcBiblio({ biblionumber =>
> > $biblionumber });
> > +my $biblio = Koha::Biblios->find($biblionumber);
> > +my $marcrecord = $biblio->metadata->record;
> > 
> > This is a general pattern for most of the changes.
> > Do you have performance figures ?
> 
> We should add `{ prefetch => [ 'metadata' ] }` on the biblio search.

For a single record, I don't think it's better. See:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30169

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #69 from Tomás Cohen Arazi  ---
(In reply to Marcel de Rooy from comment #44)
> See also IRC
> 
> -my $marcrecord = C4::Biblio::GetMarcBiblio({ biblionumber =>
> $biblionumber });
> +my $biblio = Koha::Biblios->find($biblionumber);
> +my $marcrecord = $biblio->metadata->record;
> 
> This is a general pattern for most of the changes.
> Do you have performance figures ?

We should add `{ prefetch => [ 'metadata' ] }` on the biblio search.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #68 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #67)
> (In reply to Marcel de Rooy from comment #60)
> > (In reply to Jonathan Druart from comment #59)
> > > (In reply to Marcel de Rooy from comment #48)
> > > > +my $invalid_marc_record = $@ || !$marc_record;
> > > > +if ($invalid_marc_record) {
> > > > +$template->param( decoding_error => $@ );
> > > > 
> > > > Theoretically $@ might be empty but there is not $marc_record.
> > > > So you could provide a fallback for no error message in the last line..
> > > 
> > > Indeed. No idea what's better. Do you think we need to pass another 
> > > variable
> > > to the template (invalid_marc_record set to 1)?
> > 
> > Or just $@ // 'some great message' to keep it simple and not touch the
> > template?
> 
> An untranslatable message? :)

I would keep like that for now, and see if we need to improve later.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #67 from Jonathan Druart  ---
(In reply to Marcel de Rooy from comment #60)
> (In reply to Jonathan Druart from comment #59)
> > (In reply to Marcel de Rooy from comment #48)
> > > +my $invalid_marc_record = $@ || !$marc_record;
> > > +if ($invalid_marc_record) {
> > > +$template->param( decoding_error => $@ );
> > > 
> > > Theoretically $@ might be empty but there is not $marc_record.
> > > So you could provide a fallback for no error message in the last line..
> > 
> > Indeed. No idea what's better. Do you think we need to pass another variable
> > to the template (invalid_marc_record set to 1)?
> 
> Or just $@ // 'some great message' to keep it simple and not touch the
> template?

An untranslatable message? :)

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #66 from Jonathan Druart  ---
Created attachment 135673
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135673=edit
Bug 29697: Deal with the degraded view in detail.pl

In detail.pl we must provide a degraded view with an error message about
invalid MARC::Record.
We are then forced to reproduce the GetMarcBiblio behaviour and call
StripNonXmlChars on the MARC::XML

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #65 from Jonathan Druart  ---
Created attachment 135672
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135672=edit
Bug 29697: Fix tests

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #64 from Jonathan Druart  ---
Created attachment 135671
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135671=edit
Bug 29697: Use flag embed_items

Includes:
Bug 29697: (follow-up) Use flag embed_items

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #63 from Jonathan Druart  ---
Created attachment 135670
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135670=edit
Bug 29697: Remove GetHiddenItemnumbers

Signed-off-by: Marcel de Rooy 

JD amended patch:
-my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
-foreach my $item (@items) {
+my $items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
+foreach my $item (@$items) {

-for my $itm (@items) {
+for my $itm (@$items) {

-$dat->{ITEM_RESULTS}   = \@items;
+$dat->{ITEM_RESULTS}   = $items;

-@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
-->filter_by_visible_in_opac( { patron =>
$patron } );
+@items_to_show = Koha::Items->search( { itemnumber => [ map {
$_->{itemnumber} } @all_items ] } )
+->filter_by_visible_in_opac( { patron =>
$patron } )->as_list;

-my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron });
+my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1,
patron => $patron })->as_list;

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #62 from Jonathan Druart  ---
Created attachment 135669
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135669=edit
Bug 29697: Replace GetMarcBiblio occurrences with $biblio->metadata->record

Signed-off-by: Marcel de Rooy 

JD Amended patch:
-# FIXME Special case here

-print "Biblio not found\n,";
+print "Biblio not found\n";

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135662|0   |1
is obsolete||
 Attachment #135663|0   |1
is obsolete||
 Attachment #135664|0   |1
is obsolete||
 Attachment #135665|0   |1
is obsolete||
 Attachment #135666|0   |1
is obsolete||
 Attachment #135667|0   |1
is obsolete||

--- Comment #61 from Jonathan Druart  ---
Created attachment 135668
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135668=edit
Bug 29697: Special case - opac not needed

Signed-off-by: Marcel de Rooy 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #60 from Marcel de Rooy  ---
(In reply to Jonathan Druart from comment #59)
> (In reply to Marcel de Rooy from comment #48)
> > +my $invalid_marc_record = $@ || !$marc_record;
> > +if ($invalid_marc_record) {
> > +$template->param( decoding_error => $@ );
> > 
> > Theoretically $@ might be empty but there is not $marc_record.
> > So you could provide a fallback for no error message in the last line..
> 
> Indeed. No idea what's better. Do you think we need to pass another variable
> to the template (invalid_marc_record set to 1)?

Or just $@ // 'some great message' to keep it simple and not touch the
template?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #135580|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #59 from Jonathan Druart  ---
(In reply to Marcel de Rooy from comment #47)
> diff --git a/catalogue/detail.pl b/catalogue/detail.pl
> index 502963f8d6..120fc28a88 100755
> --- a/catalogue/detail.pl
> +++ b/catalogue/detail.pl
> @@ -84,6 +84,7 @@ if ( C4::Context->config('enable_plugins') ) {
> 
>  my $biblionumber = $query->param('biblionumber');
>  $biblionumber = HTML::Entities::encode($biblionumber);
> +# FIXME Special case here
>  my $record   = GetMarcBiblio({ biblionumber => $biblionumber });
>  my $biblio = Koha::Biblios->find( $biblionumber );
> 
> 
> Not completely clear what this FIXME is doing here now.
> I assume that it relates to the encode biblionumber thing. But if it does,
> it would be a better idea to put it on the same line.
> In this context it could be something with this change too..

Hum, wondering if this is still valid. Maybe it was just a note for myself when
I was writing the first patch. detail.pl is a special case as it's the only
place where we deal with invalid metadata but there is nothing to fix.

(In reply to Marcel de Rooy from comment #48)
> +my $invalid_marc_record = $@ || !$marc_record;
> +if ($invalid_marc_record) {
> +$template->param( decoding_error => $@ );
> 
> Theoretically $@ might be empty but there is not $marc_record.
> So you could provide a fallback for no error message in the last line..

Indeed. No idea what's better. Do you think we need to pass another variable to
the template (invalid_marc_record set to 1)?

(In reply to Marcel de Rooy from comment #49)
> +++ b/misc/maintenance/process_record_through_filter.pl
> +my $biblio = Koha::Biblios->find($ARGV[0]);
> +unless ( $biblio ) {
> +print "Biblio not found\n,";
> +exit;
> 
> Looks a bit odd with that comma.

Looks like a typo.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #58 from Marcel de Rooy  ---
opac/opac-detail.pl:
if ( scalar @all_items >= 1 ) {
@items_to_show = Koha::Items->search( { itemnumbers => [ map {
$_->{itemnumber} } @all_items ] } )
->filter_by_visible_in_opac( { patron =>
$patron } );

opac/opac-tags.pl:
my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1, patron =>
$patron });

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

2022-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #57 from Marcel de Rooy  ---
Just a bit of post testing ;)

Crash on opening cart
Not a HASH reference at /usr/share/koha/opac/opac-basket.pl line 99

my @items= $biblio->items->filter_by_visible_in_opac({ patron =>
$logged_in_user })->unblessed;
   98: foreach my $item (@items) {
   99: my $reserve_status =
C4::Reserves::GetReserveStatus($item->{itemnumber});

Sub search returns a result set now, heh?
So we need to iterate with ->next..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   >