{"action":"opened","issue":{"url":"https://api.github.com/repos/OpenTechStrategies/swoptact/issues/105","labels_url":"https://api.github.com/repos/OpenTechStrategies/swoptact/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/OpenTechStrategies/swoptact/issues/105/comments","events_url":"https://api.github.com/repos/OpenTechStrategies/swoptact/issues/105/events","html_url":"https://github.com/OpenTechStrategies/swoptact/issues/105","id":93380331,"number":105,"title":"Race condition in \"save all editing rows on submit\" feature","user":{"login":"cwebber","id":55698,"avatar_url":"https://avatars.githubusercontent.com/u/55698?v=3","gravatar_id":"","url":"https://api.github.com/users/cwebber","html_url":"https://github.com/cwebber","followers_url":"https://api.github.com/users/cwebber/followers","following_url":"https://api.github.com/users/cwebber/following{/other_user}","gists_url":"https://api.github.com/users/cwebber/gists{/gist_id}","starred_url":"https://api.github.com/users/cwebber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwebber/subscriptions","organizations_url":"https://api.github.com/users/cwebber/orgs","repos_url":"https://api.github.com/users/cwebber/repos","events_url":"https://api.github.com/users/cwebber/events{/privacy}","received_events_url":"https://api.github.com/users/cwebber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cwebber","id":55698,"avatar_url":"https://avatars.githubusercontent.com/u/55698?v=3","gravatar_id":"","url":"https://api.github.com/users/cwebber","html_url":"https://github.com/cwebber","followers_url":"https://api.github.com/users/cwebber/followers","following_url":"https://api.github.com/users/cwebber/following{/other_user}","gists_url":"https://api.github.com/users/cwebber/gists{/gist_id}","starred_url":"https://api.github.com/users/cwebber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cwebber/subscriptions","organizations_url":"https://api.github.com/users/cwebber/orgs","repos_url":"https://api.github.com/users/cwebber/repos","events_url":"https://api.github.com/users/cwebber/events{/privacy}","received_events_url":"https://api.github.com/users/cwebber/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-07-06T21:23:31Z","updated_at":"2015-07-06T21:23:31Z","closed_at":null,"body":"In #47 / commit f3b226bd9552e25ede66e4e2329ce207fe2fb448 a feature was added to save rows which are mid-edit before submitting the event form.  However, it has a serious race condition and is likely to only partially succeed.\r\n\r\nThe way the code works is that the final submitted row has a \"submit_flag\" added to saveParticipant.  However, this is added to the last open row, which is not sufficient... this introduces a race condition, as the last ordered row is not guaranteed to be the last row which finishes updating on an AJAX request.\r\n\r\n@trystant has suggested seeing if javascript promises (which jquery supports) can help with this somehow.  Maybe look at that?"}}