-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature set from related record logic #396
base: hotfix
Are you sure you want to change the base?
Feature set from related record logic #396
Conversation
c9f7119
to
5d0879d
Compare
.../app/core/src/lib/fields/field-logic/set-field-from-related/set-field-from-related.action.ts
Outdated
Show resolved
Hide resolved
.../app/core/src/lib/fields/field-logic/set-field-from-related/set-field-from-related.action.ts
Outdated
Show resolved
Hide resolved
5d0879d
to
347ad32
Compare
347ad32
to
2f6c808
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be pulling the User's Job Title as expected, with given test steps.
Record saving doesn't seem negatively affected.
I had noticed that if the logic condition is met via Workflow
(ie a Workflow that sets the Assigned User)
The Logic is not fired.
If this is expected at this time, then this LGTM
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