Closed VirginiaDooley closed 3 months ago
I think this is a classic XY problem: we really want to be able to split candidates, we can't, and this prevents the workaround from working properly.
We should grasp the nettle and figure out candidate splitting, really.
I imagine there might be other reasons to remove results, though. However, I'm not convinced that deleting the resultset model is a good idea. This means we lose all the history of the results forever, including sources etc.
It would be better to delete the candidate results (in the backend, so as to avoid form validation errors), and create a new version in the versions
field to reflect that the results were deleted. This would (should) allow reverting to a previous set of results if they were deleted in error.
However, I think the better solution is to allow splitting. I can't actually think of another reason to remove the results all together (rather than correcting them).
Good points Sym. I do want to delete some results, but these are all the non-FPTP ones which don't work in our system. How close are we to being able to split candidates? This needs doing sooner rather than later, hence the results deletion workaround.
We've decided that this feature is not actually what we need, esp as we want to keep version history. Instead we will focus on the long awaited fix for candidate splitting. https://github.com/DemocracyClub/yournextrepresentative/issues/646
There is currently no way to remove results from a ballot in the front end or admin panel. One might try to remove the results in the edit form but this leaves with validation errors that we don't want to change. This change gives user with permission that power, deleting result set, candidate result and reverting winner in the process.
The context for this particular feature, requested by @pmk01, was: "One of the candidates needs splitting into two profiles, but this can only be done if the ballot doesn't have results added."