-
Notifications
You must be signed in to change notification settings - Fork 57
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] Supprimer les learners précédent l'ajout de l'import à format (Pix-15428) #10661
base: dev
Are you sure you want to change the base?
Conversation
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
44f213d
to
6793907
Compare
api/src/organizational-entities/domain/usecases/add-organization-feature-in-batch.js
Outdated
Show resolved
Hide resolved
api/src/organizational-entities/application/organization/organization.admin.controller.js
Show resolved
Hide resolved
...ption/learner-management/domain/usecases/find-organization-learners-before-import-feature.js
Outdated
Show resolved
Hide resolved
...ner-management/unit/domain/usecases/find-organization-learners-before-import-feature_test.js
Outdated
Show resolved
Hide resolved
api/src/prescription/learner-management/application/api/learners-api.js
Outdated
Show resolved
Hide resolved
api/src/prescription/learner-management/application/api/learners-api.js
Outdated
Show resolved
Hide resolved
api/src/prescription/learner-management/application/api/learners-api.js
Outdated
Show resolved
Hide resolved
api/tests/prescription/learner-management/unit/application/api/learners-api_test.js
Outdated
Show resolved
Hide resolved
bef2ae8
to
b0027f9
Compare
...escription/learner-management/infrastructure/repositories/organization-learner-repository.js
Outdated
Show resolved
Hide resolved
b0027f9
to
c6b770e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tech review ok ✅ 🐕
func review ok ✅ 🐕 🦖 🦦 |
2f55202
to
41fe95b
Compare
41fe95b
to
614d0ea
Compare
api/src/organizational-entities/infrastructure/repositories/organization-feature-repository.js
Show resolved
Hide resolved
*/ | ||
const findOrganizationLearnerIdsBeforeImportFeatureFromOrganizationId = async function ({ organizationId }) { | ||
const knexConn = DomainTransaction.getConnection(); | ||
return knexConn('view-active-organization-learners').where({ organizationId }).whereNull('attributes').pluck('id'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question Est ce que ne devrait pas renvoyer des objets du model OrganizationLearner ?
api/src/organizational-entities/domain/usecases/add-organization-feature-in-batch.js
Outdated
Show resolved
Hide resolved
@@ -1,8 +1,15 @@ | |||
class OrganizationFeature { | |||
constructor({ featureId, organizationId, params }) { | |||
#deleteLearner; | |||
constructor({ featureId, organizationId, params, deleteLearner }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question est ce que ne veux pas que le comportement par défaut soit de supprimer les ancien learner ?
api/src/organizational-entities/infrastructure/repositories/organization-feature-repository.js
Show resolved
Hide resolved
614d0ea
to
0abee17
Compare
0abee17
to
56491ab
Compare
🍂 Problème
Une organisation ayant vécu une vie paisible avant l'import à format se retrouve avec des apprenants qu'il est impossible de réconcilier après l'ajout de la feature.
Lors du premier import cela a pour effet de désactiver les anciens ( jusque là tout va bien), mais il sera impossible a des utilisateurs réconcilier des utilisateurs qui ont un apprenant désactivé dans cette organisation.
🌰 Proposition
Lors de l'ajout de l'import à format, il faudrait supprimer les apprenants antérieur à l'ajout de la feature d'import. cela aura pour effet de supprimer automatiquement les apprenants ainsi que leur participation. Pour revenir dans un état d'apprenant inexistant. Afin que l'import et la réconciliation se passe dans les meilleurs conditions pour todo el mundo.
🎃 Remarques
RAS
🪵 Pour tester
Ajouter l'import à format sur une organization ayant déjà des apprenants. Vérifier que les anciens sont supprimés. voili voilou