AntonShuvaev / elasticsearch4idea

Elasticsearch Plugin for JetBrains IDEs
https://plugins.jetbrains.com/plugin/14512-elasticsearch
58 stars 8 forks source link

Saved request does not update #112

Closed lookingcloudy closed 1 year ago

lookingcloudy commented 1 year ago

Describe the bug This is a pretty major bug. Saving a request, then open the request and make changes. The changes are not saved back to the request.

Steps to reproduce Save a request. Open the request. Make changes to the request. CMD-S to save the changes - doesn't do anything!!! The changes are lost.

Expected behavior Any change to a saved request should be saved.

Environment information:

AntonShuvaev commented 1 year ago

I know maybe it's not the best UX but the idea is that when you open an index or saved request, it is opened in in-memory file which is not persisted. If you want your changes to be saved, you need to open Query Console or create and open file with .es extension, or create Elasticsearch scratch file which are automatically saved.

When you save a request with Save request (Shift+F3) action it is placed in Requests folder in the explorer tree. It can be reused later by opening it or inserting from Request History (Alt + Cmd + F3) dialog, but it is not possible to update it, only save new one or delete.

lookingcloudy commented 1 year ago

So then the bug is to allow the user to type in the window. It should be a read-only window. It is only by loosing data that one learns that this is read-only.

AntonShuvaev commented 1 year ago

Thanks for the feedback. I will add in the next release opening an index or a saved request in a new query console that will be automatically saved.

AntonShuvaev commented 1 year ago

Fixed. Open in query console action is now open request in persistent query console.