Bug 469957 - user.setDetails (and getDetails) uses 'first_names' as key.
Summary: user.setDetails (and getDetails) uses 'first_names' as key.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2008-11-04 21:44 UTC by Justin Sherrill
Modified: 2009-09-10 19:53 UTC (History)
2 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:53:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2008-11-04 21:44:22 UTC
why first_names ?  it doesn't make sense.  You can only have one.  It uses 'last_name' not 'last_names', so why use 'first_names'?????

arg

Comment 1 Jay Dobies 2009-02-13 19:38:10 UTC
Commit: 233c64b8e502fe85ed1a77730559078d32adcdb8
Tag: spacewalk-java-0.5.14-1

UserHandler.java, UserHandlerTest.java
- Added map to translate the user submitted key into an internal key. The only real translation that happens in this is from first_name to first_names, to allow the user specified key to read correctly and then translate to our incorrect domain model usage.

The pluralization of first name goes deep into our code; it's even that way on User. I didn't want to do such a major refactor now, but at the same time I wanted to get the API correct and prevent having to have an incompatible API later. This way, if we do refactor the internal naming in the future, the external facing APIs won't have to change.


SVN Commit: r181460
user.setDetails
- Updated test for API key name change

Comment 2 Jay Dobies 2009-02-13 19:49:09 UTC
Commit: 5712dd41a819b488081aafdcb605b55d1a3b6e5e
Tag: spacewalk-0.5.14-1

UserHandler.java, UserHandlerTest.java
- Changed getDetails to use first_name instead of plural (see above comment for explanation).


SVN Commit: r181463
user.getDetails
- Updated test for API key name change

Comment 3 wes hayutin 2009-03-09 19:20:11 UTC
apiusere2KIkFS3IHRK5    	 bob, bill   	(normal user)
sat.version=5.3.0
sat.api.version=10.0
proxy.version=5.1
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '310x08259a0cc38284946a1886d149a39479'
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '311x1788823f15531f4d67880c108665b4ae'
Processing method: user.create

Comment 4 Tomas Lestach 2009-08-13 12:29:43 UTC
Having both keys: first_name and first_names in user.setDetails and user.getDetails.

If setting both for user.setDetails., first_name has higher prio. :)

Stage validated -> RELEASE_PENDING

Comment 5 Brandon Perkins 2009-09-10 19:53:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html


Note You need to log in before you can comment on or make changes to this bug.