Defect #33419
closedShow only valid projects on issue form when the issue is a subtask
0%
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
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
Updated by Marius BĂLTEANU about 4 years ago
- File 0001-Take-into-account-the-setting-Setting.cross_project_.patch 0001-Take-into-account-the-setting-Setting.cross_project_.patch added
- Subject changed from Subtasks' project on new issue form to Show only valid projects on issue form when the issue is a subtask
- Assignee deleted (
Marius BĂLTEANU)
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.
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.
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.
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?
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.
Updated by Marius BĂLTEANU almost 4 years ago
- File 0001-Fix-project-selector-on-global-new-issue-page-not-sh.patch 0001-Fix-project-selector-on-global-new-issue-page-not-sh.patch added
Indeed, the project selector contains only descendant projects of the selected project. The attached patch should fix this, Yuichi, please test with it.
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.
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.
Updated by Marius BĂLTEANU almost 4 years ago
- Assignee changed from Marius BĂLTEANU to Go MAEDA
Updated by Go MAEDA almost 4 years ago
- Status changed from Reopened to Closed
Committed the patch 0001-Fix-project-selector-on-global-new-issue-page-not-sh.patch in r20733.
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).
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.
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.
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.
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.