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

OBPIH-6368 Fix statuses mapping on outbound list page while filtering after state machine refactor + remove unused filters #4624

Merged
merged 2 commits into from
May 17, 2024

Conversation

kchelstowski
Copy link
Collaborator

… after state machine refactor + remove unused filters

… after state machine refactor + remove unused filters
@kchelstowski kchelstowski self-assigned this May 16, 2024
@alannadolny alannadolny changed the title OBPIH-6368 Fix statuses mapping on outbound list page while filtering… OBPIH-6368 Fix statuses mapping on outbound list page while filtering after state machine refactor + remove unused filters May 16, 2024
Comment on lines +68 to +76
WHEN o.status IS NULL THEN 'CREATED'
WHEN o.status = 'PENDING' THEN 'CREATED'
WHEN o.status = 'PLACED' THEN 'CHECKING'
WHEN o.status = 'APPROVED' THEN 'PICKING'
WHEN o.status = 'CANCELED' THEN 'CANCELED'
# These probably won't be used but we want to cover them just in case
WHEN o.status = 'PARTIALLY_RECEIVED' THEN 'DISPATCHED'
WHEN o.status = 'RECEIVED' THEN 'DISPATCHED'
WHEN o.status = 'COMPLETED' THEN 'DISPATCHED'
WHEN o.status = 'PARTIALLY_RECEIVED' THEN 'ISSUED'
WHEN o.status = 'RECEIVED' THEN 'ISSUED'
WHEN o.status = 'COMPLETED' THEN 'ISSUED'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I remember that we followed another idea while we were working on state machine refactoring, do we feel comfortable with this right now? 🤔

@drodzewicz
Copy link
Collaborator

wasn't this the whole point that PR ##4586 was closed?
We didn't want to change the statuses on the view to not ruin anything else in the system.

@awalkowiak
Copy link
Collaborator

@drodzewicz @alannadolny as we discussed this internally on Slack, this was the easiest and cleanest way to fix this issue with filtering. I believe this was even mentioned on the planning call as a required solution. I know we decided at the start of this status-related work to avoid changing SQL vies, but I feel like this is the right approach here.
To achieve it in another way we'd had to do either a backward display status mapping or some additional property which feels like too much of unnecessary workarounds.
I am ok with this approach as is. Let us know @jmiranda what do you think about it.

Copy link
Collaborator

@awalkowiak awalkowiak left a comment

Choose a reason for hiding this comment

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

@kchelstowski please add comments in this view about what is a status_code, what is a status, what it is used for, and why we see still DISPATCHED for status_code for cases we have ISSUED for status, plus overall why we are changing this one here, where this change came from, etc. Be as descriptive as possible (you could also add a link to the ticket)

@kchelstowski
Copy link
Collaborator Author

@awalkowiak I've added comments + I've deprecated the statusCode as it seems not to be used anymore (and it seems to have never been used for the list page 🤯 ). The reason I've deprecated it and not removed it yet, is because I reckon this should be done in the cleanup ticket (I've also mentioned that in the comment)

@awalkowiak awalkowiak merged commit b134c24 into feature/upgrade-to-grails-3.3.10 May 17, 2024
3 checks passed
@awalkowiak awalkowiak deleted the OBPIH-6368 branch May 17, 2024 07:23
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.

None yet

4 participants