stats4sd / aec_portfolio

A proof of concept for the AEC Consortium Project Management / Assessment System
GNU General Public License v3.0
0 stars 0 forks source link

Completion status harmonisation #129

Closed dave-mills closed 1 year ago

dave-mills commented 1 year ago

Thie PR fixes #97. It also addresses some minor issues with the additional criteria status (#127)

EDIT

Fixes #130

dan-tang-ssd commented 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

image

image

image

dan-tang-ssd commented 1 year ago

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

image

image

dan-tang-ssd commented 1 year ago

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...

image

image

image

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).

image

image

dave-mills commented 1 year ago

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:

  1. Additional Criteria deletion is mixed up with portfolio deletion routes;
  2. When a portfolio is deleted, all initiatives within the portfolio should also be deleted, but this is not currently happening.

I'll fix 1 here, and add 2 to the list.

dave-mills commented 1 year ago

@dan-tang-ssd - I've updated the portfolio and additional criteria deletion methods so that:

dan-tang-ssd commented 1 year ago

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 image

Notification showed image

The criteria is still here... image

Score tags related to this criteria image

dave-mills commented 1 year ago

It does not delete portfolio now, but it also does not delete the additional assessment criteria...

Fixed

dan-tang-ssd commented 1 year ago

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...

image

dave-mills commented 1 year ago

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.

dan-tang-ssd commented 1 year ago

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...

image

image

dave-mills commented 1 year ago

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?

dan-tang-ssd commented 1 year ago

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.