Problem/Motivation

Currently, if the vote attached to entity type other than node - it doesn't not pass entity validation, as a result - not possible to work with vote entity using REST API.

Proposed resolution

Restrict vote entity to single entity type save as flag module do.

Remaining tasks

  1. Review and pass pacth from #2988057: Voting API REST POST (create with REST) doesn't work, validation error, when referenced entity other than node
  2. Add patch for https://www.drupal.org/project/votingapi_widgets to restrict vote type selection in field storage settings for entities which is not applicable for particular vote.

User interface changes

  1. Add applicable entity type selector in vote settings form (done in #2988057: Voting API REST POST (create with REST) doesn't work, validation error, when referenced entity other than node)

API changes

POST REST API on vote entity type should work now.

Data model changes

Add entity_type property to vote_type configuration entity.

Release notes snippet

Got to the each vote type and define to which this vote belong.

Comments

dstorozhuk created an issue. See original summary.

tr’s picture

Title: Restrict vote to single entity type - Mata issue » [meta] Restrict vote to single entity type
Priority: Critical » Major