|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001728||v3.3 Release (Current)||Tasks||public||2017-01-04 06:39||2017-01-16 03:45|
|Target Version||Fixed in Version|
|Summary||0001728: Strange effect on task_percent_complete when deleting Task Logs|
|Description||When designing reports based on task_percent_complete, I noticed peculiar behaviour when deleting Task Logs. Team Members do not always book at the correct level, so we regularily got to clean up some Logs. When task_percent_complete becomes NULL (not even 0%), these task no longer appeared in my queries.|
|Steps To Reproduce||1. Add 2 or more task logs|
2. Set task_percent_complete to 1 to 100%
3. Delete Task Log > task_percent_complete becomes 0% (0 in MySQL)
4. Delete last remaining Task Log > task_percent_complete becomes NULL
|Tags||No tags attached.|
Can you share the query that you're attempting?
I just tried this out on the latest 3.4 development branch and got the behavior that I expected.
From an existing task, I created a log:
- for 10 days ago at 10% complete;
- for days ago at 50% complete;
- for today at 100% complete
The Task was marked as 100% complete. When I deleted the last log, it dropped back down to 50% as expected.
Patrick Hoornaert (reporter)
1. Added 1 Task Log (used a non-dynamic task)
2. Query below to select active tasks (normally I use W2P classes in PHP)
SELECT task_name, task_percent_complete FROM projects
JOIN tasks ON projects.project_id = tasks.task_project
WHERE task_id = 3813 and task_percent_complete <> 100
3. This task shows up as active
4. Manually deleted Task Log
5. No result, because task_percent_complete of this Task became (Null) and not 0 (percent) as you would expect. My quick fix was adding clause "task_percent_complete <> 100 OR task_percent_complete IS NULL"
Maybe resolved in 3.4? Anyway we'll need to upgrade from 3.3.
|2017-01-04 06:39||Patrick Hoornaert||New Issue|
|2017-01-13 22:45||caseydk||Assigned To||=> caseydk|
|2017-01-13 22:45||caseydk||Status||new => feedback|
|2017-01-13 22:45||caseydk||Note Added: 0003884|
|2017-01-16 03:45||Patrick Hoornaert||Note Added: 0003888|
|2017-01-16 03:45||Patrick Hoornaert||Status||feedback => assigned|