-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Conversation
} | ||
requisition.save(flush: true) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
37119b9
to
bc1844c
Compare
requisitionService.triggerRequisitionStatusTransition(requisition, event.createdBy) | ||
notificationService.publishRequisitionStatusTransitionNotifications(requisition) | ||
} | ||
notificationService.publishRequisitionStatusTransitionNotifications(event.requisition) |
There was a problem hiding this comment.
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?
bc1844c
to
7a50cf3
Compare
* OBPIH-5873 Make status transition synchronous and pass status as an argument * OBPIH-5873 Fix passing status
No description provided.