roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Button "remove plan" sometimes doesn't work

Open nicolasfranck opened this issue 2 years ago • 2 comments

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

3.0.5

Expected behaviour:

Button "remove plan" should link to active role to deactivate

Actual behaviour:

Button "remove plan" sometimes links to already inactive role to deactivate. This can happen if your user has both an active and a deactivated role

Steps to reproduce:

  • go to /plans
  • press button "remove plan"
  • ask someone to add you back to the plan
  • go to /plans and press button "remove plan". It is possible that it works, or not. It all depens on the query result of this line

nicolasfranck avatar Mar 07 '22 13:03 nicolasfranck

What is the scenario for this? Is it a plan with multiple owners? What is the plan visibility?

briri avatar Mar 21 '22 15:03 briri

"remove plan" is a button that is available for each plan on your "/plans" page. It contains a link to a route where that role is deactivated. Unfortunately, in the current implementation, it can happen that a link to the wrong role is given, as it just retrieves the "first" role, whether or not that role is still active. So "remove plan" does nothing if it links to an inactive role. By any luck it won't happen to you, but it depends on the current sort order.

nicolasfranck avatar Mar 21 '22 15:03 nicolasfranck