Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to re-link applications to new template versions #1112

Open
CarlosNZ opened this issue Jun 21, 2024 · 0 comments
Open

Ability to re-link applications to new template versions #1112

CarlosNZ opened this issue Jun 21, 2024 · 0 comments
Labels
12 month plan Dev EPIC Epic that has a list of related issues

Comments

@CarlosNZ
Copy link
Collaborator

CarlosNZ commented Jun 21, 2024

Currently template version don't change for applications already in progress, so if a mistake is found, or we want to change the behaviour, it can only be fixed for applications started from that point on.

This is done for safety reasons -- if applications change their links to different templates then any inconsistency between existing responses and the new template structure could cause big problems.

However, we are finding more and more need for this kind of thing, as there can be a large number of applications in progress, with a significant delay in processing them.

In principle, it should be safe to connect applications to new versions if the Actions have changed, or just some wording in the application form has been updated.

Suggestion

UI

When you "commit" a template version, as well as the comment, you will get a checkbox to "Re-link in-progress applications". There might be a warning explaining the potential risks involved.

Under the hood

Linking applications to new templates is fairly straightforward, but it's the questions (template_elements) that will be harder to keep track of.

My suggestion would be to add a new field to the template_element table called previous_version_element, which contains the id of the question that this element is duplicated from. Then, when you "commit" the new version, all entities which reference template elements (application responses, review respones, etc) would use the "previous_version" value to link then re-connect them with the correct new template element.

Some things to figure out:

  1. if a question is removed, what happens to existing responses? Should we just delete them? Or mark them somehow?
  2. if a question is changed significantly, e.g. changed to a different form element type, the application response will be invalid and likely cause an error when displayed. We can limit the degree to which questions can be changed before re-linking is no longer allowed, but unfortunately the criteria to decide what is "allowed" is not easily definable. Probably need to have a discussion to talk through some use cases before we can really make a plan for this.
  3. Similarly, if we add a question, what happens? If an application has been "Submitted", but the added question means the form would have not been allowed to be submitted, what do we do? Just assume the reviewer will send it back to the applicant for changes?
  4. what do we do with applications that are already approved? Presumably we just leave them as is -- i.e if status="COMPLETED", do nothing.
@CarlosNZ CarlosNZ added 12 month plan Dev EPIC Epic that has a list of related issues labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12 month plan Dev EPIC Epic that has a list of related issues
Projects
None yet
Development

No branches or pull requests

1 participant