Publishing a draft of a public channel replaces its kolibri_public rows with the draft
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 10/100
Línea de trabajo
Read create_content_database in contentcuration/contentcuration/utils/publish.py and the mapper in contentcuration/kolibri_public/utils/mapper.py; trace how publish_next handles draft publishes from the main and staging trees. Then inspect the backend publish tests and add coverage for a full publish followed by a draft publish. Done means draft publishing preserves the prior kolibri_public metadata and content rows, while a full publish still replaces them.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
create_content_database maps the content database it has just built into kolibri_public whenever channel.public is true (publish.py#L203-L205), and does not check is_draft_version. A draft publish reaches it through publish_next, which accepts public channels.
The mapper deletes the channel's existing kolibri_public tree and writes the draft in its place (mapper.py#L53-L71). The draft ChannelMetadata has version 0 (publish.py#L839), and with use_staging_tree its nodes come from the staging tree.
Expected behavior
A draft publish leaves the channel's kolibri_public rows as the last full publish wrote them. The publish panel says so: "without altering the current version available for Kolibri users" (communityChannelsStrings.js#L41-L44).
User-facing consequences
- Kolibri's Learn → Explore libraries shows the draft's topics and resources for the channel, to every Kolibri user, until the channel is next published in full.
/api/public/v2/channel/<channel_id>/returns"version": 0for the channel.
Steps to reproduce
- Sign in as a user with the
draft_channelsfeature flag who can edit a public, published channel. - Rename a resource in the channel.
- Choose Publish, select Publish draft channel, then Save draft.
- When the draft publish finishes, request
/api/public/v2/channel/<channel_id>/and/api/public/v2/contentnode/?channel_id=<channel_id>.
The channel has "version": 0 and the renamed resource has its new title.
Context
Studio hotfixes at 9b766019d6; unstable has the same check at publish.py#L206.
Acceptance Criteria
- After a draft publish of a public channel, from the main tree or the staging tree, the channel's
kolibri_public.ChannelMetadata.versionand itskolibri_public.ContentNoderows are the ones the last full publish wrote. - A full publish of a public channel still replaces its
kolibri_publicrows. - A backend test publishes a public channel, edits it, publishes a draft, and asserts the
kolibri_publicrows did not change.
AI usage
Claude Code found this by reading create_content_database while reviewing the plan for #6469, and drafted this issue.
- Lenguaje dominante
- JavaScript
- Estrellas
- 214
- Forks
- 327
- Merge medio
- 17 h 5 min
- PR fusionados (30 d)
- 25
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/studio
-
Community library status changes don't update `date_updated`Posiblemente ocupada @ArpitaSamanta10 la tomó hace 13 días. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
learningequality/studio#6414 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Activation key can activate a different account whose email differs only in casePosiblemente ocupada @Madhu-priya123 la tomó hace 4 días. AbiertoDEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
learningequality/studio#6410 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
learningequality/studio#6409 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6407 ·
Los mantenedores suelen responder en 1 día
-
Stripe webhook accepts events when no webhook secret is configuredPosiblemente ocupada @adibmbrk la tomó hace 14 días. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6404 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
enhancement good first issue shields parity
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
seuthootDev/terminal-shields#125 ·
Los mantenedores suelen responder en 2 días
-
[ui] 自創球員 (投手): pick 球種 at creation (直球 fixed + up to 2 more), trade-off line, shown on the cardAbiertoarea:ui P1 status:doing
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
sunososobro-hub/cloudball#1153 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NuSkooler/enigma-bbs#1241 ·
Los mantenedores suelen responder en 1 día
-
harness seguranca target:staging
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
corosolto/client#1507 · 1 comentario ·
Los mantenedores suelen responder en 1 día