-
Notifications
You must be signed in to change notification settings - Fork 4
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
Firebreak - Add report to get all live forms #663
Merged
Merged
Conversation
This file contains 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
stephencdaly
force-pushed
the
add-csv-download-reports
branch
from
December 23, 2024 15:45
cafee3d
to
fe77906
Compare
stephencdaly
changed the title
Add report to get all live forms
Firebreak - Add report to get all live forms
Dec 23, 2024
stephencdaly
force-pushed
the
add-csv-download-reports
branch
2 times, most recently
from
December 23, 2024 16:01
6b8710c
to
9521483
Compare
stephencdaly
force-pushed
the
add-csv-download-reports
branch
6 times, most recently
from
January 3, 2025 13:28
4ebb5de
to
352fa96
Compare
Add GET `api/v2/form-documents` API endpoint to retrieve all for documents by tag for the purpose of generating reports in forms-admin. This uses the "kaminari" gem to paginate the results to avoid sending all the form data in one API response. The API endpoint accepts the following query parameters: - `tag`: the tag to filter form documents by. If not provided, all form documents with all tags are returned - `page`: the page of results to get - `per_page`: the number of results to return per page
stephencdaly
force-pushed
the
add-csv-download-reports
branch
from
January 3, 2025 13:36
352fa96
to
0e3e46b
Compare
DavidBiddle
reviewed
Jan 3, 2025
When dealing with pagination, if we do not order the results there is the potential for results to move around in the order that the database would return them, meaning results could be duplicated or omitted when navigating through pages. Order the results by their ID, as this is indexed by default and any new records that are created when we are navigating through the pages of results will be added at the end.
stephencdaly
force-pushed
the
add-csv-download-reports
branch
from
January 3, 2025 15:48
0e3e46b
to
0dea82f
Compare
Quality Gate passedIssues Measures |
DavidBiddle
reviewed
Jan 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised a comment about one of the commit messages, but otherwise looks great and works for me locally
DavidBiddle
approved these changes
Jan 3, 2025
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?
Trello card: https://trello.com/c/mPtJhtWq/
Add GET
api/v2/form-documents
API endpoint to retrieve all for documents by tag for the purpose of generating reports in forms-admin. This uses the "kaminari" gem to paginate the results to avoid sending all the form data in one API response.The API endpoint accepts the following query parameters:
tag
: the tag to filter form documents by. If not provided, all form documents with all tags are returnedpage
: the page of results to getper_page
: the number of results to return per pageWe return all the form data for forms-admin to process so that organisation and group data can be added to the report.
Related admin PR to add the report: alphagov/forms-admin#1681
Things to consider when reviewing