{"action":"opened","issue":{"url":"https://api.github.com/repos/Viima/jquery-comments/issues/44","repository_url":"https://api.github.com/repos/Viima/jquery-comments","labels_url":"https://api.github.com/repos/Viima/jquery-comments/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/Viima/jquery-comments/issues/44/comments","events_url":"https://api.github.com/repos/Viima/jquery-comments/issues/44/events","html_url":"https://github.com/Viima/jquery-comments/issues/44","id":139028057,"number":44,"title":"Synchronizing the comment ID with an external source","user":{"login":"jlennoxmht","id":9505861,"avatar_url":"https://avatars.githubusercontent.com/u/9505861?v=3","gravatar_id":"","url":"https://api.github.com/users/jlennoxmht","html_url":"https://github.com/jlennoxmht","followers_url":"https://api.github.com/users/jlennoxmht/followers","following_url":"https://api.github.com/users/jlennoxmht/following{/other_user}","gists_url":"https://api.github.com/users/jlennoxmht/gists{/gist_id}","starred_url":"https://api.github.com/users/jlennoxmht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlennoxmht/subscriptions","organizations_url":"https://api.github.com/users/jlennoxmht/orgs","repos_url":"https://api.github.com/users/jlennoxmht/repos","events_url":"https://api.github.com/users/jlennoxmht/events{/privacy}","received_events_url":"https://api.github.com/users/jlennoxmht/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-07T16:42:42Z","updated_at":"2016-03-07T16:42:42Z","closed_at":null,"body":"We are using the jquery-comments plugin in our code and seek some guidance because we are not sure that this is an issue. We have created a SharePoint list which holds the comments and they are initially loaded into the plugin via an AJAX call.\r\n\r\nHere is the sequence of events:\r\n\r\n1. we add a new comment via the plugin\r\n\r\n2. in  the post handler we get the newly created comment and note that it has an ID prefixed with the letter 'C' and an ascending number based on the number of comments.  The comment is correctly displayed in the page.\r\n\r\n3. We insert that record into a SharePoint list and it creates a new ID.\r\n\r\nThe issue we need to resolve is that the ID for the comment in memory needs to be identical to the one that we create in the SharePoint list.  By the time we get the comment that the plugin creates in memory, we don't have a convenient way to change it.\r\n\r\nWe are considering adding a method onto the prototype to find and modify the comment that was just created.  We need to do this because if the user does anything else to the comment that just got created then the temporary ID is used in the AJAX call and we fail on the SharePoint side.  Note that if we close the comments plugin and reload the comments, then the records work just fine with the ID that we give it when the item is inserted into the SharePoint list.\r\n\r\nWe are asking for guidance on whether or not we should request a pull or perhaps you have an idea that would be less intrusive.\r\n\r\nThank you in advance for any thoughts.\r\n"}}