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-5873 Investigate empty date approved after approval action #4315

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

alannadolny
Copy link
Collaborator

No description provided.

}
requisition.save(flush: true)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should get rid of one of the saves - either this one or the one in the transitionRequisitionStatus.
If removing the flush won't cause any problems with the event that is published after this method is called, we could remove this save in my opinion.

import org.springframework.context.ApplicationEvent

class RequisitionStatusTransitionEvent extends ApplicationEvent {
Requisition requisition

User createdBy
RequisitionStatus status
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it necessary? Can't you get it from the requisition?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I thought we were going to do this synchronously to have a valid status on the requisition...

@alannadolny alannadolny force-pushed the OBPIH-5873 branch 3 times, most recently from 37119b9 to bc1844c Compare October 5, 2023 15:43
requisitionService.triggerRequisitionStatusTransition(requisition, event.createdBy)
notificationService.publishRequisitionStatusTransitionNotifications(requisition)
}
notificationService.publishRequisitionStatusTransitionNotifications(event.requisition)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the indent feels too big, doesn't it?

@awalkowiak awalkowiak merged commit 54b97fe into develop Oct 6, 2023
3 checks passed
@awalkowiak awalkowiak deleted the OBPIH-5873 branch October 6, 2023 08:43
awalkowiak pushed a commit that referenced this pull request Oct 26, 2023
* OBPIH-5873 Make status transition synchronous and pass status as an argument

* OBPIH-5873 Fix passing status
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

3 participants