@@ -, +, @@ --- C4/Suggestions.pm | 3 +++ installer/data/mysql/kohastructure.sql | 3 +++ .../prog/en/modules/suggestion/suggestion.tt | 20 ++++++++++++++++++++ suggestion/suggestion.pl | 5 ++++- 4 files changed, 30 insertions(+), 1 deletion(-) --- a/C4/Suggestions.pm +++ a/C4/Suggestions.pm @@ -113,6 +113,8 @@ sub SearchSuggestion { U2.email AS emailmanagedby, U2.branchcode AS branchcodemanagedby, U2.borrowernumber AS borrnummanagedby, + U3.surname AS surnamelastmodificationby, + U3.firstname AS firstnamelastmodificationby, BU.budget_name AS budget_name FROM suggestions LEFT JOIN borrowers AS U1 ON suggestedby=U1.borrowernumber @@ -121,6 +123,7 @@ sub SearchSuggestion { LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber LEFT JOIN branches AS B2 ON B2.branchcode=U2.branchcode LEFT JOIN categories AS C2 ON C2.categorycode=U2.categorycode + LEFT JOIN borrowers AS U3 ON lastmodificationby=U3.borrowernumber LEFT JOIN aqbudgets AS BU ON budgetid=BU.budget_id WHERE 1=1 } --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -3026,6 +3026,8 @@ CREATE TABLE `suggestions` ( -- purchase suggestions accepteddate date default NULL, -- date the suggestion was marked as accepted rejectedby INT(11) default NULL, -- borrowernumber for the librarian who rejected the suggestion, foreign key linking to the borrowers table rejecteddate date default NULL, -- date the suggestion was marked as rejected + lastmodificationby INT(11) default NULL, -- borrowernumber for the librarian who edit the suggestion for the last time + lastmodificationdate date default NULL, -- date of the last modification `STATUS` varchar(10) NOT NULL default '', -- suggestion status (ASKED, CHECKED, ACCEPTED, or REJECTED) `note` LONGTEXT, -- note entered on the suggestion `author` varchar(80) default NULL, -- author of the suggested item @@ -3061,6 +3063,7 @@ CREATE TABLE `suggestions` ( -- purchase suggestions CONSTRAINT `suggestions_ibfk_managedby` FOREIGN KEY (`managedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `suggestions_ibfk_acceptedby` FOREIGN KEY (`acceptedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `suggestions_ibfk_rejectedby` FOREIGN KEY (`rejectedby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `suggestions_ibfk_lastmodificationby` FOREIGN KEY (`lastmodificationby`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `suggestions_ibfk_biblionumber` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `suggestions_budget_id_fk` FOREIGN KEY (`budgetid`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `suggestions_ibfk_branchcode` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE SET NULL ON UPDATE CASCADE --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -189,6 +189,16 @@ [% END %] +