Bug 24470

Summary: Set import_status when file used to populate basket in acquisitions
Product: Koha Reporter: Andrew Fuerste-Henry <andrewfh>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: barbara.johnson, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, victor
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24469
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.02,20.05.08
Attachments: Bug 24470: Mark a batch as 'imported' if all the bib has been imported
Bug 24470: Mark a batch as 'imported' if all the bib has been imported
Bug 24470: Mark a batch as 'imported' if all the bib has been imported
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

Description Andrew Fuerste-Henry 2020-01-21 15:37:02 UTC
When a staged MARC file is used to populate a basket in acquisitions, import_batches.import_status remains set to "staged" even though those records have been imported.

To test:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage without checking for duplicates
- Add titles to your basket
- Confirm from acquisitions that new bibs were created
- Go to manage-marc-import.pl and find your file
- Confirm that you are still given an "Import this batch into the catalog" button
- Query import_batches.import_status and confirm it shows "staged"

We could set the status to the existing value of "imported" or could create a new status unique to acquisitions.

See also bug 24469 about import_biblios.matched_biblionumber.
Comment 1 Andrew Fuerste-Henry 2020-12-08 19:39:00 UTC
*** Bug 27174 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Druart 2020-12-09 14:27:03 UTC
Created attachment 114280 [details] [review]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

When a staged MARC file is used to populate a basket in acquisitions,
the status of the batch is kept as "staged" until a user repeat the operation.
The "imported" status is added to the batch when new orders are added to
a basket "from a new file" (yes!...)

Test plan:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage
- Add titles to your basket
Until all your records are imported the batch will have the status
"staged"
When all your records will be imported, the status of the batch will be
"imported"
Comment 3 PTFS Europe Sandboxes 2021-01-04 23:21:17 UTC
Created attachment 114825 [details] [review]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

When a staged MARC file is used to populate a basket in acquisitions,
the status of the batch is kept as "staged" until a user repeat the operation.
The "imported" status is added to the batch when new orders are added to
a basket "from a new file" (yes!...)

Test plan:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage
- Add titles to your basket
Until all your records are imported the batch will have the status
"staged"
When all your records will be imported, the status of the batch will be
"imported"

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 4 Nick Clemens 2021-01-08 14:54:38 UTC
Created attachment 114966 [details] [review]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

When a staged MARC file is used to populate a basket in acquisitions,
the status of the batch is kept as "staged" until a user repeat the operation.
The "imported" status is added to the batch when new orders are added to
a basket "from a new file" (yes!...)

Test plan:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage
- Add titles to your basket
Until all your records are imported the batch will have the status
"staged"
When all your records will be imported, the status of the batch will be
"imported"

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 5 Jonathan Druart 2021-01-11 09:28:23 UTC
Created attachment 115009 [details] [review]
Bug 24470: Mark a batch as 'imported' if all the bib has been imported

When a staged MARC file is used to populate a basket in acquisitions,
the status of the batch is kept as "staged" until a user repeat the operation.
The "imported" status is added to the batch when new orders are added to
a basket "from a new file" (yes!...)

Test plan:
- Create a basket
- Add to basket From a New File
- Select a marc file and stage
- Add titles to your basket
Until all your records are imported the batch will have the status
"staged"
When all your records will be imported, the status of the batch will be
"imported"

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-01-11 09:28:50 UTC
Add missing Signed-off-by line from QA.
Comment 7 Jonathan Druart 2021-01-11 09:29:58 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-01-11 13:07:57 UTC
Pushed to 20.11.x for 20.11.02
Comment 9 Andrew Fuerste-Henry 2021-01-20 01:24:05 UTC
Pushed to 20.05.x for 20.05.08
Comment 10 Victor Grousset/tuxayo 2021-01-22 19:40:51 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.