Skip to content

fix calculation of last week day #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

imcaizheng
Copy link
Contributor

Original Behavior:

[2020-12-02T16:15:41.474Z] TeamService getTeamDetail DEBUG : week started: Sun Nov 29 2020 00:00:00 GMT+0000 (Coordinated Universal Time), week ended: Thu Nov 05 2020 23:59:59 GMT+0000 (Coordinated Universal Time)

Notice the week ended is Nov 05

After Fix

[2020-12-02T16:16:36.615Z] TeamService getTeamDetail DEBUG : week started: Sun Nov 29 2020 00:00:00 GMT+0000 (Coordinated Universal Time), week ended: Sat Dec 05 2020 23:59:59 GMT+0000 (Coordinated Universal Time)

Notice the week ended is Dec 05

@nkumar-topcoder nkumar-topcoder merged commit 211532d into topcoder-platform:feature/integration-test-fix Dec 3, 2020
@nkumar-topcoder
Copy link
Contributor

nkumar-topcoder commented Dec 3, 2020

@imcaizheng The weekly count calc is not correct.

"id": 16714,
"name": "taas4 Integration4",
"weeklyCount": 13,
"startDate": "2020-11-29T04:17:23.131Z",
"endDate": "2020-12-27T04:17:23.131Z",

[2020-12-03T02:56:43.799Z] TeamService getTeamDetail �[34mDEBUG�[39m : week started: Sun Nov 29 2020 00:00:00 GMT+0000 (Coordinated Universal Time), week ended: Sat Dec 05 2020 23:59:59 GMT+0000 (Coordinated Universal Time)

"id": 16707,
"name": "taas2 Integration2",
"weeklyCount": 2913,
"startDate": "2020-11-22T04:17:23.131Z",
"endDate": "2020-12-27T04:17:23.131Z",

same week start and end date at logs

@imcaizheng
Copy link
Contributor Author

Here is the full response data from GET http://api.topcoder-dev.com/v5/taas-teams/16714

{
    "id": 16714,
    "name": "taas4 Integration4",
    "weeklyCount": 13,
    "resources": [
        {
            "id": "5bd69a82-c2cb-476f-9462-0883d3b28b90",
            "handle": "Sandrine_Kuvalis98",
            "firstName": "Mekhi",
            "lastName": "Tremblay",
            "customerRate": 13,
            "job": {
                "id": "94211d8c-9c06-4288-b5a0-9e224c6d2d04",
                "name": "Dummy16714 Description"
            },
            "skills": [
                {
                    "id": "d3d61aef-c40b-48e6-ab52-c701f8922fa3",
                    "name": ".NET Framework 4"
                }
            ],
            "skillMatched": 0
        }
    ],
    "startDate": "2020-11-29T04:17:23.131Z",
    "endDate": "2020-12-27T04:17:23.131Z",
    "jobs": [
        {
            "id": "94211d8c-9c06-4288-b5a0-9e224c6d2d04",
            "description": "Dummy16714 Description",
            "startDate": "2020-11-29T04:17:23.131Z",
            "endDate": "2020-12-27T04:17:23.131Z",
            "numPositions": 10,
            "rateType": "weekly",
            "skills": [
                {
                    "id": "23e00d92-207a-4b5b-b3c9-4c5662644941",
                    "name": "Jface"
                },
                {
                    "id": "7d076384-ccf6-4e43-a45d-1b24b1e624aa",
                    "name": "ASP.NET MVC 3"
                },
                {
                    "id": "cbac57a3-7180-4316-8769-73af64893158",
                    "name": "Compression"
                },
                {
                    "id": "a2b4bc11-c641-4a19-9eb7-33980378f82e",
                    "name": "Ruby On Rails"
                }
            ],
            "status": "sourcing"
        }
    ]
}

There is a resource, the value of weekly count(13) equals to the value of the resource's customerRate(13). I think the calculation is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants