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

LF-4479: [GET&POST] Update Task saga to account for new animal movement task #3550

Conversation

SayakaOno
Copy link
Collaborator

Description

  • Add animalMovementTaskSlice.
  • Update taskSlice to include animals and animal_batches in tasks.
  • Update taskSlice, onLoadingTaskStartSaga and getTasksSuccessSaga for GET requests.
    • The translation key is MOVEMENT_TASK, but the subtask name in the GET response body is animal_movement_task, whereas they match for other task types. To handle this, I created a getSubtaskName function. I should've been more careful with naming...
      Screenshot 2024-11-26 at 11 39 20 AM
  • Update createTaskSaga for POST requests.
    • I created a sagaUtils file and added helper functions there.

Additionally, this is not directly related to the ticket, but I updated flattenInternalIdentifier to remove the animal_union_batch property from animals and batches, which I forgot to address when working on the API.
Screenshot 2024-11-26 at 11 53 42 AM

I’ll create another PR for PATCH requests later this week.

Jira link: https://lite-farm.atlassian.net/browse/LF-4479

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Passes test case
  • UI components visually reviewed on desktop view
  • UI components visually reviewed on mobile view
  • Other (please explain)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The precommit and linting ran successfully
  • I have added or updated language tags for text that's part of the UI
  • I have added "MISSING" for all new language tags to languages I don't speak
  • I have added the GNU General Public License to all new files

@SayakaOno SayakaOno added the enhancement New feature or request label Nov 26, 2024
@SayakaOno SayakaOno self-assigned this Nov 26, 2024
@SayakaOno SayakaOno requested review from a team as code owners November 26, 2024 20:03
@SayakaOno SayakaOno requested review from antsgar and Duncan-Brain and removed request for a team November 26, 2024 20:03
@Duncan-Brain
Copy link
Collaborator

Duncan-Brain commented Nov 28, 2024

Seems to be working for me! You are crushing it Sayaka! 🎉

Copy link
Collaborator

@antsgar antsgar left a comment

Choose a reason for hiding this comment

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

Looks good, great job!! 👏

@antsgar antsgar added this pull request to the merge queue Nov 28, 2024
Merged via the queue into integration with commit 587046c Nov 28, 2024
5 checks passed
@antsgar antsgar deleted the LF-4479/Update_Task_saga_to_account_for_new_animal_movement_task branch November 28, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants