Feature #35178
Make adding project settings tabs easier
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Code cleanup/refactoring | |||
Target version: | - | |||
Resolution: |
Description
Currently it is quite cumbersome to add a tab to the projects settings. It is necessary to patch the ProjectsHelper
and override the project_settings_tabs
, which can be dangerous if the behaviour of the checks in the method change and patching helpers can lead to problems due to load orders.
I would suggest to at least extract the list of tags from the method to a constant like for the CustomFieldsHelper::CUSTOM_FIELDS_TABS
list. This would have the added benefit that it would not be necessary to duplicate any logic from the project_settings_tabs
to a plugin if needed.
History
#1
Updated by Holger Just almost 2 years ago
- Description updated (diff)
#2
Updated by Felix Schäfer almost 2 years ago
Note: another solution than the constant as for the custom fields tabs would be ok too if someone comes up with a better solution. I mentioned the custom fields tabs as this is an already existing pattern in Redmine and would be a good first improvement.
#3
Updated by Lorenzo Meneghetti 7 months ago
Felix Schäfer wrote:
Currently it is quite cumbersome to add a tab to the projects settings. It is necessary to patch the
ProjectsHelper
and override theproject_settings_tabs
, which can be dangerous if the behaviour of the checks in the method change and patching helpers can lead to problems due to load orders.
Yes, I agree. Same root cause of #34743. prepend an alias_method conflicts very often when used togheter. Could be solved with a new hook also?
#5
Updated by Felix Schäfer 7 months ago
We do not have a patch for this.