Summary: | 'Copy to all libraries' doesn't work on editing holidays | ||
---|---|---|---|
Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
Component: | Tools | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | RESOLVED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P5 - low | CC: | emmi.takkinen, jonathan.druart, m.de.rooy, michaela.sieber, sally.healey |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.02,22.11.08
|
|
Circulation function: | |||
Bug Depends on: | 4985 | ||
Bug Blocks: | |||
Attachments: |
Bug 33667: Allow copying holidays to all libraries when editing
Bug 33667: Allow copying holidays to all libraries when editing Bug 33667: Allow copying holidays to all libraries when editing |
Description
Katrin Fischer
2023-05-03 14:52:11 UTC
Emmi, can you have a look at this one please? Modifying holidays only affects to existing holidays and since holiday created and edited in branch A doesn't exists in branches B, C etc. "Copy changes to all libraries" has no effect. Maybe we could call "isHoliday" before calling e.g. "ModDaymonthholiday" and then add holiday if it doesn't exists? I think it would be great to at least have some visual clue or not to provide the option if the holiday is not present in all other branches. I believe the use case here is: * add a new holiday * realize I forgot to set the checkbox * try to fix it with editing (because it looks like it will work) So either we make it work... or make it somehow clear it won't and you need to delete first. I don't know the code well enough to make a recommendation or helpful comment in that part. :( Imo, it would probably be far more simpler just to make it work instead of checking every calendar for matching holiday. You are probably right. Does it need a little hint/warning maybe: may overwrite existing holidays in other calendars? (In reply to Katrin Fischer from comment #5) > You are probably right. Does it need a little hint/warning maybe: may > overwrite existing holidays in other calendars? Good idea. I'll assign myself on this for now. Hopefully I'm able to work on this soon. Created attachment 151562 [details] [review] Bug 33667: Allow copying holidays to all libraries when editing When editing an existing holiday and checking the "copy to all libraires" checkbox, the other calendars won't get updates. Allow this by first checking if holiday exists in target calendar and if not, add it. To test: 1. Add unique holiday to branch A. 2. Don't check checkbox "Copy to all libraries". 3. Save. 4. Verify the holidays shows on all calendars as a green box. 5. Edit the holiday, now check "Copy to all libraries" and save. => Verify nothing has changed in other calendars: only the green box, no holiday in list on the right 6. Edit again, make a change to description, check checkbox, save. => Verify it's still not showing in the other calendars. 9. Apply this patch. 10. Edit holiday again, check "Copy to all libraries" and save. => Verify holiday is now added to other calendars. 11. Edit again, this time do not copy and save. => Verify holiday was edited just in branch A. 12. Again edit, check and save. => Verify holiday was edited in all libraries. Sponsored-by: Koha-Suomi Oy Created attachment 151602 [details] [review] Bug 33667: Allow copying holidays to all libraries when editing When editing an existing holiday and checking the "copy to all libraires" checkbox, the other calendars won't get updates. Allow this by first checking if holiday exists in target calendar and if not, add it. To test: 1. Add unique holiday to branch A. 2. Don't check checkbox "Copy to all libraries". 3. Save. 4. Verify the holidays shows on all calendars as a green box. 5. Edit the holiday, now check "Copy to all libraries" and save. => Verify nothing has changed in other calendars: only the green box, no holiday in list on the right 6. Edit again, make a change to description, check checkbox, save. => Verify it's still not showing in the other calendars. 9. Apply this patch. 10. Edit holiday again, check "Copy to all libraries" and save. => Verify holiday is now added to other calendars. 11. Edit again, this time do not copy and save. => Verify holiday was edited just in branch A. 12. Again edit, check and save. => Verify holiday was edited in all libraries. Sponsored-by: Koha-Suomi Oy Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 152889 [details] [review] Bug 33667: Allow copying holidays to all libraries when editing When editing an existing holiday and checking the "copy to all libraires" checkbox, the other calendars won't get updates. Allow this by first checking if holiday exists in target calendar and if not, add it. To test: 1. Add unique holiday to branch A. 2. Don't check checkbox "Copy to all libraries". 3. Save. 4. Verify the holidays shows on all calendars as a green box. 5. Edit the holiday, now check "Copy to all libraries" and save. => Verify nothing has changed in other calendars: only the green box, no holiday in list on the right 6. Edit again, make a change to description, check checkbox, save. => Verify it's still not showing in the other calendars. 9. Apply this patch. 10. Edit holiday again, check "Copy to all libraries" and save. => Verify holiday is now added to other calendars. 11. Edit again, this time do not copy and save. => Verify holiday was edited just in branch A. 12. Again edit, check and save. => Verify holiday was edited in all libraries. Sponsored-by: Koha-Suomi Oy Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master for 23.11. Nice work everyone, thanks! Thanks for all the hard work! Pushed to 23.05.x for the next release Nice work everyone! Pushed to oldstable for 22.11.x |