Patch #29076

Dont return to Parent Task on Submit

Added by Ewan Makepeace almost 3 years ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:Candidate for next major release

Description

If I create a SubTask on a Parent - the first time I save it I land not on my new task but back on the parent. Subsequently if I edit the subtask and save I remain on the subtask.

The initial behaviour is unexpected and unwelcome. Often half way through creating a task I realise I need to move it to a different project (which you can only do after saving) and hit edit, to reassign and end up accidentally reasigning the parent. Other times I realise I have made an error and end up editing the parent instead.

I don't understand the rationale for this behaviour - I find it unexpected and annoying?

mockup_create_and_return.png (74.3 KB) Bernhard Rohloff, 2021-01-25 08:51

0001-Add-button-to-Create-and-follow-when-adding-a-subtas.patch Magnifier (3.6 KB) Marius BALTEANU, 2021-02-27 17:02


Related issues

Duplicated by Redmine - Defect #34594: Redmine 3.3.2 redirect after creating issue broke Closed

History

#1 Updated by Go MAEDA almost 3 years ago

I am also annoyed by this behavior. Sometimes I mistakenly update a parent issue instead of a subtask.

#2 Updated by Holger Just almost 3 years ago

This behavior was introduced in r16317 released with Redmine 3.4.0

#3 Updated by Go MAEDA almost 3 years ago

  • Affected version set to 3.4.0

#4 Updated by Go MAEDA almost 3 years ago

Go MAEDA wrote:

I am also annoyed by this behavior. Sometimes I mistakenly update a parent issue instead of a subtask.

But I realized that the current behavior is useful when you create subtasks for a particular issue one after another.

#6 Updated by Marius BALTEANU 3 months ago

  • Related to Defect #34594: Redmine 3.3.2 redirect after creating issue broke added

#7 Updated by Marius BALTEANU 3 months ago

  • Related to deleted (Defect #34594: Redmine 3.3.2 redirect after creating issue broke)

#8 Updated by Marius BALTEANU 3 months ago

  • Duplicated by Defect #34594: Redmine 3.3.2 redirect after creating issue broke added

#9 Updated by Marius BALTEANU 3 months ago

Go MAEDA wrote:

Go MAEDA wrote:

I am also annoyed by this behavior. Sometimes I mistakenly update a parent issue instead of a subtask.

But I realized that the current behavior is useful when you create subtasks for a particular issue one after another.

Indeed, both use cases are valid.

What if we introduce a third button "Create and follow" and then the user will have all the options available:
1. Create -> creates the subtask and returns to parent
2. Create and follow -> creates the subtask and stays on the newly created issue (old behaviour)
3. Create and add another -> creates the subtasks and stays on the subtask form.

#10 Updated by Bernhard Rohloff 3 months ago

Marius BALTEANU wrote:

Go MAEDA wrote:
What if we introduce a third button "Create and follow" and then the user will have all the options available:
1. Create -> creates the subtask and returns to parent
2. Create and follow -> creates the subtask and stays on the newly created issue (old behaviour)
3. Create and add another -> creates the subtasks and stays on the subtask form.

I like the suggestion. These are three valid options and I think it would be a good thing if users could choose between them. From my point of view I would rename Marius' first option to "Create and return" because the second option "Create and follow" is the default behavior of "Create" in other cases and I would not mix them up.

So this would be my favorite order:

1. Create -> creates the subtask and stays on the newly created issue (old/default behaviour)
2. Create and return -> creates the subtask and returns to parent
3. Create and add another -> creates the subtasks and stays on the subtask form.

#11 Updated by Go MAEDA 3 months ago

Bernhard Rohloff wrote:

From my point of view I would rename Marius' first option to "Create and return" because the second option "Create and follow" is the default behavior of "Create" in other cases and I would not mix them up.

I also think so.

So this would be my favorite order:

1. Create -> creates the subtask and stays on the newly created issue (old/default behaviour)
2. Create and return -> creates the subtask and returns to parent
3. Create and add another -> creates the subtasks and stays on the subtask form.

+1 for this.

#12 Updated by Bernhard Rohloff 3 months ago

This is how it would look like...

The list of buttons might get a bit too overwhelming depending on the length of the description text. Perhaps it would be beneficial to move the additional options to a ... menu.

#13 Updated by Marius BALTEANU about 1 month ago

  • Assignee set to Marius BALTEANU

#14 Updated by Marius BALTEANU about 1 month ago

Thanks Bernhard for you feedback. I tried to implement as you proposed, but it requires more changes in the redirect_after_create method from IssuesController in order for the button "Create" to behave differently depending on the params (I can provide more details, if you want).

Considering that we already have the term "follow" (Move and follow, Copy and follow), I've added the "Create and follow" option which required only few lines of code, please see the attached patch.

Also available in: Atom PDF