Closed dave-mills closed 1 year ago
I performed some testings.
CASE 1, success
SETTINGS > This Institution uses additional assessment criteria is TICKED AND User has defined additional assessment criteria
Then "Assess Additional Criteria" button is showed
CASE 2, success
SETTINGS > This Institution uses additional assessment criteria is UNTICKED AND User has defined additional assessment criteria
Then "Assess Additional Criteria" button is not showed
CASE 3, TBC
SETTINGS > This Institution uses additional assessment criteria is TICKED AND User has not defined additional assessment criteria
When I delete additioanl assessment, it seems like removed portfolio instead... and error occurred...
I realised that portfolio "Example Portfolio 1" (id: 1) is deleted. After that, initiatives page cannot show initiatives. I suspect that some initiatives belong to the removed portfolio. And that portfolio cannot be found when preparing initiative details (it shows the portfolio that it belongs to in front end).
I realised that portfolio "Example Portfolio 1" (id: 1) is deleted. After that, initiatives page cannot show initiatives. I suspect that some initiatives belong to the removed portfolio. And that portfolio cannot be found when preparing initiative details (it shows the portfolio that it belongs to in front end).
Sounds like 2 issues. here:
I'll fix 1 here, and add 2 to the list.
@dan-tang-ssd - I've updated the portfolio and additional criteria deletion methods so that:
destroy
method is designed for AJAX, so it was not redirecting back to the main page after compltion. I fixed that by overriting those methods in the 2 CRUD controllers. Just pulled latest code and performed testing in local env. It does not delete portfolio now, but it also does not delete the additional assessment criteria... Not sure whether it is related to the score tags related to this criteria...
Remove, Confirm Remove
Notification showed
The criteria is still here...
Score tags related to this criteria
It does not delete portfolio now, but it also does not delete the additional assessment criteria...
Fixed
Got latest code and performed testing in local env.
Additional criteria without score tag can be removed successfully.
When removing additional criteria with score tag, error occurred...
When removing additional criteria with score tag, error occurred...
Looks like we missed a cascadeOnDelete option! I've added it in here, and checked that I can delete an additional criteria item with score tags.
Now the additional criteria with score tag can be removed successfully.
The show or hide for additional assessment criteria is now working fine.
Testing result as below:
Settings Criteria Show additional critera assessment?
1 1 Y
0 1 N
1 0 N
0 0 N
Found a little issue. I created a new additional criteria with score tag. The score tag is saved and can be showed properly. But in additional assessment, the score tag cannot be showed in front end...
Found a little issue. I created a new additional criteria with score tag. The score tag is saved and can be showed properly. But in additional assessment, the score tag cannot be showed in front end...
@dan-tang-ssd Is this directly releated to this PR? Or can we merge this in and add this issue to the list?
Found a little issue. I created a new additional criteria with score tag. The score tag is saved and can be showed properly. But in additional assessment, the score tag cannot be showed in front end...
@dan-tang-ssd Is this directly releated to this PR? Or can we merge this in and add this issue to the list?
Good suggestions~ Let's merge this PR and add a new issue.
Thie PR fixes #97. It also addresses some minor issues with the additional criteria status (#127)
$organisation->has_additional_criteria
.EDIT
Fixes #130