Skip to content

Add feature reports for draft forms#1991

Merged
lfdebrux merged 7 commits intomainfrom
ldeb-add-draft-form-feature-reports--sd
May 29, 2025
Merged

Add feature reports for draft forms#1991
lfdebrux merged 7 commits intomainfrom
ldeb-add-draft-form-feature-reports--sd

Conversation

@lfdebrux
Copy link
Member

@lfdebrux lfdebrux commented May 29, 2025

What problem does this pull request solve?

It's helpful to be able to see how many draft forms are using newly released features, as part of measuring uptake of that feature.

This PR parameterises the feature report code by the form document tag, building off the changes in PR #1976 so that this doesn't result in a massively explosive duplication of code.

This PR supersedes #1972.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Copy link
Contributor

@stephencdaly stephencdaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work. Just spotted theres one link that hasn't been updated to pass in the tag.

@lfdebrux lfdebrux force-pushed the ldeb-add-draft-form-feature-reports--sd branch 2 times, most recently from 82318bf to 27030fe Compare May 29, 2025 09:47
lfdebrux and others added 6 commits May 29, 2025 14:33
Rather than going to the reports#live_csv_questions action for the CSV
of questions with answer type, we should use the same pattern as for the
other feature reports and use the same URL but with a `.csv` appended
for the CSV download link on the questions with answer type report page.

This commit updates the #questions_with_answer_type action to accept
format `csv` as well as `html`, same as the other feature report
actions, and uses that in the view template. We can then also simplify
the live_questions_csv action.

This probably should have been done in PR #1976, but it was missed.
Co-authored-by: Stephen Daly <stephen.daly@digital.cabinet-office.gov.uk>
@lfdebrux lfdebrux force-pushed the ldeb-add-draft-form-feature-reports--sd branch from 27030fe to 184375e Compare May 29, 2025 11:41
The `report_table` helper can't handle it if `records` is an empty
list and raises an exception; this commit fixes that by not calling it
if `records` is empty. For friendliness, we instead show the user a
message making it clear there are no forms/questions to show. For
completeness we also make the same change to the
questions_with_answer_type report view, even though it's not strictly
necessary.
@sonarqubecloud
Copy link

@github-actions
Copy link

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-1991.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
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@lfdebrux lfdebrux merged commit 1ab5224 into main May 29, 2025
6 checks passed
@lfdebrux lfdebrux deleted the ldeb-add-draft-form-feature-reports--sd branch May 29, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants