rez_core 2.2.132 → 2.2.133

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": "2.2.132",
3
+ "version": "2.2.133",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -68,7 +68,8 @@ export class StageService extends EntityServiceImpl {
68
68
  statusListMaster.map((s) => [String(s.id), s.name]),
69
69
  );
70
70
 
71
- // 5. Enrich result in a single pass
71
+ // 5. Enrich result but stop at is_current
72
+ const result: any[] = [];
72
73
  for (const stage of allStageGrpData) {
73
74
  // Attach human-readable status
74
75
  stage.status = statusMap.get(String(stage.status)) || stage.status;
@@ -77,9 +78,16 @@ export class StageService extends EntityServiceImpl {
77
78
  const movement = stageMovementMap.get(Number(stage.id));
78
79
  stage.is_current = movement ? movement.is_current === 'Y' : false;
79
80
  stage.full_name = `${stage.stage_group_name} - ${stage.name}`;
81
+
82
+ result.push(stage);
83
+
84
+ // stop once we hit the current stage
85
+ if (stage.is_current) {
86
+ break;
87
+ }
80
88
  }
81
89
 
82
- return allStageGrpData;
90
+ return result;
83
91
  }
84
92
 
85
93
  async updateEntity(