未验证 提交 8a64394b 编写于 作者: B Boris Sekachev 提交者: GitHub

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
上级 0d56e292
......@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TypeError: Cannot read property 'clientX' of undefined when draw cuboids with hotkeys (<https://github.com/openvinotoolkit/cvat/pull/3308>)
- Duplication of the cuboids when redraw them (<https://github.com/openvinotoolkit/cvat/pull/3308>)
- Some code issues in Deep Extreme Cut handler code (<https://github.com/openvinotoolkit/cvat/pull/3325>)
- UI fails when inactive user is assigneed to a task/job (<https://github.com/openvinotoolkit/cvat/pull/3343>)
### Security
......
{
"name": "cvat-core",
"version": "3.13.2",
"version": "3.13.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "cvat-core",
"version": "3.13.2",
"version": "3.13.3",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "babel.config.js",
"scripts": {
......
......@@ -126,10 +126,7 @@
users = await serverProxy.users.self();
users = [users];
} else {
// get list of active users as default
const searchParams = {
is_active: true,
};
const searchParams = {};
for (const key in filter) {
if (filter[key] && key !== 'self') {
searchParams[key] = filter[key];
......
{
"name": "cvat-ui",
"version": "1.20.4",
"version": "1.20.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
{
"name": "cvat-ui",
"version": "1.20.4",
"version": "1.20.5",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
......
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
......@@ -29,6 +29,7 @@ const searchUsers = debounce(
.get({
search: searchValue,
limit: 10,
is_active: true,
})
.then((result: User[]) => {
if (result) {
......@@ -50,7 +51,7 @@ export default function UserSelector(props: Props): JSX.Element {
const autocompleteRef = useRef<RefSelectProps | null>(null);
useEffect(() => {
core.users.get({ limit: 10 }).then((result: User[]) => {
core.users.get({ limit: 10, is_active: true }).then((result: User[]) => {
if (result) {
setInitialUsers(result);
}
......
......@@ -144,9 +144,7 @@ Cypress.Commands.add('resolveReopenIssue', (issueLabel, resolveText, reopen) =>
cy.get('.cvat-issue-dialog-input').type(resolveText);
cy.get('.cvat-issue-dialog-footer').within(() => {
cy.contains('button', 'Comment').click();
reopen
? cy.contains('button', 'Reopen').click()
: cy.contains('button', 'Resolve').click();
reopen ? cy.contains('button', 'Reopen').click() : cy.contains('button', 'Resolve').click();
});
if (reopen) cy.get('.cvat-issue-dialog-header').find('[aria-label="close"]').click();
cy.wait('@postComment').its('response.statusCode').should('equal', 201);
......@@ -157,7 +155,7 @@ Cypress.Commands.add('submitReview', (decision, user) => {
cy.get('.cvat-submit-review-dialog').within(() => {
cy.contains(new RegExp(`^${decision}$`, 'g')).click();
if (decision === 'Review next') {
cy.intercept('GET', `/api/v1/users?is_active=true&search=${user}&limit=10`).as('searchUsers');
cy.intercept('GET', `/api/v1/users?search=${user}&limit=10&is_active=true`).as('searchUsers');
cy.get('.cvat-user-search-field').within(() => {
cy.get('input[type="search"]').clear().type(`${user}`);
cy.wait('@searchUsers').its('response.statusCode').should('equal', 200);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册