rez_core 5.0.260 → 5.0.262

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.260",
3
+ "version": "5.0.262",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -16,11 +16,9 @@ constructor(
16
16
  async execute(payload: any): Promise<any> {
17
17
 
18
18
  let { entity, user, config } = payload;
19
- // console.log(entity)
20
19
  if (entity.entity_type !== 'LEAD') {
21
20
  entity = await this.getEntityData('LEAD', entity.parent_id,user );
22
21
  }
23
- // console.log(entity,"---------------------------------------");
24
22
 
25
23
  return this.entityUpdateRepository.updateEntityAttribute(entity,config,user);
26
24
 
@@ -29,7 +29,7 @@ export class TaskService extends EntityServiceImpl {
29
29
  async execute(payload: any): Promise<any> {
30
30
  let { entity, user, config } = payload;
31
31
 
32
- const { organization_id, level_id, level_type } = entity;
32
+ const { enterprise_id, level_id, level_type } = user;
33
33
 
34
34
  if (entity.entity_type !== 'LEAD') {
35
35
  entity = await this.getEntityData('LEAD', entity.parent_id, user);
@@ -37,9 +37,13 @@ export class TaskService extends EntityServiceImpl {
37
37
 
38
38
  // 3. Build entityData
39
39
  const entityData = {
40
+ entity_type: 'TASK',
40
41
  mapped_entity_id: entity.id,
41
42
  mapped_entity_type: entity.entity_type,
42
- task_owner: entity.lead_owner,
43
+ parent_id: entity.id,
44
+ parent_type: entity.entity_type,
45
+ task_owner: entity.created_by,
46
+ user_id: entity.lead_owner,
43
47
  stage_id: entity.stageId,
44
48
  status: config.status,
45
49
  due_date: Date.now() + 2,
@@ -47,7 +51,9 @@ export class TaskService extends EntityServiceImpl {
47
51
  description: config.description,
48
52
  is_mandatory: config.is_mandatory,
49
53
  name: config.name,
50
- entity_type: 'TASK',
54
+ enterprise_id,
55
+ level_id,
56
+ level_type,
51
57
  };
52
58
 
53
59
  return await this.createEntity(entityData, user);