ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Foxworthy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-7950) Improve consistency of service createEmployee
Date Thu, 03 Nov 2016 00:38:58 GMT

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

Paul Foxworthy commented on OFBIZ-7950:

I can see you might need special business rules for the name of an employee, but for a postal

Surely the rules for creating an employee's postal address should be consistent with those
for a PostalContactMech in general. And so they are at the moment.

Which leads to an interesting thought. If several services might create and update the data
within an entity, why is the optional flag on the services? Shouldn't it be on the entity
itself? Then an auto-fields-service could get optional values from the entity itself. In more
sophisticated services, you would define optional values yourself, but at least you'd have
some guidance from the definition of the entity.

> 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
>            Assignee: Nicolas Malin
>            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

View raw message