tritonJS826 / masters-way

38 stars 43 forks source link

Incorrect display of the end date of work on the set goal in the "metrics" section. #969

Open SayaKik opened 3 months ago

SayaKik commented 3 months ago

Description

< When you hover the cursor over a completed goal, an incorrect end date is displayed in the Metrics section, and some completed goals are listed as unfinished. >

Preconditions

<1. The Masters Way website is open. 2. At least one way has been created in your personal account. 3. Information about the set goals is transformed in the metrics section.>

Steps to reproduce

< 1. Open the Master Wey website. 2. Go to the user's personal account (Kuzmenko Polina) and open the path (MW-QA: smoke tests). 3. In the metrics section, hover the cursor over the goals (Testing scope "auth") and (Studying the working documentation).>

Actual result

< 1. The date of completion of the goal (Testing scope "auth") is 2001.01.01. 2. The goal (Study of working documentation) is not completed. >

Expected result

< 1. Date of completion of the goal (Testing scope "auth") - 2024.05.28. 2. Date of completion of the goal (Study of working documentation) - 2024.05.10. >

Additional context

< This problem is repeated in some metrics for all users

Image Image

Ekaterina1994 commented 3 months ago

In responce we get wrong date. Need to fix on backend

Image

Moon1it commented 3 months ago

Fixed problem with date on Backend. DoneDate was deleted from payload structure. The sorting of metrics was implemented on backend from createdAt, sorting can be removed from the frontend. You can check it in swagger which I updated.

Ekaterina1994 commented 3 months ago

Done

vdruda commented 3 months ago

https://github.com/tritonJS826/masters-way/assets/141385609/8dc91465-669e-44a6-af00-9df4ba34cb3d

The problem in DB data. doneDate:"0001-01-01T00:00:00.000Z". and doneDate: "Null"

tritonJS826 commented 3 months ago

done date null - is valid for this context, but "0001-01-01T00:00:00.000Z" - invalid, should be fixed

Moon1it commented 2 months ago

We need to execute the following sql, as it will solve this problem.

UPDATE "metrics"
SET "done_date" = NULL,
    "is_done" = false
WHERE "done_date" = '0001-01-01 00:00:00.000';
tritonJS826 commented 2 months ago

Done

Ekaterina1994 commented 2 months ago

Done. Should be rechecked in few weeks!