doc/3.14.rst
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 28 Sep 2011 09:01:17 +0200
changeset 7878 dcdccb495e78
parent 7875 65e460690139
child 7992 4ff9f25cb06e
permissions -rw-r--r--
[doc] more doc about what's new in 3.14

Whats new in CubicWeb 3.14
==========================

API changes
-----------

* `Entity.fetch_rql` `restriction` argument has been deprecated and should be
  replaced with a call to the new `Entity.fetch_rqlst` method, get the returned
  value (a rql `Select` node) and use the RQL syntax tree API to include the
  above-mentionned restrictions.

  Backward compat is kept with proper warning.

* `Entity.fetch_order` and `Entity.fetch_unrelated_order` class methods have been
  replaced by `Entity.cw_fetch_order` and `Entity.cw_fetch_unrelated_order` with
  a different prototype:

  - instead of taking (attr, var) as two string argument, they now take (select,
    attr, var) where select is the rql syntax tree beinx constructed and var the
    variable *node*.

  - instead of returning some string to be inserted in the ORDERBY clause, it has
    to modify the syntax tree

  Backward compat is kept with proper warning, BESIDE cases below:

  - custom order method return **something else the a variable name with or
    without the sorting order** (e.g. cases where you sort on the value of a
    registered procedure as it was done in the tracker for instance). In such
    case, an error is logged telling that this sorting is ignored until API
    upgrade.

  - client code use direct access to one of those methods on an entity (no code
    known to do that)

* `Entity._rest_attr_info` class method has been renamed to
  `Entity.cw_rest_attr_info`

  No backward compat yet since this is a protected method an no code is known to
  use it outside cubicweb itself.

* `AnyEntity.linked_to` has been removed as part of a refactoring of this
  functionality (link a entity to another one at creation step). It was replaced
  by a `EntityFieldsForm.linked_to` property.

  In the same refactoring, `cubicweb.web.formfield.relvoc_linkedto`,
  `cubicweb.web.formfield.relvoc_init` and
  `cubicweb.web.formfield.relvoc_unrelated` were removed and replaced by
  RelationField methods with the same names, that take a form as a parameter.

  **No backward compatibility yet**. It's still time to cry for it.
  Cubes known to be affected: tracker, vcsfile, vcreview

* `CWPermission` entity type and its associated require_permission relation type
  (abstract) and require_group relation definitions have been moved to a new
  `localperms` cube. With this have gone some functions from the
  `cubicweb.schemas` package as well as some views. This makes cubicweb itself
  smaller while you get all the local permissions stuff into a single,
  documented, place.

  Backward compat is kept for existing instances, **though you should have
  installed the localperms cubes**. A proper error should be displayed when
  trying to migrate to 3.14 an instance the use `CWPermission` without the new
  cube installed. For new instances / test, you should add a dependancy on the
  new cube in cubes using this feature, along with a dependancy on cubicweb >=
  3.14.

* jQuery has been updated to 1.6.4. No backward compat issue known (yet...)


Unintrusive API changes
-----------------------

* refactored properties forms (eg user preferences and site wide properties) to
  ease overridding

* table view allows to set None in 'headers', meaning the label should be fetched
  from the result set as done by default

* new `anonymized_request` decorator to temporary run stuff as an anonymous
  user, whatever the currently logged in user

* new 'verbatimattr' attribute view


User interface changes
----------------------

* breadcrumb is properly kept when creating an entity with __linkto

* users and groups management now really lead to that (i.e. includes *groups*
  management)

* new 'jsonp' controller with 'jsonexport' and 'ejsonexport' views


Configuration
------------

* add option 'resources-concat' to make javascript/css files concatenation
  optional