Skip to content

[dataquery] What happens when you edit a query you loaded from a saved one #11216

Description

@HenriRabalais

Description

Loading a saved query and changing it has no defined outcome. The module treats a query as its content, so an edited query is a different query, and the name, star, share and pin stay on the original. There is nothing in the interface that says so, and nothing that offers a choice.

Current behaviour

  • Running an edited query stores it as a separate query. An identical one that already exists is reused.
  • Naming it gives a second saved query. The original keeps its name.
  • Names aren't unique, so the edited query can be given the original's name, and both then appear under it with no warning.
  • Names are per user, so naming a query someone shared names it only for the person naming it.

Decisions needed

  1. Is there such a thing as updating a saved query? Since queries are immutable, that means moving the name, pin and shares to the edited query, and deciding what happens to other users who named the original.
  2. Should the module show that the query you're working on came from a saved one and has been changed, with a way to save it as a new query or discard the changes? This is what @christinerogers asked for in [DQT] Saved Queries - get updated / overwritten without hitting Save #9316.
  3. Should saving warn when the name is already in use?

Related Issues

#9316 fixed the display side of this: an edited query no longer changes the saved query shown on the welcome page. It didn't settle any of the above.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Module: dataqueryPR or issue related to (new) dataquery module

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions