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

Enable used rolling stock deletion with a confirmation dialogue #9377

Open
Synar opened this issue Oct 17, 2024 · 4 comments
Open

Enable used rolling stock deletion with a confirmation dialogue #9377

Synar opened this issue Oct 17, 2024 · 4 comments
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features

Comments

@Synar
Copy link
Contributor

Synar commented Oct 17, 2024

Who would benefit from this feature?

End users

What is this feature about?

Currently, trying to delete a rolling stock that is used in at least one scenario leads to an error modal, with only the option to cancel.

This enhancement would :

  • add an option to delete anyway (which would send a request with the --force flag, already implemented for this purpose in editoast)
  • add detailed informations on the number of trains, scenarios, studies and projects using the rolling stock to the modal
  • add links to the corresponding scenarios in the modal, filtered by the rolling stock to be deleted, with the filters exposed in the url

Why is this feature valuable?

This issue was planned for and its groundwork was implemented in editoast in #8078

We used to have such a mechanism that prevented a rolling stock from being deleted if it was used in some train schedules. We did that because TrainSchedule V1 used to reference a rolling stock using a foreign key. So removing it also deleted the associated train schedules.

Since TSV2, rolling stocks are loosely referenced using their name. If the rolling stock doesn't exist, the train schedule is deemed invalid but still exists. We still want to warn the user that deleting a rolling stock might invalidate some train schedules though.

However, as far as I am aware, the issue to implement the front part has not yet been created.

Anything else people should know?

This was discussed with @flomonster

@Synar Synar self-assigned this Oct 17, 2024
@Synar Synar added kind:enhancement Improvement of existing features area:front Work on Standard OSRD Interface modules and removed kind:enhancement Improvement of existing features labels Oct 17, 2024
@flomonster
Copy link
Contributor

add links to the corresponding scenarios in the modal, filtered by the rolling stock to be deleted, with the filters exposed in the url

To do so we need to do this enhancement first.

@Synar
Copy link
Contributor Author

Synar commented Oct 23, 2024

add links to the corresponding scenarios in the modal, filtered by the rolling stock to be deleted, with the filters exposed in the url

To do so we need to do this enhancement first.

Done

@Synar Synar closed this as completed Oct 25, 2024
@Synar Synar reopened this Oct 25, 2024
@Synar Synar closed this as completed Oct 30, 2024
@bloussou
Copy link
Contributor

AC are not done even if some improvements were done

@bloussou bloussou reopened this Oct 31, 2024
@Synar
Copy link
Contributor Author

Synar commented Oct 31, 2024

My bad I keep marking this as completed by mistake ^^'

@Synar Synar removed their assignment Oct 31, 2024
@Synar Synar self-assigned this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules kind:enhancement Improvement of existing features
Projects
None yet
Development

No branches or pull requests

3 participants