Project

General

Profile

Actions

Defect #33419

closed

Show only valid projects on issue form when the issue is a subtask

Added by Dmitry Makurin over 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

In r10587 were introduced cross project subtasks, you can select project of subtask based on system setting.
In r17217 were introduced selection project and its subprojects on new issue form. Basically it shows on new issue form subprojects without taking into account setting for cross-project subtasks. So, even though subtask may have any project form will show only current project and its subprojects or vice versa subtasks' project is disabled and nevertheless form will show subprojects.

Related patch fixes this behaviour. New issue form will show projects based on system setting if parent_issue_id field is present so user can't select inappropriate project.


Files

Actions #1

Updated by Go MAEDA over 4 years ago

  • Tracker changed from Patch to Defect
  • Category set to Issues
  • Target version set to Candidate for next major release
Actions #2

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Confirmed
Actions #3

Updated by Marius BĂLTEANU about 4 years ago

  • Assignee set to Marius BĂLTEANU
Actions #4

Updated by Marius BĂLTEANU almost 4 years ago

I made a patch (inspired from Dmitry's work) that implements this feature.

The patch also changes my initial implementation (r17217) in order to move the logic from model to issue helper.

Actions #5

Updated by Go MAEDA almost 4 years ago

  • Target version changed from Candidate for next major release to 4.2.0

Setting the target version to 4.2.0.

Actions #6

Updated by Go MAEDA almost 4 years ago

  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Actions #7

Updated by Yuichi HARADA almost 4 years ago

When the new issue input form is displayed with "Projects(#top-menu) > Issues > New issue", the projects that can be selected are narrowed down even though the issue to be created is not a subtask. I think it's due to app/views/issues/_form.html.erb@20701, is this appropriate?

Actions #8

Updated by Marius BĂLTEANU almost 4 years ago

  • Status changed from Closed to Reopened
  • Assignee changed from Go MAEDA to Marius BĂLTEANU

Yuichi HARADA wrote:

When the new issue input form is displayed with "Projects(#top-menu) > Issues > New issue", the projects that can be selected are narrowed down even though the issue to be created is not a subtask. I think it's due to app/views/issues/_form.html.erb@20701, is this appropriate?

Let me take a look.

Actions #9

Updated by Marius BĂLTEANU almost 4 years ago

Indeed, the project selector contains only descendant projects of the selected project. The attached patch should fix this, Yuichi, please test with it.

Actions #10

Updated by Yuichi HARADA almost 4 years ago

Marius BALTEANU wrote:

Indeed, the project selector contains only descendant projects of the selected project. The attached patch should fix this, Yuichi, please test with it.

Thanks for creating a patch. I will test it, so please wait for a while.

Actions #11

Updated by Yuichi HARADA almost 4 years ago

Marius BALTEANU wrote:

Indeed, the project selector contains only descendant projects of the selected project. The attached patch should fix this, Yuichi, please test with it.

Marius, I confirmed your patch and test. I think it's good.

Actions #12

Updated by Marius BĂLTEANU almost 4 years ago

  • Assignee changed from Marius BĂLTEANU to Go MAEDA
Actions #13

Updated by Go MAEDA almost 4 years ago

  • Status changed from Reopened to Closed
Actions #14

Updated by Marius BĂLTEANU almost 4 years ago

  • Status changed from Closed to Reopened

I have found another issue with the current implementation, the project selector dissapears after you select a project without children.

To reproduce:
- Open the new issue page from a project with children
- Observe that the project selector shows the children as expected
- Select a project without children
- Observe that the project selector disappear.

The cause is that the issue project is used to look for children (which changes when you select another project in the dropdown) instead of context project (which remains the same).

To keep the code simple, I think it's better to just show the project tree instead of self and descendant. I had some cases when I wanted to create an issue on the parent project.

What do you think? I've opened a new issue for this to track the change (#34798).

Actions #15

Updated by Mizuki ISHIKAWA almost 4 years ago

Marius BALTEANU wrote:

I have found another issue with the current implementation, the project selector dissapears after you select a project without children.

I was just trying to make a issue to report this probrem.
I will attach the Gif image I made for that explanation.

Actions #16

Updated by Marius BĂLTEANU over 3 years ago

I've posted a patch to #34798 which should fix the issue reported by me in my previous comment.

Actions #17

Updated by Mizuki ISHIKAWA over 3 years ago

Marius BALTEANU wrote:

I've posted a patch to #34798 which should fix the issue reported by me in my previous comment.

It looks like the patch was committed in #34798#note-7.
I was able to confirm that the problem was solved in my environment as well.

Actions #18

Updated by Go MAEDA over 3 years ago

  • Status changed from Reopened to Closed

Marius BALTEANU wrote:

I have found another issue with the current implementation, the project selector dissapears after you select a project without children.

To reproduce:
- Open the new issue page from a project with children
- Observe that the project selector shows the children as expected
- Select a project without children
- Observe that the project selector disappear.

Fixed by #34798.

Actions

Also available in: Atom PDF