{ "id": "171575", "key": "AC-5716", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2018-05-20T06:41:09.000+0000", "created": "2018-04-27T17:42:00.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-05-20T06:41:10.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "I am trying to create a chat with custom fields as follows\r\n\r\n{code}\r\n {\r\n\t\t\t message: message,\r\n\t\t\t custom_field:{\r\n\t\t\t \t\"[CUSTOM_chatrooms]chatroom_id\":3343\r\n\t\t\t }\r\n\t\t};\r\n{code}\r\n\r\nIt creates the chat, but when I query to get chat group as follows it does not return\r\n\r\n{code}\r\nCloud.Chats.getChatGroups({\r\n\twhere: {\r\n \t\"[CUSTOM_chatrooms] chatroom_id\": 3343\r\n \t}\t\r\n},...\r\n{code}\r\nDoes ACS allow this?", "attachment": [], "flagged": false, "summary": "Cloud.Chats.create with custom_field", "creator": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "subtasks": [], "reporter": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "environment": null, "comment": { "comments": [ { "id": "437191", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I believe you have to define chatgroup when creating chats. https://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-create\r\nPlease follow here. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-04-28T00:58:08.000+0000", "updated": "2018-04-28T00:58:08.000+0000" }, { "id": "437192", "author": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "body": "chat_group_id won't be available until a chat record is created. chat_group_id is optional. \r\nMy objective is to create a chat group for the \"chat room\". So created first chat and passed the room_id, so that later I will pass chat_group_id for future chat message in that \"chat room\".\r\n", "updateAuthor": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2018-04-28T03:04:56.000+0000", "updated": "2018-04-28T03:06:34.000+0000" }, { "id": "437195", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\n*chat_group_id* Identifies an existing chat group by ID.You must specify either a to_ids list or the chat_group_id for an existing chat group.If you already know the id of a chat group, you can use it to specify which chat group this message should go to.\r\n\r\nFor details please visit this [link|https://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-create].\r\n\r\nHope this helps.\r\nThanks\r\n\r\n", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-04-29T05:01:50.000+0000", "updated": "2018-04-29T05:01:50.000+0000" }, { "id": "437196", "author": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "body": "You are correct and I did passed the to_ids = ids.join(','), I forgot to mentioned in this ticket. \r\nBelow is what I passed\r\n{\r\nmessage: message,\r\nto_ids:ids.join(','),\r\ncustom_field:\r\n{ \"[CUSTOM_chatrooms]chatroom_id\":3343 }\r\n};", "updateAuthor": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2018-04-29T05:59:27.000+0000", "updated": "2018-04-29T05:59:27.000+0000" }, { "id": "437197", "author": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Here is my full code sample. Please notice the response, chat is created but when I tried to fetch chat group it does not return any record.\r\n\r\nvar Cloud = require('ti.cloud');\r\n\r\nvar ids = [\"5ae4a04500c731a3\",\"5ae424ee48c54b8b\"];\r\nCloud.Chats.create({\r\n to_ids: ids.join(','),\r\n message: 'Good morning',\r\n custom_field:{ \r\n\t\t\t\"[CUSTOM_groups]group_id\":\"abc\" \r\n\t\t}\r\n\t}, function (e) {\r\n\t\tif(e.success){\r\n \t\t\tTi.API.info(\"chat \"+ JSON.stringify(e)); // Response 1\r\n \t\t\tCloud.Chats.getChatGroups({\r\n\t\t\t\tresponse_json_depth:2,\r\n\t\t\t\twhere: {\r\n\t\t\t \t\"[CUSTOM_groups]group_id\":\"abc\"\r\n\t\t\t \t}\r\n\t\t\t\t\r\n\t\t\t},function (eg) {\r\n\t\t\t\tTi.API.info(\"chat group \"+ JSON.stringify(eg)); // Response 2\r\n\t\t\t \r\n\t\t\t});\t\r\n \t\t} \r\n});\r\n\r\nResponse 1:\r\n{\"chats\":[{\"id\":\"5ae584378ab\",\"created_at\":\"2018-04-29T06:06:52+0000\".....\r\n\r\n// Response 2\r\nchat group {\"chat_groups\":[],\"success\":true,\"error\":false,\"meta\":{\"code\":200,\"status\":\"ok\",\"method_name\":\"getChatGroups\"}}\r\n\r\nNOTE: I have replaced the ids with dummy value above.", "updateAuthor": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2018-04-29T06:15:52.000+0000", "updated": "2018-04-29T06:15:52.000+0000" }, { "id": "437425", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~efrancis],\r\n\r\nCan you please run the the sample code from [here|https://docs.appcelerator.com/arrowdb/latest/#!/api/Chats-method-get_chat_groups] and let us know how it goes.", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-05-07T09:27:29.000+0000", "updated": "2018-05-07T09:27:29.000+0000" }, { "id": "437427", "author": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "body": "The sample code you are referring to or in the documentation does not have where clause. Could you please try my sample above and let me know your result?", "updateAuthor": { "name": "efrancis", "key": "efrancis", "displayName": "Emmanuel Francis", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2018-05-07T14:14:43.000+0000", "updated": "2018-05-07T14:14:43.000+0000" }, { "id": "437605", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~efrancis],\r\n\r\nThanks for your feedback. We are unable to reproduce the issue on our end. Can you please attach a sample test project to reproduce the issue on our end?", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2018-05-14T08:09:18.000+0000", "updated": "2018-05-14T08:09:18.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }