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

B-21094: Automatic Reweigh Based on Estimated Weight #14364

Open
wants to merge 29 commits into
base: integrationTesting
Choose a base branch
from

Conversation

WeatherfordAaron
Copy link
Contributor

Agility Ticket: B-21094

Agility Ticket's Acceptance Criteria

As the MilMove system (on behalf of the TOO),
I need to request a reweigh for all shipments on a customer's move based on the sum of the estimated weight(s),
So that I can ensure the customer has the greatest chance of reweighs being performed on all of their shipments (through the use of more advanced notice).

AC1: 
Given the sum of all estimated weights on a customer's move,
When that sum is within 10% (or greater) of the customer's weight entitlement,
Then a reweigh is requested for all shipments on a that move (excludes PPMs).

AC2: PRESERVE EXISTING CAPABILITY ALREADY IN MILMOVE
Given a customer's move where the sum of the estimated weights did not result in automatic reweigh(s) being requested,
When the sum of the actual shipment weights is within 10% (or greater) of the customer's weight entitlement,
Then a reweigh is requested for all shipments on that move (excludes PPMs).

How to test

  1. As a Service Member, create a new move + orders + at least 2 non-PPM shipments.
  2. As Service Counsellor, update the move's orders and approve/send the move.
  3. As TOO, approve the shipments (this should make the move available to the Prime user role).
  4. As Prime, update each shipment so that the sum of the Estimated Weights of all the shipments on the move falls within the top 10% of the Authorized Weight.

Note 1: Currently you must enter both Estimated and Actual Weights on each of the shipments if you are using the Prime Simulator because current form validation forces you to do so.. however, this is a ticket which should change this functionality so that the Prime Simulator can have Estimated Weight without the need for Actual Weight (and vice versa).


Note 2: The reason the sum needs to fall within the top 10% of the Authorized Weight is because other logic may be carried out once the sum of Estimated Weights or Actual Weights goes over the Authorized Weight.


Authorized Weight = A
Target Weight Floor = T
A * 0.9 = T

Example: If Authorized Weight is 7000 lbs, 7000 * 0.9 = 6300. This means that, from the entire move, if the sum of the Estimated Weights is at least 6300 lbs or the sum of the Actual Weights is at least 6300 lbs, it will trigger an automatic reweight request.

  1. As soon as the sum of the Estimated Weights of the shipments on the move falls within the top 10% of the Authorized Weight, you should see the "Reweigh Weight" attribute (seen below) with the red "Missing" text for each shipment on the move. This indicates that an auto-reweigh has been initiated.
Screenshot 2024-12-05 at 6 32 37 AM

@robot-mymove
Copy link

robot-mymove commented Dec 10, 2024

Warnings
⚠️

New files have been created under one of the legacy directories
(src/shared or src/scenes). Please relocate them according to the file structure described here.

View the frontend file org ADR for more information

Generated by 🚫 dangerJS against c7954ac

@WeatherfordAaron WeatherfordAaron self-assigned this Dec 10, 2024
@WeatherfordAaron WeatherfordAaron added ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing labels Dec 10, 2024
@WeatherfordAaron WeatherfordAaron marked this pull request as ready for review December 12, 2024 17:05
@WeatherfordAaron WeatherfordAaron requested review from a team as code owners December 12, 2024 17:05
pkg/models/move.go Outdated Show resolved Hide resolved
pkg/models/move.go Outdated Show resolved Hide resolved
deandreJones
deandreJones previously approved these changes Dec 19, 2024
Copy link
Contributor

@taeJungCaci taeJungCaci left a comment

Choose a reason for hiding this comment

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

So my weight allowance is 5000 lb and I put 4999 lbs for the estimated weight and it doesn't seem to auto trigger the reweight. Anything I am missing?

image
image

@taeJungCaci
Copy link
Contributor

taeJungCaci commented Dec 19, 2024

Also I get this error when putting actual weight after submitting estimated weight. I switched to IntegrationBranch to test if I could submit, and I was able to.:
image

Copy link
Contributor

@brooklyn-welsh brooklyn-welsh left a comment

Choose a reason for hiding this comment

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

I'm currently getting a nil reference error at line 273 of move_weights.go:

Screenshot 2024-12-20 at 11 47 05 AM

Here's my Prime API page:
Screenshot 2024-12-20 at 11 47 12 AM

@brooklyn-welsh
Copy link
Contributor

brooklyn-welsh commented Dec 20, 2024

Oops my screenshot cut off the weights field, but I had tried to set the actual and estimated weights to 2,500 lbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

6 participants