Page MenuHomePhabricator

Periodically email saved queries
Closed, WontfixPublic

Description

It would be nice if saved queries could be periodically sent via email, ala Bugzilla's whining feature.

See https://phabricator.wikimedia.org/T76825 for some context.

Event Timeline

jayvdb created this task.Feb 5 2015, 9:12 AM
jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a subscriber: jayvdb.

Herald wouldn't help Wikimedia at all, as we're not able to use it.

Bugzilla's whining feature is about sending task query results via email, while Herald can only react to single tasks being created or updated.
So I am afraid this is not a complete duplicate of T6491.

epriestley changed the task status from Duplicate to Wontfix.May 22 2016, 4:09 PM
epriestley added a subscriber: epriestley.

Fair enough. I don't plan to pursue this, as written. We've seen very little interest in this, and it's not clear to me that it's the best solution to any problem.

You can do this yourself via the API:

  • Write whatever query you want in the web interface.
  • Grab the queryKey from the URI. This is the part after /query/ when you run the query. For builtin queries it will look like active or authored. For custom queries it will be a random-looking hash, like qE30RV4xeGYu.
  • Call maniphest.search with this key as the queryKey:
$ echo '{"queryKey":"active"}' | arc call-conduit ...

You can review these documents for additional help:


For example, I have this old saved query for "Support Impact" tasks:

The queryKey is dMq3auym_SBV.

I can get the list of tasks with a command like this:

$ echo '{"queryKey":"dMq3auym_SBV"}' | arc call-conduit --conduit-uri=https://secure.phabricator.com/ maniphest.search | json_pp
{
   "error" : null,
   "response" : {
      "maps" : [],
      "cursor" : {
         "order" : null,
         "before" : null,
         "limit" : 100,
         "after" : null
      },
      "data" : [
         {
            "fields" : {
               "priority" : {
                  "color" : "pink",
                  "value" : 100,
                  "subpriority" : -0.35537708321374,
                  "name" : "Unbreak Now!"
               },
               "ownerPHID" : null,
               "dateModified" : 1424894724,
               "authorPHID" : "PHID-USER-ba8aeea1b3fe2853d6bb",
               "points" : null,
               "dateCreated" : 1424883540,
               "policy" : {
                  "view" : "public",
...

From there, I could write a script to turn that list into an email and send it to myself every night using cron.


The downstream task describes some use case which I think are already well-served by many other mechanisms:

  • Maniphest saved query for "updated after: yesterday", or just ordered by date modified, with project filters.
  • Project page feeds / feed query by project.
  • Dashboards.

In general, these mechanisms are far more flexible than periodically emailing some query result somewhere.


If this misunderstands the need for the feature, please file a new feature request describing the root problem that you're interested in solving (see Describing Root Problems for help). But I believe problems in the vein of "I want to see recent activity in a particular project", which is what the downstream task seems to describe, are already solved effectively by more flexible general-purpose tools like project overview feeds and feed searches.

Evan, thanks (as usual) for elaborating which options are available! This is very helpful.