プロジェクト

全般

プロフィール

Vote #80863

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
152
issue_org_id:
33419
author_id:
399232
assigned_to_id:
332
comments:
18
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------
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":https://www.redmine.org/projects/redmine/repository/revisions/20701/diff/trunk/app/views/issues/_form.html.erb, is this appropriate?
--------------------------------------------------------------------------------
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":https://www.redmine.org/projects/redmine/repository/revisions/20701/diff/trunk/app/views/issues/_form.html.erb, is this appropriate?

Let me take a look.
--------------------------------------------------------------------------------
Indeed, the project selector contains only descendant projects of the selected project. The attached patch should fix this, Yuichi, please test with it.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Committed the patch attachment:0001-Fix-project-selector-on-global-new-issue-page-not-sh.patch in r20733.
--------------------------------------------------------------------------------
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).

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
I've posted a patch to #34798 which should fix the issue reported by me in my previous comment.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0