Bug 37486 - Selectively populate OAI-PMH set by set_id using build_oai_sets.pl
Summary: Selectively populate OAI-PMH set by set_id using build_oai_sets.pl
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: David Cook
QA Contact: Testopia
URL:
Keywords: no-sandbox
Depends on:
Blocks:
 
Reported: 2024-07-26 02:17 UTC by David Cook
Modified: 2025-01-09 10:12 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds an "-s" parameter to build_oai_sets.pl, so that you can selectively build OAI-PMH sets. This is useful when you have many sets, and you just need to build or rebuild one set. For example, misc/migration_tools/build_oai_sets.pl -v -s XXXX (where XXXX = the set ID)
Version(s) released in:
Circulation function:


Attachments
Bug 37486: Only build OAI-PMH set for one set at a time (6.77 KB, patch)
2024-12-09 05:13 UTC, David Cook
Details | Diff | Splinter Review
Bug 37486: Tidy (2.86 KB, patch)
2024-12-09 05:13 UTC, David Cook
Details | Diff | Splinter Review
Bug 37486: Only build OAI-PMH set for one set at a time (6.82 KB, patch)
2025-01-09 10:08 UTC, David Nind
Details | Diff | Splinter Review
Bug 37486: Tidy (2.91 KB, patch)
2025-01-09 10:08 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 David Cook 2024-07-26 02:17:44 UTC
There are times where you just want to rebuild 1 OAI-PMH set, so it would be good to have build_oai_sets.pl use a param like --spec or --set to just work with one set at a time.
Comment 1 David Cook 2024-12-09 05:13:03 UTC
Created attachment 175286 [details] [review]
Bug 37486: Only build OAI-PMH set for one set at a time

This change adds a "-s" parameter to build_oai_sets.pl, so that
you can selectively build OAI-PMH sets.

This is useful when you have many sets, and you just need
to build or rebuild 1 set.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/oai_sets.pl
2. Create setA and setB
3. Add mapping for setA:
245$a is equal to Gairm.
4. Add mapping for setB:
245$a is equal to Continuous delivery /
5. In the database, run the following SQL:
select * from oai_sets;

6. Identify the ID for setB
7. Run the following command where XXXX is the ID for setB:
perl misc/migration_tools/build_oai_sets.pl -v -s XXXX

8. Note that the only data added to the "oai_sets_biblios"
table is for setB

9. prove t/db_dependent/OAI/Sets.t
Comment 2 David Cook 2024-12-09 05:13:05 UTC
Created attachment 175287 [details] [review]
Bug 37486: Tidy
Comment 3 David Nind 2025-01-09 10:08:40 UTC
Created attachment 176287 [details] [review]
Bug 37486: Only build OAI-PMH set for one set at a time

This change adds a "-s" parameter to build_oai_sets.pl, so that
you can selectively build OAI-PMH sets.

This is useful when you have many sets, and you just need
to build or rebuild 1 set.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/admin/oai_sets.pl
2. Create setA and setB
3. Add mapping for setA:
245$a is equal to Gairm.
4. Add mapping for setB:
245$a is equal to Continuous delivery /
5. In the database, run the following SQL:
select * from oai_sets;

6. Identify the ID for setB
7. Run the following command where XXXX is the ID for setB:
perl misc/migration_tools/build_oai_sets.pl -v -s XXXX

8. Note that the only data added to the "oai_sets_biblios"
table is for setB

9. prove t/db_dependent/OAI/Sets.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-01-09 10:08:43 UTC
Created attachment 176288 [details] [review]
Bug 37486: Tidy

Signed-off-by: David Nind <david@davidnind.com>