Hi Awdesh,
My first guess is that there is a bug in the service where by it is not checking for certain vCard fields before attempting to use them. My personal opinion is that no fields should be required but simply processed if present. It would be nice to able to report back to the user what information was updated from the processing though. I would only expect an error to be returned if the file was not a valid vCard. Regards Scott HotWax Media http://www.hotwaxmedia.com 801.657.2909 ----- Original Message ----- From: "Awdesh Parihar" <[hidden email]> To: [hidden email] Sent: Tuesday, June 16, 2009 9:47:06 PM (GMT+1000) Auto-Detected Subject: Need suggestions on existing functionality of uploading Vcard Hello everyone, I have quick question related to Vcard functionality implemented in SFA component, what are the required fields for creating Vcard , is it First Name and Last Name or any other options? When i am importing Vcard containing information about Firstname , Lastname and Email Address , then it is throwing error which is "Error calling event: org.ofbiz.webapp.event.EventHandlerException: Service invocation error (null)" My suggestion is instead of throwing error like above we can display user friendly error message for required fields. Let me know your thoughts. -- Thanks Awdesh Parihar |
Hello Scott,
Thanks a lot for your feedback. Please see my comments inline: -- Ashish On Tue, Jun 16, 2009 at 5:37 PM, Scott Gray <[hidden email]>wrote: > Hi Awdesh, > > My first guess is that there is a bug in the service where by it is not > checking for certain vCard fields before attempting to use them. Yes you are right. Actually it is working fine if we have following information on the vCard. Like First Name, Last name, Email address, Address1, City, State & Country etc. Although in the recent commit we have provided option for not to provide State Details & Country details. Conditional check is provided for this. But thinking that what to do with Address, City and other fields? We can provide empty check for those fields as well. > > > My personal opinion is that no fields should be required but simply > processed if present. It would be nice to able to report back to the user > what information was updated from the processing though. Few questions are coming in my mind: 1) What should we do if empty vCard is provided. I think we should not process it and will safely ignore it. Right? 2) It happens that a vCard contains only First Name and that's it. So in that case if we should pass this to the "createPerson" service then it will say that "Last Name is missing". How should we handle this case? 3) Can we say that a "vCard is complete vCard if it has two fields only. i.e First Name & Last Name"? > > > I would only expect an error to be returned if the file was not a valid > vCard. What criteria can be used to check the validity of vCard? Is it First Name & Last Name check, if it has then its valid vCard? Or some third party api exists that checks vCard validity? Don't know much about it. Will see on google if don't see any reply on this point. > > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > 801.657.2909 > |
In reply to this post by Scott Gray-2
Hi Ashish
I think fields should be considered as part of their logical group rather than individually. So if a first name is supplied but no last name then we do nothing because we require both for the input to be considered valid. Likewise for postal addresses or any other groups of information. I think we should return an error if the vCard is empty because that would be exceptional situation I suppose and the user should be notified. I don't think we should return an error if the vCard contained only information that we couldn't process, the user should just be warned in that case but the vCard should be considered valid. In a super useful implementation a vCard would simply populate a screen in which the user could confirm, alter or add any information that they saw fit. Regards Scott ----- Original Message ----- From: "Ashish Vijaywargiya" <[hidden email]> To: [hidden email] Sent: Tuesday, June 16, 2009 10:31:39 PM (GMT+1000) Auto-Detected Subject: Re: Need suggestions on existing functionality of uploading Vcard Hello Scott, Thanks a lot for your feedback. Please see my comments inline: -- Ashish On Tue, Jun 16, 2009 at 5:37 PM, Scott Gray <[hidden email]>wrote: > Hi Awdesh, > > My first guess is that there is a bug in the service where by it is not > checking for certain vCard fields before attempting to use them. Yes you are right. Actually it is working fine if we have following information on the vCard. Like First Name, Last name, Email address, Address1, City, State & Country etc. Although in the recent commit we have provided option for not to provide State Details & Country details. Conditional check is provided for this. But thinking that what to do with Address, City and other fields? We can provide empty check for those fields as well. > > > My personal opinion is that no fields should be required but simply > processed if present. It would be nice to able to report back to the user > what information was updated from the processing though. Few questions are coming in my mind: 1) What should we do if empty vCard is provided. I think we should not process it and will safely ignore it. Right? 2) It happens that a vCard contains only First Name and that's it. So in that case if we should pass this to the "createPerson" service then it will say that "Last Name is missing". How should we handle this case? 3) Can we say that a "vCard is complete vCard if it has two fields only. i.e First Name & Last Name"? > > > I would only expect an error to be returned if the file was not a valid > vCard. What criteria can be used to check the validity of vCard? Is it First Name & Last Name check, if it has then its valid vCard? Or some third party api exists that checks vCard validity? Don't know much about it. Will see on google if don't see any reply on this point. > > > Regards > Scott > > HotWax Media > http://www.hotwaxmedia.com > 801.657.2909 > |
Hello Scott,
Thanks a lot once again. For now we are working on the grouping as suggested by you. Please see my comments inline: -- Ashish On Tue, Jun 16, 2009 at 6:46 PM, Scott Gray <[hidden email]>wrote: > Hi Ashish > > I think fields should be considered as part of their logical group rather > than individually. So if a first name is supplied but no last name then we > do nothing because we require both for the input to be considered valid. > Likewise for postal addresses or any other groups of information. > > I think we should return an error if the vCard is empty because that would > be exceptional situation I suppose and the user should be notified. I don't > think we should return an error if the vCard contained only information that > we couldn't process, the user should just be warned in that case but the > vCard should be considered valid. > > In a super useful implementation a vCard would simply populate a screen in > which the user could confirm, alter or add any information that they saw > fit. This option is good only when we have single person info in the vCard. It will be difficult if we have more then person info in vCard then this screen it will be mess IMO. So for now we should not be working on this option. > > > Regards > Scott > > |
Thanks Scott and Ashish for your suggestions ,
As per the discussion , I have added some more checks in importVCard service and uploaded the patch on issue https://issues.apache.org/jira/browse/OFBIZ-2609 , I need some guidance for showing warning message for missing information ( I am able to complete this work by showing error message for missing fields ) Any suggestion is appreciated. -- Thanks Awdesh Parihar |
Free forum by Nabble | Edit this page |