rez_core 5.0.310 → 5.0.312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module/filter/service/filter-evaluator.service.js +0 -2
- package/dist/module/filter/service/filter-evaluator.service.js.map +1 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.js +8 -1
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/service/filter-evaluator.service.ts +0 -2
- package/src/module/workflow-automation/service/schedule-handler.service.ts +9 -1
package/package.json
CHANGED
|
@@ -129,12 +129,20 @@ export class ScheduleHandlerService {
|
|
|
129
129
|
// Parse the workflow event JSON again to get filter/action info
|
|
130
130
|
const filter = workflow.criteria_filter_code;
|
|
131
131
|
const mappedEntityType = workflow.mapped_entity_type;
|
|
132
|
+
const applicableEntityType = workflow.applicable_entity_type;
|
|
132
133
|
|
|
133
134
|
const matchedEntities: any[] = [];
|
|
134
135
|
|
|
135
136
|
// 🔁 Step 2A: Evaluate criteria for each record
|
|
136
137
|
for (const record of results) {
|
|
137
|
-
|
|
138
|
+
let entityIdToUse;
|
|
139
|
+
|
|
140
|
+
if (mappedEntityType == applicableEntityType) {
|
|
141
|
+
entityIdToUse = record.id;
|
|
142
|
+
} else {
|
|
143
|
+
entityIdToUse = record.parent_id;
|
|
144
|
+
}
|
|
145
|
+
// const entityIdToUse = record.id; // assuming 'id' column in the table
|
|
138
146
|
|
|
139
147
|
const executionUser = {
|
|
140
148
|
organization_id: jobData.organization_id,
|