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

Ticket requesters cannot delete their own ticket requests #149

Closed
yarunluon opened this issue May 13, 2024 · 11 comments · Fixed by #176
Closed

Ticket requesters cannot delete their own ticket requests #149

yarunluon opened this issue May 13, 2024 · 11 comments · Fixed by #176
Assignees
Labels
bug-non-blocking Nice to have a fix but not technically required work-in-progress

Comments

@yarunluon
Copy link
Contributor

yarunluon commented May 13, 2024

Describe the bug
Ticket requesters cannot delete their own ticket requests. However, Admins can delete ticket requests. As a workaround, users can ask Admins to delete their ticket requests.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://tickets.fnf.events/events/14/ticket_requests/3027. Log in as necessary. See login credentials below.
  2. Click on "Delete this Ticket Request"
  3. Refresh page
  4. Ticket request still loads.

Note
Admins can delete ticket requests. Users cannot delete their own ticket requests.

Expected behavior
Users should be able to delete their own ticket requests.

Screenshots
cannot-delete-request

Version info
App Version: 1.0.1
Rails: 7.1.3.2
Ruby: 3.2.3
Mode: production

Credentials
https://tickets.fnf.events/events/14/ticket_requests/3027
[email protected]
ethical-STRIATED-dormer

@beingmattlevy
Copy link
Collaborator

Issue is a calling delete when destroy is needed.
Will fix when updates routes are merged in from big payments merge

Issue is in views/ticket_request/show.html.haml
= button_to "Delete this Ticket Request ✘ ", event_ticket_request_path(@event, @ticket_request), class: 'btn btn-warning', method: :delete, data: { "turbo-confirm": "Are you sure?" }

Should be destroy. But path is wrong here so need to wait till other changes are in

@kigster
Copy link
Collaborator

kigster commented May 13, 2024

I disagree — I think we should allow deleting your own ticket request until it's been either paid for, or approved. It should be possible to go back and change your mind, unless someone approved it.

@kigster kigster added not-now This won't get done anytime soon and removed bug-phase-1 labels May 13, 2024
@kigster
Copy link
Collaborator

kigster commented May 13, 2024

Issue is a calling delete when destroy is needed. Will fix when updates routes are merged in from big payments merge

Issue is in views/ticket_request/show.html.haml = button_to "Delete this Ticket Request ✘ ", event_ticket_request_path(@event, @ticket_request), class: 'btn btn-warning', method: :delete, data: { "turbo-confirm": "Are you sure?" }

Should be destroy. But path is wrong here so need to wait till other changes are in

I don't think this is correct.

Method delete invokes the destroy action. I tested and it works.

I think @yarunluon ia saying users should not BE ABLE TO delete their own ticket requests.

I am saying they should unless the ticket is other approved or paid for.

@kigster kigster assigned kigster and unassigned beingmattlevy May 13, 2024
@kigster kigster added work-in-progress and removed not-now This won't get done anytime soon labels May 13, 2024
@beingmattlevy beingmattlevy self-assigned this May 14, 2024
@beingmattlevy
Copy link
Collaborator

I disabled the button for now
GIt commit 0a61983

@yarunluon
Copy link
Contributor Author

I'm fine closing this ticket for now. For future reference, my preference is for both Ticket Requesters and Admins to be able to delete tickets.

@kigster
Copy link
Collaborator

kigster commented May 15, 2024

Why would the admins need to be able to delete ticket requests?

They already can approve or decline it.

The reason only the ticket request submitted should be able to delete the ticket request is if it hasn't been paid for yet, and perhaps it was created in error.

Please realize that deleting ticket request is an irreversible operation and it physically deletes the request from the database, leaving no record of the ticket request being there in the first place.

Admins should never be able to delete other people's requests. They can decline it and it will remain as a record.

@kigster
Copy link
Collaborator

kigster commented May 15, 2024

I created a ticket request as a test and now I cannot delete it. This is a bad user experience.

I should be able to delete it if i haven't paid for it.

@yarunluon
Copy link
Contributor Author

The old version of TicketBooth did not have a delete button so an addition of a button in any form is a bonus for me. Not having a delete button is the status quo and I'm also fine with that.

Why would the admins need to be able to delete ticket requests?

Admins get requests from ticket requesters to "delete" their tickets. For house keeping reasons, Admins want to clear tickets to understand the current state of tickets.

Please realize that deleting ticket request is an irreversible operation and it physically deletes the request from the database, leaving no record of the ticket request being there in the first place.

We're probably working with different levels of the term "delete". I'm only speaking at a UI level and you're referencing a DB level. "Hiding" and "Deleting" a ticket request are the same to me. How this is represented in the DB doesn't matter to me.

@kigster
Copy link
Collaborator

kigster commented May 17, 2024

@yarunluon the delete will be working for this release as follows:

  • The delete button will only show on unpaid ticket requests
  • The delete button will only be shown to ticket request owner or event or site admin
  • The same as above would be able to delete the ticket request.
  • Instead of physically deleting the request from the database without a trace, we'll use "logical delete" by marking it deleted but keeping a record in the database.
  • This will allow the ticket user to submit another request.

For each event, and each user there could be any number of logically deleted ticket requests and only one "live" ticket request.

@yarunluon
Copy link
Contributor Author

yarunluon commented May 17, 2024

This makes sense to me. Would it be easier to phrase it as "Cancel the ticket request" as the "logical delete" at the UI level? We can reserve "Delete" for when we actually remove records from the DB like you said.

Instead of a "Delete button", we'll call it a "Cancel button".

@yarunluon
Copy link
Contributor Author

Oh, I see we are already saying "Cancel" in the UI. Logical delete works for me.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-non-blocking Nice to have a fix but not technically required work-in-progress
Projects
None yet
3 participants