Bug 17529

Summary: Add a --with-records option to populate_db.pl
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED MOVED QA Contact: Tomás Cohen Arazi <tomascohen>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 10337    
Bug Blocks: 17534    
Attachments: Bug 17529: Add a --with-records option to populate_db.pl
Bug 17529: Add a --with-records option to populate_db.pl
[SIGNED-OFF] Bug 17529: Add a --with-records option to populate_db.pl
[SIGNED-OFF] Bug 17529: Follow-up - add with records to list of options in usage
[SIGNED-OFF] Bug 17529: Add a --with-records option to populate_db.pl
Bug 17529: Follow-up - add --with-records to list of options in usage
Bug 17529: Remove items without homebranch

Description Jonathan Druart 2016-11-01 13:55:35 UTC
This option will insert data into biblio, biblioitems, items and auth_header tables \o/
Comment 1 Jonathan Druart 2016-11-01 14:18:05 UTC
Created attachment 57030 [details] [review]
Bug 17529: Add a --with-records option to populate_db.pl

It's so frustrating to have to insert data manually to test with a fresh
install. This patch adds the data from the marc21 sandbox and let
populate_db.pl inserts them

Test plan:
DROP DATABASE koha_kohadev;
perl misc/devel/populate_db.pl --with-records -v

Enjoy
Comment 2 Jonathan Druart 2016-11-01 14:33:48 UTC
Created attachment 57031 [details] [review]
Bug 17529: Add a --with-records option to populate_db.pl

It's so frustrating to have to insert data manually to test with a fresh
install. This patch adds the data from the marc21 sandbox and let
populate_db.pl inserts them

Test plan:
DROP DATABASE koha_kohadev;
perl misc/devel/populate_db.pl --with-records -v

Enjoy
Comment 3 Josef Moravec 2016-11-01 14:49:28 UTC
Created attachment 57032 [details] [review]
[SIGNED-OFF] Bug 17529: Add a --with-records option to populate_db.pl

It's so frustrating to have to insert data manually to test with a fresh
install. This patch adds the data from the marc21 sandbox and let
populate_db.pl inserts them

Test plan:
DROP DATABASE koha_kohadev;
perl misc/devel/populate_db.pl --with-records -v

Enjoy

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2016-11-01 14:49:33 UTC
Created attachment 57033 [details] [review]
[SIGNED-OFF] Bug 17529: Follow-up - add with records to list of options in usage

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Josef Moravec 2016-11-01 14:54:51 UTC
I was too fast and signed off the older (now obsoleted) patch, I'll do it again...
Comment 6 Josef Moravec 2016-11-01 15:17:46 UTC
Created attachment 57039 [details] [review]
[SIGNED-OFF] Bug 17529: Add a --with-records option to populate_db.pl

It's so frustrating to have to insert data manually to test with a fresh
install. This patch adds the data from the marc21 sandbox and let
populate_db.pl inserts them

Test plan:
DROP DATABASE koha_kohadev;
perl misc/devel/populate_db.pl --with-records -v

Enjoy

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Josef Moravec 2016-11-01 15:18:33 UTC
Created attachment 57040 [details] [review]
Bug 17529: Follow-up - add --with-records to list of options in usage
Comment 8 Jonathan Druart 2016-11-11 08:32:12 UTC
Created attachment 57452 [details] [review]
Bug 17529: Remove items without homebranch

In the previous data, there are 11 items without homebranch
 select distinct (homebranch), count(*) from items group by holdingbranch;

This patch regenerates the sql file without these items.

Feel free to squash with the first patch!
Comment 9 Jonathan Druart 2016-11-11 11:04:08 UTC
I have finally decided not to integrate these script into the Koha codebase but create a new project instead.

See https://github.com/joubu/koha-misc4dev