CaRCC / rcd-nexus-portal

RCD Nexus Portal, including Capabilities Model assessment
0 stars 0 forks source link

Need to detect previous year RCDProfiles/assessments and either migrate or abandon old assessment. #140

Open plschmitz opened 6 months ago

plschmitz commented 6 months ago

If a user creates a Profile and assessment in one year but does not submit, and then either continues work or tries to submit in another year, we need to catch this and move the assessment to a new (or existing) Profile for the current year. We should catch this as soon as they navigate to an assessment, and or navigates to the prior year profile. If the second step below is implemented, it should not be the case that there is an open/in progress assessment for any profile other than the most recent one.

When the use creates a new Profile we should check for any existing profiles from prior years that have assessments that were not submitted and given them the choice to either move the in-process assessment to the current year or mark it "closed" (or perhaps "abandoned", "stopped", or something else). We do not want to let them edit partially completed assessments from prior years. They should be handled in the UI largely the same as submitted ones (read-only). Users can copy from them, but not edit them.

Simplest method is probably to add a value to AssessmentBase.ReviewStatusChoices like "ABANDONED" (we can adjust the name in the UI), and then adjust AssessmentBase.is_frozen to be true for this new value as well as APPROVED.

@pphysch comments?

plschmitz commented 6 months ago

We should copy the old assessment, e.g., in case questions change. Year is effectively the state, so need not change that.

plschmitz commented 6 months ago

If they create a new profile with a new assessment this will "orphan" the old one. We need to 1) recognize this and disallow editing, and 2) not confuse this with the case of moving an assessment from the prior year (not if there is a current year assessment already, with an assessment).

plschmitz commented 1 month ago

We should probably just archive the one that they stop work on. There is no particular reason to keep it around if they create a new one, and it will just be clutter in the UI. This precludes the need for a new state or something. We should probably not even ask them about cloning or not, and simply state that this one is out of date and needs to be updated to the current year. This should be a modal that explains this and allows them to say "Okay". If they really object, then can leave the page but they should not be allowed to further edit the old profile/assessment. Need to ensure that the info makes clear that the new profile will preserve/copy all the information from the old one. Perhaps we should allow them to specify that the previous assessment should not be copied.

plschmitz commented 1 month ago

This may be moot, as profiles from previous years show up as "Past profiles." If they create one for the current year they can clone from the past one. Pushing to 2.2