Skip to content

119 improvements to initial form#133

Merged
pooleycodes merged 5 commits intomainfrom
119-improvements-to-initial-form
Mar 19, 2026
Merged

119 improvements to initial form#133
pooleycodes merged 5 commits intomainfrom
119-improvements-to-initial-form

Conversation

@pooleycodes
Copy link
Copy Markdown
Contributor

@pooleycodes pooleycodes commented Mar 18, 2026

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

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

Description

List of form improvements that have been requested after initial use, can be seen in ticket, key tech changes:

Process locking (ServiceLock)

  • New ServiceLock SQLAlchemy model (migration included) stores a lock record keyed by process name, with the locking user's GitHub username and timestamp

Check results — override button

  • Users in config/allowed-users.md can override blocking check failures ("columns not found") and proceed to add data anyway

GitHub branch selection — shared macro

  • Extracted into datamanager/components/github-branch.html as a reusable Jinja macro consumed by both dashboard_add.html and add-data.html

Add data form improvements

  • Start date no longer defaults to today on either form page; it is optional on the first page and required on the second
  • Geom type (Point/Polygon) radio group added to the first page, visible only when the tree dataset is selected; defaults to Point
  • When geom_type is polygon, {"WKT": "geometry"} is automatically added to the column_mapping in the check_url params and flows through to add_data
  • CSV file upload button added alongside "Import from CSV"; selecting a file auto-submits the multipart form to the existing import handler

Dataset list source

  • dataset.py now derives the dataset list from PROVISION_CSV_URL (the specification provision CSV) rather than the planning API, ensuring only provisioned datasets appear in the autocomplete
  • Display name and collection ID are still completed from the planning API for any matched dataset.

Related Tickets & Documents

QA Instructions, Screenshots, Recordings

Please replace this line with instructions on how to test your changes, a note
on the devices and browsers this has been tested on, as well as any relevant
images for UI changes.

Try upload a csv file, with tree dataset, and override if missing columns

Added/updated tests?

We encourage you to keep the code coverage percentage at 80% and above. Please refer to the Digital Land Testing Guidance for more information.

  • Yes - Increase form and organisation tests.
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

@pooleycodes pooleycodes linked an issue Mar 18, 2026 that may be closed by this pull request
8 tasks
@pooleycodes pooleycodes marked this pull request as ready for review March 18, 2026 16:44
@pooleycodes pooleycodes merged commit bfe38c6 into main Mar 19, 2026
2 checks passed
@pooleycodes pooleycodes deleted the 119-improvements-to-initial-form branch March 19, 2026 09: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.

Improvements to initial form

2 participants