mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 20:50:13 +08:00
Fix #478 - Add check for 'onFieldInitialize'
This commit is contained in:
parent
7e73cdddcb
commit
464830fd9d
1 changed files with 9 additions and 3 deletions
|
@ -188,12 +188,18 @@ export class FieldLogicManager extends BaseActionManager<FieldLogicActionData> {
|
|||
|
||||
let actionTriggeringStatus = action?.triggeringStatus ?? frontendActionTriggeringStatus ?? defaultTriggeringStatus;
|
||||
|
||||
if (triggeringStatus && !actionTriggeringStatus.includes(triggeringStatus)) {
|
||||
if (actionTriggeringStatus.includes('onValueChange')) {
|
||||
actionTriggeringStatus = actionTriggeringStatus.filter(value => value !== 'onValueChange');
|
||||
actionTriggeringStatus = ['onAnyLogic', ...actionTriggeringStatus];
|
||||
}
|
||||
|
||||
if (actionTriggeringStatus.includes('onAnyLogic') && triggeringStatus !== 'onFieldInitialize') {
|
||||
actions.push(action);
|
||||
return;
|
||||
}
|
||||
|
||||
if (actionTriggeringStatus.includes('onValueChange')) {
|
||||
actionTriggeringStatus = ['onAnyLogic'];
|
||||
if (triggeringStatus && !actionTriggeringStatus.includes(triggeringStatus)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actionTriggeringStatus.includes('onDependencyChange') && !dependentFieldsKeys?.includes(fieldDependent.name)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue