[Koha-bugs] [Bug 22690] Merging records with many items too slow (Elasticsearch)

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Jonathan Druart  changed:

   What|Removed |Added

   Keywords|additional_work_needed  |

--- Comment #211 from Jonathan Druart  ---
ok, let's keep as it for now, thanks!

Note:

(In reply to Jonathan Druart from comment #201)
>   * We will need to update existing entries (set to NULL when 0 or
> deleted), we can take the opportunity to remove the rows with
> biblionumber=null, itemnumber=null, biblionumber=null.

The DBRev already deals with that.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #210 from Ere Maijala  ---
(In reply to Jonathan Druart from comment #209)
> I am not sure it's relevant as you lost the link (on delete set null).
> 
> The question basically is: do we want to know how many times a user clicked
> on records that have been deleted?

The url is still recorded in the tracking table, and that might be all you need
regardless of the biblio that contained it. The bottom line is, I wouldn't want
to make too many assumptions about the possible use cases and potentially
handicap someone's reporting. I also think such change, if implemented, should
not be a side effect of this issue, but would need to be its own issue with
clear decisions, perhaps an RFC as well.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #209 from Jonathan Druart  ---
(In reply to Katrin Fischer from comment #208)
> (In reply to Nick Clemens from comment #207)
> > (In reply to Ere Maijala from comment #206)
> > > Jonathan,
> > > 
> > > I'm still not sure it makes sense to delete the tracking information when 
> > > a
> > > biblio is deleted. That would break the first use case described here:
> > > 
> > > https://bywatersolutions.com/news/koha-tutorial-track-click-system-preference
> > > 
> > > The second example has a JOIN with the biblio table, but I'm not convinced
> > > it's intentionally ignoring the case of deleted biblios.
> > 
> > I think both cases there are tracking use of current resources.
> > 
> > My assumption would be that a deleted resource is no longer available and
> > the decisions has already been made (i.e. you ended the subscription) so
> > that tracking does not need to be retained
> 
> I think this is true if you want to report on a specific resource, but I
> think the information could still be useful if you want to purchase the
> records again in another license model or when doing annual reporting on
> e-resource use.

I am not sure it's relevant as you lost the link (on delete set null).

The question basically is: do we want to know how many times a user clicked on
records that have been deleted?

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #208 from Katrin Fischer  ---
(In reply to Nick Clemens from comment #207)
> (In reply to Ere Maijala from comment #206)
> > Jonathan,
> > 
> > I'm still not sure it makes sense to delete the tracking information when a
> > biblio is deleted. That would break the first use case described here:
> > 
> > https://bywatersolutions.com/news/koha-tutorial-track-click-system-preference
> > 
> > The second example has a JOIN with the biblio table, but I'm not convinced
> > it's intentionally ignoring the case of deleted biblios.
> 
> I think both cases there are tracking use of current resources.
> 
> My assumption would be that a deleted resource is no longer available and
> the decisions has already been made (i.e. you ended the subscription) so
> that tracking does not need to be retained

I think this is true if you want to report on a specific resource, but I think
the information could still be useful if you want to purchase the records again
in another license model or when doing annual reporting on e-resource use.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #207 from Nick Clemens  ---
(In reply to Ere Maijala from comment #206)
> Jonathan,
> 
> I'm still not sure it makes sense to delete the tracking information when a
> biblio is deleted. That would break the first use case described here:
> 
> https://bywatersolutions.com/news/koha-tutorial-track-click-system-preference
> 
> The second example has a JOIN with the biblio table, but I'm not convinced
> it's intentionally ignoring the case of deleted biblios.

I think both cases there are tracking use of current resources.

My assumption would be that a deleted resource is no longer available and the
decisions has already been made (i.e. you ended the subscription) so that
tracking does not need to be retained

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #206 from Ere Maijala  ---
Jonathan,

I'm still not sure it makes sense to delete the tracking information when a
biblio is deleted. That would break the first use case described here:

https://bywatersolutions.com/news/koha-tutorial-track-click-system-preference

The second example has a JOIN with the biblio table, but I'm not convinced it's
intentionally ignoring the case of deleted biblios.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #205 from Jonathan Druart  ---
Follow-up still needed for 21.11

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-09-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

David Nind  changed:

   What|Removed |Added

  Text to go in the||This enhancement
  release notes||significantly improves the
   ||performance when merging
   ||records with many items
   ||(for an installation using
   ||Elasticsearch).
   ||
   ||Before
   ||this enhancement the web
   ||server would time out as
   ||the search engine was
   ||reindexing the origin
   ||record and the destination
   ||record for each item
   ||moving.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-09-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Kyle M Hall  changed:

   What|Removed |Added

 Status|Pushed to master|RESOLVED
 Resolution|--- |FIXED

--- Comment #204 from Kyle M Hall  ---
Does not apply cleanly to 21.05.x. If this is needed for 21.05 please create a
21.05 patch. 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 22690] Merging records with many items too slow (Elasticsearch)

2021-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #203 from Jonathan Druart  ---
(In reply to Ere Maijala from comment #202)
> Jonathan, I've lost track of things a bit here, but since linktracker also
> tracks clicks per borrower, would it still be useful to keep the records?
> Also, if cascade delete would be used, would it only affect biblionumber,
> not itemnumber or borrowernumber? 

In my understanding we want to keep track of the number of clicks on the
records, so even if the patron of item is deleted we should keep the entry.

> Or to put it another way, if we don't want to keep the records after the
> biblio is deleted, why is biblionumber nullable in the table?

Correct, that is not consistent.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #202 from Ere Maijala  ---
Jonathan, I've lost track of things a bit here, but since linktracker also
tracks clicks per borrower, would it still be useful to keep the records? Also,
if cascade delete would be used, would it only affect biblionumber, not
itemnumber or borrowernumber? 
Or to put it another way, if we don't want to keep the records after the biblio
is deleted, why is biblionumber nullable in the table?

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #201 from Jonathan Druart  ---
I sent the following email to Chris yesterday:

"""
A couple of questions:
  * Having the FK means the ON UPDATE SET NULL clause will apply. We
will "lose" the links but as the ids can be reused several times I
think it makes sense.
  * We will need to update existing entries (set to NULL when 0 or
deleted), we can take the opportunity to remove the rows with
biblionumber=null, itemnumber=null, biblionumber=null.
"""

his reply:
"""
The table is mainly just report the usage of electronic resources. So
if the resource is deleted it doesn't make sense to keep how many
times it whats viewed, so I think the FK will be fine
"""

Maybe we should then have a delete cascade on the biblionumber.

Please help here, I am not willing to follow-up myself.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Jonathan Druart  changed:

   What|Removed |Added

   Keywords||additional_work_needed

--- Comment #200 from Jonathan Druart  ---
(In reply to Jonathan Druart from comment #199)
> Created attachment 124257 [details] [review]
> Bug 22690: Fix the tracklink feature
> 
> With the FK we must set to undef/NULL, not 0.

This also means that we need a db rev to fix existing values. Can you follow-up
please?

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #199 from Jonathan Druart  ---
Created attachment 124257
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124257=edit
Bug 22690: Fix the tracklink feature

With the FK we must set to undef/NULL, not 0.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #198 from Jonathan Druart  ---
Follow-up 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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #197 from Jonathan Druart  ---
Created attachment 124188
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124188=edit
Bug 22690: Add koha_object[s]_class to fix TestBuilder.t

'Can't locate object method "_new_from_dbic" via package "Koha::Linktracker"
(perhaps you forgot to load "Koha::Linktracker"?) at
/kohadevbox/koha/Koha/Object.pm line 334.

Signed-off-by: Jonathan Druart 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #196 from Jonathan Druart  ---
Pushed to master for 21.11, thanks to everybody involved!

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Jonathan Druart  changed:

   What|Removed |Added

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

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #195 from Jonathan Druart  ---
Created attachment 124176
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124176=edit
Bug 22690: Remove uneeded return and add no_triggers

* C4/Items.pm
  - Koha::Biblios not used

* Koha/Item.pm
  - Koha::Item->orders must return an empty set if no order attached
  - no_triggers should be passed to other update calls

* Item.t
  - No need to build a fund
  - Add new test to test Koha::Item->orders when no order attached

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #194 from Jonathan Druart  ---
About the new FK added to the linktracker table, is it relevant to keep the
entry if the biblio has been deleted?

+  CONSTRAINT `linktracker_biblio_ibfk` FOREIGN KEY (`biblionumber`) REFERENCES
`biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL,

(not blocker but please answer)

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Status|Failed QA   |Passed QA

--- Comment #193 from Martin Renvoize  ---
Fixes made in followup, test suit re-run against everything and all passing.

I think it was a good move adding the Koha:: classes, it makes the code cleaner
and shows the path for future work.

Setting back to 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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #192 from Martin Renvoize  ---
Created attachment 123497
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123497=edit
Bug 22690: (QA follow-up) Fix indexing for Items sets

This patch adds tests and handling for calling move_to_biblio on a
Koha::Items set that contains items from more than one source biblio.

Test plan
1/ Inspect the changes to t/db_dependent/Koha/SearchEngine/Indexer.t
2/ Run t/db_dependent/Koha/SearchEngine/Indexer.t and confirm it passes

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123062|0   |1
is obsolete||

--- Comment #191 from Martin Renvoize  ---
Created attachment 123496
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123496=edit
Bug 22690: (QA follow-up) Correct variable name

The $from_biblio variable name doesn't exists after a refactoring that
happened. Here we need to re-index both the $self biblio and $to_biblio
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123044|0   |1
is obsolete||

--- Comment #190 from Martin Renvoize  ---
Created attachment 123495
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123495=edit
Bug 22690: (QA follow-up) Add TrackedLink classes and use them

This patch adds Koha::TrackedLink(s) classes based on Koha::Object(s)
and then adds the relationship accessor to Koha::Item and uses it within
the move_to_biblio method.

Tests for new relationship also added to t/db_dependent/Koha/Item.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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123042|0   |1
is obsolete||

--- Comment #189 from Martin Renvoize  ---
Created attachment 123494
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123494=edit
Bug 22690: (QA follow-up) Use relationship accessor

With the addition of foreign key relationships to the linktracker table
we now get a DBIC relationship accessor we can use. This clarifies the
code slightly by using the _result->relationship form to get the DBIC
resultset.  We should still introduce a Koha::Object based class for
this table at some point.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123041|0   |1
is obsolete||

--- Comment #188 from Martin Renvoize  ---
Created attachment 123493
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123493=edit
Bug 22690: DBIC Schema Updates

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123040|0   |1
is obsolete||

--- Comment #187 from Martin Renvoize  ---
Created attachment 123492
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123492=edit
Bug 22690: (QA follow-up) Add relationships to linktracker

Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123039|0   |1
is obsolete||

--- Comment #186 from Martin Renvoize  ---
Created attachment 123491
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123491=edit
Bug 22690: (QA follow-up) Clarify uses of DBIC

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123038|0   |1
is obsolete||

--- Comment #185 from Martin Renvoize  ---
Created attachment 123490
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123490=edit
Bug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items

This patch moves the Koha::Biblio->adopt_items_from_biblio method to the
Koha::Items set class and updates all calls from
Biblio2->adopt_items_from_biblio(Biblio1) to
Biblio->items->move_to_biblio(Biblio2)

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123037|0   |1
is obsolete||

--- Comment #184 from Martin Renvoize  ---
Created attachment 123489
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123489=edit
Bug 22690: (QA follow-up) Improve negation syntax

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123036|0   |1
is obsolete||

--- Comment #183 from Martin Renvoize  ---
Created attachment 123488
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123488=edit
Bug 22690: (QA follow-up) Rename 'item_orders' to 'orders'

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123035|0   |1
is obsolete||

--- Comment #182 from Martin Renvoize  ---
Created attachment 123487
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123487=edit
Bug 22690: Remove MoveItemFromBiblio import

Added in the meanwhile by bug 17600.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123034|0   |1
is obsolete||

--- Comment #181 from Martin Renvoize  ---
Created attachment 123486
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123486=edit
Bug 22690: Add missing txn_begin in subtest

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123033|0   |1
is obsolete||

--- Comment #180 from Martin Renvoize  ---
Created attachment 123485
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123485=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123032|0   |1
is obsolete||

--- Comment #179 from Martin Renvoize  ---
Created attachment 123484
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123484=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123031|0   |1
is obsolete||

--- Comment #178 from Martin Renvoize  ---
Created attachment 123483
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123483=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123030|0   |1
is obsolete||

--- Comment #177 from Martin Renvoize  ---
Created attachment 123482
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123482=edit
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #123029|0   |1
is obsolete||

--- Comment #176 from Martin Renvoize  ---
Created attachment 123481
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123481=edit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server
timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click
"Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging
process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #175 from Jonathan Druart  ---
(In reply to Martin Renvoize from comment #169)
> RM comments addressed in followups.
> 
> I also took the opportunity to add the Koha::TrackedLink(s) classes and use
> those Koha::Object(s) based accessors to clarify some of the code found
> within move_to_biblio.  With this change, the odd call to update_all has
> been replaced with our Koha::Objects based automatic trigger handling update
> call (without passing no_triggers yet).  The other DBIC resultset acting
> call is against a single row so update is correct.. I believe.

To clarify, I was not asking to add new classes. I was wondering if the
inconsistency (update vs update_all) in those two calls was expected:

1257 my $hold_fill_target = $self->_result->hold_fill_target;
1258 if ($hold_fill_target) {
1259 $hold_fill_target->update({ biblionumber => $to_biblionumber });
1260 }


1260 my $linktrackers = $schema->resultset('Linktracker')->search({
itemnumber => $self->itemnumber });
1261 $linktrackers->update_all({ biblionumber => $to_biblionumber });

both are DBIx::Class::ResultSet

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #174 from Joonas Kylmälä  ---
I also get the following test failure:

> root@kohadevbox:koha(master)$ prove t/db_dependent/Koha/Item.t 
> t/db_dependent/Koha/Item.t .. # No tests run!
> t/db_dependent/Koha/Item.t .. 1/12 
> #   Failed test 'No tests run for subtest "tracked_links relationship"'
> #   at t/db_dependent/Koha/Item.t line 56.
> Can't locate object method "_new_from_dbic" via package "Koha::TrackedLinks" 
> (perhaps you forgot to load "Koha::TrackedLinks"?) at 
> /kohadevbox/koha/Koha/Item.pm line 1220.
> # Looks like your test exited with 255 just after 1.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #173 from Joonas Kylmälä  ---
Koha::Items::move_to_biblio only re-indexing the last item's biblio and not all
of them, this was not spotted probably in testing because all the items were in
the same biblio. Working on a patch.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #172 from Martin Renvoize  ---
Thanks for catching that 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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #171 from Joonas Kylmälä  ---
Created attachment 123062
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123062=edit
Bug 22690: (QA follow-up) Correct variable name

The $from_biblio variable name doesn't exists after a refactoring that
happened. Here we need to re-index both the $self biblio and $to_biblio
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 22690] Merging records with many items too slow (Elasticsearch)

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

Joonas Kylmälä  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 22690] Merging records with many items too slow (Elasticsearch)

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

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #170 from Joonas Kylmälä  ---
In Koha::Items::move_to_biblio the variable $from_biblio should be $to_biblio,
now it produces error because there is no such variable.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #169 from Martin Renvoize  ---
RM comments addressed in followups.

I also took the opportunity to add the Koha::TrackedLink(s) classes and use
those Koha::Object(s) based accessors to clarify some of the code found within
move_to_biblio.  With this change, the odd call to update_all has been replaced
with our Koha::Objects based automatic trigger handling update call (without
passing no_triggers yet).  The other DBIC resultset acting call is against a
single row so update is correct.. I believe.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #168 from Martin Renvoize  ---
Created attachment 123044
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123044=edit
Bug 22690: (QA follow-up) Add TrackedLink classes and use them

This patch adds Koha::TrackedLink(s) classes based on Koha::Object(s)
and then adds the relationship accessor to Koha::Item and uses it within
the move_to_biblio method.

Tests for new relationship also added to t/db_dependent/Koha/Item.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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #167 from Martin Renvoize  ---
Created attachment 123042
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123042=edit
Bug 22690: (QA follow-up) Use relationship accessor

With the addition of foreign key relationships to the linktracker table
we now get a DBIC relationship accessor we can use. This clarifies the
code slightly by using the _result->relationship form to get the DBIC
resultset.  We should still introduce a Koha::Object based class for
this table at some point.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #166 from Martin Renvoize  ---
Created attachment 123041
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123041=edit
Bug 22690: DBIC Schema Updates

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #165 from Martin Renvoize  ---
Created attachment 123040
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123040=edit
Bug 22690: (QA follow-up) Add relationships to linktracker

Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #164 from Martin Renvoize  ---
Created attachment 123039
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123039=edit
Bug 22690: (QA follow-up) Clarify uses of DBIC

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #163 from Martin Renvoize  ---
Created attachment 123038
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123038=edit
Bug 22690: (QA follow-up) Move adopt_items_from_biblios to Koha::Items

This patch moves the Koha::Biblio->adopt_items_from_biblio method to the
Koha::Items set class and updates all calls from
Biblio2->adopt_items_from_biblio(Biblio1) to
Biblio->items->move_to_biblio(Biblio2)

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #162 from Martin Renvoize  ---
Created attachment 123037
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123037=edit
Bug 22690: (QA follow-up) Improve negation syntax

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #161 from Martin Renvoize  ---
Created attachment 123036
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123036=edit
Bug 22690: (QA follow-up) Rename 'item_orders' to 'orders'

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122939|0   |1
is obsolete||

--- Comment #160 from Martin Renvoize  ---
Created attachment 123035
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123035=edit
Bug 22690: Remove MoveItemFromBiblio import

Added in the meanwhile by bug 17600.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122938|0   |1
is obsolete||

--- Comment #159 from Martin Renvoize  ---
Created attachment 123034
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123034=edit
Bug 22690: Add missing txn_begin in subtest

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122890|0   |1
is obsolete||

--- Comment #158 from Martin Renvoize  ---
Created attachment 123033
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123033=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122889|0   |1
is obsolete||

--- Comment #157 from Martin Renvoize  ---
Created attachment 123032
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123032=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122888|0   |1
is obsolete||

--- Comment #156 from Martin Renvoize  ---
Created attachment 123031
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123031=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122887|0   |1
is obsolete||

--- Comment #155 from Martin Renvoize  ---
Created attachment 123030
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123030=edit
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #122886|0   |1
is obsolete||

--- Comment #154 from Martin Renvoize  ---
Created attachment 123029
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123029=edit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server
timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click
"Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging
process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #153 from Jonathan Druart  ---
(In reply to Martin Renvoize from comment #152)
> (In reply to Jonathan Druart from comment #150)
> > 4. 
> > in move_to_biblio you are calling, on a DBIC rs, ->update, then update_all:
> > 1237 $hold_fill_target->update({ biblionumber => $to_biblionumber
> > });
> > 
> > 1254 $linktrackers->update_all({ biblionumber => $to_biblionumber });
> > 
> > It's not consistent, is there a good reason for that?
> > 
> > Please provide a fast reply, I can write the follow-up patches if needed.
> 
> I think this is simply because we didn't have a Koha:: based resultset yet
> and he didn't want to add further complexity to the patch by adding that new
> class as well.  Having said that, it's fairly trivial to add such a class so
> long as it's a basic one, so perhaps we should for consistency.

Both are "raw" DBIC resultsets :)

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #152 from Martin Renvoize  ---
(In reply to Jonathan Druart from comment #150)
> 1. Why Koha::Item->item_orders is not named Koha::Item->orders?
> It returns a Koha::Acquisition::Orders.

This should certainly be named 'orders', annoyed I overlooked that during QA :(

> 
> 2.
> in move_to_biblio
> 1215 return unless $self->biblionumber != $to_biblio->biblionumber; 
> I am a fan of unless, not when there is a negation in the test :)
>  return if $self->biblionumber == $to_biblio->biblionumber; 
> Read much better IMO.

Agreed.

> 
> 3. There is Koha::Item->move_to_biblio($biblio) and
> Koha::Biblio->adopt_items_from_biblio($biblio)
> Don't you think Koha::Biblio->adopt_items_from_biblio could be
> Koha::Items->move_to_biblio actually?
> It would be more consistent and flexible.

Hmmm, I think so long as the method name is clear I was happy for it to live in
either class. I do see what you mean though and for consistency, I certainly
like that.

> 
> 4. 
> in move_to_biblio you are calling, on a DBIC rs, ->update, then update_all:
> 1237 $hold_fill_target->update({ biblionumber => $to_biblionumber
> });
> 
> 1254 $linktrackers->update_all({ biblionumber => $to_biblionumber });
> 
> It's not consistent, is there a good reason for that?
> 
> Please provide a fast reply, I can write the follow-up patches if needed.

I think this is simply because we didn't have a Koha:: based resultset yet and
he didn't want to add further complexity to the patch by adding that new class
as well.  Having said that, it's fairly trivial to add such a class so long as
it's a basic one, so perhaps we should for consistency.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #122936|0   |1
is obsolete||

--- Comment #151 from Jonathan Druart  ---
Created attachment 122939
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122939=edit
Bug 22690: Remove MoveItemFromBiblio import

Added in the meanwhile by bug 17600.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #150 from Jonathan Druart  ---
1. Why Koha::Item->item_orders is not named Koha::Item->orders?
It returns a Koha::Acquisition::Orders.

2.
in move_to_biblio
1215 return unless $self->biblionumber != $to_biblio->biblionumber; 
I am a fan of unless, not when there is a negation in the test :)
 return if $self->biblionumber == $to_biblio->biblionumber; 
Read much better IMO.

3. There is Koha::Item->move_to_biblio($biblio) and
Koha::Biblio->adopt_items_from_biblio($biblio)
Don't you think Koha::Biblio->adopt_items_from_biblio could be
Koha::Items->move_to_biblio actually?
It would be more consistent and flexible.

4. 
in move_to_biblio you are calling, on a DBIC rs, ->update, then update_all:
1237 $hold_fill_target->update({ biblionumber => $to_biblionumber });   

1254 $linktrackers->update_all({ biblionumber => $to_biblionumber });

It's not consistent, is there a good reason for that?

Please provide a fast reply, I can write the follow-up patches if 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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #149 from Jonathan Druart  ---
Created attachment 122938
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122938=edit
Bug 22690: Add missing txn_begin in subtest

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

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

--- Comment #148 from Jonathan Druart  ---
Created attachment 122936
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122936=edit
Bug 22690: Remove MoveItemFromBiblio import

Added in the meanwhile by bug 17600.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #147 from Victor Grousset/tuxayo  ---
Does this need more testing? More review?

(it's 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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #146 from Jonathan Druart  ---
Patches 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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #145 from Jonathan Druart  ---
Created attachment 122890
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122890=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #144 from Jonathan Druart  ---
Created attachment 122889
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122889=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #143 from Jonathan Druart  ---
Created attachment 122888
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122888=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #142 from Jonathan Druart  ---
Created attachment 122887
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122887=edit
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #122846|0   |1
is obsolete||
 Attachment #122847|0   |1
is obsolete||
 Attachment #122848|0   |1
is obsolete||
 Attachment #122849|0   |1
is obsolete||
 Attachment #122850|0   |1
is obsolete||

--- Comment #141 from Jonathan Druart  ---
Created attachment 122886
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122886=edit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server
timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click
"Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging
process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 QA Contact|josef.mora...@gmail.com |martin.renvoize@ptfs-europe
   ||.com

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #140 from Martin Renvoize  ---
I am so sorry, this completely fell off my radar with an overly busy period at
work.

This is all looking great now and has had lots more eyes on since my own
comments have all be taken care of.

All works as expected for me, the code is clean and it's a great improvement as
a whole.

QA scripts happy, tests all pass.

Passing QA, thanks for the perseverance everyone.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #121520|0   |1
is obsolete||

--- Comment #139 from Martin Renvoize  ---
Created attachment 122850
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122850=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #121519|0   |1
is obsolete||

--- Comment #138 from Martin Renvoize  ---
Created attachment 122849
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122849=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #121518|0   |1
is obsolete||

--- Comment #137 from Martin Renvoize  ---
Created attachment 122848
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122848=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #121517|0   |1
is obsolete||

--- Comment #136 from Martin Renvoize  ---
Created attachment 122847
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122847=edit
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #121516|0   |1
is obsolete||

--- Comment #135 from Martin Renvoize  ---
Created attachment 122846
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122846=edit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server
timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click
"Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging
process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 
Signed-off-by: Martin Renvoize 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-07-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690
Bug 22690 depends on bug 28479, which changed state.

Bug 28479 Summary: TestBuilder.pm uses incorrect method for checking if objects 
to be created exists
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28479

   What|Removed |Added

 Status|Pushed to oldstable |RESOLVED
 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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #134 from Victor Grousset/tuxayo  ---
Thanks for the followup, no additional warnings and the test plan still works
:)

---

QA tools:
 FAIL   C4/Items.pm
   OK critic
   OK forbidden patterns
   OK git manipulation
   OK pod
   FAIL   pod coverage
POD coverage was greater before, try perl
-MPod::Coverage=PackageName -e666
   OK spelling
   OK valid

That looks a false positive, a function was deleted, so it's POD

---

(In reply to Joonas Kylmälä from comment #127)
> Please give one more look and mark this as PQA & sign-off if all looks good 
> to you.

Code is way over my head so I can't go further than this. But at least the QAer
only has the code to review.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #121474|0   |1
is obsolete||

--- Comment #133 from Victor Grousset/tuxayo  ---
Created attachment 121520
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121520=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.t

Signed-off-by: Victor Grousset/tuxayo 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #121392|0   |1
is obsolete||

--- Comment #132 from Victor Grousset/tuxayo  ---
Created attachment 121519
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121519=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #121389|0   |1
is obsolete||

--- Comment #131 from Victor Grousset/tuxayo  ---
Created attachment 121518
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121518=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

Signed-off-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #120853|0   |1
is obsolete||

--- Comment #130 from Victor Grousset/tuxayo  ---
Created attachment 121517
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121517=edit
Bug 22690: Add more tests

- Tests for adopt_items_from_biblio
- Tests for the relationship between items and acquisition orders
- Tests for indexer calls in adopt_items_from_biblio

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Attachment #120852|0   |1
is obsolete||

--- Comment #129 from Victor Grousset/tuxayo  ---
Created attachment 121516
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121516=edit
Bug 22690: Refactor merging of records to improve performance (Elasticsearch)

This patch allows merging of records with many items without the web server
timing out.

Test plan:

Without the patch:

- Create 2 records (one with e.g. 1000 items).
- Do a cataloguing search that displays both records, select them and click
"Merge selected".
- Choose the record with many items as the one to be eliminated.
- Start the merging.
- After a while the web server should give you a timeout error (the merging
process may still continue)

With the patch:
- Do the same as above
- This time verify that the records are merged without timeout
- Create a new biblio with an item
- Add with the item:
  * acquisition order
  * hold (reserve)
- Merge the biblio to another one
- Verify that the item and its related data was moved
- Verify that tests pass:
  prove -v t/db_dependent/Koha/Biblio.t
  prove -v t/db_dependent/Koha/Item.t
  prove -v t/db_dependent/Koha/SearchEngine/Indexer.t

Signed-off-by: Michal Denar 
Rebased-by: Joonas Kylmälä 
Signed-off-by: Victor Grousset/tuxayo 

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #128 from Joonas Kylmälä  ---
Note: please be sure to include the patch from bug 28479, it fixes one of the
warnings in TestBuilder.pm

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #127 from Joonas Kylmälä  ---
Victor the warnings have been addressed now in the follow-ups. Please give one
more look and mark this as PQA & sign-off if all looks good to you.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #126 from Joonas Kylmälä  ---
Created attachment 121474
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121474=edit
Bug 22690: (QA follow-up) Make bib-level hold object actually bib-level

We need to pass undef itemnumber to build_object() to actually have a
hold without an item tied to it. Otherwise build_object() will create
automatically an item for us (thus making it an item-level hold)

To test:
 $ prove t/db_dependent/Koha/Item.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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Joonas Kylmälä  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Joonas Kylmälä  changed:

   What|Removed |Added

 Depends on||28479


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28479
[Bug 28479] TestBuilder.pm uses incorrect method for checking if objects to be
created exists
-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #125 from Joonas Kylmälä  ---
To debug the remaining warning I added the following lines to TestBuilder.pm

> use Data::Dumper;
> warn "$linked_tbl with " . Dumper($fk_value) if $linked_tbl eq 'Item';

this is just above the line:

>return {} if $self->schema->resultset($linked_tbl)->find( $fk_value );

inside _create_links(). The output I got when running the test then with this
is as follows:

> Item with $VAR1 = {
>   'itemnumber' => 1773
> };
> Item with $VAR1 = {
>   'biblionumber' => 1234
> };
> DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. 
>  > SQL that returns multiple rows is DEPRECATED for ->find and ->single at 
> /kohadevbox/koha/t/lib/TestBuilder.pm line 239

So for some reason where are using ->find() in TestBuilder.pm even for
non-primary keys (here 'biblionumber' of items table) and that causes problems.
I haven't still gotten to the bottom of this so any help is still welcome to
resolve this.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #124 from Joonas Kylmälä  ---
Created attachment 121392
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121392=edit
Bug 22690: (QA follow-up) Index also source biblio when calling
move_to_biblio()

We need to update the search index record for the old biblio where the
item was moved from to keep the item info in search index up-to-date.

To test:
1) $ prove t/db_dependent/Koha/SearchEngine/Indexer.t

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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #123 from Joonas Kylmälä  ---
I attached a patch to fix those manually added warns but the one with

> DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. 
>  SQL that returns multiple rows is DEPRECATED for ->find and ->single at 
> /kohadevbox/koha/t/lib/TestBuilder.pm line 235

seems a bit more tricky. Not sure if we should fix TestBuilder.pm or...

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #122 from Joonas Kylmälä  ---
Created attachment 121389
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121389=edit
Bug 22690: (QA follow-up) Silence manually generated warnings

In our test setup we mock the index_records() to produce warnings like
this:

Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line
93.

By wrapping all our item creations to warnings_are{} we can silence them.

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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

--- Comment #121 from Joonas Kylmälä  ---
I think we have a regression here, the new move_to_biblio function (previously
MoveItemFromBiblio) doesn't index the old biblio, e.g. the item info there is
outdated. The indexing is only done for the biblio where the item was moved to,
not the where it came from.

-- 
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 22690] Merging records with many items too slow (Elasticsearch)

2021-05-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22690

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #120 from Victor Grousset/tuxayo  ---
Issue found, more warnings in the tests with these patches:

 Without patches ===
kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Biblio.t 
t/db_dependent/Koha/Item.t t/db_dependent/Koha/SearchEngine/Indexer.t

t/db_dependent/Koha/Biblio.t  4/14 Use of uninitialized value
$sub6 in pattern match (m//) at
/kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 596.
t/db_dependent/Koha/Biblio.t  ok 
t/db_dependent/Koha/Item.t .. ok   
t/db_dependent/Koha/SearchEngine/Indexer.t .. ok   
All tests successful.

 With patches ===
kohadev-koha@kohadevbox:/kohadevbox/koha$ prove t/db_dependent/Koha/Biblio.t 
t/db_dependent/Koha/Item.t t/db_dependent/Koha/SearchEngine/Indexer.t
t/db_dependent/Koha/Biblio.t  4/15 Use of uninitialized value
$sub6 in pattern match (m//) at
/kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 596.
t/db_dependent/Koha/Biblio.t  ok 
t/db_dependent/Koha/Item.t .. 10/11
DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. 
SQL that returns multiple rows is DEPRECATED for ->find and ->single at
/kohadevbox/koha/t/lib/TestBuilder.pm line 235
DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. 
SQL that returns multiple rows is DEPRECATED for ->find and ->single at
/kohadevbox/koha/t/lib/TestBuilder.pm line 235
DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. 
SQL that returns multiple rows is DEPRECATED for ->find and ->single at
/kohadevbox/koha/t/lib/TestBuilder.pm line 235
t/db_dependent/Koha/Item.t .. ok 
t/db_dependent/Koha/SearchEngine/Indexer.t .. 1/2 Zebra at
t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Zebra at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Zebra at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Zebra at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Elasticsearch at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Elasticsearch at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Elasticsearch at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
Elasticsearch at t/db_dependent/Koha/SearchEngine/Indexer.t line 91.
Koha::Item at t/db_dependent/Koha/SearchEngine/Indexer.t line 93.
t/db_dependent/Koha/SearchEngine/Indexer.t .. ok   
All tests successful.

-- 
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   3   >