Rake task for changing the state of a Form#2839
Open
chao-xian wants to merge 3 commits into
Open
Conversation
Spe'cing out the various expected event paths for changing the state of a Form.
Algorithmically determine the shortest event paths to change the state of a form to another state.
49bb26f to
d3cedc4
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2839.admin.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this pull request solve?
We have some forms that were fiddled with in the database to remove them from service. This was prior to having the Archive functionality we now have. As a consequence some of our metrics data is counting wrong.
Example:
XL Bully - the "live" version was deleted, but as it was once live it should be counted as being published some time ago.
This PR adds a method and accompanying rake task for switching a Form's state programatically, in the shortest number of steps.
In the case of XL Bully it would make it live and then immediately archive it. As it's done programatically, it would be much quicker than one of the admins clicking around to do the same thing. It also decreases the likelihood of a user finding the live form.
Trello card: https://trello.com/c/44SCirtT/3150-live-and-archived-forms-report-is-missing-2-forms
Things to consider when reviewing