[
https://issues.apache.org/jira/browse/SHINDIG-582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul Lindner updated SHINDIG-582:
---------------------------------
Description:
It's possible for the canonical value of undisclosed to be associated with a
gender. Current code in jsonrpccontainer.js maps this to FEMALE.
was:
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};
}
Issue Type: Bug (was: Improvement)
Summary: Handle UNDISCLOSED gender values properly (was: Add
UNDISCLOSED to the enum values for Gender to sync with Portable Contacts)
Okay Cassie, making this a bug so we can fix this.
Let's make sure that UNDISCLOSED becomes part of the spec for 0.9
> Handle UNDISCLOSED gender values properly
> -----------------------------------------
>
> Key: SHINDIG-582
> URL: https://issues.apache.org/jira/browse/SHINDIG-582
> Project: Shindig
> Issue Type: Bug
> Components: Common Components (Java)
> Reporter: Paul Lindner
> Assignee: Paul Lindner
>
> It's possible for the canonical value of undisclosed to be associated with a
> gender. Current code in jsonrpccontainer.js maps this to FEMALE.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.