As an admin/instructor I can delete JobLog records so that the job log is not cluttered with distracting/irrelevant info.
Acceptance Criteria
[ ] In each place that the JobLog React component appears, there is a delete button (either text with Delete) or maybe a trash can icon (e.g. <i class="fas fa-trash-alt"></i> if font-awesome is part of our build (see: https://fontawesome.com/v5.15/how-to-use/on-the-web/using-with/react ).
[ ] When you press the delete icon, the CompletedJob record is deleted. (I don't think there is any need for a "confirmation dialog")
[ ] If you delete the CompletedJob record of a job that is "In Progress", the job log should reappear when the job finishes (assuming that it does). See below "What does it mean to say that the record "reappears"
What does it mean to say that the record "reappears"?
That is to say, the code in background_job.rb that handles updating the job record on completion should check whether the CompletedJob already exists, and if so, it should update it, but if not, it should create a new record.
Here is the code in question.
What is not clear is whether this just will "work" without us having to do anything.... because the instance variable in the object already has a handle to an object, or whether we would have to recreate the object.
User Story
As an admin/instructor I can delete JobLog records so that the job log is not cluttered with distracting/irrelevant info.
Acceptance Criteria
[ ] In each place that the JobLog React component appears, there is a delete button (either text with Delete) or maybe a trash can icon (e.g.
<i class="fas fa-trash-alt"></i>
if font-awesome is part of our build (see: https://fontawesome.com/v5.15/how-to-use/on-the-web/using-with/react ).[ ] When you press the delete icon, the CompletedJob record is deleted. (I don't think there is any need for a "confirmation dialog")
[ ] If you delete the CompletedJob record of a job that is "In Progress", the job log should reappear when the job finishes (assuming that it does). See below "What does it mean to say that the record "reappears"
What does it mean to say that the record "reappears"?
That is to say, the code in
background_job.rb
that handles updating the job record on completion should check whether the CompletedJob already exists, and if so, it should update it, but if not, it should create a new record. Here is the code in question.What is not clear is whether this just will "work" without us having to do anything.... because the instance variable in the object already has a handle to an object, or whether we would have to recreate the object.
Implementation Todos
Front end:
Back end:
Testing: