プロジェクト

全般

プロフィール

Defect #1276

完了

Default template not applied in when template is inherited

Mattanja Kern さんが10年以上前に追加. 10年以上前に更新.

ステータス:
終了(Closed)
優先度:
通常(Normal)
担当者:
-
対象バージョン:
開始日:
2013/08/29
期日:
進捗率:

100%

予定工数:

説明

I have freshly installed the plugin from bitbucket today and am at the latest version

parent: 151:38234f1d9389 tip
Added tag 0.0.6 for changeset a937d537f44d

Environment:
Redmine version 2.2.2.devel.11291
Ruby version 1.9.3 (x86_64-linux)
Rails version 3.2.11
Environment production
Database adapter PostgreSQL
Redmine plugins:
clipboard_image_paste 1.7
redmine_dashboard 2.0.rc1
redmine_importer 1.2
redmine_issue_checklist 2.0.5
redmine_issue_templates 0.0.6
redmine_lightbox 0.0.1

I have a project structure with multiple sub-projects and template inheritance works fine, i.e. the templates can be used in the sub-projects, too.

When I create a new issue in the project that holds the templates, everything works as expected. I have created a template for the tracker "Bug" and selecting the tracker results in applying the template.

However, when I create a new issue in a sub-project, the default template is not applied. The template appears in the dropdown "Issue template". It can then be manually selected and is applied. But it is not applied by default.


ファイル

Akiko Takano さんが10年以上前に更新

  • ステータス新規(New) から 担当(Assigned) に変更
  • 対象バージョンFuture Release にセット

Hi, Mattanja.

First, thank you for your applying my plugin.
Inherited template feature was released since 0.0.6, but I am hesitating about which template to set as default, in case both parent template and child template marked as default.

Could you please tell me your suggestion?
Do you think child template value does not override the parent's?

Akiko Takano さんが10年以上前に更新

  • 対象バージョンFuture Release から ver0.0.7 に変更

Mattanja Kern さんが10年以上前に更新

Hi Takano-san,

thank you for writing this plugin - it really comes in handy since we're getting lousy bug reports from clients and with this plugin I can give some structure to the report. That's also why it is pretty important for me that it is applied by default.

Yes, a child template marked as default should override the parent templates. You are right with that! (Priorities would be "local" over "inherited" over "global".)

However in my case I have only created one template on top level for now and no other templates. This one template is inherited down to all sub-projects and used there. That means, there is no child template as you can see in my screenshot attached. Now when filing a new bug, the inherited (default) template is not applied.

Let me know if I can further assist you in any way.

Best regards,
Mattanja

Akiko Takano さんが10年以上前に更新

Ok, let me confirm.
Child template can override parent, just like Superclass and Subclass :)

Mattanja Kern さんが10年以上前に更新

I'd say so, yes.

Or, put another way:

if (currentProject has own template that is default) {
use own template
} else if (inherited template exists that is marked as default) {
use inherited template
} else if (global template exists that is marked as default) {
use global template
} else {
do not apply any default template
}

Akiko Takano さんが10年以上前に更新

  • 進捗率0 から 40 に変更

Hi, I've applied workaround on commit:eb8b7ef

Could you please try above?

Mattanja Kern さんが10年以上前に更新

Perfect, works like a charm. Thank you for the quick response & fix!

Akiko Takano さんが10年以上前に更新

  • ステータス担当(Assigned) から 終了(Closed) に変更
  • 進捗率40 から 100 に変更

It's my pleasure!

Though I need some test code to release new version, I've applied above change to my default branch.

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