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-5809 Approval rollback - Approvals end to end workflow (fix after QA) #4335

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

alannadolny
Copy link
Collaborator

No description provided.

@alannadolny alannadolny marked this pull request as draft October 17, 2023 08:21
@alannadolny alannadolny marked this pull request as ready for review October 17, 2023 09:35
@@ -90,7 +90,11 @@
<g:isUserInAllRoles location="${stockMovement?.origin?.id}" roles="${[RoleType.ROLE_REQUISITION_APPROVER]}">
<g:set var="userHasRequestApproverRole" value="${true}"/>
</g:isUserInAllRoles>
<g:set var="isApprovalRequired" value="${stockMovement?.requisition?.approvalRequired && stockMovement?.origin?.isApprovalRequired()}" />
<g:set var="isApprovalRequired"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This also could be moved to the StockMovement

<g:set var="isApprovalRequired"
value="${stockMovement?.requisition?.approvalRequired &&
stockMovement?.origin?.isApprovalRequired() &&
stockMovement.status < RequisitionStatus.PICKING}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like this is dangerous - won't it compare the statuses chronologically?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is compared by sortOrder

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you sure? it's compare method in the RequisitionStatus which is not the same as compareTo method available in Comparator interface. Those are not the same.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@alannadolny yup please make sure about that one

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This topic was previously answered by Justin: #4133 (comment)

<g:set var="isApprovalRequired" value="${stockMovement?.requisition?.approvalRequired && stockMovement?.origin?.isApprovalRequired()}" />
<g:set var="isApprovalRequired"
value="${stockMovement?.requisition?.approvalRequired &&
stockMovement?.origin?.isApprovalRequired() &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
stockMovement?.origin?.isApprovalRequired() &&
stockMovement?.origin?.approvalRequired &&

@awalkowiak awalkowiak merged commit e06937a into develop Oct 17, 2023
3 checks passed
@awalkowiak awalkowiak deleted the OBPIH-5809-4 branch October 17, 2023 11:32
awalkowiak pushed a commit that referenced this pull request Oct 26, 2023
…er QA) (#4335)

* OBPIH-5809 Fix throwing error with missing required argument

* OBPIH-5809 Show buttons when stock movement status is higher than approved / rejected

* OBPIH-5809 Fixes after review

* OBPIH-5809 Fixes after review

* OBPIH-5809 Add comments
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