diff --git a/changelog.d/20231121_105913_sekachev.bs_fixed_multiple_changing_job_state.md b/changelog.d/20231121_105913_sekachev.bs_fixed_multiple_changing_job_state.md new file mode 100644 index 000000000000..bf53adbd369b --- /dev/null +++ b/changelog.d/20231121_105913_sekachev.bs_fixed_multiple_changing_job_state.md @@ -0,0 +1,4 @@ +### Fixed + +- Job state can not be changed many time without reloading annotation view. + () diff --git a/cvat-core/src/session.ts b/cvat-core/src/session.ts index 47e82d8237fc..4f0e98e350c8 100644 --- a/cvat-core/src/session.ts +++ b/cvat-core/src/session.ts @@ -459,6 +459,10 @@ export class Job extends Session { assignee: { get: () => data.assignee, set: (assignee) => { + if ((assignee?.id || null) === (data.assignee?.id || null)) { + return; + } + if (assignee !== null && !(assignee instanceof User)) { throw new ArgumentError('Value must be a user instance'); } @@ -469,6 +473,10 @@ export class Job extends Session { stage: { get: () => data.stage, set: (stage) => { + if (stage === data.stage) { + return; + } + const type = JobStage; let valueInEnum = false; for (const value in type) { @@ -491,6 +499,10 @@ export class Job extends Session { state: { get: () => data.state, set: (state) => { + if (state === data.state) { + return; + } + const type = JobState; let valueInEnum = false; for (const value in type) {