LF-4479: [GET&POST] Update Task saga to account for new animal movement task #3550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
animalMovementTaskSlice
.taskSlice
to includeanimals
andanimal_batches
in tasks.taskSlice
,onLoadingTaskStartSaga
andgetTasksSuccessSaga
forGET
requests.MOVEMENT_TASK
, but the subtask name in theGET
response body isanimal_movement_task
, whereas they match for other task types. To handle this, I created agetSubtaskName
function. I should've been more careful with naming...createTaskSaga
forPOST
requests.sagaUtils
file and added helper functions there.Additionally, this is not directly related to the ticket, but I updated
flattenInternalIdentifier
to remove theanimal_union_batch
property from animals and batches, which I forgot to address when working on the API.I’ll create another PR for
PATCH
requests later this week.Jira link: https://lite-farm.atlassian.net/browse/LF-4479
Type of change
How Has This Been Tested?
Checklist: