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

No hard delete for feedback #6153

Closed
shreyanshdwivedi opened this issue Jul 7, 2019 · 5 comments · Fixed by #6154
Closed

No hard delete for feedback #6153

shreyanshdwivedi opened this issue Jul 7, 2019 · 5 comments · Fixed by #6154

Comments

@shreyanshdwivedi
Copy link
Member

Describe the bug

Currently there is hard delete for feedback. When a user sets his/her rating to 0 again, the feedback of the user should be removed completely from the db.
This issue needs to be solved to merge fossasia/open-event-frontend#3198

Expected behavior

When the user clears his/her rating (i.e. sets it to 0 again), the feedback must be removed.

Additional context

On it

@iamareebjamal
Copy link
Member

Don't understand why is there a need of hard delete?

@shreyanshdwivedi
Copy link
Member Author

shreyanshdwivedi commented Jul 7, 2019

Actually currently when user sets its rating to 0 again, I destroyed the record on frontend by - feedback.destroyRecord() but it is only setting rhe deleted_at to a non null value
The feedback is still in db and messes up with avg rating and number of ratings

@iamareebjamal
Copy link
Member

Then fix the queries of average rating and number of ratings

@shreyanshdwivedi
Copy link
Member Author

One more case - suppose user again rates the session, then their will be similar entries in db - same user, same session. Even if I fix the queries for avg rating and number of ratings, these similar entries will exist.
Also, we soft delete event, user etc so that they can be restored later but I don't think any such purpose is required in case of feedback. That's why I thought of hard delete.
However, final call is obv yours, should I proceed with updating queries?

@iamareebjamal
Copy link
Member

OK, go ahead with hard delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants