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

Capture duration of stay for each house member #46

Open
jmprathab opened this issue Jul 18, 2020 · 24 comments
Open

Capture duration of stay for each house member #46

jmprathab opened this issue Jul 18, 2020 · 24 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Contribute to Hacktoberfest 2020! up-for-grabs up-for-grabs
Projects

Comments

@jmprathab
Copy link
Owner

jmprathab commented Jul 18, 2020

Ability to add the duration of stay for each house member. Users should be able to set From date and To date during which a member stayed in the house.

Endpoints

  • GET /houses/{houseId}/rentals - Which returns a list of members and their time range of stay. End time is empty for currently staying member
  • POST /houses/{houseId}/rentals - Create a new rental for a house member. Get the start date and end date in request body.
@jmprathab jmprathab added enhancement New feature or request good first issue Good for newcomers up-for-grabs up-for-grabs labels Jul 18, 2020
@jmprathab jmprathab assigned jmprathab and unassigned jmprathab Jul 18, 2020
@jmprathab jmprathab added this to To do in Features via automation Jul 25, 2020
@mslowiak
Copy link
Collaborator

  1. Should it be a new endpoint?
  2. Who would have access to that endpoint?
  3. If so, we should have another entity to store all visits in house, right?

@jmprathab
Copy link
Owner Author

@mslowiak

  • Yes, this should be a new endpoint.
  • As of now, we do not have access control for the application. But, in future only community admin should have access to this endpoint(This is something which we can take care of in future)
  • It should be a separate entity for each house.

@VinitaNirmal
Copy link

@jmprathab Can I pick this task?

@jmprathab jmprathab linked a pull request Aug 7, 2020 that will close this issue
6 tasks
@Muhib007dev
Copy link

Muhib007dev commented Aug 16, 2020

Whats the status now? Is it fixed?Can I try that out. I am a beginner though.

@jmprathab
Copy link
Owner Author

@VinitaNirmal Can you please update the status?

@VinitaNirmal
Copy link

@jmprathab I have completed the code and raised the PR. I have made the changes according to the reviews done by you too.

@mslowiak
Copy link
Collaborator

mslowiak commented Oct 2, 2020

@VinitaNirmal
We are waiting for you to resolve the conflicts. Could you do that please :)

@mslowiak
Copy link
Collaborator

mslowiak commented Oct 7, 2020

Reopen because of no feedback from developer

@mslowiak mslowiak added the hacktoberfest Contribute to Hacktoberfest 2020! label Oct 7, 2020
@Giluerre
Copy link

Giluerre commented Oct 7, 2020

Hello, I can take this. Can you assign it to me?

@jmprathab
Copy link
Owner Author

@Giluerre Sure.

@mslowiak
Copy link
Collaborator

@Giluerre
Can you update your status? How it is going?

@Giluerre
Copy link

I still need to finish controller and test it.

@mslowiak
Copy link
Collaborator

@Giluerre
How it is going?

@Giluerre
Copy link

Giluerre commented Oct 22, 2020

Well... after updating my branch I noticed controller is now uses openAPI generated interface. So I have started migrating + my return type in old method was entity.
My current situation is: I have a problem adding a record to the table. After sending PostRequest from Postman record is added but both my Columns representing time are empty.
EDIT: In the end it was such stupid mistake .... Tomorrow i will create pull request.

@kev711
Copy link

kev711 commented Mar 21, 2021

@jmprathab Can I take a shot at this ?

@kev711
Copy link

kev711 commented Mar 29, 2021

@jmprathab A gentle reminder...

@mslowiak
Copy link
Collaborator

@kev711
Go ahead :)

@kev711
Copy link

kev711 commented Apr 5, 2021

Endpoints

  • GET /houses/{houseId}/rentals - Which returns a list of members and their time range of stay. End time is empty for currently staying member
  • POST /houses/{houseId}/rentals - Create a new rental for a house member. Get the start date and end date in request body.

I have a question regarding this. If the newly created rentals via POST has mandatory start and end time, then shouldn't the GET request send out the same, regardless if the member is currently staying ?

@mslowiak
Copy link
Collaborator

mslowiak commented Apr 7, 2021

@kev711
I had read the description of this task again and yeah, it is a little misleading.

I guess the best option would be to store four types of dates:

  • bookingFromDate - mandatory for POST, returned in GET
  • bookingToDate - mandatory for POST, returned in GET
  • arrivalDate - not used in POST, returned in GET
  • departureDate - not used in POST, , returned in GET

What are your thoughts about the solution above? :)

@kev711
Copy link

kev711 commented Apr 10, 2021

Generally, requirement for capturing any data element should come from a business need. Off the bat, I think together with date, time should also be captured. Maybe capture date and time together as an Unix Epoch time. Do you see any issues with that ?

@kev711
Copy link

kev711 commented Apr 19, 2021

  • Will / Is there another endpoint for adding arrivalDate & departureDate values ? Since they are actuals and will be added at the time of check-in/out.
  • Looking at the ER diagram, I think the entity house_member would be a good candidate to store this data, assuming each entry is unique for a stay. Is it ?

@mslowiak
Copy link
Collaborator

  1. As far as I remember there is no such endpoint because rentals are the new thing there. It should be tackled later after this task will be done.
  2. From the house owner's view - you are right. How about the person who is renting a flat/house? In my opinion, we should store those data in a separate place to satisfy this need.

According to your previous question - yes, we should get dates from users as Instant, and store them in the database as data/datetime converted to UTC before.

@kev711
Copy link

kev711 commented Jun 6, 2021

Hi @mslowiak,
Due to other commitments I won't be able to work on this issue. Kindly un-assign me from this issue. Thank you for all your inputs!

@ErikHalas
Copy link

@mslowiak @jmprathab Hey, I'm a university student and we have this class in this semester where the main goal of the class is to contribute code to an open source project. I find this project to be really interesting and would like to contribute. I see no one worked on this issue for quite some time and it seems like something I would like to try to solve. If it's possible please assign me this issue. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Contribute to Hacktoberfest 2020! up-for-grabs up-for-grabs
Projects
Features
  
To do
Development

Successfully merging a pull request may close this issue.

7 participants