Skip update selection in task assignment if change is processing

Open
#1,486 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
frontend

Research direction

Start in components/task-assignment at didReceiveAttrs and read reference #1435 for the reassignment flow. Trace how a selection change is processed and how failure is handled; done means the selection is not overwritten during processing and correctly rolls back when reassignment fails.

Written by the indexing model from the issue text.

Description

Problem

Right now, this code below, found in components/task-assignment, updates the user selection when it changes.

     let { taskUserId, users } = getProperties(this, 'taskUserId', 'users');
     if (users) {
       set(this, 'selectedOption', users.findBy('id', taskUserId));
     }
   },```

However, this updates while the change is still processing, and rolls back if it fails. It'd be preferred if for the update to be skipped if the change is processing. It also fails to roll back when reassignment fails.

## References
#1435 
Dominant language
JavaScript
Stars
120
Forks
75
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-corps/code-corps-ember

All issues in code-corps/code-corps-ember

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.