Skip to content
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

Frontend and backend do not agree on how to define a timeslot/timerecurrence #140

Closed
hmpf opened this issue Sep 10, 2020 · 4 comments
Closed
Assignees
Labels
API Affects Argus' REST API bug Something is not working as expected data model Affects the data model and/or SQL schema frontend Has/needs companion issue in frontend
Milestone

Comments

@hmpf
Copy link
Contributor

hmpf commented Sep 10, 2020

  1. Week day number is different:
    • Back-end uses iso week day numbering, with Monday = 1, Sunday = 7.
    • Front end uses Monday = 0, Sunday = 6. The front-end sending in a 0 leads to a 400 Bad Request-error.
  2. What goes in TimeRecurrene.days is different:
    • Back-end expects a string of comma-separated integers
    • Front-end send a single integer, and interprets a string of comma-separated integers as the first integer. For backend 1,2,3,4,5,6,7, front-end sees 1 (Tuesday).

Backend stores all the days as it does in order to make the admin prettier I suspect.

Conclusion: array of integers wins, frontend must be updated.

@hmpf hmpf added bug Something is not working as expected frontend Has/needs companion issue in frontend API Affects Argus' REST API data model Affects the data model and/or SQL schema labels Sep 10, 2020
@lunkwill42
Copy link
Member

lunkwill42 commented Sep 10, 2020

ISO week day numbering throughout the system gets my 👍

@hmpf hmpf changed the title Frontend asnd backend do not agree on how to define a timeslot/timerecurrence Frontend and backend do not agree on how to define a timeslot/timerecurrence Sep 10, 2020
@hmpf
Copy link
Contributor Author

hmpf commented Sep 10, 2020

Uninett/Argus-frontend#114 seems to solve point 1.

@lunkwill42 lunkwill42 added this to To do in Argus Sprint #3 via automation Sep 22, 2020
@lunkwill42
Copy link
Member

I really did have issues grasping how this was supposed to work in the frontend, and now I understand it's because of this issue. I want to make a timeslot that defines the period 8-16 every weekday, but I find myself completely unable to do so from the frontend. From the backend's Admin interface, it's no problem, however.

I find the array storage model for the backend just fine. What is missing is for the frontend to support multiple days per recurrence, and we need this in time for version 1.0

@hmpf hmpf added this to the Version 1 milestone Sep 23, 2020
@hmpf hmpf moved this from To do to In progress in Argus Sprint #3 Sep 23, 2020
@hmpf hmpf moved this from In progress to Ready for merge in Argus Sprint #3 Oct 15, 2020
@hmpf hmpf moved this from Ready for merge to Done in Argus Sprint #3 Oct 15, 2020
@hmpf
Copy link
Contributor Author

hmpf commented Oct 15, 2020

Closed by Uninett/Argus-frontend#155

@hmpf hmpf closed this as completed Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Affects Argus' REST API bug Something is not working as expected data model Affects the data model and/or SQL schema frontend Has/needs companion issue in frontend
Projects
No open projects
Development

No branches or pull requests

3 participants