http://en.dwagn.org/wagn/John_Abbe%2B*last_edited busted. Nothing on Hoptoad, but the cards shows:
ActiveRecord::StatementInvalid: PGError: ERROR: syntax error at or near "update" LINE 1: ...h is false ) and t.trash is false ORDER BY by update des... ^ : (select t.name from cards t where t.updated_by in (select extension_id from cards tx where tx.extension_type = E'User' and tx.key = E'john_abbe' and tx.trash is false ) and t.trash is false ORDER BY by update desc LIMIT 50 OFFSET 0)
{"last_edited_by": "_left", "sort": "by update", "view": "change" }
http://en.dwagn.org/wagn/*last_edited+*right+*content
sort field was problem.
--Ethan McCutchen.....Sun Feb 27 22:22:21 -0800 2011
Do you think we should hold off on documenting last_editor for now since it's using updated_by, which isn't always an editor? Once we have unified changes, I think pretty much all "updates" will be visible, so the distinction won't matter much, but right now it's confusing. I took it off of here: http://en.dwagn.org/wagn/*account+*right+*content (where it seemed like noise to me anyway)
--Ethan McCutchen.....Mon Feb 28 09:46:22 -0800 2011
WQL is for pretty geeky people anyway, so I'm inclined to document it but note the distinction. Updating CQL Syntax now...
--John Abbe.....Mon Feb 28 09:58:32 -0800 2011
I don't really like this, but just so the idea's on the table, we could change it to last_updated_by / last_updater so there's not the weird incongruity with edited_by / editor.
--Ethan McCutchen.....Mon Feb 28 10:25:02 -0800 2011
Oh, does edited_by / editor not include people/cards from name or permissions being changed?
--John Abbe.....Mon Feb 28 11:02:40 -0800 2011
nope, that stuff isn't tracked in any sort of history. That's the representational incongruity. We have a revisions table that stores content revision, and that's what we query to get the edits. The last_edit stuff comes from the updated_at field which gets pinged by any update (default rails behavior based on "updated_at" naming convention).
--Ethan McCutchen.....Mon Feb 28 11:10:20 -0800 2011
So...was it on purpose that for last_editor we drew from updated_at instead of the revisions table?
--John Abbe.....Mon Feb 28 11:15:45 -0800 2011
faster, simpler, fewer joins. but I could change it I guess.
--Ethan McCutchen.....Mon Feb 28 11:21:00 -0800 2011
pondering whether we want "edited" WQL/star cards stuff to include renaming. I kind of think so. When permissions are setting-ized, updated_at will only be renaming, right? So maybe change to just edit for now, then ticket to have them all include updated_at after we setting-ize permissions?
--John Abbe.....Mon Feb 28 11:27:26 -0800 2011
Can't. updated_at is only the most recent one (it's just a field on the cards table). Historic changes aren't tracked. This will have to wait until "revisions" (content only) becomes changes (all tracked fields).
and no, that field will also be type changes. maybe other things, not sure.
suggest just forgetting about it for now. wait for overhaul card history. don't publicize last_edited WQL and take away star card.
--Ethan McCutchen.....Mon Feb 28 11:45:32 -0800 2011
Done.
--John Abbe.....Mon Feb 28 13:06:12 -0800 2011