Bug 26402 - Add --framework parameter to commit_file.pl
Summary: Add --framework parameter to commit_file.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Andreas Jonsson
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-07 09:29 UTC by Andreas Jonsson
Modified: 2022-06-06 20:25 UTC (History)
3 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:
21.11.00


Attachments
Bug 26402: Add --framework parameter to commit_file.pl (1.71 KB, patch)
2020-09-07 09:32 UTC, Andreas Jonsson
Details | Diff | Splinter Review
Bug 26402: Add --framework parameter to commit_file.pl (2.44 KB, patch)
2021-10-29 11:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 26402: Add --framework parameter to commit_file.pl (2.50 KB, patch)
2021-11-01 21:32 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jonsson 2020-09-07 09:29:40 UTC
In the staff interface it is possible to specify framework code when committing staged MARC records.  But this parameter is not available in the corresponding shell-script.
Comment 1 Andreas Jonsson 2020-09-07 09:32:17 UTC
Created attachment 109690 [details] [review]
Bug 26402:  Add --framework parameter to commit_file.pl
Comment 2 Andreas Jonsson 2020-09-07 09:53:58 UTC
Test plan:

1. Stage a MARC file using stage_file.pl.  For instance using the devbox:

   cd ~/kohaclone
   sudo koha-shell -c 'perl misc/stage_file.pl --file t/db_dependent/www/data/marc21record.mrc' kohadev

2. Note the assigned batch number and commit the batch using --framework parameter to commit_file.pl.  For example using the devbox:

   sudo koha-shell -c 'perl misc/commit_file.pl --batch-number 1 --framework ACQ' kohadev

3. Verify that the framework code was correctly assigned:

   sudo koha-mysql kohadev -e 'SELECT frameworkcode FROM biblio ORDER BY timestamp DESC LIMIT 1;'
Comment 3 Tomás Cohen Arazi 2021-10-29 11:05:56 UTC
Created attachment 127093 [details] [review]
Bug 26402: Add --framework parameter to commit_file.pl

This patch adds the option to pass a frameworkcode to the commit_file.pl
script.

To test:
1. Stage a MARC file using stage_file.pl.  For instance using the devbox:

   cd ~/kohaclone
   sudo koha-shell -c 'perl misc/stage_file.pl --file t/db_dependent/www/data/marc21record.mrc' kohadev

2. Note the assigned batch number and commit the batch using --framework parameter to commit_file.pl.  For example using the devbox:

   sudo koha-shell -c 'perl misc/commit_file.pl --batch-number 1 --framework ACQ' kohadev

3. Verify that the framework code was correctly assigned:

   sudo koha-mysql kohadev -e 'SELECT frameworkcode FROM biblio ORDER BY timestamp DESC LIMIT 1;'
=> SUCCESS: It picked it

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Katrin Fischer 2021-11-01 21:32:49 UTC
Created attachment 127203 [details] [review]
Bug 26402: Add --framework parameter to commit_file.pl

This patch adds the option to pass a frameworkcode to the commit_file.pl
script.

To test:
1. Stage a MARC file using stage_file.pl.  For instance using the devbox:

   cd ~/kohaclone
   sudo koha-shell -c 'perl misc/stage_file.pl --file t/db_dependent/www/data/marc21record.mrc' kohadev

2. Note the assigned batch number and commit the batch using --framework parameter to commit_file.pl.  For example using the devbox:

   sudo koha-shell -c 'perl misc/commit_file.pl --batch-number 1 --framework ACQ' kohadev

3. Verify that the framework code was correctly assigned:

   sudo koha-mysql kohadev -e 'SELECT frameworkcode FROM biblio ORDER BY timestamp DESC LIMIT 1;'
=> SUCCESS: It picked it

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-11-03 14:30:07 UTC
Pushed to master for 21.11, thanks to everybody involved!