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

Improve show creation to avoid duplicate shows being created #280

Closed
philosophicles opened this Issue Jan 17, 2015 · 6 comments

Comments

Projects
None yet
6 participants
@philosophicles
Copy link
Contributor

philosophicles commented Jan 17, 2015

Not too infrequently, two different people involved with one production each create a listing for it on Camdram. Then subsequently realise the mistake and one has to be deleted. In a few cases I'm sure we will have lingering duplicates where it was never noticed.

Doing to try to avoid this would seem helpful to end users. It also keeps our DB tidy and avoids slugs with -1 (-2..-n) suffixes being created unnecessarily.

This may only be possible after #42 has been implemented? (At which point there would presumably be a Show Name autocomplete that also fills in Author etc.)

Or perhaps there could be some intermediate process where the Show Name field triggers a search for exact name matches within 1 year of the current time, and (if found) presents a "Has somebody already created this show?" type warning. User wouldn't be prevented from creating the duplicate - it's not unheard of for the same play to happen twice in one year by different societies/venues. It would just act as a little reminder to double-check.

Unusually, this search might actually need to include non-authorised show listings - and report who created the potential duplicate so the current user can think "oh, that person is on my production team, I should email them to check".

@hoyes

This comment has been minimized.

Copy link
Member

hoyes commented Jan 17, 2015

I think we could look at the performance dates and venue too - if these match (or the performance dates are sufficiently similar or overlap or something), then we could display an error and block the creation of the show.

It could even be an error if someone tries to insert a show at with the same date/time and the same venue as another approved show, regardless of show title.

@ajf58

This comment has been minimized.

Copy link
Contributor

ajf58 commented Apr 12, 2015

I like Peter's suggestion: if another show exists (pending or otherwise) at the same time/place then prevent the user from trying to add a new show. We'd probably want to give some quite verbose feedback to the user, e.g. "Unfortunately your show couldn't be added. This could be because another show already has been approved for the same time at this venue, or another show is waiting for approval."

I've been out of touch with Camdram for a while, so I'll try to take this one on.

@ajf58 ajf58 self-assigned this Apr 12, 2015

@ajf58 ajf58 added the enhancement label Apr 12, 2015

@hoyes

This comment has been minimized.

Copy link
Member

hoyes commented Apr 12, 2015

If you haven't already found it, http://symfony.com/doc/current/cookbook/validation/custom_constraint.html is probably a nice way to do it (injecting in doctrine as a dependency to the validator service so you can search for other shows)

@hoyes

This comment has been minimized.

Copy link
Member

hoyes commented Apr 12, 2015

Also (thinking some more) I don't think sample data fixture generation currently guarantees unique times at venues ...extra checks might be needed there to prevent non-deterministic errors...

@jamesterjlrb

This comment has been minimized.

Copy link

jamesterjlrb commented Apr 13, 2015

The other thing to watch out for is where a venue might have two shows at the same time, e.g Larkum and Main show (although larkum is normally slightly later, so this might not be relevant). It might be useful for superadmins to be able to override this warning, either for the rare case above, or if troubleshooting is required.

@philosophicles

This comment has been minimized.

Copy link
Contributor

philosophicles commented Apr 14, 2015

The Larkum is a separate venue on Camdram (as is the bar) so that should be OK.

@dstansby dstansby added this to the Mitchell milestone Jun 18, 2015

@GKFX GKFX assigned GKFX and unassigned ajf58 Jan 3, 2019

@GKFX GKFX closed this in 2a8b788 Jan 6, 2019

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