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

Add access type for keyless entry #1485

Merged
merged 12 commits into from
Jan 14, 2025
Merged

Add access type for keyless entry #1485

merged 12 commits into from
Jan 14, 2025

Conversation

matti-lamppu
Copy link
Collaborator

@matti-lamppu matti-lamppu commented Jan 8, 2025

🛠️ Changelog

  • Add new access_type (="kulkuoikeus") to the reservation unit model for keyless entry
  • Add new access_type_start_date and access_type_end_date to the reservation unit model for enabling onboarding to or offboarding from different access types
  • Add a new PindoraClient for interfacing with the Pindora API
  • Add access_type to the admin panel and check the reservation unit from Pindora if changed to "ACCESS_CODE"
  • Add new fields to the GraphQL schema
  • Add "access_type" filtering to the GraphQL schema

🧪 Test plan

  • Automated tests

🚧 Dependencies

  • None

🎫 Tickets

@matti-lamppu matti-lamppu added the feature Adds a new feature label Jan 8, 2025
@matti-lamppu matti-lamppu self-assigned this Jan 8, 2025
@matti-lamppu matti-lamppu marked this pull request as ready for review January 8, 2025 15:06
@matti-lamppu matti-lamppu requested review from vergama and ranta January 8, 2025 15:06
Copy link
Collaborator

@ranta ranta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something that should be clarified is the logic on how the logic between keyless_entry_start_date, keyless_entry_end_date and method_of_entry works.

If the method is set to MethodOfEntry.KEYLESS and start/end date is set, what is the method before/after the date?
I would assume it would always just be KEYLESS, but the ticket mentions:

(Tämän aikavälin ulkopuolella kulku katsotaan kuitenkin avoimeksi.)

Having the start/end dates set when the method is KEYLESS would be a bit confusing and open to open for interpretation. I'm thinking if we should the block setting start/end dates if the method is set to KEYLESS?


The ticket also mentions:

(Varausten tilastoihin tarvitaan kuitenkin boolean-tieto, oliko kyseessä pääsykoodin vaatinut varaus.)

Which is not implemented here. But it is also not in the acceptance criteria, so I would assume that this is coming later at some point?


In HAUKI there are some states (HaukiResourceState) that mention a key, do those relate to WITH_KEY/KEYLESS in any way? 🤔

tilavarauspalvelu/models/reservation_unit/model.py Outdated Show resolved Hide resolved
@matti-lamppu
Copy link
Collaborator Author

matti-lamppu commented Jan 9, 2025

The ticket also mentions:

(Varausten tilastoihin tarvitaan kuitenkin boolean-tieto, oliko kyseessä pääsykoodin vaatinut varaus.)

Which is not implemented here. But it is also not in the acceptance criteria, so I would assume that this is coming later at some point?

@ranta This can be implemented when keyless entry is integrated to the reservations flow.

@matti-lamppu
Copy link
Collaborator Author

matti-lamppu commented Jan 9, 2025

In HAUKI there are some states (HaukiResourceState) that mention a key, do those relate to WITH_KEY/KEYLESS in any way? 🤔

@ranta No relation.

@matti-lamppu
Copy link
Collaborator Author

@ranta @vergama Added method of entry fields to GraphQL schema and a filter for filtering units that have certain method of entries on a given period (see new commits)

@matti-lamppu matti-lamppu changed the title Add method of entry for keyless entry Add access type for keyless entry Jan 14, 2025
@matti-lamppu
Copy link
Collaborator Author

@ranta @vergama Changed names from "method of entry" to "access type". You may recheck the PR if you so wish, but no functionality should have been changed.

@matti-lamppu
Copy link
Collaborator Author

/ff

@github-actions github-actions bot merged commit e798636 into main Jan 14, 2025
6 checks passed
@github-actions github-actions bot deleted the add-method-of-entry branch January 14, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants