Ticket #816 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Autocomplete for the resource format field

Reported by: cygri Owned by: johnglover
Priority: minor Milestone: ckan-sprint-2011-10-28
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

The field for entering the format of a resource should have autocomplete, populated from all the values that have already been entered in this field for any resource.

This would help improve data quality and consistency.

Change History

comment:1 Changed 3 years ago by dread

  • Priority set to awaiting triage
  • Repository set to ckan
  • state set to draft
  • Theme set to none
  • Milestone changed from ckan-v1.4 to ckan-v1.5

comment:2 Changed 3 years ago by thejimmyg

  • Owner set to johnglover
  • Status changed from new to assigned

John, could you have a look at this one please. We'd need an entry in the logic layer for it and then some autocomplete JavaScript? on the format field.

Can we standardise on jQueryUI going forward.

http://jqueryui.com/demos/autocomplete/

comment:3 Changed 3 years ago by thejimmyg

  • Priority changed from awaiting triage to minor
  • Type changed from requirement to enhancement
  • Milestone changed from ckan-v1.5 to ckan-current-sprint

comment:4 Changed 3 years ago by rgrp

What about idea of 'model' refactor for resource, specifically to have:

  • format: human created format string with possible nesting e.g. zip:csv
  • kind: file | api | example | service
  • mimetype: standard mimetype (e.g. for zipped csv would be application/zip)
  • mimetype-inner: mimetype of innermost object (so for example would be text/csv)

See http://lists.okfn.org/pipermail/ckan-discuss/2011-April/001139.html

comment:5 Changed 3 years ago by dread

I like rgrp's idea to change the model. But since it's complicated it would be good to have a UI.

e.g. You might make format field simply a drop-down with only some common options: 'CSV, Excel, Zip, Other'. If you go for Other, then a more substantial UI appears, to cover more filetypes, APIs, services and a text box for Other. And if you select 'Zip' then another set of options appears to say what is in the zip. etc.etc.

Another approach would be to have a background process downloading the data file and filling this in for you.

comment:6 Changed 3 years ago by johnglover

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

I have implemented the resource autocomplete so am closing this for now.

I agree that more information on the resource would be a good addition. It seems a bit of a different issue to just adding autocomplete though, with potentially far more changes to the codebase, so maybe it would be better discussed in a separate ticket/CREP. However, any new fields would presumably want to either be constrained or have an autocomplete and so can reuse the work done on this feature.

Cheers, John

comment:7 Changed 3 years ago by dread

John did this in cset:1697dfa2552c for release 1.5

comment:8 Changed 3 years ago by dread

And branch feature-816-format-autocomplete

Note: See TracTickets for help on using tickets.