Ticket #204 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Custom package input form

Reported by: dread Owned by: dread
Priority: blocker Milestone: v0.11
Component: ckan Keywords:
Cc: Repository:

Description (last modified by dread) (diff)

As a


I want to

input government data in a constrained way

so that

you get consistency in the db which is easily searched, discovered and automatically linked.


Form has fields suitable for government data. (related to custom excel importer ticket)

In pylons config specify the form schema to use - whether the existing one or the government one.

On submission, during validation, warn if a field isn't completed (unless it's optional - agency, maintainer, maintainer_email)

Simple fields

  • all basic ckan fields
  • default license to OKD::Crown Copyright
  • co_id, precision, taxonomy url, agency

Date fields

Date format: machine readable. Can be specific or vague: year or month/year or day/month/year.

  • date_released
  • date_updated
  • temporal_coverage_from, temporal_coverage_to - two date fields combined

Strict selection

Drop down combo

  • department

Selection or free text

Editable combo

  • update_frequency - selections: never, weekly, monthly, annually, discontinued
  • geographic_granularity - selections: national, regional, local authority, ward, point
  • temporal_granularity - selections: yes, months, weeks, days, hours, point

Specialised fields

  • geographic_coverage - UI is tick boxes. store a comma separated list of all that apply from: england, scotland, wales, northern ireland, overseas, global

(Idea for future version: Select the most relevant one from a choice of OS hierarchical geographic IDs in the UK. Stored in the database as the RDF URI. Question - what to do beyond the UK?)

  • national_statisic - UI is check box, store as 'Yes' or 'No'
  • resources - use standard table, but suggestions for file type are: RDF, CSV, SPARQL, REST, XBRL, SDMX, Other XML, HTML+RDFa, XLS, DOC. Have warning label saying it is not ideal to have PDF, zip or html targets.
  • categories - multi values from strict selection of ONS categories. Stored as comma-separated.

Field data processed

  • tags - in addition to words entered here, search for known keywords in other fields: title, notes, department, agency, geographic coverage & categories.

Future - optional

Each form schemas is made available (or not) in the pylons config, along with the default schema for new packages. If there is more than just the 'basic' schema available then the 'new package' form has at the top a drop-down to select the schema with a 'switch' button. This submits the form's current data and parameter schema=xyz and the form arrives back populated with the existing options. No data should be lost switching views.

When you edit a package it detects the schema based on the extra fields that are present.

Change History

comment:1 Changed 4 years ago by dread

  • Description modified (diff)

comment:2 Changed 4 years ago by dread

  • Description modified (diff)

comment:3 Changed 4 years ago by dread

  • Owner changed from rgrp to dread

comment:4 Changed 4 years ago by dread

First, do simple fields, department and a date field. See how it goes.

comment:5 Changed 4 years ago by dread

  • Status changed from new to closed
  • Resolution set to fixed

Basically done in changesets particularly: cset:06b1232321d7 cset:adc4ad5c5b3f cset:2b4c0f723307 cset:39dc4b106dd2

comment:6 Changed 4 years ago by rgrp

  • Milestone set to v0.11

comment:7 Changed 4 years ago by anonymous

Note: See TracTickets for help on using tickets.