Skip to content

Emit comprehensive events for tagging/taxonomy changes #557

@bradenmacdonald

Description

@bradenmacdonald

Some tagging-related events were introduced in #530 , but I think we need to make the events more comprehensive. Here is a proposed spec.

Proposed specification:

  1. When a taxonomy is created, a TAXONOMY_CHANGED event is emitted.

  2. When a taxonomy is created via import, a TAXONOMY_CHANGED event is emitted. The
    event specifies that its tags have changed, but doesn't need to include the full
    list of tags.

  3. When a taxonomy is renamed, a TAXONOMY_CHANGED event is emitted,
    and CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted (asynchronously) for
    every object tagged using that taxonomy's tags.

  4. When a taxonomy's export_id is changed, the cached ObjectTag._export_id value is
    updated for all associated ObjectTags, a TAXONOMY_CHANGED event is emitted, and
    CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted (asynchronously) for
    every object tagged using that taxonomy's tags.

  5. When a taxonomy's description is changed, a TAXONOMY_CHANGED event is emitted.

  6. When a taxonomy is deleted, a TAXONOMY_CHANGED event is emitted, specifying that
    the taxonomy has been deleted and that its tags have changed. A
    CONTENT_OBJECT_ASSOCIATIONS_CHANGED event is emitted (asynchronously) for every
    object that had been tagged using that taxonomy.

  7. When a taxonomy is enabled/disabled, a TAXONOMY_CHANGED event is emitted,
    specifying that the taxonomy has been enabled/disabled and that its tags have
    changed. A CONTENT_OBJECT_ASSOCIATIONS_CHANGED event is emitted
    (asynchronously) for every object that had been tagged using that taxonomy.

  8. When a tag is renamed, the cached ObjectTag.value is updated for all associated
    ObjectTags, a TAXONOMY_CHANGED event is emitted (specifying that tags have
    changed), and CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted
    (asynchronously) for every object tagged using that particular tag or any of its
    children.

  9. When a tag is re-parented (moved), the cached ObjectTag.value is updated for all
    associated ObjectTags, a TAXONOMY_CHANGED event is emitted (specifying that tags
    have changed), and CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted
    (asynchronously) for every object tagged using that particular tag or any of its
    children.

  10. When a tag is created, a TAXONOMY_CHANGED event is emitted. The
    event specifies that its tags have changed.

  11. When a tag is deleted, the associated ObjectTags are deleted, a TAXONOMY_CHANGED
    event is emitted (specifying that tags have changed), and
    CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted (asynchronously) for
    every object tagged using that particular tag.

  12. When a taxonomy is updated (via re-import) a single TAXONOMY_CHANGED event is
    emitted (specifying that tags have changed), and
    CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted (asynchronously) for
    every object tagged using tags that were moved/renamed/deleted.

  13. When copy_tags() is used to copy tags from one object to another,
    CONTENT_OBJECT_ASSOCIATIONS_CHANGED events are emitted (asynchonrously) for the
    destination object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions