feat: refs #8558 modify claim_beforeInsert
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Ivan Mas 2025-02-14 14:50:39 +01:00
parent c79867188a
commit 9cf6f8f031
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,13 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claim_beforeInsert`
BEFORE INSERT ON `claim`
FOR EACH ROW
BEGIN
DECLARE vCreated DATE;
SELECT created INTO vCreated FROM ticket WHERE id = NEW.ticketFk;
IF vCreated > util.VN_CURDATE() THEN
CALL util.throw('Future ticket date not allowed.');
END IF;
SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;