Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Ajouter un nom interne pour les profils cibles (PIX-16685) #11581

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

La-toile-cosmique
Copy link
Contributor

@La-toile-cosmique La-toile-cosmique commented Mar 6, 2025

🥞 Problème

Il y a beaucoup de profils cibles et apparemment il devient complique de s'y retrouver.

🥓 Proposition

Ajouter un nom interne aux profil cibles uniquement visibles sur l'interface d'administration pour aider le tri.

🧃 Remarques

Il y a une copie de la colonne nom en nom interne dans la migration. Ainsi il est possible par la suite d'appliquer un contrainte "not null" sur le champ internalName. Cette migration est a surveiller a la mise en integration/prod.
Je ne sais pas si il existe d'autres moyens de créer des profils cibles que via l'administration ( script ? autre étrangeté ? )

Dans l'administration, le nom affiche au prescripteur apparaît seulement au détail du profil cible et n'est pas beaucoup mis en valeur.

😋 Pour tester

Cas de tests:

  • créer un profil cible.
  • modifier un profil cible.
  • afficher les profils cible lies aux organisations.
  • afficher les profiles cibles attaches aux contenus formatifs.
  • Utiliser un profil cible dans orga pour vérifier que le nom interne n'apparaisse pas.

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@La-toile-cosmique La-toile-cosmique changed the title pix-16685-add-target-profile-internal-name [FEATURE] Ajouter un nom interne pour les profils cibles (PIX-16685) Mar 6, 2025
@La-toile-cosmique La-toile-cosmique marked this pull request as ready for review March 6, 2025 09:19
@La-toile-cosmique La-toile-cosmique force-pushed the pix-16685-add-target-profile-internal-name branch from 4f0565c to 7996272 Compare March 6, 2025 09:22
@La-toile-cosmique La-toile-cosmique marked this pull request as draft March 6, 2025 09:46
@La-toile-cosmique La-toile-cosmique force-pushed the pix-16685-add-target-profile-internal-name branch from 7996272 to da37807 Compare March 6, 2025 10:37
@La-toile-cosmique La-toile-cosmique marked this pull request as ready for review March 6, 2025 12:35
@La-toile-cosmique La-toile-cosmique requested a review from a team as a code owner March 6, 2025 12:35
@La-toile-cosmique La-toile-cosmique force-pushed the pix-16685-add-target-profile-internal-name branch 2 times, most recently from 7a32994 to 6d430b2 Compare March 6, 2025 13:13
@@ -0,0 +1,38 @@
const TABLE_NAME = 'target-profiles';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: Il me semble que les captains préconisent de faire ce genre de migrations dans une PR a part, en cas de soucis ça serait plus simple de revert.
Egalement je sais pas si on veut pas split la création et la copie dans deux migrations séparée ? Peut être demander l'avis aux @1024pix/team-captains

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -506,6 +507,7 @@ const register = async function (server) {
description: Joi.string().allow(null).max(500),
'image-url': Joi.string().uri().allow(null),
name: Joi.string(),
'internal-name': Joi.string(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: rajouter un required()

Comment on lines 741 to +743
const { name } = await knex('target-profiles').select('name').where('id', targetProfile.id).first();
expect(name).to.equal(targetProfile.name);
expect(name).to.equal(targetProfile.name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { name } = await knex('target-profiles').select('name').where('id', targetProfile.id).first();
expect(name).to.equal(targetProfile.name);
expect(name).to.equal(targetProfile.name);
const { name, internalName } = await knex('target-profiles').select('name').where('id', targetProfile.id).first();
expect(name).to.equal(targetProfile.name); expect(name).to.equal(targetProfile.name);
expect(internalName).to.equal(targetProfile.internalName)

Comment on lines 23 to +24
@attr('nullable-string') name;
@attr('nullable-string') internalName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: C'est string tout court vu que c'est pas nullable 🤔

@yannbertrand yannbertrand requested review from a team and removed request for a team March 7, 2025 08:38
Copy link
Contributor

@Alexandre-Monney Alexandre-Monney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revue en mob 👍
-> Juste sortir le premier commit de la migration dans une PR séparée

@Alexandre-Monney Alexandre-Monney added Tech Review OK Func Review OK PO validated functionally the PR labels Mar 7, 2025
@La-toile-cosmique La-toile-cosmique force-pushed the pix-16685-add-target-profile-internal-name branch from 6d430b2 to 99a9123 Compare March 7, 2025 09:20
@La-toile-cosmique La-toile-cosmique marked this pull request as draft March 7, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants