fix: Show all teams on frontend if nothing is present
This MR introduces two key changes to improve the handling of team_ids:
Backend Validation for undefined Team IDs:
The backend now validates against undefined values for team_ids and returns a relevant error message to the frontend, ensuring more robust error handling and improved feedback for invalid inputs. Frontend Handling of undefined Team IDs:
The frontend has been updated to prevent sending undefined as the value for team_ids. If no specific team_ids is provided, the field will be omitted from the request, allowing the backend to return all team IDs that the user is associated with.
Supporting information
Visual changes
Merge deadline
None
Testing instructions
Step by step procedure
Try to follow the flow in the ticket and it should show the report of all the teams the user is part of
- Setup listaflow locally and login via admin user
- Go to http://localhost:8000/admin/workflow/recurrence/ and enable a recurrence
- Now, go to http://localhost:3000/lists and click the three dots on a list that is created and then on "Show report"
- Ensure that the list have multiple assignees
- This should open a URL somewhat like: http://localhost:3000/reports/compare?checklistDefinition=dfN-u8qlSPeA&team_ids=q11aH7tJQ2eA&start_date=2024-10-07&end_date=2024-10-07 and the reports should be visible
- Update the team_ids to
team_ids=undefinedandteam_ids=. In both the cases report should be shown and no error should be visible on the frontend
Author notes and concerns
None or note it here
Edited by Saksham Agrawal
