rez_core 5.0.264 → 5.0.266

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.264",
3
+ "version": "5.0.266",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -21,7 +21,6 @@ export class TaskService extends EntityServiceImpl {
21
21
  @Inject('ActivityLogService')
22
22
  private readonly activityLogService: ActivityLogService,
23
23
  private readonly configService: ConfigService,
24
- private readonly workflowService: WorkflowMetaService,
25
24
  ) {
26
25
  super();
27
26
  }
@@ -44,14 +43,19 @@ export class TaskService extends EntityServiceImpl {
44
43
  hour12: true,
45
44
  });
46
45
 
47
- const getStage = await this.workflowService.getCurrentStage(
48
- entity.entity_type,
49
- entity.id,
50
- user,
51
- );
46
+ const stageMovementRepo =
47
+ await this.reflectionHelper.getRepoService('StageMovementData');
52
48
 
53
- const stageName = getStage.name;
54
- const stageGroupName=getStage.stage_group_name;
49
+ const stageMovement = await stageMovementRepo.findOne({
50
+ where: {
51
+ enterprise_id,
52
+ mapped_entity_type: entity.entity_type,
53
+ mapped_entity_id: entity.id,
54
+ is_current: 'Y',
55
+ },
56
+ select: ['stage_id', 'action_id'],
57
+ });
58
+ ;
55
59
 
56
60
  if (entity.entity_type !== 'LEAD') {
57
61
  entity = await this.getEntityData('LEAD', entity.parent_id, user);
@@ -64,9 +68,10 @@ export class TaskService extends EntityServiceImpl {
64
68
  mapped_entity_type: entity.entity_type,
65
69
  parent_id: entity.id,
66
70
  parent_type: entity.entity_type,
67
- task_owner: entity.created_by,
68
- user_id: entity.lead_owner,
69
- stage_id: getStage.stage_id,
71
+ task_owner: entity.lead_owner,
72
+ user_id: entity.created_by,
73
+ stage_id: stageMovement.stage_id,
74
+ action_id: stageMovement.action_id,
70
75
  status: config.status,
71
76
  due_date: dueDate,
72
77
  due_time: dueTime,