Skip to content

[$100] Update Resource Booking model to not store time, only dates #204

Closed
@maxceem

Description

@maxceem

Task

  • Update Resource Booking model startDate and endDate fields so they only store dates without time, same like WorkPeriod.startDate/endDate.
  • Create a migration script that updates all the existent records to store only dates without time (Just cut the time and timezone or any simple way). And it updates the DB model accordingly.
  • Update all Joi schemas so they only accept dates without time and timezone for Resource Booking create/update operations.
  • Make sure that filtering and sorting by start/end dates work good for Resource Booking endoint.
  • Update logic of automatic WorkPeriod creation. Now we don't need timezone conversion. Logic should use Resource Booking dates without time and timezone now. See logic description for create and update https://github.com/topcoder-platform/taas-apis/wiki/TaaS---Scope,-Status-and-permissions#work-period-wp-automation-and-constraints
  • Update all Postman endpoints accordingly, so they all work good.
  • Update Swagger if needed.
  • Update demo data populate by npm run local:init if needed so if works good.
  • Update ES processor test data https://github.com/topcoder-platform/taas-es-processor/tree/feature/work-periods/test/messages and make sure unit and e2e tests pass there.
  • Make sure that data in ES is also stored without time and timezone.
  • Unit tests in TaaS API should pass.
  • Lint should pass.
  • Update anything else which might be affected by this change.

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions