Doesnt sound too difficult, if I get a moment I’ll show you exactly, but in a nutshell…
In the hasRequiredCondition, use the task finder to get the task by the id and then check the status. You’ll have to
use the task finder model.
Should look similar to
&& $this->taskFinderModel->getById($data['task_link']['task_id'])['status'] == 1
Bare in mind I’m on a cell phone at the moment…
Edit: actually theres more to it than that…because you want to change the color back, when nothing else is blocking it, so, you need to add that condition, “when nothing is blocking it”, and then change the color back to previous, which presents the next issue…what color was it? So you need some type of previous memory, which could be stored in the tasks metadata and accessed upon condition.
You also need to decipher between tasks that have never been blocked, and no longer are blocked, which can be determined by the existence of this memory stored in the metadata.