Page MenuHomePhabricator

Make it easier to update the query a Phabricator Dashboard "Query" Panel uses
Open, LowPublic

Description

Upstream: https://secure.phabricator.com/T7216

I visit https://phabricator.wikimedia.org/maniphest/query/e41ODj4.53uU/ (a saved query called "Reading code review")
I click edit
I update the search to include a new extension
I click save query
I have no way to save it as "Reading code review" - if I do I just end up creating a new query
Expected: I want to override the existing query

This is frustrating as when I change a query I also have to change the panel in a dashboard...

Event Timeline

Jdlrobson updated the task description. (Show Details)
Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson added a project: Phabricator.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added subscribers: scfc, Aklapper. · View Herald TranscriptSep 23 2015, 11:47 PM
Aklapper renamed this task from Should be easy to amend queries to Allow overwriting/changing saved queries.Sep 24 2015, 8:25 AM
Aklapper edited projects, added Phabricator (Upstream); removed Phabricator.
Aklapper set Security to None.
greg added a subscriber: greg.Sep 24 2015, 4:26 PM

Agreed. This looks like https://secure.phabricator.com/T7216 upstream.

Aklapper updated the task description. (Show Details)Sep 25 2015, 9:13 AM
Aklapper moved this task from Backlog to Upstreamed on the Phabricator (Upstream) board.
Aklapper triaged this task as Low priority.May 23 2016, 5:36 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptMay 23 2016, 5:36 PM

saved queries are immutable by design.

That seems like a poor design decision. It means there is no way to correct mistakes or adapt to changes.

I'm going to retitle this to align with the upstream task since I everyone is actually talking about a reasonable feature ("Make it easier to change which query a dashboard panel uses"), even though some of the task titles and actual descriptions and discussion look like a different problem that's less reasonable ("Make a fundamentally immutable object, with a lot of good reasons to be immutable, into a mutable object").

The workflow will look something like:

  • You click "Edit Query" from a Dashboard Panel.
  • You are taken to the Query screen, in a special "Edit For Panel" mode ("You are editing the query that appears on Wxxx.").
  • You edit the query and click "Save Query" or similar.
  • You're taken back to the panel and the query the panel uses is updated to reflect your changes.

The last step changes the query the panel issues from, say, /e41oQz/ to /f8h31Mp/ (the actual queries don't become mutable) but this doesn't matter because the workflow is generally indistinguishable from a workflow where we've changed the meaning of /e41oQz/.

epriestley renamed this task from Allow overwriting/changing saved queries to Make it easier to update the query a Phabricator Dashboard "Query" Panel uses.Wed, Mar 13, 12:00 PM
Aklapper moved this task from Backlog to Reported Upstream on the Upstream board.Wed, Mar 13, 12:03 PM
HappyDog added a comment.EditedThu, Mar 14, 9:50 PM

Sounds reasonable (taking you at your word - personally, I can't think of any reasons why immutable search results are a good idea).

One additional (automatic) step is needed:

  • Hide (delete/disable/remove ownership/whatever) the original query so it doesn't show up in any of the normal lists. People shouldn't end up with a ton of near-identical duplicates due to editing/refining/updating their dashboard queries.

I'm not sure what you mean by that, can you show me a screenshot of what you mean by the "normal lists" where you're worried the query will show up? My expectation is that there's no "list of queries people have run" or anything similar to that, so I'm not sure what UI you're worried about.

HappyDog added a comment.EditedThu, Mar 14, 9:57 PM

Maybe I'm confusing things - when I use 'add existing panel' then all the old versions of the panel are still listed, currently. But I don't know how that maps to the suggested workflow - I don't really understand the difference between a query and a query panel.

Either way, if there are lists of queries anywhere, you probably don't want all the different variants of "My projects" to be listed - just the current one.

(And if there aren't such lists, it makes me even more confused about why they need to be immutable...)