Feature set from related record logic #396
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes it is needed to hold a specific value from a related record. This is similar to #394 but copying the value of a field of the related record. This PR also needs #395
Caution
DO NOT MERGE BEFORE #395
Description
core/app/common/src/lib/record/field.model.ts
new assignation approach for value, valueList, valueObject.core/app/core/src/lib/fields/field-logic/actionable-field-logic/actionable-field-logic.action.ts
Abstract class ActionableFieldLogicActionHandler that can hold general and reusable functions across field logic actions.core/app/core/src/lib/fields/field-logic/set-field-from-related/set-field-from-related.action.ts
Actual SetFieldFromRelatedAction class that holds the logic.core/app/core/src/lib/fields/field-logic/field-logic.manager.ts:[40, 66, 78]
Registration of the SetFieldFromRelatedAction as Field Logic Action.core/app/core/src/lib/services/logic/active-logic-checker.service.ts
: Creation of ActiveLogicChecker class that holds the routine for checking if a logic is active or not.core/app/core/src/lib/core.ts:364
Export created classesMotivation and Context
A client needed to copy the value of a related record into the Cases module each time that related record changed, but this was not possible.
How To Test This
ASSIGNED TO JOB TITLE
fieldASSIGNED TO
to any other user.ASSIGNED TO JOB TITLE
field, should hold the Job Title of the selected UserTest Environment
public/legacy/custom/Extension/modules/Cases/Ext/Vardefs/assigned_to_job_title.php
public/legacy/custom/Extension/modules/Cases/Ext/Language/en_us.assigned_to_job_title.php
public/legacy/custom/modules/Cases/metadata/detailviewdefs.php
public/legacy/custom/modules/Cases/metadata/editviewdefs.php
Types of changes
Final checklist