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) O3-3274: Fix failing expressions #292

Merged
merged 5 commits into from
May 28, 2024

Conversation

arodidev
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR introduces a fix for failing expressions within the forms' engine.

Screenshots

Related Issue

https://openmrs.atlassian.net/jira/software/c/projects/O3/boards/37?assignee=712020:381d2aac-e89b-44ab-803b-02445824ad47&selectedIssue=O3-3274

Other

arodidev and others added 2 commits May 27, 2024 10:36
Co-authored-by: Dennis Kigen <kigen.work@gmail.com>
Co-authored-by: samuelmale <samuelsmalek@gmail.com>

---------

Co-authored-by: Ian <ian.c.bacher@gmail.com>

adding HD instance to async xps
@arodidev arodidev marked this pull request as ready for review May 27, 2024 08:04
@arodidev arodidev requested a review from samuelmale May 27, 2024 08:04
@arodidev
Copy link
Contributor Author

@samuelmale the CI disallows importation of the entire lodash module, is there a way around this?

@samuelmale
Copy link
Member

samuelmale commented May 27, 2024

@samuelmale the CI disallows importation of the entire lodash module, is there a way around this?

In as much as there is probably a way to dynamically import lodash, I think it's overkill and maybe unnecessary.

Question: Do we really need the entire library? Is that what's happening in AFE @ibacher @denniskigen?

I've done a quick search in Ampath's config repo, and seems like they're mainly consuming lodash's isEmpty(...) utility function;

Should we rather aim for a synthetic version of the lodash object?

import { isEmpty, filter, find } from 'lodash-es';

const _ = {
  isEmpty,
  filter,
  find,
};

@arodidev
Copy link
Contributor Author

@samuelmale I updated the PR with due changes.

Comment on lines 60 to 61
filter,
find,
Copy link
Member

Choose a reason for hiding this comment

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

We actually may not need these two

@samuelmale
Copy link
Member

@arodidev does this fix all the errors related to expressions even for the "Adult Visit Return" form?

@arodidev
Copy link
Contributor Author

@arodidev does this fix all the errors related to expressions even for the "Adult Visit Return" form?

@samuelmale this addresses majority of the failing expressions(related to lodash). There are a few failing while referencing field ids, will investigate and address those separately.

@samuelmale samuelmale merged commit 81b3335 into openmrs:main May 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants