diff --git a/ui/app/components/allocation-row.js b/ui/app/components/allocation-row.js index 5625c092f..088c07a82 100644 --- a/ui/app/components/allocation-row.js +++ b/ui/app/components/allocation-row.js @@ -58,6 +58,9 @@ function qualifyJob() { job, originalJobId: null, }); + if (job.get('isPartial')) { + job.reload(); + } } else { this.get('store') .findRecord('job', allocation.get('originalJobId')) diff --git a/ui/app/models/job.js b/ui/app/models/job.js index f9042ec39..4681b502e 100644 --- a/ui/app/models/job.js +++ b/ui/app/models/job.js @@ -84,6 +84,11 @@ export default Model.extend({ taskGroups: fragmentArray('task-group', { defaultValue: () => [] }), summary: belongsTo('job-summary'), + // A job model created from the jobs list response will be lacking + // task groups. This is an indicator that it needs to be reloaded + // if task group information is important. + isPartial: equal('taskGroups.length', 0), + // If a job has only been loaded through the list request, the task groups // are still unknown. However, the count of task groups is available through // the job-summary model which is embedded in the jobs list response.