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

Fix reset of attributes when moving a task to a project #5764

Merged
merged 37 commits into from
Mar 13, 2023

Conversation

yasakova-anastasia
Copy link
Contributor

@yasakova-anastasia yasakova-anastasia commented Feb 24, 2023

Motivation and context

  • Fixed reset of attributes when moving a task to a project

Steps to reproduce the bug:

  1. Create a task with a couple of labels and attributes
  2. Annotate several frames in the task. Attributes should have non-default value.
  3. Create a project and copy the definition of labels with attributes
  4. Move the task to the project.
  5. Attributes should have default values after the action

How has this been tested?

Added REST API test

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@yasakova-anastasia yasakova-anastasia changed the title Fix reset of attributes when moving an issue to a project Fix reset of attributes when moving a task to a project Feb 24, 2023
@yasakova-anastasia yasakova-anastasia marked this pull request as draft February 24, 2023 18:55
@yasakova-anastasia yasakova-anastasia marked this pull request as ready for review February 27, 2023 08:12
@sizov-kirill
Copy link
Contributor

sizov-kirill commented Mar 1, 2023

I see some strange behavior: try to create task with the following label configuration:

task configuration ``` [ { "name": "car", "id": 9, "color": "#2080c0", "type": "any", "attributes": [ { "id": 5, "name": "mark", "input_type": "select", "mutable": false, "values": [ "bmw", "audi", "fiat" ], "default_value": "bmw" } ] } ] ```

Annotate some frames and set some non-default attributes, then create project with the following label configuration

project configuration [ { "name": "car", "id": 10, "color": "#2080c0", "type": "any", "attributes": [ { "id": 6, "name": "mark", "input_type": "select", "mutable": false, "values": [ "ford", "honda", "volvo" ], "default_value": "ford" } ] } ] ```

Then move annotated task into the project.

It's questionable should we allow to move task in project if project has the same label with the same name attributes but with different attributes spec

@yasakova-anastasia
Copy link
Contributor Author

It's questionable should we allow to move task in project if project has the same label with the same name attributes but with different attributes spec

I think that the task with such attributes should not be moved. Expanded the check for this.

Copy link
Contributor

@sizov-kirill sizov-kirill left a comment

Choose a reason for hiding this comment

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

LGTM

@nmanovic nmanovic merged commit 10ffa61 into develop Mar 13, 2023
@nmanovic nmanovic deleted the ay/fix-task-transfer branch March 13, 2023 20:04
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Jul 1, 2023
- Fixed reset of attributes when moving a task to a project

Steps to reproduce the bug:

1. Create a task with a couple of labels and attributes
2. Annotate several frames in the task. Attributes should have
non-default value.
3. Create a project and copy the definition of labels with attributes
4. Move the task to the project.
5. Attributes should have default values after the action

Co-authored-by: kirill-sizov <sizow.k.d@gmail.com>
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.

3 participants