BUG540 ログインユーザ変数. isGuestの値挿入修正
This commit is contained in:
@@ -75,19 +75,16 @@ export class InsertValueAction implements IAction{
|
|||||||
checkVariableValueBlank(fieldType :string | undefined,inputValueArray :any,fieldCode :string,fieldRequired :boolean | undefined,event :any): boolean{
|
checkVariableValueBlank(fieldType :string | undefined,inputValueArray :any,fieldCode :string,fieldRequired :boolean | undefined,event :any): boolean{
|
||||||
|
|
||||||
let variableHasBlank;
|
let variableHasBlank;
|
||||||
let variableHasNull;
|
|
||||||
//正規表現チェック
|
//正規表現チェック
|
||||||
for(let i =0;i<inputValueArray.length;i++){
|
for(let i =0;i<inputValueArray.length;i++){
|
||||||
//配列の要素にnullがないか、空白文字が値に含まれていないかチェックする
|
//配列の要素にnullがないか、空白文字が値に含まれていないかチェックする
|
||||||
if (inputValueArray[i] !== null && inputValueArray[i] !== undefined && inputValueArray[i] !== "" && typeof inputValueArray[i] === "string"){
|
if (typeof inputValueArray[i] === "string"){
|
||||||
variableHasBlank = inputValueArray[i].match(/^(\s| )*$/);//値が半角スペース・タブ文字・改行・改ページ・全角スペースのみであるか
|
variableHasBlank = inputValueArray[i].match(/^(\s| )*$/);//値が半角スペース・タブ文字・改行・改ページ・全角スペースのみであるか
|
||||||
}else{
|
|
||||||
variableHasNull = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//変数の値に空白文字が入っている、配列に要素がないときは、エラーチェックする
|
//変数の値に空白文字が入っている、配列に要素がないときは、エラーチェックする
|
||||||
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"
|
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"){
|
|| 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);
|
const conditionResult = this.getConditionResult(context);
|
||||||
//保存成功イベントの場合、kintone async/await による非同期処理でフィールドに値を挿入する
|
//保存成功イベントの場合、kintone async/await による非同期処理でフィールドに値を挿入する
|
||||||
if(!event.type.includes('success')){
|
if(!event.type.includes('success')){
|
||||||
|
|||||||
Reference in New Issue
Block a user