Workboard 404 after using "View as Query"


Observed Behavior:
After clicking “View as Query” on a workboard column (where the workboard has a customized default filter), the workboard will return a 404.

Expected Behavior:
Returning a 200 and showing the workboard.

Phabricator Version:

Reproduction Steps:

  1. Create a new project.
  2. Create the workboard for the new project.
  3. Change the default workboard filter (it has to be a custom query rather than one of the built-in ones, I changed it to tasks assigned to myself).
  4. On the “backlog” column, click “View as Query”.
  5. Click “Search”.
  6. Go back to workboard page, get 404ed.


From my own troubleshooting (this has happened twice now on our install), the saved query referenced in workboard.filter.default seems to no longer exist. The 404 is then caused by this code:

$custom_query = null;                                                        
if ($search_engine->isBuiltinQuery($query_key)) {                            
  $saved = $search_engine->buildSavedQueryFromBuiltin($query_key);           
} else {                                                                     
  $saved = id(new PhabricatorSavedQueryQuery())                              
  if (!$saved) {                                                             
    return new Aphront404Response();                                         
  $custom_query = $saved;                                                    


I don’t know if it is related, but downstream came to my mind.


Upstreamed as since we now have three independent reports.