{"action":"closed","issue":{"url":"https://api.github.com/repos/ngageoint/scale/issues/963","repository_url":"https://api.github.com/repos/ngageoint/scale","labels_url":"https://api.github.com/repos/ngageoint/scale/issues/963/labels{/name}","comments_url":"https://api.github.com/repos/ngageoint/scale/issues/963/comments","events_url":"https://api.github.com/repos/ngageoint/scale/issues/963/events","html_url":"https://github.com/ngageoint/scale/issues/963","id":258053667,"number":963,"title":"Bug in batch creation of recipes with non-original jobs","user":{"login":"dfaller","id":15897378,"avatar_url":"https://avatars3.githubusercontent.com/u/15897378?v=4","gravatar_id":"","url":"https://api.github.com/users/dfaller","html_url":"https://github.com/dfaller","followers_url":"https://api.github.com/users/dfaller/followers","following_url":"https://api.github.com/users/dfaller/following{/other_user}","gists_url":"https://api.github.com/users/dfaller/gists{/gist_id}","starred_url":"https://api.github.com/users/dfaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfaller/subscriptions","organizations_url":"https://api.github.com/users/dfaller/orgs","repos_url":"https://api.github.com/users/dfaller/repos","events_url":"https://api.github.com/users/dfaller/events{/privacy}","received_events_url":"https://api.github.com/users/dfaller/received_events","type":"User","site_admin":false},"labels":[{"id":288387994,"url":"https://api.github.com/repos/ngageoint/scale/labels/bug","name":"bug","color":"fc2929","default":true},{"id":322184842,"url":"https://api.github.com/repos/ngageoint/scale/labels/jobs%20and%20recipes","name":"jobs and recipes","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"mikenholt","id":22593495,"avatar_url":"https://avatars1.githubusercontent.com/u/22593495?v=4","gravatar_id":"","url":"https://api.github.com/users/mikenholt","html_url":"https://github.com/mikenholt","followers_url":"https://api.github.com/users/mikenholt/followers","following_url":"https://api.github.com/users/mikenholt/following{/other_user}","gists_url":"https://api.github.com/users/mikenholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mikenholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikenholt/subscriptions","organizations_url":"https://api.github.com/users/mikenholt/orgs","repos_url":"https://api.github.com/users/mikenholt/repos","events_url":"https://api.github.com/users/mikenholt/events{/privacy}","received_events_url":"https://api.github.com/users/mikenholt/received_events","type":"User","site_admin":false},"assignees":[{"login":"mikenholt","id":22593495,"avatar_url":"https://avatars1.githubusercontent.com/u/22593495?v=4","gravatar_id":"","url":"https://api.github.com/users/mikenholt","html_url":"https://github.com/mikenholt","followers_url":"https://api.github.com/users/mikenholt/followers","following_url":"https://api.github.com/users/mikenholt/following{/other_user}","gists_url":"https://api.github.com/users/mikenholt/gists{/gist_id}","starred_url":"https://api.github.com/users/mikenholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikenholt/subscriptions","organizations_url":"https://api.github.com/users/mikenholt/orgs","repos_url":"https://api.github.com/users/mikenholt/repos","events_url":"https://api.github.com/users/mikenholt/events{/privacy}","received_events_url":"https://api.github.com/users/mikenholt/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ngageoint/scale/milestones/46","html_url":"https://github.com/ngageoint/scale/milestone/46","labels_url":"https://api.github.com/repos/ngageoint/scale/milestones/46/labels","id":2820041,"number":46,"title":"Sprint 10-23-2017","description":"Sprint backlog for 10-23-2017 to 11-03-2017","creator":{"login":"dfaller","id":15897378,"avatar_url":"https://avatars3.githubusercontent.com/u/15897378?v=4","gravatar_id":"","url":"https://api.github.com/users/dfaller","html_url":"https://github.com/dfaller","followers_url":"https://api.github.com/users/dfaller/followers","following_url":"https://api.github.com/users/dfaller/following{/other_user}","gists_url":"https://api.github.com/users/dfaller/gists{/gist_id}","starred_url":"https://api.github.com/users/dfaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfaller/subscriptions","organizations_url":"https://api.github.com/users/dfaller/orgs","repos_url":"https://api.github.com/users/dfaller/repos","events_url":"https://api.github.com/users/dfaller/events{/privacy}","received_events_url":"https://api.github.com/users/dfaller/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":1,"state":"open","created_at":"2017-10-06T14:11:32Z","updated_at":"2017-10-24T13:18:54Z","due_on":"2017-11-03T07:00:00Z","closed_at":null},"comments":0,"created_at":"2017-09-15T14:11:44Z","updated_at":"2017-10-24T13:18:54Z","closed_at":"2017-10-24T13:18:54Z","author_association":"CONTRIBUTOR","body":"There is a bug in the batch creation process where jobs that are not original to the new batch recipes (i.e. jobs that were created before and are being left as is in the new batch recipes) are still being added to the batch_job models for the batch. This creates the situation where a job belongs in multiple batch_job models, which is invalid and creates problems.\r\n\r\nI believe the solution is to place a check in `BatchManager._create_batch_models()` so that only recipe_job models for new/original jobs (`recipe_job.is_original` is `true`) will create a corresponding batch_job model instead of all recipe_job models (which may contain jobs from previous batches).\r\n\r\nInvestigate and fix."}}
{"actor":{"display_login":"mikenholt"}}