Skip to content

Commit

Permalink
EPMRPP-93470 fix elements count (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx authored Aug 12, 2024
1 parent 87e6c8a commit 0eafd63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static com.epam.ta.reportportal.dao.util.OrganizationMapper.ORGANIZATION_USERS_LIST_FETCHER;

import com.epam.reportportal.api.model.OrganizationUserInfo;
import com.epam.ta.reportportal.commons.querygen.FilterTarget;
import com.epam.ta.reportportal.commons.querygen.QueryBuilder;
import com.epam.ta.reportportal.commons.querygen.Queryable;
import java.util.List;
Expand Down Expand Up @@ -64,6 +63,6 @@ public Page<OrganizationUserInfo> findByFilter(Queryable filter, Pageable pageab
return PageableExecutionUtils.getPage(
ORGANIZATION_USERS_LIST_FETCHER.apply(dsl.fetch(query)),
pageable,
() -> dsl.fetchCount(QueryBuilder.newBuilder(FilterTarget.ORGANIZATION_USERS).build()));
() -> dsl.fetchCount(QueryBuilder.newBuilder(filter).build()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import static com.epam.ta.reportportal.dao.util.ResultFetchers.ORGANIZATION_PROJECT_LIST_FETCHER;

import com.epam.ta.reportportal.commons.querygen.FilterTarget;
import com.epam.reportportal.api.model.ProjectProfile;
import com.epam.ta.reportportal.commons.querygen.QueryBuilder;
import com.epam.ta.reportportal.commons.querygen.Queryable;
import com.epam.reportportal.api.model.ProjectProfile;
import org.jooq.DSLContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
Expand All @@ -28,7 +27,7 @@ public Page<ProjectProfile> getProjectProfileListByFilter(Queryable filter, Page
return PageableExecutionUtils.getPage(ORGANIZATION_PROJECT_LIST_FETCHER.apply(
dsl.fetch(QueryBuilder.newBuilder(filter).with(pageable).build())),
pageable,
() -> dsl.fetchCount(QueryBuilder.newBuilder(FilterTarget.PROJECT_PROFILE).build()));
() -> dsl.fetchCount(QueryBuilder.newBuilder(filter).build()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private OrganizationMapper() {
// set launches
OrganizationRelationRelationshipsLaunches orl = new OrganizationRelationRelationshipsLaunches();
orl.meta(new OrganizationRelationRelationshipsLaunchesMeta()
//.count(row.get(OrganizationFilter.LAUNCHES_QUANTITY, Integer.class))
.count(row.get(OrganizationFilter.LAUNCHES_QUANTITY, Integer.class))
.lastOccurredAt(row.get(OrganizationFilter.LAST_RUN, Instant.class)));

// set projects
Expand Down

0 comments on commit 0eafd63

Please sign in to comment.