https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42625
--- Comment #226 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 211249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211249&action=edit Bug 42625: Accept and return library groups on record sources api Record sources can now be linked to library groups through the API. - library_groups can be embedded (x-koha-embed) when listing or fetching record sources - POST and PUT /api/v1/record_sources accept a library_groups list of { library_group_id }. On update, leaving the key out keeps the current links, and an empty list clears them - a group that cannot be linked (it does not exist, is not a top level group, or is not flagged for record source editing) is answered with a 400 on /body/library_groups - the record source and its links are saved in one transaction To test: 1. Apply the patches, then run updatedatabase.pl, yarn build and restart_all 2. Administration > Library groups: create a group "Editors" with "Use for record source editing" checked 3. Administration > Record sources > New record source. Give it a name and select "Editors" under "Editable by library groups" (this needs the record source form patch of this series), then save 4. Edit the record source again => SUCCESS: "Editors" is still selected 5. Run: prove t/db_dependent/api/v1/record_sources.t xt/api.t => SUCCESS: Tests pass Signed-off-by: Brendan Lawlor <[email protected]> Sponsored-by: CLAMS Signed-off-by: Andrew Fuerste Henry <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
