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

2016-11-02 Thread Paul Foxworthy (JIRA)

[ 
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 address?

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
(v6.3.4#6332)


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

2016-11-02 Thread Montalbano Florian (JIRA)

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

Montalbano Florian commented on OFBIZ-7950:
---

This seems true for the creation of an employee but maybe for other part of 
OFBiz too. With this point on the city-state, it soudns like a very useful 
update for some cases.

To go further in this problem, we need too know if the consistency of the data 
model will be still ok after those changes (e.g : allowing address without city 
or postal code).

Should we focus only on employee-related services in this thread and/or open a 
new one to widen this improvement to other component ?

> 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
(v6.3.4#6332)


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

2016-10-31 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux commented on OFBIZ-7950:


Vatican City and Monaco may look anecdotal (though not that much), but if we 
add Singapore it begins to make even more sense...

> 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
(v6.3.4#6332)


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

2016-10-30 Thread Paul Foxworthy (JIRA)

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

Paul Foxworthy commented on OFBIZ-7950:
---

Wow. There are over forty countries in the world that do not *have* a postal 
code - https://en.wikipedia.org/wiki/List_of_postal_codes. They have been 
introduced very recently in Ireland and New Zealand.

When an entire country is a city (e.g. Vatican CIty, Monaco) should city be 
mandatory?

The current implementation of createPartyPostalAddress seems naive to me.

> 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
(v6.3.4#6332)


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

2016-10-29 Thread Montalbano Florian (JIRA)

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

Montalbano Florian commented on OFBIZ-7950:
---

Hi,
you may be totally right about this part. If an address without the "Address 1" 
field makes sense, then we should allow it.
Does someone have an example for this ?

I looked into the service "createPartyPostalAddress" which creates a record for 
storing the postal data and it requires at least the following fields :
- address1 
- city 
- contactMechId 
- postalCode 

So, if we want to adopt a more flexible address policy, we'll need to change 
this service too. But it may impact other functionnality as well.

If we ever change this policy, then we can use an  check (the same than 
for the firstName/lastName check) to see if at least one data about the address 
is filled by the user.

> 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
(v6.3.4#6332)


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

2016-10-28 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux commented on OFBIZ-7950:


Hi Paul,

In Florian's patch, like for 1st and last name, no address field is enforced. 
It's only when the 1st or last name is missing then it's considered a mistake 
(ie if you provide only one of the field it's a mistake, you need to provide 
both). So I guess Florian was not clear when he used "Same way for the address" 
or he did not implement it finally (ie no address field is enforced, but if 
address1 is provided then it's automatically a PRIMARY_LOCATION.

> 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
(v6.3.4#6332)


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

2016-10-26 Thread Paul Foxworthy (JIRA)

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

Paul Foxworthy commented on OFBIZ-7950:
---

Hi Montalbano,

What do you mean by "Same way for the address"? Addresses have more than one 
component, sure, but the components that are mandatory for a valid address vary 
from one place to another. I wonder if address is too hard, and we're better 
leaving it alone.

> 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
(v6.3.4#6332)


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

2016-09-18 Thread Nicolas Malin (JIRA)

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

Nicolas Malin commented on OFBIZ-7950:
--

After a tried, when I create a new employee the entity person created hadn't 
firstName and lastName ... strange.

I will review in detail the proposal

> 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)


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

2016-08-28 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux commented on OFBIZ-7950:


After a review, this looks good to me

> 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)