Bug 36627 - Display importer for manually harvested SUSHI data
Summary: Display importer for manually harvested SUSHI data
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Jonathan Druart
URL:
Keywords: rel_25_05_candidate
Depends on: 36623
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-17 16:22 UTC by Matt Blenkinsop
Modified: 2024-11-19 15:17 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Example counter file (869 bytes, text/csv)
2024-04-17 16:29 UTC, Matt Blenkinsop
Details
Bug 36627: Record who is importing sushi data (4.05 KB, patch)
2024-04-17 16:29 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.30 KB, patch)
2024-04-17 16:29 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (4.01 KB, patch)
2024-04-18 08:50 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.30 KB, patch)
2024-04-18 08:50 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (4.91 KB, patch)
2024-04-18 09:23 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.00 KB, patch)
2024-04-18 09:24 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (4.06 KB, patch)
2024-04-18 10:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.35 KB, patch)
2024-04-18 10:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.05 KB, patch)
2024-04-18 10:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (1.98 KB, patch)
2024-04-18 10:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Add tests (2.67 KB, patch)
2024-04-18 10:21 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (4.06 KB, patch)
2024-04-18 10:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.35 KB, patch)
2024-04-18 10:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.05 KB, patch)
2024-04-18 10:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (2.05 KB, patch)
2024-04-18 10:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Add tests (2.67 KB, patch)
2024-04-18 10:26 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (4.08 KB, patch)
2024-04-18 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.36 KB, patch)
2024-04-18 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.06 KB, patch)
2024-04-18 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (2.07 KB, patch)
2024-04-18 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Add tests (2.68 KB, patch)
2024-04-18 14:52 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (4.16 KB, patch)
2024-07-19 13:01 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.36 KB, patch)
2024-07-19 13:01 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.07 KB, patch)
2024-07-19 13:01 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (2.07 KB, patch)
2024-07-19 13:01 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Add tests (2.69 KB, patch)
2024-07-19 13:01 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (3.67 KB, patch)
2024-11-06 09:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.36 KB, patch)
2024-11-06 09:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.07 KB, patch)
2024-11-06 09:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (2.07 KB, patch)
2024-11-06 09:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: Add tests (2.69 KB, patch)
2024-11-06 09:49 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36627: (QA follow-up): Add missing tests (8.40 KB, patch)
2024-11-12 11:47 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36627: Record who is importing sushi data (3.73 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: Embed patron record for display (2.42 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: Rename embed method to patron (5.13 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: Use patron_to_html in 'Imported by' column (2.13 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: Add tests (2.74 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: (QA follow-up): Add missing tests (8.48 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36627: (follow-up) Use patron_to_html in 'Imported by' column (1.28 KB, patch)
2024-11-18 14:48 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-04-17 16:22:46 UTC
The counter logs table has a column for "Imported by" but this is not currently stored
Comment 1 Matt Blenkinsop 2024-04-17 16:29:01 UTC
Created attachment 165029 [details]
Example counter file
Comment 2 Matt Blenkinsop 2024-04-17 16:29:50 UTC
Created attachment 165030 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link
Comment 3 Matt Blenkinsop 2024-04-17 16:29:52 UTC
Created attachment 165031 [details] [review]
Bug 36627: Embed patron record for display
Comment 4 Matt Blenkinsop 2024-04-18 08:50:03 UTC
Created attachment 165054 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link
Comment 5 Matt Blenkinsop 2024-04-18 08:50:05 UTC
Created attachment 165055 [details] [review]
Bug 36627: Embed patron record for display
Comment 6 Matt Blenkinsop 2024-04-18 09:23:29 UTC
Created attachment 165056 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API
Comment 7 Matt Blenkinsop 2024-04-18 09:24:58 UTC
Created attachment 165057 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API
Comment 8 Pedro Amorim 2024-04-18 10:21:11 UTC Comment hidden (obsolete)
Comment 9 Pedro Amorim 2024-04-18 10:21:14 UTC Comment hidden (obsolete)
Comment 10 Pedro Amorim 2024-04-18 10:21:16 UTC Comment hidden (obsolete)
Comment 11 Pedro Amorim 2024-04-18 10:21:19 UTC Comment hidden (obsolete)
Comment 12 Pedro Amorim 2024-04-18 10:21:22 UTC Comment hidden (obsolete)
Comment 13 Pedro Amorim 2024-04-18 10:26:28 UTC
Created attachment 165070 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 14 Pedro Amorim 2024-04-18 10:26:35 UTC
Created attachment 165071 [details] [review]
Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 15 Pedro Amorim 2024-04-18 10:26:38 UTC
Created attachment 165072 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 16 Pedro Amorim 2024-04-18 10:26:40 UTC
Created attachment 165073 [details] [review]
Bug 36627: Use patron_to_html in 'Imported by' column

For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 17 Pedro Amorim 2024-04-18 10:26:43 UTC
Created attachment 165074 [details] [review]
Bug 36627: Add tests

k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 18 Matt Blenkinsop 2024-04-18 14:52:28 UTC
Created attachment 165127 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 19 Matt Blenkinsop 2024-04-18 14:52:31 UTC
Created attachment 165128 [details] [review]
Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 20 Matt Blenkinsop 2024-04-18 14:52:33 UTC
Created attachment 165129 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 21 Matt Blenkinsop 2024-04-18 14:52:36 UTC
Created attachment 165130 [details] [review]
Bug 36627: Use patron_to_html in 'Imported by' column

For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 22 Matt Blenkinsop 2024-04-18 14:52:38 UTC
Created attachment 165131 [details] [review]
Bug 36627: Add tests

k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 23 Matt Blenkinsop 2024-07-19 13:01:34 UTC
Created attachment 169217 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 24 Matt Blenkinsop 2024-07-19 13:01:36 UTC
Created attachment 169218 [details] [review]
Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 25 Matt Blenkinsop 2024-07-19 13:01:39 UTC
Created attachment 169219 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 26 Matt Blenkinsop 2024-07-19 13:01:41 UTC
Created attachment 169220 [details] [review]
Bug 36627: Use patron_to_html in 'Imported by' column

For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 27 Matt Blenkinsop 2024-07-19 13:01:44 UTC
Created attachment 169221 [details] [review]
Bug 36627: Add tests

k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 28 Matt Blenkinsop 2024-11-06 09:49:08 UTC
Created attachment 174066 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 29 Matt Blenkinsop 2024-11-06 09:49:11 UTC
Created attachment 174067 [details] [review]
Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 30 Matt Blenkinsop 2024-11-06 09:49:14 UTC
Created attachment 174068 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 31 Matt Blenkinsop 2024-11-06 09:49:16 UTC
Created attachment 174069 [details] [review]
Bug 36627: Use patron_to_html in 'Imported by' column

For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 32 Matt Blenkinsop 2024-11-06 09:49:19 UTC
Created attachment 174070 [details] [review]
Bug 36627: Add tests

k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 33 Jonathan Druart 2024-11-06 11:08:27 UTC
For me tests are missing. You need low level tests: one for ->patron and one for the API route.
Comment 34 Pedro Amorim 2024-11-12 11:47:01 UTC
Created attachment 174402 [details] [review]
Bug 36627: (QA follow-up): Add missing tests

1) Apply patch
2) $ yarn api:bundle
3) $ prove t/db_dependent/Koha/ERM/EUsage/CounterLog.t
4) $ prove t/db_dependent/api/v1/erm_counter_logs.t
Comment 35 Jonathan Druart 2024-11-18 14:45:53 UTC
I am seeing "Borrowernumber 51", does not seem correct.
Comment 36 Jonathan Druart 2024-11-18 14:48:35 UTC
Created attachment 174706 [details] [review]
Bug 36627: Record who is importing sushi data

This patch adds functionality for storing the patron (or cronjob) that triggers a harvest. Currently every counter log is stored as being imported by the cronjob

Test plan:
1) In the usage statistics module in ERM, create a data provider (the details in the provider are not important)
2) Click into the provider and click into manual upload
3) Upload the file attached to this bug
4) Once the background job is completed click into the counter logs tab in the provider. The imported by columns should show a user with a clickable link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 37 Jonathan Druart 2024-11-18 14:48:38 UTC
Created attachment 174707 [details] [review]
Bug 36627: Embed patron record for display

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 38 Jonathan Druart 2024-11-18 14:48:42 UTC
Created attachment 174708 [details] [review]
Bug 36627: Rename embed method to patron

This patch renames the embed method from borrowernumber to patron to fit with the use of 'patron' in the API

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 39 Jonathan Druart 2024-11-18 14:48:45 UTC
Created attachment 174709 [details] [review]
Bug 36627: Use patron_to_html in 'Imported by' column

For consistency, and to avoid 'null koha' for a file imported by
the koha user (no first name).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 40 Jonathan Druart 2024-11-18 14:48:48 UTC
Created attachment 174710 [details] [review]
Bug 36627: Add tests

k-t-d, from /kohadevbox/koha, run:
yarn run cypress run --spec "./t/cypress/integration/ERM/DataProviders_spec.ts"

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 41 Jonathan Druart 2024-11-18 14:48:51 UTC
Created attachment 174711 [details] [review]
Bug 36627: (QA follow-up): Add missing tests

1) Apply patch
2) $ yarn api:bundle
3) $ prove t/db_dependent/Koha/ERM/EUsage/CounterLog.t
4) $ prove t/db_dependent/api/v1/erm_counter_logs.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 42 Jonathan Druart 2024-11-18 14:48:56 UTC
Created attachment 174712 [details] [review]
Bug 36627: (follow-up) Use patron_to_html in 'Imported by' column

We don't need those 2 lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 43 Jonathan Druart 2024-11-18 14:49:11 UTC
(In reply to Jonathan Druart from comment #35)
> I am seeing "Borrowernumber 51", does not seem correct.

It displays the correct value when the job has been processed.