Skip to content

Add a validation requests controller to bops_preapps#2755

Closed
pixeltrix wants to merge 1 commit intomainfrom
add-preapps-validation-requests-controller
Closed

Add a validation requests controller to bops_preapps#2755
pixeltrix wants to merge 1 commit intomainfrom
add-preapps-validation-requests-controller

Conversation

@pixeltrix
Copy link
Copy Markdown
Member

All the redirect_to/return_to handling was becoming unmanageable.

@pixeltrix pixeltrix force-pushed the add-preapps-validation-requests-controller branch from 3370920 to 118e396 Compare December 19, 2025 06:17
Copy link
Copy Markdown
Member Author

@pixeltrix pixeltrix left a comment

Choose a reason for hiding this comment

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

This is just for 'other change' validation requests - will add others later today.


def set_planning_application
scope = current_local_authority.planning_applications
planning_application = scope.find_by!(reference: params[:reference])
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We need to fix everywhere else we're doing the following:

PlanningApplication.find_by(reference: params[:reference])

Because that reference is not globally unique - needs to be scoped to the local authority.

<% else %>
<p>Applicant has not responded yet</p>
<% end %>
</div>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Currently this block is hidden unless the planning application is in an invalidated state - seems like you'd want to see the applicant response even after the application has been validated so I've removed the condition.

All the redirect_to/return_to handling was becoming unmanageable.
@pixeltrix pixeltrix force-pushed the add-preapps-validation-requests-controller branch from 118e396 to 96ae49b Compare December 19, 2025 06:26
@pixeltrix
Copy link
Copy Markdown
Member Author

Closing because it's out of date and we have copied chunks across

@pixeltrix pixeltrix closed this Feb 12, 2026
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