Bug: Hiring Overview does not update
Expected behavior and actual behavior.
Expected behavior: After changing the status in the candidate pipeline, the Hiring Overview graph should update correspondingly.
Actual behavior:
When changing the status in the candidate pipeline for example from Interviewing back to No Contact, then the Hiring Overview graph at the Dashboard is not updated and still shows the additional 1 Interview. This bug happens only when changing the status back to previous statuses.
Steps to reproduce the problem.
Start with empty database to clearly see the problem.
Create Job Order. Add Candidate to This Job Order Pipeline. Change Status to at least Submitted, save. Then change the Status back to No Contact and look at the Dashboard.
What version of opencats are you running?
CATS Version 0.9.4 Countach.
Release or downloaded from Git?
Normal 0.9.4 Countach Release.
WAMP or LAMP?
LAMP
What version of PHP and MySQL are you running
MariaDb: 10.1-36-1 PHP Version 5.6.38
Workaround to update the Hiring Overview graph: Delete and re-add the Candidate from the Job order.
I've found out that the used date for the Hiring Overview graph is the date from the candidate_joborder_status_history table. So the other data is probably taken from this table as well. If the status is changed back, the old entry is still in this table (because it is a history table after all..). So the Hiring Overview graph gets old data from this table or rather does not use it correctly.
(closed this issue by accident, reopened immediately)
What I think is even worse: you can change the Activities date (Status change: Submitted), but when you do this the date from the Hiring Overview chart is off. I wish for more consistency here. Although I know that the activity logs are implemented freely. But if the status is changed together with a log it should be connected, in order that the log represents the actual status change.
The status should be taken out from the candidate_joborder table, where the status is always the current one. But the last date from the candidate_joborder_status_history must be used.
I've located the problem to the getPipelineData function inside the Dashboard.php. But i'm not yet that experienced in php to understand how the variable $data is made.
Need to revisit after accepting #243