BUG540 ログインユーザ変数. isGuestの値挿入修正

This commit is contained in:
Moriyukina2
2024-08-07 16:09:34 +09:00
parent dfaa77f2b9
commit b6db5f274e

View File

@@ -75,19 +75,16 @@ export class InsertValueAction implements IAction{
checkVariableValueBlank(fieldType :string | undefined,inputValueArray :any,fieldCode :string,fieldRequired :boolean | undefined,event :any): boolean{
let variableHasBlank;
let variableHasNull;
//正規表現チェック
for(let i =0;i<inputValueArray.length;i++){
//配列の要素にnullがないか、空白文字が値に含まれていないかチェックする
if (inputValueArray[i] !== null && inputValueArray[i] !== undefined && inputValueArray[i] !== "" && typeof inputValueArray[i] === "string"){
variableHasBlank = inputValueArray[i].match(/^(\s| )*$/);//値が半角スペース・タブ文字・改行・改ページ・全角スペースのみであるか
}else{
variableHasNull = true;
if (typeof inputValueArray[i] === "string"){
variableHasBlank = inputValueArray[i].match(/^(\s| )*$/);//値が半角スペース・タブ文字・改行・改ページ・全角スペースのみであるか
}
}
//変数の値に空白文字が入っている、配列に要素がないときは、エラーチェックする
if(variableHasBlank !== null || variableHasNull || inputValueArray.length === 0){
if(variableHasBlank !== null && variableHasBlank !== undefined && variableHasBlank !== "" && inputValueArray.length === 0){
//空白文字を空白文字が非対応のフィールドに挿入しようとしている場合、例外を発生させる
if(fieldType === "NUMBER" || fieldType === "DATE" || fieldType === "DATETIME" || fieldType === "TIME" || fieldType === "USER_SELECT"
|| fieldType === "ORGANIZATION_SELECT" || fieldType === "GROUP_SELECT" || fieldType === "RADIO_BUTTON" || fieldType === "DROP_DOWN" || fieldType === "CHECK_BOX" || fieldType === "MULTI_SELECT"){
@@ -645,6 +642,10 @@ export class InsertValueAction implements IAction{
}
}
// if(fieldType === "SINGLE_LINE_TEXT" || fieldType === "MULTI_LINE_TEXT" || fieldType === "RICH_TEXT" || fieldType === "LINK" ){
// correctFormattedValue = false;
// }
const conditionResult = this.getConditionResult(context);
//保存成功イベントの場合、kintone async/await による非同期処理でフィールドに値を挿入する
if(!event.type.includes('success')){