Bug 33236: Move NewSuggestion to Koha::Suggestion->store
authorNick Clemens <nick@bywatersolutions.com>
Wed, 15 Mar 2023 15:27:11 +0000 (15:27 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 6 Jun 2023 13:08:35 +0000 (10:08 -0300)
commitfb877da7d3fee54e1b53b28299e24bbcd4635ef1
tree1cda6027416bfa1e68628d00ad339604583dbd70
parentf0dc1fff2a0f8c526cdb12b50e6757fdd1694dcf
Bug 33236: Move NewSuggestion to Koha::Suggestion->store

The NewSuggestion routine saved the suggestion to the DB
and returned the id

This patch moves the code to Koha::Suggestion->store and
handles emailing upon creation, this adds that functionality to
suggestions added via api

To test:
1 - Apply patch
2 - Test adding a suggestion on the opac and staff client
3 - Confirm the suggestions are added correctly

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/Suggestions.pm
Koha/Suggestion.pm
opac/opac-suggestions.pl
suggestion/suggestion.pl
t/db_dependent/Suggestions.t