Item10409: query on createdate
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Wanted: a cheap & dirty hack (until "proper" versions query support is added) to support query on
createdate
as it's known in
DBQUERY
, aka
versions[-1].info.date
according to
QueryAcrossTopicRevisions and Support.Faq40.
We just use it in workflow - "things created in the last week"
Example DBQUERY:
%DBQUERY{"form.name~'*TermForm' AND createdate LATER_THAN_OR_ON '%CALC{"$GET(weekold)"}%' AND createdate !LATER_THAN_OR_ON '%TODAY%' AND info.date !LATER_THAN_OR_ON '%TODAY%'"
web="%TERMSWEB%"
hidenull="on"
sort="createdate"
reverse="on"
header="---++ New Terms$n| *Term* | *Created* | *By* |$n"
format="| [[$web.$topic][$topic]] | $formatTime(createdate) |%USERSWEB%.$expand(info.author)|"
}%
Proposed
SEARCH solution:
%SEARCH{
"form.name~'*TermForm' AND (NOW - versions[-1].info.date < (60*60*24*7))"
web="%TERMSWEB%"
hidenull="on"
sort="createdate"
reverse="on"
header="---++ New Terms$n| *Term* | *Created* | *By* |$n"
format="| [[$web.$topic][$topic]] | $createdate | $createwikiusername |"
}%
--
PaulHarvey - 25 Feb 2011
what if we do
Item10678 - so that
createdate
is just part of the magic aliases?
--
SvenDowideit - 25 Apr 2011
META:CREATEINFO
has been implemented as part of the pre-work for
Item10678, and the
MongoDB optimisation is in trunk too. This should fly, but needs testing by... Paul
--
SvenDowideit - 04 May 2011
I'm having trouble finding the time to test this out properly, so I've added Paul & Temi. Can you guys please try it out and report back here? I think this task is finished, we just need to do some testing so that we can close it.
--
PaulHarvey - 13 May 2011
I've created a test topic in here
http://foswiki.org/Sandbox/TestTopic44682 which only returns one topic in the results. I've tried changing the web to Documentation, Tasks, and System but sandbox is the only web that returns topic hits. I'm obviously missing something but what?.
%SEARCH{
"createdate < (60*60*24*3000)"
web="Sandbox"
sort="createdate"
reverse="on"
nonoise="on"
header="---++ New Topics$n| *Topic* | *Created* | *By* |"
format="| [[$web.$topic][$topic]] | $createdate | $createwikiusername |"
}%
--
PaulAlexander - 16 May 2011
This feature is trunk-only. foswiki.org isn't running trunk - please try it out on trunk.foswiki.org and/or wiki.trin.org.au/Sandbox
--
PaulHarvey - 16 May 2011
Searching
CREATEINFO.author
works fine, but you've commented out the
createinfo
alias in Foswiki::Meta?
--
PaulHarvey - 05 Jul 2011
I
think the
MongoDBPlugin portion of this is completed. The remaining issue (lacking an
alias
for
META:CREATEINFO
) is continued in
Item10678).
--
PaulHarvey - 05 Jul 2011