Support Ticket

+status
answered
+tags
 

Not sure where this belongs exactly. Is there a search/card that allows the listing of all cards currently on one's "watch" list? By extensions, how would an admin find the cards on the "watch" list of another User X?

 

It's available under the related tab of all cards w accounts or directly at +*watching.  Eg: Ethan McCutchen+*watching

  --Ethan McCutchen.....Sun May 13 18:42:20 +0000 2012


Some WQL like this should do it:

 

{"plus": ["*watch", "refer_to": "username"]}

 

If you replaced "username" with "_left" and put that in foo+*right+*content, then you could plus any user to foo and get the cards they're watching.

--John Abbe


above WQL is very close to what the +*watching is doing:

{"plus": ["*watcher", {"refer_to": "_self"} ], "view": "change" }

  --Ethan McCutchen.


Just the phrase "plus any user to foo" is reason enough for this exchange. I may have T-Shirts made.

"What's up with that guy?"

"Dunno, but he looks like somebody plussed him to foo."

  --Brandon WilliamsCraig.....Mon May 21 20:43:34 +0000 2012


I am misinterpreting your instructions somewhere.

Is http://culturesmith.com/trx+*right+*content not an example of what you had in mind?

http://culturesmith.com/Brandon_WilliamsCraig+trx gave me

No results? JSON::ParserError: 399: unexpected token at ': "_left"]}'

{"plus": ["*watch", "refer_to": "_left"]}

  --Brandon WilliamsCraig.....Mon May 21 20:54:24 +0000 2012


hahah. I want that t-shirt. But I'd have to give credit to John. I clarified the authors above.

 

John is basically right, but the WQL is a little broken.

 

The easy solution is in my first comment; my second comment is an attempt to clarify John's approach.

  --Ethan McCutchen.....Mon May 21 21:31:04 +0000 2012


btw, your specific error is about the missing curly brackets: {}

  --Ethan McCutchen.....Mon May 21 21:31:52 +0000 2012


So...

{"plus": ["*watcher", {"refer_to": "_left"} ], "view": "change" }

?

  --Brandon WilliamsCraig.....Mon May 21 23:02:28 +0000 2012


well, it should be _self (searches are weird that way). But is there a reason you don't just want to use http://culturesmith.com/Brandon_WilliamsCraig+*watching?

  --Ethan McCutchen.....Tue May 22 02:50:43 +0000 2012


The easy solution doesn't help me understand how the heck WQL works :-)

Sorry for getting a covert tutorial. I'll ask more directly next time.

  --Brandon WilliamsCraig.....Tue May 22 06:29:57 +0000 2012


Oh, I was giving a fish to a man who wanted a rod! Well, let me back up.

 

Currently the actual watching data is stored as a list of user names in a card called "+*watchers". This has not yet been converted to our "rules" pattern, so that applies to individual cards, not sets. (For this reason and others, the notifications system is due for an upgrade).

 

For example, if I'm watching the roadmap card, then you will see my name as one of the items in a pointer card called "roadmap+*watchers". Types are similiar. If I'm watching all user cards, you'll see my name as an item of User+*watchers. In some examples above we used "*watcher" (singular) in place of "*watchers" (plural). That's just a shortcut; they're the same.

 

When you click "watch" or "unwatch", it automatically updates a +*watchers card.

 

But what you're looking for is the data organized by watcher not by watchee. For that we need to search through all those +*watcher cards and find the ones that are pointing to the user in question.

 

To get back to the actual CQL Syntax that makes this work, this isn't the best spot for a full-on WQL intro, but I hear that wagn.org needs to do that better. I think I've been holding out in part because I don't think writing WQL in JSON form will ever be a very happy user experience, but it's taken us a lot longer than I'd hoped to produce other forms.

 

Still just to piece apart what you've got:

 

{"plus": ["*watcher", {"refer_to": "_self"} ] }

 

This means to find all the cards for which there is a +*watchers card that "refers to" self. "Refers to" will find all links and inclusions, including pointer items (which are stored as links). "_self" comes from the name of the search. So if our search is called "Brandon+*watching", then "_self" is Brandon.

 

(This is the weird thing about searches I referred to before. In all other contexts, "Brandon" would be _left, as you intimated. I can explain the historical reason if you're curious, but know that we intend to fix this and migrate all the old references.)

  --Ethan McCutchen.....Tue May 22 13:36:16 +0000 2012