From e492659dbf7cb88d128b30f8c6626fd3c0c9de10 Mon Sep 17 00:00:00 2001 From: "xiaozhe.ma" Date: Tue, 27 Aug 2024 11:45:32 +0900 Subject: [PATCH] =?UTF-8?q?fix:BUG541=20=E3=83=A6=E3=83=BC=E3=82=B6?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB=E3=83=89=E6=9C=AA?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=81=AE=E9=9A=9B=E3=80=81Contains=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E3=81=AE=E4=B8=8D=E5=85=B7=E5=90=88=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/kintone-addins/src/types/Conditions.ts | 8 +++--- scripts/kintoneToolDB_20240826_update.sql | 27 ++++++++++++++++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/plugin/kintone-addins/src/types/Conditions.ts b/plugin/kintone-addins/src/types/Conditions.ts index 050f9d3..7befbc4 100644 --- a/plugin/kintone-addins/src/types/Conditions.ts +++ b/plugin/kintone-addins/src/types/Conditions.ts @@ -512,13 +512,13 @@ export class ConditionTree { const valueArray=sortArray(value); switch (operator) { case Operator.Equal: - return targetArray.every((v, i) => v === valueArray[i]); + return targetArray.length===valueArray.length && targetArray.every((v, i) => v === valueArray[i]); case Operator.NotEqual: - return !targetArray.every((v, i) => v === valueArray[i]); + return targetArray.length!==valueArray.length || !targetArray.every((v, i) => v === valueArray[i]); case Operator.Contains: - return valueArray.every(v => targetArray.includes(v)); + return valueArray.length>0 && valueArray.every(v => targetArray.includes(v)); case Operator.NotContains: - return !valueArray.every(v => targetArray.includes(v)); + return valueArray.length===0 || !valueArray.every(v => targetArray.includes(v)); default: return false; } diff --git a/scripts/kintoneToolDB_20240826_update.sql b/scripts/kintoneToolDB_20240826_update.sql index 93fc481..d6b434c 100644 --- a/scripts/kintoneToolDB_20240826_update.sql +++ b/scripts/kintoneToolDB_20240826_update.sql @@ -5,7 +5,7 @@ -- Dumped from database version 15.6 -- Dumped by pg_dump version 15.4 --- Started on 2024-08-26 11:39:23 +-- Started on 2024-08-26 16:16:09 SET statement_timeout = 0; SET lock_timeout = 0; @@ -228,7 +228,28 @@ INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, } } ]', 2, 1); -INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (1, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '必須チェック', 'フィールドの値が入力されているかチェックする', '必須チェック', '[]', '[{"component":"FieldInput","props":{"displayName":"フィールド","modelValue":{},"name":"field","placeholder":"必須項目を選択してください"}},{"component":"MuiltInputText","props":{"displayName":"エラーメッセージ","modelValue":"","name":"message","placeholder":"エラーメッセージを入力してください"}}]', 1, 1); +INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (1, '2024-01-21 15:33:50.958114', '2024-01-21 15:33:50.958114', '必須チェック', 'フィールドの値が入力されているかチェックする', '必須チェック', '[]', '[ + { + "component": "FieldInput", + "props": { + "displayName": "フィールド", + "modelValue": {}, + "name": "field", + "placeholder": "必須項目を選択してください", + "required":true + } + }, + { + "component": "MuiltInputText", + "props": { + "displayName": "エラーメッセージ", + "modelValue": "", + "name": "message", + "placeholder": "エラーメッセージを入力してください", + "required":true + } + } +]', 1, 1); INSERT INTO public.action (id, create_time, update_time, name, title, subtitle, outputpoints, property, nosort, categoryid) VALUES (13, '2024-05-10 10:08:34.990297', '2024-05-10 10:08:34.990297', '文字結合', '2つのフィールドの文字を結合する', '文字結合', '[]', '[ { "component": "FieldInput", @@ -836,7 +857,7 @@ ALTER TABLE ONLY public.action ADD CONSTRAINT fk_categoryid FOREIGN KEY (categoryid) REFERENCES public.category(id) NOT VALID; --- Completed on 2024-08-26 11:39:26 +-- Completed on 2024-08-26 16:16:15 -- -- PostgreSQL database dump complete