Skip to content

ESoCC: Save channel included categories and expose channel version history #5169

@AlexVelezLl

Description

@AlexVelezLl

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

The frontend will require a couple of final pieces of information from the backend to render the send submission side panel: the categories and licenses included in a given channel version (to be displayed as summary in the submission side panel) and the channel's version history, allowing users to view the release notes of the channel they are submitting for review. We will address both simultaneously.

Technical requirements

  1. To ensure we have the included categories and the included licenses of the last published channel version, we will store these categories in the channel's published_data JSON field during the channel publish workflow.
    • The published_data channel field is a key-value JSON field that stores snapshot information of each channel version in the following format, where the key is the channel version number, and the value is the related information. For example:
           {
             "1": { "resource_count": 10, "kind_count": ... },
             "2": { "resource_count": 10, "kind_count": ... }
           }
    • For this purpose, within the fill_published_fields function we will now compute the list of included categories and the list of included licenses by extracting the categories and license_ids of the published nodes. These lists will then added to the published_data JSON, similar to how the included_languages list is handled.
    • Note that this will make the categories and license fields available just for channels that have been published after these new changes are deployed. However, we can accept this trade-of.
  2. Add new tests in the ChannelExportPublishedData TestCase to verify that the included_categories and included_licenses fields are correctly set in the published_data field.
  3. To make this published_data field accessible via the studio API, we will add a new get_published_data action to the Channel Viewset. This will expose a GET /.../{pk}/published_data endpoint that will return the published_data field of a given channel.
  4. Add a new test case to the test_channel file to assert that the get_published_data action returns the correct data for a given channel if it exists.

Acceptance criteria

  • included_categories and included_licenses are present in the published_data field after a channel publish action.
  • There is a new get_published_data action in the channel viewset that return the channel's published data.
  • Described unit tests have been added.

Metadata

Metadata

Assignees

Labels

P0 - criticalPriority: Release blocker or regression

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions