Skip to content

Commit

Permalink
feat: show creators from non archived features (#7309)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jun 6, 2024
1 parent eb39a21 commit 8279da9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class ProjectFlagCreatorsReadModel
.distinct('users.id')
.join('features', 'users.id', '=', 'features.created_by_user_id')
.where('features.project', project)
.where('features.archived_at', null)
.select([
'users.id',
'users.name',
Expand Down
6 changes: 2 additions & 4 deletions src/lib/features/project/project-flag-creators.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,12 @@ test('should return flag creators', async () => {
})
.expect(200);
await app.createFeature('flag-name-2');
await app.archiveFeature('flag-name-2');

const { body } = await app.request
.get('/api/admin/projects/default/flag-creators')
.expect('Content-Type', /json/)
.expect(200);

expect(body).toEqual([
{ id: 1, name: '[email protected]' },
{ id: 2, name: '[email protected]' },
]);
expect(body).toEqual([{ id: 1, name: '[email protected]' }]);
});

0 comments on commit 8279da9

Please sign in to comment.