1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

feat: show creators from non archived features (#7309)

This commit is contained in:
Mateusz Kwasniewski 2024-06-06 14:50:38 +02:00 committed by GitHub
parent eb39a212ce
commit 8279da9f9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -17,6 +17,7 @@ export class ProjectFlagCreatorsReadModel
.distinct('users.id') .distinct('users.id')
.join('features', 'users.id', '=', 'features.created_by_user_id') .join('features', 'users.id', '=', 'features.created_by_user_id')
.where('features.project', project) .where('features.project', project)
.where('features.archived_at', null)
.select([ .select([
'users.id', 'users.id',
'users.name', 'users.name',

View File

@ -48,14 +48,12 @@ test('should return flag creators', async () => {
}) })
.expect(200); .expect(200);
await app.createFeature('flag-name-2'); await app.createFeature('flag-name-2');
await app.archiveFeature('flag-name-2');
const { body } = await app.request const { body } = await app.request
.get('/api/admin/projects/default/flag-creators') .get('/api/admin/projects/default/flag-creators')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect(200); .expect(200);
expect(body).toEqual([ expect(body).toEqual([{ id: 1, name: 'user1@getunleash.io' }]);
{ id: 1, name: 'user1@getunleash.io' },
{ id: 2, name: 'user2@getunleash.io' },
]);
}); });