[jira] [Updated] (OFBIZ-7950) Improve consistency of service createEmployee

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-7950) Improve consistency of service createEmployee

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-7950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Montalbano Florian updated OFBIZ-7950:
--------------------------------------
    Attachment: OFBIZ-7950_proposition.patch

Here is a proposition to harmonize things :
A Employee is at the very least just a Party with a Role of Employee and a RelationShip with a PartyGroup. That's why the only required field is the Internal Organization.

Then, you can fill whatever fields you need. But if you fill the first name field, you have to provide at least the last name too.
Same way for the address.

What do you think of this ? Is this a good idea or should we go the other way arround with adding constraint to the service ?

> Improve consistency of service createEmployee
> ---------------------------------------------
>
>                 Key: OFBIZ-7950
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7950
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: humanres
>    Affects Versions: Trunk
>            Reporter: Montalbano Florian
>            Priority: Minor
>              Labels: consistency, create, employee, service
>         Attachments: OFBIZ-7950_proposition.patch
>
>
> In the humanres component, we can create an employee through the form https://localhost:8443/humanres/control/NewEmployee .
> This form has required fields that are not the same requirement than the service called when submitting the form.
> The service called is createEmployee.
> In the service, everything is declared optional but the postalAddContactMechPurpTypeId (which is set in the form as an hidden field).
> This means we could create an Employee without forcing a telephone number or a primary address or even a first name.
> But then, within the service, a check is done on the firstName and lastName parameters and if missing, an error shows up.
> We could harmonize things a little.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)