Ticket #43 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Generic Attributes for Packages

Reported by: rgrp Owned by: rgrp
Priority: critical Milestone: v0.10
Component: ckan Keywords:
Cc: Repository:
Theme:

Description (last modified by rgrp) (diff)

As A

User

I Want To

Add arbitrary named attributes to packages (an attribute being a name, type, value triple).

Details

  • We will do this using a dedicated (versioned) table associated to Package
  • Do we allow multiple attributes of the same name?
    • For the present: No (since we will key by attribute name)
    • Could allow for single attribute but with multiple values using json list ...
  • What types do we allow or do we just rely on JSON to take care of this?

Questions (Original)

  • How complex is this to implement?
  • What would an arbitrary user be able to edit? Possibilities:
    1. 'create new attribute' and setting the value (so name and type would be chosen from predefined list).
    2. 'create', setting of name and value (but not type -- type already set in predefined list)
  • Could just use (machine) tags -- though this could be seen as a bit of a hack.
  • Would solve having to create special file/url attributes (though I think that perhaps file stuff is important enough to merit first class support in the domain model -- though, that said, since one won't want to have a file limit adding unlimited file support is very similar to unlimited attributes of arbitrary type).

Change History

comment:1 Changed 6 years ago by rgrp

  • Milestone set to v0.6

comment:2 Changed 6 years ago by rgrp

  • Priority changed from major to minor
  • Milestone v0.6 deleted

This is currently low priority and should only happen after move to vdm 0.2 (sqlalchemy etc).

comment:3 Changed 5 years ago by rgrp

  • Priority changed from minor to critical
  • Description modified (diff)
  • Milestone set to v0.9

Started work on this using "extra" table. See r426.

comment:4 Changed 5 years ago by rgrp

  • Milestone changed from v0.9 to v0.95

Making this versioned/revisioned turns out to be slightly more complex than anticipated (need a stateful associated list). So defer to 0.95

comment:5 Changed 5 years ago by rgrp

Done in model in changeset:7f9b19d4d54a: "Implement a fully *versioned* PackageExtra? domain object in the model and attach to the Package object via a simple dict-like attribute named 'extras'.".

However still need to integrate into WUI which can only happen after conversion to formalchemy (ticket:76) is complete.

comment:6 Changed 5 years ago by rgrp

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

Split out wui work in two new tickets ticket:124 (show) and ticket:125 (edit) and therefore marking this as done.

Note: See TracTickets for help on using tickets.