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-18028] User is able to add invalid related stages event #3795

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eirikhaugstulen
Copy link
Contributor

Tech-summary:

  • We were filtering out events that had a relationship because these are not considered linkable
  • Switched this out to rather keep all events, but filter out the non-linkable as a separate array

Copy link
Contributor

@henrikmv henrikmv left a comment

Choose a reason for hiding this comment

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

I just found a filter function that I think is unnecessary. Apart from that, it looks very good.

/>
))}
{linkableEvents
.filter(event => event.isLinkable)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to filter here? As I understand it, constant linkableEvents are only events where isLinkable is true due to the filter function in useRelatedStageEvents.js.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, Henrik! Removed now 🎉

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

Successfully merging this pull request may close these issues.

2 participants