Skip to content

Add LPA Dashboard link to CheckAnswersController - #1214

Merged
Ben-Hodgkiss merged 4 commits into
mainfrom
add-LPA-Dash-link-to-JIRA
Jun 29, 2026
Merged

Add LPA Dashboard link to CheckAnswersController#1214
Ben-Hodgkiss merged 4 commits into
mainfrom
add-LPA-Dash-link-to-JIRA

Conversation

@Ben-Hodgkiss

@Ben-Hodgkiss Ben-Hodgkiss commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the link to the LPA Dashboard into the JIRA ticket.

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Related Tickets & Documents

  • Closes #

QA Instructions, Screenshots, Recordings

Before

Before screenshot here

After

After screenshot here

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: Please replace this line with details on why tests have not been included
  • I need help with writing tests

QA sign off

  • Code has been checked and approved
  • Design has been checked and approved
  • Product and business logic has been checked and proved

[optional] Are there any post-deployment tasks we need to perform?

[optional] Are there any dependencies on other PRs or Work?

Summary by CodeRabbit

  • New Features
    • Added an LPA Dashboard link to the Jira issue details generated from answer checks, making it easier to jump from a report to the relevant organisation page.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Ben-Hodgkiss, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 451b5a8f-d605-4707-b73c-13b1c5d4e751

📥 Commits

Reviewing files that changed from the base of the PR and between f9574f2 and ba2f93a.

📒 Files selected for processing (2)
  • src/controllers/CheckAnswersController.js
  • test/unit/checkAnswersController.test.js

Walkthrough

A single line is added to the Jira issue description template in CheckAnswersController.createJiraServiceRequest, inserting an "LPA Dashboard" bullet point with a URL constructed from data.organisationId pointing to https://provide.planning.data.gov.uk/organisations/${data.organisationId}.

Changes

Jira Description Update

Layer / File(s) Summary
LPA Dashboard link in Jira description
src/controllers/CheckAnswersController.js
Adds a new "LPA Dashboard" bullet to the Jira issue description template, with a URL built from data.organisationId.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • digital-land/submit#1095: Modifies the same CheckAnswersController.createJiraServiceRequest description template, touching the same code path for assembling Jira ticket descriptions.

Poem

🐇 A link, a link, a dashboard bright,
One tiny line to shed some light,
The organisation's page now shown,
In every Jira ticket grown.
Hip-hop-hooray for URLs! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding an LPA Dashboard link in CheckAnswersController.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-LPA-Dash-link-to-JIRA

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.77% 2497 / 3528
🔵 Statements 69.93% 2633 / 3765
🔵 Functions 64.18% 500 / 779
🔵 Branches 63.61% 1222 / 1921
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/controllers/CheckAnswersController.js 82.19% 77.5% 70% 84.5% 17-19, 23-29, 137-141, 168, 180-185, 191-192, 210-214
Generated in workflow #1539 for commit ba2f93a by the Vitest Coverage Report Action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/controllers/CheckAnswersController.js (1)

113-113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a unit assertion for the new dashboard URL.

test/unit/checkAnswersController.test.js:113-142 already checks the generated Jira description, so it would be worth extending that spec to assert this new line as well and keep the new behaviour covered.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/controllers/CheckAnswersController.js` at line 113, The Jira description
now includes a new LPA Dashboard URL line, but the unit test coverage does not
assert it. Extend the existing checkAnswersController spec for the
description-building logic in CheckAnswersController to verify the new dashboard
URL appears in the generated Jira description alongside the existing assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/controllers/CheckAnswersController.js`:
- Line 113: The Jira description now includes a new LPA Dashboard URL line, but
the unit test coverage does not assert it. Extend the existing
checkAnswersController spec for the description-building logic in
CheckAnswersController to verify the new dashboard URL appears in the generated
Jira description alongside the existing assertions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5154da2e-9697-44b6-a849-1f542a928fb5

📥 Commits

Reviewing files that changed from the base of the PR and between bebc0dc and f9574f2.

📒 Files selected for processing (1)
  • src/controllers/CheckAnswersController.js

Added expectation for LPA Dashboard URL in the test case.
gibahjoe
gibahjoe previously approved these changes Jun 29, 2026

@gibahjoe gibahjoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a minor change.

- Email: ${data.email}\n
- Organisation ID: ${data.organisationId}\n
- Organisation Name: ${data.organisationName}\n
- LPA Dashboard: https://provide.planning.data.gov.uk/organisations/${data.organisationId}\n

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should use the config like below so it is environment aware

? `${config.url}check/results/${requestId}/1`

@gibahjoe gibahjoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. If @pooleycodes is done with his test.

@pooleycodes pooleycodes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yep test in local works fine

@Ben-Hodgkiss
Ben-Hodgkiss merged commit 9ca58c6 into main Jun 29, 2026
5 checks passed
@Ben-Hodgkiss
Ben-Hodgkiss deleted the add-LPA-Dash-link-to-JIRA branch June 29, 2026 09:35
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.

3 participants