Skip to content

[OBPIH-6634] improve validation on not existing bin locations in full outbound import#4817

Merged
kchelstowski merged 4 commits intofeature/outbound-importfrom
feature/OBPIH-6634-improve-validation-on-not-existing-bin-locations-in-full-outbound-import
Sep 3, 2024
Merged

[OBPIH-6634] improve validation on not existing bin locations in full outbound import#4817
kchelstowski merged 4 commits intofeature/outbound-importfrom
feature/OBPIH-6634-improve-validation-on-not-existing-bin-locations-in-full-outbound-import

Conversation

@drodzewicz
Copy link
Collaborator

@drodzewicz drodzewicz commented Sep 2, 2024

✨ Description of Change

A concise summary of what is being changed. Please provide enough context for reviewers to be able to understand the change and why it is necessary. If the issue/ticket already provides enough information, you can put "See ticket" as the description.

Link to GitHub issue or Jira ticket: OBPIH-6634

Description:
Improve response on validation of not existing bin locations and not existing recipeints.
We want to return a value that the user has submitted and highlight it that it is not valid (was not found) instead of not returning anything.

I decided to just bind the bin location name to Location object and return it (same with recipient).


📷 Screenshots & Recordings (optional)

If this PR contains a UI change, consider adding one or more screenshots here or link to a screen recording to help reviewers visualize the change. Otherwise, you can remove this section.

image


📈 Test Plan

We require that all code changes come paired with a method of testing them. Please select which of the following testing approaches you've included with this change:

  • Frontend automation tests (unit)
  • Backend automation tests (unit, API, smoke)
  • End-to-end tests (Playwright)
  • Manual tests (please describe below)
  • Not Applicable

Description of test plan (if applicable):


✅ Quality Checks

Please confirm and check each of the following to ensure that your change conforms to the coding standards of the project:

  • The pull request title is prefixed with the issue/ticket number (Ex: [OBS-123] for Jira, [#0000] for GitHub, or [OBS-123, OBPIH-123] if there are multiple), or with [N/A] if not applicable
  • The pull request description has enough information for someone without context to be able to understand the change and why it is needed
  • The change has tests that prove the issue is fixed / the feature works as intended

@drodzewicz drodzewicz self-assigned this Sep 2, 2024
@github-actions github-actions bot added type: feature A new piece of functionality for the app domain: backend Changes or discussions relating to the backend server domain: l10n Changes or discussions relating to localization & Internationalization labels Sep 2, 2024
binLocation(nullable: true)
binLocation(nullable: true, validator: { Location binLocation, ImportPackingListItem item ->
if (!item.binLocationFound) {
return ['binLocationNotFound', binLocation.name]
Copy link
Collaborator

Choose a reason for hiding this comment

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

if so, this should also be included in the quantityPicked validation

// We want to indicate if a recipient was not found, but the search term was given
obj.recipientFound = false
// returns a dummy person object to add more context in a response of what person was not found
return new Person(firstName: source['recipient'], lastName: "")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't see it being included in the recipient validator in the same way, as you included it in the bin location validator.

@kchelstowski kchelstowski merged commit 65c6ea7 into feature/outbound-import Sep 3, 2024
@kchelstowski kchelstowski deleted the feature/OBPIH-6634-improve-validation-on-not-existing-bin-locations-in-full-outbound-import branch September 3, 2024 20:22
awalkowiak pushed a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: backend Changes or discussions relating to the backend server domain: l10n Changes or discussions relating to localization & Internationalization type: feature A new piece of functionality for the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants