View Single Post
Quote:
Originally Posted by mrubenson View Post
What modification do I need to make to have the script count only actions that have a context as actions?
The task table has a context field, the value of which is either NULL or the id of a particular context.

To count only tasks which have an assigned context, you need to add the condition and (context is not null) to any Select ... from task lines in the SQL.

For example:
Code:
select "ALL ACTIONS", count(*) from task where (projectinfo is null) and (childrenCount=0);
could be edited to:

Code:
select "ACTIONS WITH CONTEXTS", count(*) from task where (projectinfo is null) and (childrenCount=0) and (context is not null);