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

[4409] Only show fulfillment column if partner has default location #4466

Conversation

napster235
Copy link
Contributor

@napster235 napster235 commented Jun 20, 2024

Resolves #4409

Description

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Specs were added for the new functionality

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

Thank you for this! Functionally, it works well - I've got some asks for adjustments on the tests, though.

spec/requests/requests_requests_spec.rb Outdated Show resolved Hide resolved
spec/requests/requests_requests_spec.rb Outdated Show resolved Hide resolved
spec/requests/requests_requests_spec.rb Outdated Show resolved Hide resolved
@napster235
Copy link
Contributor Author

@cielf I have updated the specs as you suggested here c2fc041

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

1 clarification in the description, please.

end
end

context 'When partner or organization does not have a default storage location' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a nitpick, but this should be 'When neither partner nor organization has a default storage location' -- i.e. that it has to be both the partner doesn't and the organization doesn't. Your description means, instead, if the partner doesn't have it or the organization doesn't have it, which is not quite the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed it here 90098cd

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

One last thing, then I think we're good to go.

@@ -65,7 +65,11 @@
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Fulfillment Location Inventory</th>
<% default_storage_location = @request.organization.default_storage_location ||
@request.partner.default_storage_location_id %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I found one more thing on my last go-through -- and this is extremely nitpicky.
I think it would be better if we switched the two clauses in this or?

Why? You are only using the existence of a default storage location, but, If someone later decides to use the default storage location (say we decide to change the title) - it should match what we are using for getting the on_hand_for_location. In the probably rare case where the organization and partner both have default locations, we use the partner location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I fixed it here 9e77b48

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

LGTM (Oops -- see below)

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

Ahhhh.... There is a test that is looking for Fulfillment Location Inventory... please update it to look for the new heading (Once we get the tests passing, I'm happy with it!)

Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

Getting very close!

There is another test in request_system_spec failing (at about line 153). Without looking into it too closely, I suspect the partner for that test has no default location. Please investigate and address. Also check to see if there are any other possibly related tests failing.

@napster235 napster235 force-pushed the 4409-only_show_fulfillment_column_if_partner_has_default_location branch from cfd2265 to a5c908e Compare June 26, 2024 21:19
@cielf cielf merged commit 693c866 into rubyforgood:main Jun 27, 2024
20 checks passed
Copy link
Contributor

github-actions bot commented Jul 7, 2024

@napster235: Your PR [4409] Only show fulfillment column if partner has default location is part of today's Human Essentials production release: 2024.07.07.
Thank you very much for your contribution!

@awwaiid awwaiid added this to the Request Units (Packs) milestone Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bank Request View -- only show fulfillment column if partner has default location
3 participants