Repository navigation
Description
Some tagging-related events were introduced in #530 and #571 , but I think we need to make the events more comprehensive. Here is a proposed spec.
Proposed specification:
-
When a taxonomy is created, a
TAXONOMY_CHANGEDevent is emitted. -
When a taxonomy is created via import, a
TAXONOMY_CHANGEDevent is emitted. The
event specifies that its tags have changed, but doesn't need to include the full
list of tags. -
When a taxonomy is renamed, a
TAXONOMY_CHANGEDevent is emitted,
andCONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted (asynchronously) for
every object tagged using that taxonomy's tags. -
When a taxonomy's export_id is changed, the cached ObjectTag._export_id value is
updated for all associated ObjectTags, aTAXONOMY_CHANGEDevent is emitted, and
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted (asynchronously) for
every object tagged using that taxonomy's tags. -
When a taxonomy's description is changed, a
TAXONOMY_CHANGEDevent is emitted. -
When a taxonomy is deleted, a
TAXONOMY_CHANGEDevent is emitted, specifying that
the taxonomy has been deleted and that its tags have changed. A
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDevent is emitted (asynchronously) for every
object that had been tagged using that taxonomy. -
When a taxonomy is enabled/disabled, a
TAXONOMY_CHANGEDevent is emitted,
specifying that the taxonomy has been enabled/disabled and that its tags have
changed. ACONTENT_OBJECT_ASSOCIATIONS_CHANGEDevent is emitted
(asynchronously) for every object that had been tagged using that taxonomy. -
When a tag is renamed, the cached ObjectTag.value is updated for all associated
ObjectTags, aTAXONOMY_CHANGEDevent is emitted (specifying that tags have
changed), andCONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted
(asynchronously) for every object tagged using that particular tag or any of its
children. -
When a tag is re-parented (moved), the cached ObjectTag.value is updated for all
associated ObjectTags, aTAXONOMY_CHANGEDevent is emitted (specifying that tags
have changed), andCONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted
(asynchronously) for every object tagged using that particular tag or any of its
children. -
When a tag is created, a
TAXONOMY_CHANGEDevent is emitted. The
event specifies that its tags have changed. -
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_CHANGEDevents are emitted (asynchronously) for
every object tagged using that particular tag. PR 571 -
When a taxonomy is updated (via re-import) a single
TAXONOMY_CHANGEDevent is
emitted (specifying that tags have changed), and
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted (asynchronously) for
every object tagged using tags that were moved/renamed/deleted. -
When
copy_tags()is used to copy tags from one object to another,
CONTENT_OBJECT_ASSOCIATIONS_CHANGEDevents are emitted (asynchonrously) for the
destination object. -
When tags (
ObjectTag) are added/removed to an object (like a Component or a Container), aCONTENT_OBJECT_ASSOCIATIONS_CHANGEDevent is emitted. (This is currently implemented in the platform but should be moved into openedx-core so it works regardless of which API is used.)
Activity