Skip to content

feat(#438): register PCOL Daily Cause List flat-file list type - #863

Merged
junaidiqbalmoj merged 8 commits into
masterfrom
feat/438-pcol-daily-cause-list
Jul 30, 2026
Merged

feat(#438): register PCOL Daily Cause List flat-file list type#863
junaidiqbalmoj merged 8 commits into
masterfrom
feat/438-pcol-daily-cause-list

Conversation

@junaidiqbalmoj

@junaidiqbalmoj junaidiqbalmoj commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Registers PCOL_DAILY_CAUSE_LIST (Possession Claim Online Daily Cause List) as a flat-file, strategic manual-upload cause list. It is uploaded verbatim (PDF/manual document) through the admin manual-upload journey and served via the existing generic flat-file path — there is no JSON schema, no Excel conversion, no bespoke renderer, and no bespoke PDF generator.

Closes #438.

Field Value
Enum name PCOL_DAILY_CAUSE_LIST
English friendly name Possession Claim Online Daily Cause List
Welsh friendly name Rhestr Achosion Dyddiol Hawliadau Meddiant Ar-lein
Shortened name (manual upload form) PCOL Daily Cause List
Jurisdiction Civil Court (subJurisdictionId: 1)
Non-strategic false
Default sensitivity Public
Provenance CFT_IDAM
url path none (flat-file, generic route)

Changes

  • libs/list-types/common/src/list-type-data.ts — new catalogue entry
  • libs/list-types/common/src/list-type-data.test.ts — unit tests for the entry (fields, sub-jurisdiction, shortened name, absence of urlPath)
  • apps/postgres/prisma/scripts/001_insert_missing_list_types.sql — prod seed row (TS seeding is skipped in prod)
  • apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql — Civil Court link
  • docs/tickets/438/* — planning/review docs

Note for reviewers

  • defaultSensitivity is stored as "Public" — the source listLookup.json has an empty string, which defaults to public; no catalogue entry uses null/"".
  • provenance: "CFT_IDAM" matches every existing Civil sibling list type. The ticket says "no restricted provenances"; allowedProvenance only affects access for Classified sensitivity, so with Public it is not access-significant.
  • Merge-conflict heads-up: feat(#859): register four High Court manual-upload flat-file cause lists #862 also creates libs/list-types/common/src/list-type-data.test.ts. Whichever PR merges second will conflict on that file — the fix is to keep both describe blocks. This branch's tests live in a single self-contained describe("listTypeData PCOL Daily Cause List", ...) block for easy reconciliation.

Testing

  • Unit tests added (list-type-data.test.ts, 8 tests passing)
  • yarn workspace @hmcts/list-types-common test — 256 tests passing
  • Manual QA (dropdown selection, PDF upload/view) deferred — requires a running DB + web app

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added PCOL Daily Cause List as a public flat-file list type with English and Welsh names, Civil Court linkage, and manual upload labelling.
    • Added the PCOL Daily Cause List reference-data entry to the list-type catalogue.
  • Bug Fixes
    • Updated notification template selection when no PDF or Excel files are available.
  • Documentation
    • Added planning, tasks, ticket, and review notes for the new list type.

Registers PCOL_DAILY_CAUSE_LIST as a flat-file (strategic) manual-upload
cause list in the list-type catalogue. Flat-file list: no JSON schema,
no Excel conversion, no bespoke renderer/PDF generator.

- libs/list-types/common/src/list-type-data.ts: new catalogue entry
  (CFT_IDAM, isNonStrategic: false, Public, Civil Court, no urlPath)
- apps/postgres/prisma/scripts/001_insert_missing_list_types.sql: prod seed row
- apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql:
  Civil Court sub-jurisdiction link
- libs/list-types/common/src/list-type-data.test.ts: unit tests for the entry
- docs/tickets/438/*: planning docs

Closes #438.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d5a379ca-2b20-41f5-9c4e-bf6cfe97c074

📥 Commits

Reviewing files that changed from the base of the PR and between 9d3575d and 4c2940d.

📒 Files selected for processing (1)
  • libs/list-types/common/src/list-type-data.ts
💤 Files with no reviewable changes (1)
  • libs/list-types/common/src/list-type-data.ts

📝 Walkthrough

Walkthrough

Changes

PCOL list type registration

Layer / File(s) Summary
List type catalogue and validation
libs/list-types/common/src/list-type-data.ts, libs/list-types/common/src/list-type-data.test.ts
Adds PCOL_DAILY_CAUSE_LIST with Civil linkage, strategic status, Public sensitivity, display names, shortened name, and no urlPath, with matching field assertions.
Ticket planning and review records
docs/tickets/438/*
Adds the ticket record, implementation plan, task checklist, and review record for the flat-file list type and its acceptance criteria.

Notification template selection

Layer / File(s) Summary
No-links template handling
libs/notifications/src/govnotify/template-config.ts, libs/notifications/src/govnotify/template-config.test.ts
Selects the no-links GovNotify template when files are unavailable or neither PDF nor Excel files exist, with updated tests.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The notifications template-config change appears unrelated to the PCOL list-type registration objectives. Remove or justify the notifications template-config changes, or split them into a separate PR if they are needed independently.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: registering the PCOL Daily Cause List flat-file list type.
Linked Issues check ✅ Passed The core changes add the PCOL Daily Cause List entry with Civil linkage, Public sensitivity, strategic status, and flat-file support as required.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/438-pcol-daily-cause-list

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.

@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.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a9c262c7-2913-4773-8b6d-e0800c661d7e

📥 Commits

Reviewing files that changed from the base of the PR and between ca5c5ad and 706b489.

📒 Files selected for processing (8)
  • apps/postgres/prisma/scripts/001_insert_missing_list_types.sql
  • apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql
  • docs/tickets/438/plan.md
  • docs/tickets/438/review.md
  • docs/tickets/438/tasks.md
  • docs/tickets/438/ticket.md
  • libs/list-types/common/src/list-type-data.test.ts
  • libs/list-types/common/src/list-type-data.ts

Comment thread docs/tickets/438/plan.md
Comment on lines +157 to +170
1. **`allowedProvenance` value.** The ticket says "Restricted provenances: None", but the
data model requires a value and every sibling Civil list uses `CFT_IDAM`. Options:
`CFT_IDAM` (consistent with Civil siblings) vs `MANUAL_UPLOAD` (the provenance actually used
by manual uploads — see `libs/api/src/blob-ingestion/validation.ts`). The plan assumes
`CFT_IDAM` for consistency. **Please confirm the intended `allowedProvenance`.**
2. **Welsh translation sign-off.** "Rhestr Achosion Dyddiol Hawliadau Meddiant Ar-lein" comes
from the ticket/pip-frontend. Confirm it is the approved Welsh string (no
`[WELSH TRANSLATION REQUIRED]` placeholder needed).
3. **E2E coverage expectation.** Is a dedicated E2E test required for this list type, or is the
existing manual-upload E2E coverage sufficient? Adding PCOL to
`e2e-tests/utils/seed-list-types.ts` is only needed if a PCOL-specific journey is written.
4. **Prod rollout mechanism.** Confirm the `apps/postgres/prisma/scripts/00x_*.sql` scripts are
the correct/only path for prod (seeding is skipped when `ENVIRONMENT === "prod"`), and that
they are executed as part of the release for this change.

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Update the resolved open questions.

The plan still presents allowedProvenance and PCOL-specific E2E coverage as open questions, while docs/tickets/438/tasks.md records them as resolved or skipped. Update this section to reflect the final decisions and leave only genuinely pending rollout work.

🧰 Tools
🪛 LanguageTool

[formatting] ~157-~157: Insert a comma before quoting reported speech: “says, "”…
Context: ...allowedProvenance value.** The ticket says "Restricted provenances: None", but the ...

(SAID_COMMA_SPEECH)

Comment on lines +94 to +101
- [x] **The PCOL Daily Cause List is created and linked to the Civil jurisdiction; in the manual upload form the list name is displayed as "PCOL Daily Cause List".**
Data created in `list-type-data.ts:84-93` with `subJurisdictionIds: [1]` (Civil Court) and
`shortenedFriendlyName: "PCOL Daily Cause List"`; prod rows in
`001_insert_missing_list_types.sql:14` and Civil link in
`003_upsert_sub_jurisdictions_and_list_type_links.sql:75-76`. The manual-upload dropdown
uses `shortenedFriendlyName || friendlyName || name` (pre-existing, proven for sibling
Civil lists). Runtime UI confirmation is an outstanding manual QA step
(`tasks.md:9`) but the code change fully satisfies the criterion.

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Align approval with the outstanding manual checks.

The review record marks acceptance and approval complete even though the required manual checks remain unchecked.

  • docs/tickets/438/review.md#L94-L101: leave the runtime-dependent acceptance criterion pending until the manual upload and publication checks are verified.
  • docs/tickets/438/review.md#L127-L134: do not mark the review APPROVED until those checks pass or an explicit waiver is recorded.
  • docs/tickets/438/tasks.md#L9-L10: retain these tasks as release-blocking verification items.
🧰 Tools
🪛 LanguageTool

[grammar] ~94-~94: Did you mean “because”?
Context: ...ia Verification - [x] **The PCOL Daily Cause List is created and linked to the Civil...

(CAUSE_BECAUSE)

📍 Affects 2 files
  • docs/tickets/438/review.md#L94-L101 (this comment)
  • docs/tickets/438/review.md#L127-L134
  • docs/tickets/438/tasks.md#L9-L10

@@ -0,0 +1,58 @@
# #438: Style Guide: PCOL Daily List

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename the ticket title to reflect the delivered scope.

The title says “Style Guide”, but the ticket explicitly states that no style guide is required. Rename it to “PCOL Daily Cause List” or similar to avoid misleading future readers.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

🎭 Playwright E2E Test Results

82 tests   52 ✅  6m 42s ⏱️
31 suites  30 💤
 1 files     0 ❌

Results for commit 4c2940d.

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment Successful 🚀

Your preview environment is ready:

The environment will be automatically cleaned up when this PR is closed.

junaidiqbalmoj and others added 2 commits July 23, 2026 11:40
Register MENTAL_HEALTH_TRIBUNAL_HEARING_LIST as a flat-file, strategic,
manually-uploaded list type linked to the Mental Health Tribunal
sub-jurisdiction (Tribunal jurisdiction), with Public default sensitivity.

- Add catalogue entry to list-type-data.ts (CFT_IDAM, isNonStrategic: false,
  defaultSensitivity: Public, subJurisdictionIds: [20]) plus unit test
- Add prod seed row (001) and sub-jurisdiction link by stable name (003)

Flat-file list type: no JSON schema, validator, converter, PDF generator,
or list page. Manual upload form auto-populates from findStrategicListTypes().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…o PI_AAD

Change default/allowed provenance from CFT_IDAM to PI_AAD in the list type
reference data and the insert-missing-list-types SQL script.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment Successful 🚀

Your preview environment is ready:

The environment will be automatically cleaned up when this PR is closed.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment Successful 🚀

Your preview environment is ready:

The environment will be automatically cleaned up when this PR is closed.

Flat-file lists with no generated PDF/Excel (e.g. PCOL_DAILY_CAUSE_LIST)
fell through to the NON_SJP_PDF template, which requires pdf_link_text /
pdf_link_to_file personalisation that is only set when a PDF buffer exists.
GOV.UK Notify then rejected the send with 'Missing personalisation'.

Route the no-attachment case to the no-links template.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment Successful 🚀

Your preview environment is ready:

The environment will be automatically cleaned up when this PR is closed.

junaidiqbalmoj and others added 2 commits July 24, 2026 17:10
…-cause-list

# Conflicts:
#	apps/postgres/prisma/scripts/001_insert_missing_list_types.sql
#	apps/postgres/prisma/scripts/003_upsert_sub_jurisdictions_and_list_type_links.sql
#	libs/list-types/common/src/list-type-data.ts
Not part of the PCOL daily cause list ticket.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
libs/list-types/common/src/list-type-data.ts (1)

94-115: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Register the intended PCOL and Mental Health Tribunal list types.

These lines add ET_DAILY_LIST and ET_FORTNIGHTLY_PRESS_LIST, but this PR is intended to register PCOL_DAILY_CAUSE_LIST and the Mental Health Tribunal list type. Because seedListTypes() persists every entry in listTypeData, the current change will register unrelated lists and leave PCOL unavailable to the catalogue and manual-upload journey. Replace these objects with the required metadata and verify their jurisdiction and display names.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3290d8d5-a205-4d29-bae3-4d6235f735e6

📥 Commits

Reviewing files that changed from the base of the PR and between bd38452 and 9d3575d.

📒 Files selected for processing (3)
  • libs/list-types/common/src/list-type-data.ts
  • libs/notifications/src/govnotify/template-config.test.ts
  • libs/notifications/src/govnotify/template-config.ts

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment Successful 🚀

Your preview environment is ready:

The environment will be automatically cleaned up when this PR is closed.

@junaidiqbalmoj
junaidiqbalmoj merged commit 5421d74 into master Jul 30, 2026
46 of 47 checks passed
hmctsclaudecode Bot pushed a commit that referenced this pull request Jul 31, 2026
REQ-0110 (#438): approved -> verified, impl_commit_sha and impl_paths
populated from merged closing PR #863.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style Guide: PCOL Daily List

1 participant