Bug 33435 - We're missing sample dev data for ERM
Summary: We're missing sample dev data for ERM
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on: 32030
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-06 16:44 UTC by Pedro Amorim
Modified: 2023-12-28 20:43 UTC (History)
6 users (show)

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


Attachments
Bug 33435: Add sample ERM data (13.89 KB, patch)
2023-04-06 16:45 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33435: Add sample ERM data (13.96 KB, patch)
2023-04-06 16:48 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33435: Add sample ERM data (14.01 KB, patch)
2023-04-07 01:45 UTC, David Nind
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 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 :)