https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42217
Michaela Sieber <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210106|0 |1 is obsolete| | --- Comment #15 from Michaela Sieber <[email protected]> --- Created attachment 210115 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210115&action=edit TR_sample_file_with-only-one-access_type Please use TR_sample_file_with-only-one-access_type , otherwise the test plan gets too complicated (due to Bug 43967) Test Plan: 1.) enable ERM Module 2.) create a provider manually (no need for credentials) with report type TR 3.) Manual Upload of the attache file 'TR_sample_file_with-only-one-access_type' 4.) koha-mysql kohadev 5.) MariaDB [koha_kohadev]> select * from erm_usage_mus where title_id = 1 and month=1 and metric_type = 'Unique_Item_Requests'; +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | monthly_usage_summary_id | title_id | platform_id | database_id | item_id | usage_data_provider_id | year | month | usage_count | metric_type | access_type | yop | report_type | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | 62| 1 | NULL | NULL | NULL | 1 | 2022 | 1 | 497| Unique_Item_Requests | NULL | NULL | TR | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ -- > Result : 1 rows (access_type is missing, but this is a different Bug 43967) 6.) Now manipulate the usage_count to simulate a second harvest with a different usage_count later UPDATE erm_usage_mus set usage_count = 111 where title_id = 1 and month=1 and metric_type = 'Unique_Item_Requests' and usage_count=497; The usage_count is now 111 MariaDB [koha_kohadev]> select * from erm_usage_mus where title_id = 1 and month=1 and metric_type = 'Unique_Item_Requests'; +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | monthly_usage_summary_id | title_id | platform_id | database_id | item_id | usage_data_provider_id | year | month | usage_count | metric_type | access_type | yop | report_type | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | 62| 1 | NULL | NULL | NULL | 1 | 2022 | 1 | 111 | Unique_Item_Requests | NULL | NULL | TR | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ 7.) upload the file again, this is the "second harvest" . Note that in the background job there is a line saying "Monthly usages added: 1" Result now: +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | monthly_usage_summary_id | title_id | platform_id | database_id | item_id | usage_data_provider_id | year | month | usage_count | metric_type | access_type | yop | report_type | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | 62| 1 | NULL | NULL | NULL | 1 | 2022 | 1 | 111 | Unique_Item_Requests | NULL | NULL | TR | | 697| 1 | NULL | NULL | NULL | 1 | 2022 | 1 | 497 | Unique_Item_Requests | NULL | NULL | TR | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ -- > Result : 2 rows 8.) Apply patch 9.) upload the file again Result now: MariaDB [koha_kohadev]> select * from erm_usage_mus where title_id = 1 and month=1 and metric_type = 'Unique_Item_Requests'; +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | monthly_usage_summary_id | title_id | platform_id | database_id | item_id | usage_data_provider_id | year | month | usage_count | metric_type | access_type | yop | report_type | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ | 62| 1 | NULL | NULL | NULL | 1 | 2022 | 1 | 497| Unique_Item_Requests | NULL | NULL | TR | +--------------------------+----------+-------------+-------------+---------+------------------------+------+-------+-------------+----------------------+-------------+------+-------------+ -- > Result : only one row as expected. Oldest ID is kept -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
