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

Incorrect warning when specifying hidden_fields #377

Closed
garethbowen opened this issue Feb 23, 2021 · 4 comments
Closed

Incorrect warning when specifying hidden_fields #377

garethbowen opened this issue Feb 23, 2021 · 4 comments
Assignees
Labels
Type: Bug Fix something that isn't working as intended

Comments

@garethbowen
Copy link
Member

Describe the bug
When I specify "hidden_fields" the console outputs a warning...

WARN Ignoring unknown properties in [filename]: hidden_fields

This is a known and supported field so the warning is incorrect. The field appears to work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Modify the default cht-core/config/default/forms/app/undo_death_report.properties.json file to have "hidden_fields": ["undo"] which should hide the undo property in submitted forms
  2. Execute medic-conf <instance> convert-app-forms upload-app-forms in the cht-core/config/default directory
  3. Submit an Undo Death Report report

Expected behavior

  • No warning shown in the console.
  • The undo_death_report form is uploaded.
  • The submitted report has the undo field hidden.

Environment

  • Instance: localhost
  • Client platform: Linux
  • medic-conf version: latest
  • cht-core version: latest
@garethbowen garethbowen added the Type: Bug Fix something that isn't working as intended label Feb 23, 2021
@garethbowen garethbowen self-assigned this Feb 23, 2021
garethbowen added a commit that referenced this issue Feb 23, 2021
The hidden_fields propery is supported and should not WARN.

#377
@garethbowen
Copy link
Member Author

Ready for AT in medic-conf 377-remove-incorrect-warning

@newtewt
Copy link
Contributor

newtewt commented Mar 3, 2021

@garethbowen just to confirm I understand. The WARN displays when running the medic-conf command and then on the server the undo death report properties does not have the hidden fields. The behavior when using 377-remove-incorrect-warning. The error is no longer there, the doc has that property, and our app then hides it.

@garethbowen
Copy link
Member Author

Right! medic-conf was warning that the field was unsupported but then using the field correctly later on anyway.

@newtewt
Copy link
Contributor

newtewt commented Mar 3, 2021

ok cool! This is ready to merge and close.

garethbowen added a commit that referenced this issue Mar 3, 2021
The hidden_fields propery is supported and should not WARN.

#377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants