Fix to not mark a valid preloaded subtask as INVALID
Before this change, a subtask was marked as INVALID when a task had a
preload-task pointing to a task from external file which had a
subtask [1]. While preloading a task, all the subtasks are copied to
the current task. Since the subtask property was a String, it does
not maintain the information regarding the location of the subtask.
Due to which, the plugin fails to lookup the subtask.
Thus, fix this issue by using TaskKey as the type for subtask property,
which helps in tracking the location of the subtask. Add tests for the
same.
[1]
file: `All-Projects:refs/meta/config:task.config`
```
[root "root task"]
applicable = status:open
preload-task = //common.config^simple task with subtask
```
file: `All-Projects:refs/meta/config:task/common.config`
```
[task "simple task with subtask"]
applicable = is:open
subtask = passing task
[task "passing task"]
applicable = is:open
pass = True
```
Change-Id: Iacf5345c575209267cf6ad0489327ee10feed55c
5 files changed