プロジェクト

全般

プロフィール

Vote #80999

完了

Auto complete wiki page links

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

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

0%

予定工数:
category_id:
10
version_id:
152
issue_org_id:
33820
author_id:
259873
assigned_to_id:
332
comments:
15
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I think it would be useful to use the functionality of Tribute to auto complete the title of a wiki page at @wiki page title@.

!{width: 400px; border: 1px solid #ccc}ScreenShot_2020-08-06_10.58.16.png!
!{width: 400px; border: 1px solid #ccc}ScreenShot_2020-08-06_10.58.32.png!


journals

I attach a patch that adds this feature.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Nice feature, let me find a better way to pass the auto complete endpoint for each case (issues, wiki pages, etc).
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Nice feature, let me find a better way to pass the auto complete endpoint for each case (issues, wiki pages, etc).

I've posted an alternative solution in #34122, please let me know what do you think about it.

Beside this point, the patch needs at least two changes:
* Use a collection for triggers (see my note from #33425)
* Explore the possibility to show the wiki pages in parent - child relation or at least the parent if any in order to avoid confusion when there are multiple pages with the same title, but under different parent pages.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Beside this point, the patch needs at least two changes:
> * Use a collection for triggers (see my note from #33425)
> * Explore the possibility to show the wiki pages in parent - child relation or at least the parent if any in order to avoid confusion when there are multiple pages with the same title, but under different parent pages.

I think the latter is not a problem. Wiki page names are unique in a project. You cannot create Wiki pages with the same name even if its parent pages are different.
--------------------------------------------------------------------------------
I fixed the patch by referring to the code of #34122.
--------------------------------------------------------------------------------
Setting the target version to 4.2.0 again.
--------------------------------------------------------------------------------
Mizuki, can you add a system tests for this? you should have enough examples.
--------------------------------------------------------------------------------
Marius BALTEANU wrote:
> Mizuki, can you add a system tests for this? you should have enough examples.

I have attached a patch with system test added.
There are already tests to check that tributes work on other pages, so I'm only added testing that the issues/new page can autocomplete the wiki page link.
--------------------------------------------------------------------------------
I found a security issue.

Auto complete for wiki pages should not suggest pages that the current user cannot view. The current patch always shows wiki pages even if the current user does not have "View wiki".
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I found a security issue.
>
> Auto complete for wiki pages should not suggest pages that the current user cannot view. The current patch always shows wiki pages even if the current user does not have "View wiki".

Thank you for pointing that out.
I changed to return nothing when you do not have permission.
--------------------------------------------------------------------------------
Committed the patch. Thank you for improving Redmine.
--------------------------------------------------------------------------------


related_issues

relates,New,33425,Auto complete wiki macros
relates,Closed,31989,Inline issue auto complete (#) in fields with text-formatting enabled

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

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

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

いいね!0
いいね!0