Closed aviskase closed 3 years ago
Yes, this is how I would implement this! Alternatively you could make a query for each g_in_*
field done between two dates, but my experience with couchdb is that it's easiest to do as much client-side as possible.
Hi, I'd like to replicate Archive > Stats view, but with the split by goals instead of categories.
I'm not very familiar with couchdb queries, so I've started with a simple find with selectors
done
anddoneAt
. But I have trouble with filtering based on goal. As I understand, the only way to know that the task is in the goal is byg_in_GOALID
field. It doesn't look like there is possibility to have a selector "field starting with gin`", am I right? Also, looks like if a task is a part of the project with the goal, the task itself doesn't have this field.Thus, the algorithm seems to be: 1) Grab all done tasks between two dates 2) For each task check whether it has
g_in_*
fieldPerhaps there is a better way?