IT would be helpful if changes to purchase suggestions were logged. Sometimes troubleshooting the cycle of a suggestion.
Created attachment 160223 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions
I have a patch but its not quite ready for testing. Currently it logs modifications and deletion. Do we want/need to also log creation of suggestions? If so, both OPAC and staff? This probably also needs a system preference to go with it like 'SuggestionLog' so it can be turned off if needed.
Created attachment 160253 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions
Created attachment 160265 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Modify the suggestion and check the logs again, the modification should be logged. 7. Delete the suggestion, the deletion should be logged. 8. Do a purchase suggestion via the OPAC. 9. Check the logs to see the newly created suggestion, the interface should be OPAC. 10. Turn of SuggestionsLog 11. No changes of any kind should be logged.
Just a couple of comments from testing: 1. Since it only logs modifications and deletions, then the description for the system preference needs updating (currently says "Don't log/Log any changes to purchase suggestions (create, modify, delete).") 2. For deletions, the info column is empty - should this have the details for the suggestion before it is deleted?
I think both are good points. Can it be easily expanded to include logging of suggestion creation? Marking FQA to take it out of the queue while we wait for answers.
(In reply to Lucas Gass from comment #2) > Do we want/need to also log creation of suggestions? If so, both OPAC and > staff? I would say "yes" on both counts. :-)
Created attachment 161114 [details] [review] Bug 35597: Log creation on suggestion from staff or OPAC To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Create a suggestion from the OPAC. 7. You should see your newly created OPAC suggestion. 8. Modify the suggestion and check the logs again, the modification should be logged. 9. Delete the suggestion, the deletion should be logged. 10. Do a purchase suggestion via the OPAC. 11. Check the logs to see the newly created suggestion, the interface should be OPAC. 12. Turn off SuggestionsLog 13. No changes of any kind should be logged.
Created attachment 161115 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Modify the suggestion and check the logs again, the modification should be logged. 7. Delete the suggestion, the deletion should be logged. 8. Do a purchase suggestion via the OPAC. 9. Check the logs to see the newly created suggestion, the interface should be OPAC. 10. Turn of SuggestionsLog 11. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 161116 [details] [review] Bug 35597: Log creation on suggestion from staff or OPAC To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Create a suggestion from the OPAC. 7. You should see your newly created OPAC suggestion. 8. Modify the suggestion and check the logs again, the modification should be logged. 9. Delete the suggestion, the deletion should be logged. 10. Do a purchase suggestion via the OPAC. 11 Check the logs to see the newly created suggestion, the interface should be OPAC. 12. Turn off SuggestionsLog 13. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 164536 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Modify the suggestion and check the logs again, the modification should be logged. 7. Delete the suggestion, the deletion should be logged. 8. Do a purchase suggestion via the OPAC. 9. Check the logs to see the newly created suggestion, the interface should be OPAC. 10. Turn of SuggestionsLog 11. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Created attachment 164537 [details] [review] Bug 35597: Log creation on suggestion from staff or OPAC To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Create a suggestion from the OPAC. 7. You should see your newly created OPAC suggestion. 8. Modify the suggestion and check the logs again, the modification should be logged. 9. Delete the suggestion, the deletion should be logged. 10. Do a purchase suggestion via the OPAC. 11 Check the logs to see the newly created suggestion, the interface should be OPAC. 12. Turn off SuggestionsLog 13. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Created attachment 166890 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Modify the suggestion and check the logs again, the modification should be logged. 7. Delete the suggestion, the deletion should be logged. 8. Do a purchase suggestion via the OPAC. 9. Check the logs to see the newly created suggestion, the interface should be OPAC. 10. Turn of SuggestionsLog 11. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166891 [details] [review] Bug 35597: Log creation on suggestion from staff or OPAC To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Create a suggestion from the OPAC. 7. You should see your newly created OPAC suggestion. 8. Modify the suggestion and check the logs again, the modification should be logged. 9. Delete the suggestion, the deletion should be logged. 10. Do a purchase suggestion via the OPAC. 11 Check the logs to see the newly created suggestion, the interface should be OPAC. 12. Turn off SuggestionsLog 13. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166892 [details] [review] Bug 35597: Tidy Suggestions.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166893 [details] [review] Bug 35597: logaction when modifying or deleteing suggestions To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Modify the suggestion and check the logs again, the modification should be logged. 7. Delete the suggestion, the deletion should be logged. 8. Do a purchase suggestion via the OPAC. 9. Check the logs to see the newly created suggestion, the interface should be OPAC. 10. Turn of SuggestionsLog 11. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166894 [details] [review] Bug 35597: Log creation on suggestion from staff or OPAC To test: 1. Apply patch, restart services, updatedatabase 2. Search for the system preference 'SuggestionsLog', it should be off. Turn it on. 3. Create a purhase suggestion 4. Go to Tools > Log viewer. In modules check 'Suggestions' 5. You should see your newly created suggestion. 6. Create a suggestion from the OPAC. 7. You should see your newly created OPAC suggestion. 8. Modify the suggestion and check the logs again, the modification should be logged. 9. Delete the suggestion, the deletion should be logged. 10. Do a purchase suggestion via the OPAC. 11 Check the logs to see the newly created suggestion, the interface should be OPAC. 12. Turn off SuggestionsLog 13. No changes of any kind should be logged. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166895 [details] [review] Bug 35597: Tidy Suggestions.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 166896 [details] [review] Bug 35597: Move modification logging to Koha::Suggestion Some actions such as archiving a suggestion were not being logged. By moving the logging to Koha::Suggestion we can ensure more modifcations will be logged. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Enhancement will not be backported to 24.05.x series