-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
[bug] Unsaved changes alert triggered unnecessarily when required templates are in use #469
Comments
I was not able to replicate the bug described in the issue description. But I found another issue: The required templates are always shown at top, irrespective of the ordering set by user. |
I will double check.
That's the intended behavior and documented: https://github.com/openwisp/openwisp-controller/tree/797b41e1048f9b8c2939298c2f506a55e811e46b#required-templates. |
But if you add them from shell using `Config.templates.add(''), then they'll appear at the end of the list. Since this is a thing which won't happen in real world, I don't think we should worry about it. |
I just noticed in the GIF attached in the issue description, the required template is not at the top. |
Correct, they'll be reordered again sooner or later when the user hits save again on the same device. |
Yes, that's the issue. I'll need to try again on an empty system. |
The problem happens on devices that exist before a required template is added to a system, I opened an issue to deal with required/default templates that should be automatically assigned to devices: #480. A problem with the unsaved changes code is still present but opened a dedicated issue for it: #481. |
How to replicate
Add a required template to the system.
Create a new device in the same organization of the template just created.
Open the device detail page, do not change anything, reload or click on anywhere to go to a different page.
Expected behavior
Device page is left without alerts.
Actual behavior
Unsaved changes alert is triggered.
Demo
We need tests
This problem has been happening too much lately.
In order to avoid keep banging our head on it, I think we need to start introducing selenium tests, this could be the first (failing) test to add.
The text was updated successfully, but these errors were encountered: