Skip to content

BI-1900 - Update Validation Error Messages#302

Merged
mlm483 merged 3 commits intorelease/0.8.1from
feature/BI-1900-messages
Oct 30, 2023
Merged

BI-1900 - Update Validation Error Messages#302
mlm483 merged 3 commits intorelease/0.8.1from
feature/BI-1900-messages

Conversation

@mlm483
Copy link
Contributor

@mlm483 mlm483 commented Oct 13, 2023

Description

Story: https://breedinginsight.atlassian.net/browse/BI-1900

Because we'll need to provide different error messages for different import types, I moved the generic/default error messages to the BrAPIImportService abstract base class (thanks Tim!), and inheritors can override.

  • Updated an error message to match the source of truth.
  • Updated unit tests.

See the comments on the Jira story for more context.

Dependencies

bi-web/release/0.8.1

Testing

Test editing template-defined column headers in an experiment and observation file and uploading, ensure the displayed error message contains "Column heading does not match template or ontology".

Example: change "Exp Title" to "Experiment Title".

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have tested that my code works with both the brapi-java-server and BreedBase
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: https://github.com/Breeding-Insight/taf/actions/runs/6512978500

@mlm483 mlm483 marked this pull request as ready for review October 13, 2023 20:48
@mlm483 mlm483 changed the title [BI-1900] - Update Validation Error Messages BI-1900 - Update Validation Error Messages Oct 13, 2023
@mlm483 mlm483 requested review from a team, dmeidlin and timparsons and removed request for a team October 16, 2023 19:58
Copy link
Member

@timparsons timparsons left a comment

Choose a reason for hiding this comment

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

One small change to a method name, but otherwise looks good!

public abstract class BrAPIImportService {
public String getImportTypeId() {return null;}
public BrAPIImport getImportClass() {return null;}
public String getWrongDataTypeMsg(String columnName) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this method name should be changed to something like getInvalidIntegerMsg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, 1fc3c81.

@mlm483 mlm483 requested a review from timparsons October 30, 2023 13:57
@mlm483 mlm483 merged commit e1e1a4a into release/0.8.1 Oct 30, 2023
@mlm483 mlm483 deleted the feature/BI-1900-messages branch October 30, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants