Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the tasklist formatters to be used with task search results #1387

Merged
merged 2 commits into from Oct 19, 2021

Conversation

wheelsandcogs
Copy link
Contributor

@wheelsandcogs wheelsandcogs commented Oct 18, 2021

Task search results are a slimmer / flattened object when compared with tasks returned from the workflow API - update the formatters to be able to cope with the new shape.

let licence = get(model, 'data.model');
format: (type, task) => {
const id = get(task, 'id');
const status = get(task, 'data.modelData.status') || get(task, 'status');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like there's going to be some ambiguity between the status of the task and the status of the associated data object.

I would expect task.status to represent the task's status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh good catch - in that case we need to index the modelData.status as well.

@lennym lennym merged commit 6dae7c6 into master Oct 19, 2021
@lennym lennym deleted the feature/task-search branch October 19, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants