tango-app-api-task 3.4.1-activitylog-5 → 3.4.1-activitylog-7

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": "tango-app-api-task",
3
- "version": "3.4.1-activitylog-5",
3
+ "version": "3.4.1-activitylog-7",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -220,7 +220,7 @@ export async function createUpdateTask( req, res ) {
220
220
  } );
221
221
  } );
222
222
 
223
- if ( questionList.questionAdd.length || questionList.questionEdit.length || questionList.questionDelete.length || inputBody.checklistName.toLowerCase() != checkListDetails.checkListName.toLowerCase() || inputBody.checklistDescription.toLowerCase() != checkListDetails.checkListDescription.toLowerCase() ) {
223
+ if ( questionList.questionAdd.length || questionList.questionEdit.length || questionList.questionDelete.length || inputBody.checklistName.toLowerCase() != taskDetails.checkListName.toLowerCase() || inputBody.checklistDescription.toLowerCase() != taskDetails.checkListDescription.toLowerCase() ) {
224
224
  let insertLogData = {
225
225
  client_id: req.body.clientId,
226
226
  createAt: new Date(),
@@ -235,12 +235,12 @@ export async function createUpdateTask( req, res ) {
235
235
  createdBy: req.user.userName,
236
236
  coverage: taskDetails?.coverage,
237
237
  logDetails: {
238
- ...( inputBody.checklistName.toLowerCase() == checkListDetails.checkListName.toLowerCase() ) ? { updatedChecklistName: {} } :{ updatedChecklistName: {
239
- previous: checkListDetails.checkListName,
238
+ ...( inputBody.checklistName.toLowerCase() == taskDetails.checkListName.toLowerCase() ) ? { updatedChecklistName: {} } :{ updatedChecklistName: {
239
+ previous: taskDetails.checkListName,
240
240
  new: inputBody.checklistName,
241
241
  } },
242
- ...( inputBody.checklistDescription.toLowerCase() == checkListDetails.checkListDescription.toLowerCase() ) ? { updatedChecklistDescription: {} } :{ updatedChecklistDescription: {
243
- previous: checkListDetails.checkListDescription,
242
+ ...( inputBody.checklistDescription.toLowerCase() == taskDetails.checkListDescription.toLowerCase() ) ? { updatedChecklistDescription: {} } :{ updatedChecklistDescription: {
243
+ previous: taskDetails.checkListDescription,
244
244
  new: inputBody.checklistDescription,
245
245
  } },
246
246
  updatedSectionName: [],
@@ -276,7 +276,7 @@ export async function createUpdateTask( req, res ) {
276
276
  let logObj = {
277
277
  client_id: inputBody.clientId,
278
278
  createAt: new Date(),
279
- sourceCheckList_id: inputBody._id,
279
+ sourceCheckList_id: inputBody._id || checkListId,
280
280
  checkListName: inputBody.checklistName,
281
281
  fromCheckListName: '',
282
282
  type: 'task',