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

In Add users to group, only the first 10 can be viewed or selected #2130

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

RomuDeuxfois
Copy link
Member

@RomuDeuxfois RomuDeuxfois commented Dec 27, 2024

Proposed changes

  • Add pagination to user management in group
  • Add UserOutput to fit front end usage

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 3.44828% with 56 lines in your changes missing coverage. Please review.

Project coverage is 35.02%. Comparing base (43019c7) to head (25a0e63).

Files with missing lines Patch % Lines
...a/io/openbas/rest/user/helper/UserQueryHelper.java 0.00% 27 Missing ⚠️
.../rest/user/service/UserCriteriaBuilderService.java 0.00% 27 Missing ⚠️
...pi/src/main/java/io/openbas/rest/user/UserApi.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##             release/1.11.0    #2130      +/-   ##
====================================================
- Coverage             35.11%   35.02%   -0.09%     
- Complexity             1418     1419       +1     
====================================================
  Files                   535      537       +2     
  Lines                 16187    16248      +61     
  Branches               1037     1041       +4     
====================================================
+ Hits                   5684     5691       +7     
- Misses                10209    10263      +54     
  Partials                294      294              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@heditar heditar self-requested a review January 3, 2025 10:22
.admin(tuple.get("user_admin", boolean.class))
.organizationName(tuple.get("user_organization_name", String.class))
.tags(
Arrays.stream(tuple.get("user_tags", String[].class))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think you can just do Set.of(...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good shot
It's fixed

public static List<UserOutput> execution(TypedQuery<Tuple> query) {
return query.getResultList().stream()
.map(
tuple ->
Copy link
Contributor

Choose a reason for hiding this comment

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

As we discussed I think we should avoid that (DB to DTO) but it's not blocking as we need to discuss it as a team

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I code it before our discussion...
We need to talk about it, I will add it to our internal notion

@RomuDeuxfois RomuDeuxfois merged commit 552196f into release/1.11.0 Jan 3, 2025
4 checks passed
@RomuDeuxfois RomuDeuxfois deleted the issue/2077 branch January 3, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants