rez_core 5.0.299 → 5.0.300

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "5.0.299",
3
+ "version": "5.0.300",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -133,11 +133,34 @@ export class ScheduleHandlerService {
133
133
  // 🔁 Step 2A: Evaluate criteria for each record
134
134
  for (const record of results) {
135
135
  const entityIdToUse = record.id; // assuming 'id' column in the table
136
+
137
+ const executionUser = {
138
+ organization_id: jobData.organization_id,
139
+ level_id: record.level_id,
140
+ level_type: record.level_type,
141
+ appcode: jobData.appcode,
142
+ id: jobData.createdBy,
143
+ };
144
+
145
+ if (!record.level_id || !record.level_type) {
146
+ this.logger.warn(
147
+ `Skipping entity ${record.id}: missing school context`,
148
+ );
149
+ continue;
150
+ }
151
+
152
+ this.logger.debug(
153
+ `Evaluating filter for entity ${record.id} at ${record.level_type}:${record.level_id}`,
154
+ );
155
+
136
156
  const criteriaMatched = await this.filterEvaluator.evaluateCriteria(
137
157
  mappedEntityType,
138
158
  filter,
139
159
  entityIdToUse,
140
- jobData,
160
+ {
161
+ ...jobData,
162
+ user: executionUser,
163
+ },
141
164
  );
142
165
 
143
166
  this.logger.debug(