Skip to content

Conversation

@SchrodingersGat
Copy link
Member

  • Fixes bug introduced in Build order consume #8191
  • "Consumed" quantity not taken into account for "auto allocation" against build order
  • Ensure the already consumed quantity is accounted for
  • Ensure that running auto-allocate again does not over-allocate

- Take "consumed" quantity into account also
- build.is_fully_allocated
- build.is_overallocated
- Ensure the new calculations work properly
@SchrodingersGat SchrodingersGat added this to the 1.1.0 milestone Sep 26, 2025
@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed build Build orders backport Apply this label to a PR to enable auto-backport action backport-to-1.0.x labels Sep 26, 2025
@netlify
Copy link

netlify bot commented Sep 26, 2025

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit 08c1606
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/68d722845953810008cf442d

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 96.36364% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.44%. Comparing base (eb18c0b) to head (08c1606).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10398   +/-   ##
=======================================
  Coverage   87.43%   87.44%           
=======================================
  Files        1266     1266           
  Lines       56644    56682   +38     
  Branches     2058     2058           
=======================================
+ Hits        49528    49565   +37     
- Misses       6610     6611    +1     
  Partials      506      506           
Flag Coverage Δ
backend 89.14% <96.36%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Backend Apps 91.68% <96.36%> (+<0.01%) ⬆️
Backend General 93.66% <ø> (ø)
Frontend 70.04% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat SchrodingersGat merged commit 6fdc6b3 into inventree:master Sep 27, 2025
35 checks passed
@SchrodingersGat SchrodingersGat deleted the auto-allocate-bug branch September 27, 2025 00:10
github-actions bot pushed a commit that referenced this pull request Sep 27, 2025
* Fix "unallocated_quantity" calculation

- Take "consumed" quantity into account also

* Account for consumed quantity in:

- build.is_fully_allocated
- build.is_overallocated

* Additional unit tests

- Ensure the new calculations work properly

* Adjust API filter

* Try splitting query

* Another fix

* Try ExpressionWrapper

* Change order of operations?

* Refactor

* Adjust filtering strategy

* Change ordering

* Use Max wrapper

* Add comments

(cherry picked from commit 6fdc6b3)
@github-actions
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
1.0.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat added a commit that referenced this pull request Sep 27, 2025
* Fix "unallocated_quantity" calculation

- Take "consumed" quantity into account also

* Account for consumed quantity in:

- build.is_fully_allocated
- build.is_overallocated

* Additional unit tests

- Ensure the new calculations work properly

* Adjust API filter

* Try splitting query

* Another fix

* Try ExpressionWrapper

* Change order of operations?

* Refactor

* Adjust filtering strategy

* Change ordering

* Use Max wrapper

* Add comments

(cherry picked from commit 6fdc6b3)

Co-authored-by: Oliver <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Apply this label to a PR to enable auto-backport action bug Identifies a bug which needs to be addressed build Build orders

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant