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

Ensure line items are correctly scoped for producers #8476

Conversation

Matt-Yorkley
Copy link
Contributor

What? Why?

Closes #8473

What should we test?

For orders which contain items from multiple producers, only those supplied by the current user should be shown.

Release notes

Fixed supplied items visibility issue in packing reports

Changelog Category: Technical changes

@Matt-Yorkley Matt-Yorkley self-assigned this Nov 11, 2021
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Nice.

@filipefurtad0 filipefurtad0 self-assigned this Nov 17, 2021
@filipefurtad0 filipefurtad0 added the pr-staged-uk staging.openfoodnetwork.org.uk label Nov 17, 2021
@filipefurtad0
Copy link
Contributor

Hey @Matt-Yorkley ,

I've checked the behavior again, before this PR:

Indeed, a supplier whose items were on a given order would see entries on the packing reports from items from other suppliers. Items from orders on that OC without items from that supplier seemed not to appear in the report.
So, I was not able to exactly reproduce the Current Behavior, in which it is clearly stated that a supplier sees entries from other suppliers, from all orders.

So, before staging, an order with items from two suppliers (on is the OC coordinator), as seem from a non-coordinating supplier:
image

After this PR:

  • as a supplier whose items are on a given order
    image

  • the OC coordinator should still see all the orders
    image

This works for both report types 👍
I'd say we are good to go.

@filipefurtad0 filipefurtad0 removed the pr-staged-uk staging.openfoodnetwork.org.uk label Nov 17, 2021
@Matt-Yorkley Matt-Yorkley merged commit 378d3d5 into openfoodfoundation:master Nov 17, 2021
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.

Producers are able to see all orders (not just their own) when running 'Pack by Supplier' report
4 participants