I found that the status looks like approved but actual status is not updated at workflow. Is there any way to update the status which has already confirmed?
I’m also having this issue. Has any one been able to find a solution? Seems the status is not changing to approved by workflow
@tundebabzy Hello bro sorry for tagging you directly but could you help take a look at this issue? seems to have been on for quite some time and no one has picked it up.
Ok. Please open an issue on github and tag me. I’ll investigate
@tundebabzy i opened one already bro but i didn’t tag you. I will edit it now. I am checking through leave_application.py right now and my hunch tells me this is the error:
Like i’ve mentioned before i’m a novice so i can’t be sure but could i be right?
@tundebabzy Hi, sorry for the bother. Just wanted to find out if you’ve been able to take a look at the issue. Thanks.
I haven’t received any alert. Maybe you can just put the link to the issue on this thread
@tundebabzy Oh maybe i didn’t tag you properly. Here’s the link to the Github request:
https://github.com/frappe/erpnext/issues/11222
Thanks.
@olamide_shodunke Hi, here are screenshots of the issue. First is Employee leave application for 10 Days approved. Employee had 10 Days prior to this application:
Then employee attempts to apply again and still has 10 days left:
And here’s the leave balance report for sample employee and all empoyees:
I’ve checked everything i can think of and i can’t find any issue with the configuration.
I cannot seem to replicate this in any of my companies.
Can you show me the settings for the leave type “Privilege”?
Regards
Same here
@olamide_shodunke @tundebabzy Thanks for looking into this issue. Here’s the settings for the leave type as requested.
Thanks.
Please see my reply on github. Are you sure that the leave allocation has not changed?
@tundebabzy The leave allocation has not changed. Leaves allocated to employee before application was 10 days. Employee applied for 10 days leave and was subsequently approved. However, when employee goes back to leave application, it still shows that employee has 10 days leave. I have all these as screenshots in my earlier post. See below screenshot for actual employee’s allocation:
@tundebabzy I presume the screenshot above shows a direct application and approval process. My setup currently uses workflow and these are the workflow setup screenshots:
The workflow state is set up thus:
While the transition rules are set up thus:
You would notice that in the workflow state i setup the update field as status both on applied and approved by leave approver. This is because even though the examples given is that i should set the update field to status only for the Applied or Draft state, upon submission by Leave Approver, an error pops up that only a document with status Approved or Rejected can be submitted. The status only changes with the slight modification as seen in the workflow state. The state is then not visible in the final approved page even though the document then submits which assumes that the criteria has been met.
I found that this is a leave status problem.
At the line of STATES - 4.Approved by Leave, the column of Update Value should be ‘Approved’.
Then, the qty of leave allocation will be deducted after approve.
So, I solved new leave application issue.
However, I still have a problem with previously applied leave quantity which is not changed at leave balance report.
@josephyou7 hi, is it possible to post a screenshot of your workflow setup so i can see how you fixed it? I’ve tried different setup but i still have the problem on mine. Thanks.
@josephyou7 Hi. Many thanks for your reply. Implementing the workflow states following your example above did the trick. This was not included in the tutorials for leave approval workflow so i didn’t know i could make the workflow update the value of the status as you did. Lesson learnt.
Although i noticed that in the leave balance report in the available balance is not indicated anymore but the leave taken is indicated both in the report and for each employee so that’s a major problem solved and i can live with the report not being completed.
As for resolving the back applications. I may have to either ask the employees to reapply or just do them myself as the admin.