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

fix: [DHIS2-17519] app crashing when opening new event from view event #3781

Conversation

alaa-yahia
Copy link
Member

@alaa-yahia alaa-yahia commented Sep 2, 2024

Implements DHIS2-17519


Description:

The app crashes when attempting to open a new event from the view event screen. This issue occurs because the useRulesEngine hook is executed before the singleEvent-newEvent object is added to the dataEntriesFieldsUI in the state.

Root cause:

The app crash is triggered from the inputHelpers.js file, specifically on this line, where dataEntriesFieldsUI is undefined.

The fix:

Ensure that the singleEvent-newEvent object exist before the useRulesEngine hook is called.

@alaa-yahia alaa-yahia requested a review from a team as a code owner September 2, 2024 13:29
Copy link
Contributor

@superskip superskip left a comment

Choose a reason for hiding this comment

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

I don't quite get what caused the problem by looking through these changes; could you add a little more technical details in the description?

@alaa-yahia
Copy link
Member Author

I don't quite get what caused the problem by looking through these changes; could you add a little more technical details in the description?

@superskip I have updated the description of the PR.

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@superskip superskip left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link

github-actions bot commented Nov 19, 2024

…shing-when-opening-new-event-from-view-event
Copy link

@geethaalwan geethaalwan left a comment

Choose a reason for hiding this comment

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

Tested successfully on 2.42,2.41.3,2.40.7,2.37.8 versions

@alaa-yahia alaa-yahia merged commit 93366ef into master Nov 25, 2024
35 of 40 checks passed
@alaa-yahia alaa-yahia deleted the DHIS2-17519-app-crashing-when-opening-new-event-from-view-event branch November 25, 2024 08:53
dhis2-bot added a commit that referenced this pull request Nov 25, 2024
## [101.16.6](v101.16.5...v101.16.6) (2024-11-25)

### Bug Fixes

* [DHIS2-17519] app crashing when opening new event from view event ([#3781](#3781)) ([93366ef](93366ef))
* [DHIS2-18150] user has to click out of range filter for update button to trigger ([#3855](#3855)) ([f70b205](f70b205))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 101.16.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants