Skip to content

[BI-1281] refactor obsVarName error messages to use Name#150

Merged
dmeidlin merged 7 commits intorelease/0.5from
bug/BI-1281
Mar 7, 2022
Merged

[BI-1281] refactor obsVarName error messages to use Name#150
dmeidlin merged 7 commits intorelease/0.5from
bug/BI-1281

Conversation

@dmeidlin
Copy link
Contributor

@dmeidlin dmeidlin commented Feb 9, 2022

Description

Story: BI-1281

trait import validation error messages for observation variable names were changed to refer instead to "name"

Dependencies

bi-web develop

Testing

try importing a trait with a name that exceeds the 12 char limit.

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 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: <link to TAF run>

@github-actions github-actions bot added the bug Something isn't working label Feb 9, 2022
Copy link
Contributor

@HMS17 HMS17 left a comment

Choose a reason for hiding this comment

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

Tested with a file with name and description exceeding character limits, got:
"Name: Name exceeds 12 character limit in row 2
method.description: Method description exceeds 30 character limit in row 2"

Based on the card, the second line should be more akin to "Method Description: Method description exceeds 30 character limit in row x", correct?

Also tested a scenario with insufficient scale categories and got "scale.categories: Ordinal scales must have at least two categories. in row 4" which matches the expected result but I'm wondering if that is a typo given that seems more the variable name than the column name.

Copy link
Member

@nickpalladino nickpalladino left a comment

Choose a reason for hiding this comment

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

I think this should target the v0.5 release branch right?

@dmeidlin dmeidlin changed the base branch from develop to release/0.5 February 22, 2022 19:10
@Override
public ValidationError getMissingObsVarNameMsg() {
return new ValidationError("observationVariableName", "Missing observation variable name", HttpStatus.BAD_REQUEST);
return new ValidationError("name", "Missing Name", HttpStatus.BAD_REQUEST);
Copy link
Member

Choose a reason for hiding this comment

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

Should this be capitalized?

Copy link
Member

Choose a reason for hiding this comment

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

Same question for entity and attribute in here and TraitValidationError.

Copy link
Member

Choose a reason for hiding this comment

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

Should trait traitDescription, programObservationLevel.name, and method.formula be updated?

return new ValidationError("Method Description", "Method description exceeds 30 character limit", HttpStatus.UNPROCESSABLE_ENTITY);
}

@Override
Copy link
Member

Choose a reason for hiding this comment

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

Should the terminology here and in TraitValidationError be changed to name rather than trait name? Should it also be capitalized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Trait name is now a concatenation of entity + attribute; whereas, obs var. name is the Name. So my feeling is to keep trait name as is for now, but I updated the rest of the field names to have consistent formatting/capitalization.

@dmeidlin dmeidlin changed the title refactor obsVarName error messages to use Name [BI-1281] refactor obsVarName error messages to use Name Mar 7, 2022
@dmeidlin dmeidlin merged commit b897e29 into release/0.5 Mar 7, 2022
@dmeidlin dmeidlin deleted the bug/BI-1281 branch March 7, 2022 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants