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.

Reply via email to