Problem/Motivation

When you assign a task to yourself in the LocalTaskForm and save, it will create a new task assigned to you while the unassigned still exists.
That's wrong and should modify the existing task changing the translator.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

edurenye created an issue. See original summary.

miro_dietiker’s picture

Priority: Normal » Major

This makes the local translator pretty useless. Like this state and progress is a total mess.

edurenye’s picture

Assigned: Unassigned » edurenye
Status: Active » Needs work
Related issues: +#2646582: Exception in TaskItemOperation trying to get translator when it doesn't have any assigned
miro_dietiker’s picture

Status: Needs work » Postponed

Then postponed is the right status.

miro_dietiker’s picture

Status: Postponed » Active

Unpostponing. :-)

edurenye’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB
new6.83 KB

Done, and added tests.

The last submitted patch, 6: fix_duplicated_task-2646592-6-test_only.patch, failed testing.

berdir’s picture

Status: Needs review » Needs work

Lets do some more cleanup here:

* remove validateForm()
* simplify actions(), call parent, set access on submit.
* update $form['label'] to title. Check that it visually makes sense.
* in save(), parent save returns the entity. Then you don't need $this->getEntity(). it can also not be empty, so you don't have to check that.

Also, the hardcoded dependency on the view URL is a bit problematic because if that is deleted, everything breaks. But we're not introducing it here and this will do enough cleanup.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new9.25 KB
new4.1 KB

save() returns an int.
Done all the clean up.
What do you mean with the hardcoded dependency?

edurenye’s picture

Done the small fix that you told me and I created the followup #2649590: Do not allow users to delete tmgmt_local_task_overview

  • Berdir committed aaa5c90 on 8.x-1.x authored by edurenye
    Issue #2646592 by edurenye: Fix duplicated task when saving local task
    

  • Berdir committed 33b4922 on 8.x-1.x authored by edurenye
    Issue #2646592 by edurenye: Fix duplicated task when saving local task (...
berdir’s picture

Status: Needs review » Fixed

Ha, forgot that I told you that and already committed. Committed that separately now.

Status: Fixed » Needs work

The last submitted patch, 10: fix_duplicated_task-2646592-10.patch, failed testing.

berdir’s picture

Status: Needs work » Fixed

Yeah yeah testbot.

edurenye’s picture

Should I open a issue to not let tasks to be deleted if it's not deleted the job?
And since this was committed, it's impossible to change the status, I created a issue for that #2650042: Make status read only in localTaskForm

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.