[
https://issues.apache.org/jira/browse/SHINDIG-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629528#action_12629528
]
Cassie Doll commented on SHINDIG-582:
-------------------------------------
We shouldn't be making any js changes to the opensocial-reference/* package as
part of portable contacts because it only changed the restful apis and not the
js apis.
If the type is undisclosed we can just set the key to null and the displayValue
to "undisclosed".
> Add UNDISCLOSED to the enum values for Gender to sync with Portable Contacts
> ----------------------------------------------------------------------------
>
> Key: SHINDIG-582
> URL: https://issues.apache.org/jira/browse/SHINDIG-582
> Project: Shindig
> Issue Type: Improvement
> Components: Common Components (Java)
> Reporter: Paul Lindner
> Assignee: Paul Lindner
>
> The Portable contacts specification calls for an UNDISCLOSED canonical value
> for gender. We should add this to the Gender enum. Right now an undisclosed
> Gender will result in FEMALE as a gender.
> Index: features/opensocial-reference/enum.js
> ===================================================================
> --- features/opensocial-reference/enum.js (revision 693195)
> +++ features/opensocial-reference/enum.js (working copy)
> @@ -172,7 +172,9 @@
> /** @member opensocial.Enum.Gender */
> MALE : 'MALE',
> /** @member opensocial.Enum.Gender */
> - FEMALE : 'FEMALE'
> + FEMALE : 'FEMALE',
> + /** @member opensocial.Enum.Gender */
> + UNDISCLOSED : 'UNDISCLOSED
> };
>
>
> Index: features/opensocial-current/jsonrpccontainer.js
> ===================================================================
> --- features/opensocial-current/jsonrpccontainer.js (revision 693195)
> +++ features/opensocial-current/jsonrpccontainer.js (working copy)
> @@ -301,7 +301,9 @@
> }
>
> if (serverJson.gender) {
> - var key = serverJson.gender == 'male' ? 'MALE' : 'FEMALE';
> + var key = serverJson.gender == 'male' ? 'MALE' :
> + (serverJson.gender == 'female') ? 'FEMALE' :
> + 'UNDISCLOSED';
> serverJson.gender = {key : key, displayValue : serverJson.gender};
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.