Skip to content

OBPIH-6675 Errors cached despite leaving outbound import workflow#4835

Merged
awalkowiak merged 2 commits intorelease/0.9.2-hotfix1from
OBPIH-6675
Sep 12, 2024
Merged

OBPIH-6675 Errors cached despite leaving outbound import workflow#4835
awalkowiak merged 2 commits intorelease/0.9.2-hotfix1from
OBPIH-6675

Conversation

@kchelstowski
Copy link
Collaborator

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket: https://pihemr.atlassian.net/browse/OBPIH-6675?atlOrigin=eyJpIjoiZDA1OTBlNmVjN2U5NDk5ZmFhOGY1YWE3MmFkMmYwOTMiLCJwIjoiaiJ9

Description:

The problem here was that the cached data was cleared, but two useEffects were affecting themselves, hence before they were cleared, the cached data was sent for validation, as it was not empty yet.
To fix that, we want to load the cached data only if we are on the confirm step.

@kchelstowski kchelstowski self-assigned this Sep 10, 2024
@github-actions github-actions bot added the domain: frontend Changes or discussions relating to the frontend UI label Sep 10, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good job!
Could you also remove the

...
else {
  clearCachedData();
}

from the useMemo for default values

First I think it is unnecessary to call it there anymore since now we are calling clearCahcedData in the useEffect hook (what you have impement)
And also it is probably wrong to call any methods with side-effect in a useMemo hook (my bad 🙈 )

@awalkowiak awalkowiak merged commit d80d641 into release/0.9.2-hotfix1 Sep 12, 2024
@awalkowiak awalkowiak deleted the OBPIH-6675 branch September 12, 2024 14:21
jwalbers pushed a commit to jwalbers/openboxes that referenced this pull request Oct 29, 2024
jwalbers pushed a commit to jwalbers/openboxes that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants