Bug 33435

Summary: We're missing sample dev data for ERM
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: DatabaseAssignee: Pedro Amorim <pedro.amorim>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: agustinmoyano, david, dcook, jonathan.druart, martin.renvoize, matt.blenkinsop
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:
Circulation function:
Bug Depends on: 32030    
Bug Blocks:    
Attachments: Bug 33435: Add sample ERM data
Bug 33435: Add sample ERM data
Bug 33435: Add sample ERM data

Description Pedro Amorim 2023-04-06 16:44:46 UTC

    
Comment 1 Pedro Amorim 2023-04-06 16:45:35 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2023-04-06 16:48:45 UTC
Created attachment 149244 [details] [review]
Bug 33435: Add sample ERM data

Apply patch
run reset_all
Check ERM module and verify it has data in it
Comment 3 Pedro Amorim 2023-04-06 16:49:42 UTC
Was not able to set erm_user_roles because by the time sample_erm_data.yml is imported, no patrons exist in the database yet. Any quick way around this?
Comment 4 David Nind 2023-04-07 01:45:55 UTC
Created attachment 149248 [details] [review]
Bug 33435: Add sample ERM data

Apply patch
run reset_all
Check ERM module and verify it has data in it

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2023-04-07 01:51:51 UTC
(In reply to Pedro Amorim from comment #3)
> Was not able to set erm_user_roles because by the time sample_erm_data.yml
> is imported, no patrons exist in the database yet. Any quick way around this?

For other bugs I have tested, if specific permissions are required then the test plan will normally say to set the specific permissions. Also, for most testing I use the koha user, and it has the super librarian permissions.

Also, a great idea to add some sample ERM data! I was thinking the other day that having some sample data would make it much easier to test any ERM bugs.
Comment 6 David Cook 2023-04-10 23:18:19 UTC
Sounds like a great idea but perhaps it should go in the koha-misc4dev repo?
Comment 7 Martin Renvoize (ashimema) 2023-04-11 06:19:00 UTC
I agree, this is probably better placed in misc4dev. Perhaps Jonathan could guild you in migrating this patch to a merge-request for that?
Comment 8 Pedro Amorim 2023-04-12 09:49:44 UTC
Thank you David and Martin. Understood.
However, should we decide on a standard way/place where dev sample data should be?  (if not already)
At the moment it seems it's split between core and misc4dev, and honestly I wasn't sure where to place it to begin with!
Comment 9 Katrin Fischer 2023-04-12 10:39:34 UTC
You are not wrong, traditionally we had sample libraries, sample users etc. that could be installed via the web installer. And I think they are really helpful if libraries just want to have a first look at Koha for initial testing. The lable examples are also very helpful if you are just starting out using the module.

The ERM data is maybe a grey area? We haven't added new sample data (not configuration) to the installer in a while. 

The web installer makes it more generally available, the misc4dev only to devs.

If we want to add to web installer, we should make some of the fields (the notes) translatable in the yaml file :)