Skip to content

Commit 8a64394

Browse files
author
Boris Sekachev
authored
Fixed UI fails when inactive user is assigneed to a task/job (#3343)
* Fixed UI fails when inactive user is assigneed to a task/job * Updated changelog * Fixed tests
1 parent 0d56e29 commit 8a64394

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3939
- TypeError: Cannot read property 'clientX' of undefined when draw cuboids with hotkeys (<https://github.com/openvinotoolkit/cvat/pull/3308>)
4040
- Duplication of the cuboids when redraw them (<https://github.com/openvinotoolkit/cvat/pull/3308>)
4141
- Some code issues in Deep Extreme Cut handler code (<https://github.com/openvinotoolkit/cvat/pull/3325>)
42+
- UI fails when inactive user is assigneed to a task/job (<https://github.com/openvinotoolkit/cvat/pull/3343>)
4243

4344
### Security
4445

cvat-core/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-core",
3-
"version": "3.13.2",
3+
"version": "3.13.3",
44
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
55
"main": "babel.config.js",
66
"scripts": {

cvat-core/src/api-implementation.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,7 @@
126126
users = await serverProxy.users.self();
127127
users = [users];
128128
} else {
129-
// get list of active users as default
130-
const searchParams = {
131-
is_active: true,
132-
};
129+
const searchParams = {};
133130
for (const key in filter) {
134131
if (filter[key] && key !== 'self') {
135132
searchParams[key] = filter[key];

cvat-ui/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-ui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cvat-ui",
3-
"version": "1.20.4",
3+
"version": "1.20.5",
44
"description": "CVAT single-page application",
55
"main": "src/index.tsx",
66
"scripts": {

cvat-ui/src/components/task-page/user-selector.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2020 Intel Corporation
1+
// Copyright (C) 2020-2021 Intel Corporation
22
//
33
// SPDX-License-Identifier: MIT
44

@@ -29,6 +29,7 @@ const searchUsers = debounce(
2929
.get({
3030
search: searchValue,
3131
limit: 10,
32+
is_active: true,
3233
})
3334
.then((result: User[]) => {
3435
if (result) {
@@ -50,7 +51,7 @@ export default function UserSelector(props: Props): JSX.Element {
5051
const autocompleteRef = useRef<RefSelectProps | null>(null);
5152

5253
useEffect(() => {
53-
core.users.get({ limit: 10 }).then((result: User[]) => {
54+
core.users.get({ limit: 10, is_active: true }).then((result: User[]) => {
5455
if (result) {
5556
setInitialUsers(result);
5657
}

tests/cypress/support/commands_review_pipeline.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ Cypress.Commands.add('resolveReopenIssue', (issueLabel, resolveText, reopen) =>
144144
cy.get('.cvat-issue-dialog-input').type(resolveText);
145145
cy.get('.cvat-issue-dialog-footer').within(() => {
146146
cy.contains('button', 'Comment').click();
147-
reopen
148-
? cy.contains('button', 'Reopen').click()
149-
: cy.contains('button', 'Resolve').click();
147+
reopen ? cy.contains('button', 'Reopen').click() : cy.contains('button', 'Resolve').click();
150148
});
151149
if (reopen) cy.get('.cvat-issue-dialog-header').find('[aria-label="close"]').click();
152150
cy.wait('@postComment').its('response.statusCode').should('equal', 201);
@@ -157,7 +155,7 @@ Cypress.Commands.add('submitReview', (decision, user) => {
157155
cy.get('.cvat-submit-review-dialog').within(() => {
158156
cy.contains(new RegExp(`^${decision}$`, 'g')).click();
159157
if (decision === 'Review next') {
160-
cy.intercept('GET', `/api/v1/users?is_active=true&search=${user}&limit=10`).as('searchUsers');
158+
cy.intercept('GET', `/api/v1/users?search=${user}&limit=10&is_active=true`).as('searchUsers');
161159
cy.get('.cvat-user-search-field').within(() => {
162160
cy.get('input[type="search"]').clear().type(`${user}`);
163161
cy.wait('@searchUsers').its('response.statusCode').should('equal', 200);

0 commit comments

Comments
 (0)