Comments (14)
Contest https://www.topcoder.com/challenges/30154003 has been created for this ticket.This is an automated message for veshu via Topcoder X
from taas-apis.
Contest https://www.topcoder.com/challenges/30154003 has been updated - it has been assigned to aaron2017.This is an automated message for veshu via Topcoder X
from taas-apis.
@veshu
I am not quite sure if current implementation of weekly count is correct or not.
I tried to extract the business logic about the weekly count from the source code, as follows:
For a team, for every resource bookings of the team, only when the resource booking was started before the first day of current week and is to be ended after the last day of current week, the customer rate of the resource booking would be added to weekly count(cost).
Let's take an example, say, today is Nov 27, so the beginning of this week is Nov 22(Sunday) and the end of this week is Nov 28(Saturday).
- the following resourceBooking won't fullfilled the conditions because its startDate is larger than Nov 22.
{
"projectId": 16704,
"userId": "3f64739e-10bf-42ca-8314-8aea0245cd0f",
"jobId": "1a5f81ca-65e1-4022-b997-6ab0f9140aa0",
"startDate": "2020-11-27T04:17:23.131Z",
"endDate": "2020-12-27T04:17:23.131Z",
"memberRate": 13.23,
"customerRate": 113,
"rateType": "weekly",
"createdAt": "2020-11-19T09:55:40.896Z",
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"status": "sourcing",
"updatedBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"updatedAt": "2020-11-19T09:58:08.413Z",
"id": "cd32fce8-7cbb-4a8e-ad32-b5dc8e495f47"
}
- this one won't fullfilled the conditions as well. Because its endDate is less than Nov 22.
{
"projectId": 61,
"userId": "3f64739e-10bf-42ca-8314-8aea0245cd0f",
"jobId": "0c1e518f-7aad-47f6-81e1-1d0aedb1e9b6",
"startDate": "2020-09-27T04:17:23.131Z",
"endDate": "2020-09-27T04:17:23.131Z",
"memberRate": 61,
"customerRate": 61,
"rateType": "weekly",
"createdAt": "2020-11-18T08:24:59.286Z",
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"status": "sourcing",
"id": "c8189e84-6cd6-41f8-bbf5-0c692a38594d"
}
- this one's customerRate will be added to weekly count.
{
"projectId": 16705,
"userId": "df2f0027-f74f-45fa-85cd-84c9fdc2faf4",
"jobId": "2de6b167-8c6a-44dd-a6a2-8abd8bf6443b",
"startDate": "2020-11-15T04:17:23.131Z",
"endDate": "2020-12-15T04:17:23.131Z",
"memberRate": 200,
"customerRate": 200,
"rateType": "weekly",
"createdAt": "2020-11-18T16:24:02.682Z",
"createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"status": "assigned",
"updatedBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a",
"updatedAt": "2020-11-18T16:24:56.797Z",
"id": "a7a65205-d7c5-4725-a1db-923543e621b1"
}
Is current implementation desired? If not, please tell me what it should be so that I can fix it.
from taas-apis.
@imcaizheng if the startdate and end date overlaps the current week then only show.
So for this week any resources whose startdate is less the weekEndDate and end date is greater than weekStartDate should be considered
from taas-apis.
@veshu
Thanks for clarification. PR submitted. See #20
from taas-apis.
Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30154003This is an automated message for veshu via Topcoder X
from taas-apis.
@wdprice
Check the logic for weekly count above. As this involves $ calculation :-)
- I would prefer, weekly count to be counting the (first resource booking start date - last resource booking end date)/7. If it comes in decimal ex: 25/7 = 3.51. above 0.5 round-off 4 weeks. Below 0.5 round-down to week as 3 weeks.
- Business logic wise backdate of resource is possible, right ? If I backdate and resource is assigned status ideally from that start date weekly count should be calculated.
- If we go by sunday as startdate as given in the above example (1), we might miss weekly count completely.
@imcaizheng
Check my email, I have given as start and enddate as per your example (3), but still I am not getting weekly count.
from taas-apis.
@nkumar-topcoder
It is because weekEndDate is not correctly calculated. See PR #28
from taas-apis.
@veshu need your input.
We have weekly count vs weekly cost and time remaining in week. can you pls clarify how these calculated and displayed at frontend.
from taas-apis.
Going by our earlier challenge
https://www.topcoder.com/challenges/742acfca-da8f-447c-b700-67298ac9a8c4
weeklycost and weeklycount got mixed up ?
from taas-apis.
what does weekly count mean?
Currently, the weekly cost is the sum of all resources that are billed this week.
what is time remaining in week field?
from taas-apis.
The weekly count is output of {{URL}}/taas-teams/{projectid}
that's what i meant weeklycost and weeklycount mix up
{
"id":,
"name": "",
"weeklyCount": 2913,
"resources": [
{
"id": "5bd69a82-c2cb-476f-9462-0883d3b28b90",
"handle": "",
"firstName": "Mekhi",
from taas-apis.
oh @nkumar-topcoder we can rename that field to weeklyCost
from taas-apis.
Closing this issue as it's done per description and created a new one to handle renaming #47
from taas-apis.
Related Issues (20)
- [$100] Some notifications are not received HOT 33
- [$50] Replace webhook which listens to created events HOT 4
- Interview Improvements - Summary
- [$75] Fix updating interview method on webhooks HOT 14
- [$75] Use `metadata` to identify Nylas update events instead of parsing `description` HOT 2
- Issue when connecting Google/Microsoft calendar and then removing it HOT 12
- Interview scheduled email is not sent
- [$50] Add authentication for a new Nylas Page webhook. HOT 5
- [$80] Send interview "canceled" and interview "rescheduled" email notifications HOT 12
- [$30] Use existent env variable during DB migration HOT 5
- Some interviews are stuck in scheduling, therefore unable to cancel/reschedule them HOT 3
- Attendees are not listed in the Interview reminder(customer), Interview complete(customer) and Reminder: Take action to reserve your talent(customer) emails HOT 2
- [$40] The meeting link sent to the JC in the 'Reminder: Interview coming up' email says 'You do not have permissions to perform this action' HOT 14
- Add a new `Did not Post` rcrmStatus to the taas-api HOT 1
- Migration Open Jobs which are only present on Gigs Listing MFE
- The email notification 'before 1 hour of interview time' and the 'Post Interview Action Reminder' notification are not received HOT 1
- [Prod] Interview confirmation email notification is not sent sporadically HOT 4
- Download resume email was not received HOT 2
- Cancel interview doesn't work - Interview is not getting canceled and no emails sent HOT 3
- Internal server error while trying to schedule an interview
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taas-apis.