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

Amend DFC backorder completely #13000

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Nov 27, 2024

What? Why?

Before, we accounted for cancelled orders but not for changed or removed line items. Now we completely re-calculate the backorder and can re-use this logic whenever something changes.

But so far, we still only trigger this when an order is cancelled or when the backorder is completed.

What should we test?

  • Visit ... page.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

So that we can use order states programmatically.
Update every single order line to reflect local orders and stock levels.

New cases supported:

* Add lines for orders created by an admin.
* Create backorder line after increase of local line item quantity.
* Adjust local stock after variant has been removed from order cycle.
@mkllnk mkllnk self-assigned this Nov 27, 2024
@mkllnk mkllnk added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Nov 27, 2024

def self.load_context
JSON::LD::Context.add_preloaded("http://www.datafoodconsortium.org/") {
JSON::LD::Context.parse(read_file("context_1.8.2")["@context"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

All releases of the ontology now have a versioned context file associated with them. We should target latest release (currently v1.14.0, soon to be v.1.15.0 for Variants)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Status: In Progress ⚙
Development

Successfully merging this pull request may close these issues.

[DFC Orders] Updates to backorder on any order amendment
2 participants