feat: Turn issues into calculated columns refs#7213
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Andrés 2024-04-16 18:26:57 +02:00
parent d53f19b47d
commit 7bbf113ffa
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE FUNCTION vn.sale_hasComponentLack(vSelf INT) CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`sale_hasComponentLack`(vSelf INT)
RETURNS tinyint(1) RETURNS tinyint(1)
READS SQL DATA READS SQL DATA
BEGIN BEGIN
@ -12,7 +12,7 @@ BEGIN
WITH componentRequired AS( WITH componentRequired AS(
SELECT COUNT(*)total SELECT COUNT(*)total
FROM component FROM vn.component
WHERE isRequired WHERE isRequired
)SELECT SUM(IF(c.isRequired, TRUE, FALSE)) <> cr.total INTO vHasComponentLack )SELECT SUM(IF(c.isRequired, TRUE, FALSE)) <> cr.total INTO vHasComponentLack
FROM vn.sale s FROM vn.sale s