Hi Suraj,

There is an unequivocal relation from a userLoginId to a partyId.  A Party may 
have several userLoginIds but the reserve is not true.

Maybe this is intended to be called with only a part of the userLoginId String? 
You might then get several parties and refine...

So the question is: what was the desired result? Based on which userLoginId? 
What was the surprise? (I guess I answered later, please continue to read :))

This is pre apache era code, with some no functional modifications since.

The same applies to getPartyFromEmail and more services there.

Ah, I found that we had already a similar question from Ean Schuessler long ago 
(10 years!) http://markmail.org/message/fadkiyby4azqj3bj

I'd review the whole class as Michael suggested and also suggest to get the same way than I did 10 years ago: simply rename the service and related methods to have them make sense.

Like getPartiesFromPartOfUserloginId, same idea for getPartyFromEmail to clarify 
more than in http://svn.apache.org/viewvc?view=revision&revision=443465

Also check/change all services in this class which use a LIKE: 
getPartyFromPerson, getPartyFromPartyGroup

I see no reasons to drop those services if some find them useful. I get they do since someone wrote it, even with a misleading name. Not having them used OOTB is not a sufficient indication of removal.

Jacques


Le 14/11/2017 à 15:21, Michael Brohl a écrit :
Hi Suraj,

this service seems not to be used anywhere in the system and the code looks... 
ämm..., strange.

I'd propose to remove it from the codebase along with other resources like the 
UI labels referenced there (if not used anywhere else).

I think it is worth to have a deeper look at the whole class.

Thanks and regards,

Michael


Am 14.11.17 um 12:09 schrieb Suraj Khurana:
Hello,

While using service *getPartyFromUserLogin *and it is not returning
desired results. While digging more into the issue, I found that the
service is using LIKE operator instead of returning exact records. Is it
intentional or a bug?

IMO, this is not correct and it should return exactly similar records for a
particular party.

Moving further, why it is a service? IMO, it should be a helper method.

Please let me know your thoughts about this.

--
Thanks and Regards,
*Suraj Khurana* | Sr. Enterprise Software Engineer
*HotWax Commerce* by  *HotWax Systems*
Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010




Reply via email to