nasa / mmt

NASA's Metadata Management Tool.
Apache License 2.0
87 stars 36 forks source link

MMT-3848: Order options fails in Forms XML for character limit although the character limit wasn't exceeded #1274

Closed cgokey closed 3 months ago

cgokey commented 3 months ago

Overview

What is the feature?

Order options fails in Forms XML for character limit although the character limit wasn't exceeded Also noticed that on form load, existing errors would not appear.

What is the Solution?

Updated order options schema and removed the char limits. Also made updates to the form logic so that only "new" records have special logic where it hides the error until the field is visited.

What areas of the application does this impact?

Order Options and Groups Form.

Testing

Easiest way to test this is to use CMR graphql to ingest a order option where the form xml > 1024 characters. It should now load into the form, not show an error, and allow you to publish a order option with a length more than 1024 characters.

To test the other bug fix, upload an order option where the name is > 85 characters directly via CMR graphql. When the form comes up, you should see an error. Same thing can be done with group page, upload a new group where the name is > 85 characters, the form should show an error when loading into MMT form.

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.72%. Comparing base (925bba2) to head (09a1913). Report is 1 commits behind head on MMT-3390.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## MMT-3390 #1274 +/- ## ========================================= Coverage 97.72% 97.72% ========================================= Files 359 359 Lines 5404 5416 +12 Branches 1114 1134 +20 ========================================= + Hits 5281 5293 +12 Misses 122 122 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.