qatrackplus / qatrackplus

QATrack+ is an open source program for managing the quality control program of radiotherapy and diagnostic imaging clinics.
Other
55 stars 23 forks source link

Due date lost when completing an In Progress TestList #650

Open bobred opened 1 year ago

bobred commented 1 year ago

As the title suggests, the due date is empty when a TestList has been completed when it was initially in 'In Progress' status.

We are using MS SQL Server 2019 and QATrack version 3.1.0 hosted on Windows Server 2022.

Running a test instance of QATrack in Pycharm I was able to track down where I believe the issue lays. In the C:\deploy\qatrackplus\qatrack\qa\views\perform.py there is a class EditTestListInstance and the function form_valid. It was here that I noticed that the self.initial was None, I changed this to equal the value of form.initial, this had the due date. In the same class but in function update_test_list_instance I added

if self.object.due_date is None: self.object.due_date = self.initial['due_date']

Though this is not a big issue, it does cause issues when trying to audit QA performance.

randlet commented 1 year ago

Good investigation! Thank you for this. I will check it out and get a fix ready soon.