You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In axelor-human-resource/src/main/resources/views/LeaveRequest.xml there is this snippet:
<action-attrs name="action-leave-request-attrs-leave-reason-domain">
<attribute name="domain" for="leaveReason"
expr="eval: "self.leaveReasonTypeSelect = 2""/>
<attribute name="domain" for="leaveReason"
expr="eval: "self.leaveReasonTypeSelect = 2 OR self IN (SELECT leaveReason FROM LeaveLine leaveLine WHERE leaveLine.employee.id = ${__this__.employee.id})""
if="employee != null"/>
<attribute name="domain" for="leaveReason"
expr="eval: "(self.leaveReasonTypeSelect = 2 OR self IN (SELECT leaveReason FROM LeaveLine leaveLine WHERE leaveLine.employee.id = ${__this__.employee.id})) AND (self.selectedByMgtOnly = false) ""
if="employee != null && !__user__.employee?.hrManager"/>
</action-attrs>
If the user is an HR Manager, then the third attribute will fall away. Thus self.selectedByMgtOnly is never considered, because the first two attributes don't contain it.
I am guessing that the intent is for an HR Manager to be able to select leave reasons where self.selectedByMgtOnly is true, but this won't happen.
I don't see any automated tests for this logic. If there are, please point me to them.
There might be a bug in the logic here or maybe I just don't understand it. If my understanding is wrong, please explain the intent to me.
Thanks,
Evert
The text was updated successfully, but these errors were encountered:
In axelor-human-resource/src/main/resources/views/LeaveRequest.xml there is this snippet:
If the user is an HR Manager, then the third attribute will fall away. Thus self.selectedByMgtOnly is never considered, because the first two attributes don't contain it.
I am guessing that the intent is for an HR Manager to be able to select leave reasons where self.selectedByMgtOnly is true, but this won't happen.
I don't see any automated tests for this logic. If there are, please point me to them.
There might be a bug in the logic here or maybe I just don't understand it. If my understanding is wrong, please explain the intent to me.
Thanks,
Evert
The text was updated successfully, but these errors were encountered: