-
Notifications
You must be signed in to change notification settings - Fork 299
Closed
Copy link
Labels
P0 - criticalPriority: Release blocker or regressionPriority: Release blocker or regression
Description
❌ 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
- 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_dataJSON field during the channel publish workflow.- The
published_datachannel 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_dataJSON, 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.
- The
- Add new tests in the ChannelExportPublishedData TestCase to verify that the
included_categoriesandincluded_licensesfields are correctly set in thepublished_datafield. - To make this
published_datafield accessible via the studio API, we will add a newget_published_dataaction to the Channel Viewset. This will expose aGET /.../{pk}/published_dataendpoint that will return thepublished_datafield of a given channel. - Add a new test case to the test_channel file to assert that the
get_published_dataaction returns the correct data for a given channel if it exists.
Acceptance criteria
-
included_categoriesandincluded_licensesare present in thepublished_datafield after a channel publish action. - There is a new
get_published_dataaction in the channel viewset that return the channel's published data. - Described unit tests have been added.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0 - criticalPriority: Release blocker or regressionPriority: Release blocker or regression
