]> git.koha-community.org Git - koha.git/commit
Bug 34587: Improve title uniqueness rules
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Mon, 23 Oct 2023 11:02:36 +0000 (11:02 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Oct 2023 19:46:27 +0000 (16:46 -0300)
commitee4db6d7631e8ed3ed211586daa3d471070b011d
tree237c74a1157b39b23f204a8e655ac2a9237cd8d3
parent184602ce3823b169873daaa675fdebab4f9ae286
Bug 34587: Improve title uniqueness rules

Improve robustness of unique matching here, to make sure we always match for same title if the case,

Some report rows may correspond to the same title as the previous row but have an empty match field, or alternatively come with a filled match field (e.g. DOI or Print_ISSN in TR_J4. Because of this we only verify a uniqueness match field if both current row and previous have it non-empty, otherwise we keep checking the remaining uniqueness match fields.

Example of this use-case, COUNTER report:
title    | publisher | platform  | Proprietary_ID | Print_ISSN | DOI     | YOP  | usages
examplet | examplep  | examplepl | 1              | 123        |        | 2020 | usages
examplet | examplep  | examplepl | 1              | 123        |someDOI | 2021 | usages

The above 2 rows is the same title, same publisher, same proprietary_id,
same Print_ISSN, etc. It just so happens that one was returned by SUSHI
with DOI and the other wasnt.
These 2 rows correspond to different usage statistics by YOP, not 2
different usage_titles

Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/ERM/EUsage/CounterFile.pm