Defect #1276
closed
Default template not applied in when template is inherited
Added by Mattanja Kern over 11 years ago.
Updated over 11 years ago.
Description
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.
Files
- Status changed from 新規(New) to 担当(Assigned)
- Target version set to 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?
- Target version changed from Future Release to ver0.0.7
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
Ok, let me confirm.
Child template can override parent, just like Superclass and Subclass
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
}
- % Done changed from 0 to 40
Hi, I've applied workaround on commit:eb8b7ef
Could you please try above?
Perfect, works like a charm. Thank you for the quick response & fix!
- Status changed from 担当(Assigned) to 終了(Closed)
- % Done changed from 40 to 100
It's my pleasure!
Though I need some test code to release new version, I've applied above change to my default branch.
Also available in: Atom
PDF