Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By worthy on
I have the tasklist module installed and its working great, except when I'm on the main task list node and I change the filter by selecting completed or all from the drop down box and then "filter" it just goes back to uncompleted tasks view. I can't see the others.
Anyone have any idea what I'm doing wrong?
Thanks
Comments
A quick dirty fix to show completed tasks...
I experienced the same problem on a fresh 4.7 installation.
I tried both the 4.7 and the CVS version.
Since I'm pressed for time and all I want is to list all tasks (completed or not), I looked for the code that builds the task lists for display and simply commented out the condition statements so that the filter displays all tasks regardless of the selection.
That is, go to line 330 where it says:
// Filter the tasks shown
and comment the following:
by adding
/*
before and*/
after it. Then simply copy and paste the last statement below:$order_by = 'IF(t.completed = 0, 0, 1), t.completed DESC, t.order_by';
so that it ends up like this:For the sake of minimizing confusion (remember, we haven't fixed the problem of the filter not being applied), do the following so that the filter shows 'All Tasks' as selected:
Go to around line 360 where it says:
'#default_value' => 0,
and change the 0 (Incomplete Tasks) with a -1 (All tasks):
'#default_value' => -1,
This doesn't solve the problem of the selection not being applied, but at least it gets you to list all tasks, Complete and Incomplete, regardless of the selection, which is what I needed now.
And if it really bothers you that the other options are listed (Completed/Incomplete), then just change the line after last one:
'#options' => array(0=>t('Incomplete Tasks'),1=>t('Complete Tasks'),-1=>t('All Tasks'))
into:
'#options' => array(-1=>t('All Tasks'))
Then the only filter option will be 'All Tasks' and users will at most think it's an odd design and not a bug.
By the way, this should be listed as an issue on the Tasklist module's page. I just did:
http://drupal.org/node/44293
------
Con paciencia y calma,
sube un burro a una palma
Thank you
That is exactly what I needed to do and you wrote it out simply enough that even this total newbie could get it fixed, well working anyways.
Thank you!
Ive written a patch that
Ive written a patch that makes it work like it should. Its on the issues tracker:
http://drupal.org/node/64157