ivylabs / suitecrm-data-integration

6 stars 5 forks source link

Tasks (without date) not populating in Activities Report #139

Closed fraserward closed 3 years ago

fraserward commented 3 years ago

Completed Tasks without set dates don't populate the activities report as one of the parameters for this report is date (month/year) select or 'All Dates'

Possible fix would be to set all tasks without a date to a particular number and having this as an Unset Date option in the parameter pull-down.

Discussions needed.

harrisward commented 3 years ago

Discussed 19th May:

The solution is to set the task date to the task created date if no original task date has been set. This will allow the tasks to be queries in analytics. When a task is updated with a NEW real task date then we will update the task date to match

harrisward commented 3 years ago

When the ACTIVITY_DATE_TK is NULL / 0 then we should use the date_entered from the source database instead.

fraserward commented 3 years ago

Updated ActivitiesFact transformation

Pull Request: https://github.com/ivylabs/suitecrm-data-integration/pull/168

harrisward commented 3 years ago

Tested and merged

johnM2401 commented 3 years ago

Hey @harrisward

I've had a look, and it appears as though all Tasks are just taking the "Date Created" value, regardless of whether a "Due Date" is present

I have created these 3 Tasks today (24/06): image

However, all of these show as Today (24/06) in Analytics; image

harrisward commented 3 years ago

@johnM2401 From the requirements we use the date_start from the tasks table and NOT the date_due field. Can you retest the logic with date_start fields instead please? This should work

johnM2401 commented 3 years ago

@harrisward Ahh, yep, you're totally right. My bad, must have gotten it confused with something else.

Have given it a go with the Start Date and looks good.

Thanks for clarifying!