{ "id": "124250", "key": "AC-2164", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-02-14T07:22:30.000+0000", "created": "2013-12-28T01:11:15.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:09.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "When I save google api result string(or object) to custom_files, there is a critical bug.\r\n\r\n\r\nCase 1 Step:\r\n1. Create post with custom_fields which has google api result string.\r\n2. Post.Query with no where condition, you can't find a just created post in the result.\r\n3. Post.Query with \"where:{id:created_id}\" condition, you can find a just create post.\r\n\r\nIf you set google api result to 'title', All step work property. (Case 2)\r\nIf you use other string instead of google api result, All step work property.\r\n\r\n\r\nYes! It's wired! It's true!\r\n\r\nrun below code. You could understand what I'm saying.\r\n\r\n{code:javascript}\r\nvar Cloud = require('ti.cloud');\r\n\r\nfunction createPostAndQuery() {\r\n\r\n\tCloud.Posts.create({\r\n\t\t/**\r\n\t\t * test case 1 : custom_fileds string\r\n\t\t * actual result : Cloud.Show work!,\r\n\t\t * \t\t\t\t Cloud.Query(with where:{id:xxx}) work!\r\n\t\t * \t\t\t\t Cloud.Query(with no where) DOESN'T FIND POST JUST CREATED!!!! \r\n\t\t */\r\n\t\tcontent : 'custom_fileds string',\r\n\t\tcustom_fields : {\r\n\t\t\tmyField : JSON.stringify(googleReverseGeo)\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/**\r\n\t\t * test case 2 : custom_fileds string\r\n\t\t * actual result : Cloud.Show work!,\r\n\t\t * \t\t\t\t Cloud.Query(with no where) work!!!!! \r\n\t\t */\r\n\t\t// content : 'no custom_fileds',\r\n\t\t// title : JSON.stringify(googleReverseGeo)\r\n\t\t\r\n\t\t\r\n\t}, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\tvar created_post = e.posts[0];\r\n\t\t\talert('CREATE Success:\\n' + 'id: ' + created_post.id + '\\n' \r\n\t\t\t\t+ 'title: ' + created_post.title + '\\n' \r\n\t\t\t\t+ 'content: ' + created_post.content + '\\n' \r\n\t\t\t\t+ 'updated_at: ' + created_post.updated_at + '\\n',\r\n\t\t\t\t+ 'custom_fields' + JSON.stringify(created_post.custom_fields));\r\n\t\t\t\r\n\t\t\tCloud.Posts.show({\r\n\t\t\t\tpost_id : created_post.id\r\n\t\t\t}, function(e) {\r\n\t\t\t\tif (e.success) {\r\n\t\t\t\t\tvar post = e.posts[0];\r\n\t\t\t\t\talert('SHOW Success:\\n' + 'id: ' + post.id + '\\n' + 'title: ' + post.title + '\\n' + 'content: ' + post.content + '\\n' + 'updated_at: ' + post.updated_at + '\\n' + 'custom_fields' + JSON.stringify(created_post.custom_fields));\r\n\t\t\t\t} else {\r\n\t\t\t\t\talert('SHOW Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tCloud.Posts.query({\r\n\t\t\t page: 1,\r\n\t\t\t per_page: 20,\r\n\t\t\t // where : {\r\n\t\t\t \t// id : created_post.id\r\n\t\t\t // }\r\n\t\t\t}, function (e) {\r\n\t\t\t if (e.success) {\r\n\t\t\t \tvar isFound = false,\r\n\t\t\t \t\tqueryPost;\r\n\t\t\t for (var i = 0; i < e.posts.length; i++) {\r\n\t\t\t var post = e.posts[i];\r\n\t\t\t if(post.id == created_post.id){\r\n\t\t\t \tisFound = true;\r\n\t\t\t \tqueryPost = post;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t if(isFound){\r\n\t\t\t \talert(\r\n\t\t\t \t\t'QUERY Success:\\n' +\r\n\t\t\t \t\t'id: ' + queryPost.id + '\\n' +\r\n\t\t\t 'id: ' + queryPost.id + '\\n' +\r\n\t\t\t 'title: ' + queryPost.title + '\\n' +\r\n\t\t\t 'content: ' + queryPost.content + '\\n' +\r\n\t\t\t 'updated_at: ' + queryPost.updated_at + '\\n' + \r\n\t\t\t 'custom_fields' + JSON.stringify(queryPost.custom_fields));\r\n\t\t\t } else {\r\n\t\t\t \talert ('QUERY : Opps!'+'\\n'+\r\n\t\t\t \t\t'post length : ' + e.posts.length +'\\n'+ \r\n\t\t\t \t\t'There is no post_id :' + created_post.id);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t } else {\r\n\t\t\t alert('QUERY Error:\\n' +\r\n\t\t\t ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\talert('CREATE Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t}\r\n\t});\r\n}\r\n\r\n\r\nCloud.Users.login({\r\n login: 'test@mycompany.com',\r\n password: 'test_password'\r\n}, function (e) {\r\n if (e.success) {\r\n createPostAndQuery();\r\n } else {\r\n alert('LOGIN Error:\\n' +\r\n ((e.error && e.message) || JSON.stringify(e)));\r\n }\r\n});\r\n\r\n// result of https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding\r\nvar googleReverseGeo = {\"results\":[{\"address_components\":[{\"long_name\":\"365-11\",\"short_name\":\"365-11\",\"types\":[\"political\"]},{\"long_name\":\"Sindorim-dong\",\"short_name\":\"Sindorim-dong\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Guro-gu\",\"short_name\":\"Guro-gu\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]},{\"long_name\":\"152-070\",\"short_name\":\"152-070\",\"types\":[\"postal_code\"]}],\"formatted_address\":\"365-11 Sindorim-dong, Guro-gu, Seoul, South Korea\",\"geometry\":{\"location\":{\"lat\":37.5096051,\"lng\":126.8872816},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.5184557,\"lng\":126.903289},\"southwest\":{\"lat\":37.5007535,\"lng\":126.8712742}}},\"types\":[\"political\"]},{\"address_components\":[{\"long_name\":\"Sindorim-dong\",\"short_name\":\"Sindorim-dong\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Guro-gu\",\"short_name\":\"Guro-gu\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]},{\"long_name\":\"152-070\",\"short_name\":\"152-070\",\"types\":[\"postal_code\"]}],\"formatted_address\":\"Sindorim-dong, Guro-gu, Seoul, South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}},\"location\":{\"lat\":37.509469,\"lng\":126.882105},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}}},\"types\":[\"sublocality\",\"political\"]},{\"address_components\":[{\"long_name\":\"Sindorim-dong\",\"short_name\":\"Sindorim-dong\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Guro-gu\",\"short_name\":\"Guro-gu\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]},{\"long_name\":\"152-070\",\"short_name\":\"152-070\",\"types\":[\"postal_code\"]}],\"formatted_address\":\"Sindorim-dong, Guro-gu, Seoul, South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}},\"location\":{\"lat\":37.5077345,\"lng\":126.8805914},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}}},\"types\":[\"sublocality\",\"political\"]},{\"address_components\":[{\"long_name\":\"152-070\",\"short_name\":\"152-070\",\"types\":[\"postal_code\"]},{\"long_name\":\"Sindorim-dong\",\"short_name\":\"Sindorim-dong\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Guro-gu\",\"short_name\":\"Guro-gu\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]}],\"formatted_address\":\"Sindorim-dong, Guro-gu, Seoul, South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}},\"location\":{\"lat\":37.5114119,\"lng\":126.8815276},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.8922686},\"southwest\":{\"lat\":37.5031568,\"lng\":126.873054}}},\"types\":[\"postal_code\"]},{\"address_components\":[{\"long_name\":\"Guro-gu\",\"short_name\":\"Guro-gu\",\"types\":[\"sublocality\",\"political\"]},{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]}],\"formatted_address\":\"Guro-gu, Seoul, South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.9030494},\"southwest\":{\"lat\":37.4733012,\"lng\":126.8126901}},\"location\":{\"lat\":37.4954031,\"lng\":126.887369},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.5182288,\"lng\":126.9030494},\"southwest\":{\"lat\":37.4733012,\"lng\":126.8126901}}},\"types\":[\"sublocality\",\"political\"]},{\"address_components\":[{\"long_name\":\"Seoul\",\"short_name\":\"Seoul\",\"types\":[\"locality\",\"political\"]},{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]}],\"formatted_address\":\"Seoul, South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":37.7017495,\"lng\":127.18359},\"southwest\":{\"lat\":37.4259627,\"lng\":126.7645827}},\"location\":{\"lat\":37.566535,\"lng\":126.9779692},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":37.6956,\"lng\":127.1823},\"southwest\":{\"lat\":37.4346,\"lng\":126.7968}}},\"types\":[\"locality\",\"political\"]},{\"address_components\":[{\"long_name\":\"South Korea\",\"short_name\":\"KR\",\"types\":[\"country\",\"political\"]}],\"formatted_address\":\"South Korea\",\"geometry\":{\"bounds\":{\"northeast\":{\"lat\":38.6169312,\"lng\":130.9232178},\"southwest\":{\"lat\":33.1061096,\"lng\":124.608139}},\"location\":{\"lat\":35.907757,\"lng\":127.766922},\"location_type\":\"APPROXIMATE\",\"viewport\":{\"northeast\":{\"lat\":38.6169312,\"lng\":129.584671},\"southwest\":{\"lat\":33.1061096,\"lng\":124.608139}}},\"types\":[\"country\",\"political\"]}],\"status\":\"OK\"};\r\n\r\n{code}\r\n\r\nThis is not only post bug. When I tested with Photo object, I got a same result.", "attachment": [], "flagged": false, "summary": "ACS - Critical Bug with custom_fileds.", "creator": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "subtasks": [], "reporter": { "name": "yomybaby", "key": "yomybaby", "displayName": "Jong Eun Lee", "active": true, "timeZone": "Asia/Tokyo" }, "environment": "TiSDK 3.3.0.GA\r\niOS7", "comment": { "comments": [ { "id": "286687", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for reporting this issue. We have been able to reproduce this issue based on the steps provided. We have created ticket CLOUDSRV-3116 to track this issue on engineering side. We will continue to update this ticket as we receive more information from engineering.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-05T23:35:34.000+0000", "updated": "2014-01-05T23:35:34.000+0000" }, { "id": "293141", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue has been fixed and deployed on the production environment. Please give it a try and let us know if this issue is resolved for you.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-14T07:22:30.000+0000", "updated": "2014-02-14T07:22:30.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }