[ 
https://issues.apache.org/jira/browse/OFBIZ-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755364#action_12755364
 ] 

Pradeep Ruhil commented on OFBIZ-2938:
--------------------------------------

Hi Erwan

I saw you patch and I find that you have only implemented the view calendar 
functionality and in the party profile screen, you have shown the leave taken 
by the corresponding party.

But through calendar I am not able to select any date. Is this calendar 
intended for selection of date when you are applying leave? Because it is 
showing me only the dates with no corresponding day on it, i.e. Sunday, Monday 
and so on and I am not able to apply leave through calendar.

Where as in our patch we have enhanced the core functionality of leave. Earlier 
there was functionality of leave creation only, but no approval process was 
there for approval of leaves applied by the party. So we have implemented role 
based approval process. Where a party can apply for leave, he/she can select 
the approver party for approval of his 
leave applied. Now when a approver logins in, he will see the leave applied to 
it and then he can approve or reject the leave.

Problems I have found in you patch:
1.  If a leave is rejected by the admin, then he can approve the same later, 
which is wrong. That should not happen.
2.  Party can apply the leave without specifying the thru date, which ideally 
should not be the case.
3.  Party can edit the status field in the party profile page by specifying its 
own status, which should not change.
4. When I applied your  patch I got this error in party profile screen  when 
admin applies leave to himself and approves the same then he is redirected to 
party profile screen, there when admin click on profile page I got this 
exception.

Error on line 37, column 24 in 
component://party/webapp/partymgr/party/profileblocks/Leaves.ftl 
leave.getRelatedOne("StatusItem") is undefined. It cannot be assigned to status 
The problematic instruction: ---------- ==> assignment: 
status=leave.getRelatedOne("StatusItem") [on line 37, column 24 in 
component://party/webapp/partymgr/party/profileblocks/Leaves.ftl] ---------- 
Java backtrace for programmers: ---------- 
freemarker.core.InvalidReferenceException: Error on line 37, column 24 in 
component://party/webapp/partymgr/party/profileblocks/Leaves.ftl 
leave.getRelatedOne("StatusItem") is undefined. It cannot be assigned to status 
at

So what I feel your functionality is a bit different, where in your case any 
party having update permission can approve the leave and in our case selected 
approver party having approval role with update permission can only change the 
status 


> HR Leave Enhancement 
> ---------------------
>
>                 Key: OFBIZ-2938
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2938
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: humanres
>    Affects Versions: SVN trunk
>         Environment: Windows XP, JDK 1.6
>            Reporter: Pradeep Ruhil
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: HR Leave.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> In this patch we are doing enhancement in HumanResource Leave Module. 
> Initially we can only create new leave application for a partyId. But there 
> was not functionality available for approval of leave. So in this patch we 
> have given functionality for Leave approval as well as leave creation.
> Thanks & Regards,
> Pradeep Ruhil
> L & T Infotech, Mumbai

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to