agileware-jp / redmine_issue_templates

Redmine Issue Template. Pull requests, reporting issues, stars and sponsoring are always welcome!
https://www.redmine.org/plugins/redmine_issue_templates
GNU General Public License v2.0
65 stars 28 forks source link

Default template not applied automatically #35

Open sylvainfaivre opened 1 year ago

sylvainfaivre commented 1 year ago

Summary

When creating an issue on a tracker other than the default tracker for a project, the template is not applied automatically.

Description

When creating an issue, you can select the tracker in the project. Let's say you have a project with 3 trackers : tracker1, tracker2, tracker3. Tracker1 is the default tracker for this project.

If you apply an issue template as default template for tracker1 : when you create an issue, the template is applied. If you apply no issue template for tracker1, but apply an issue template as default template for tracker2 : when you create an issue, at first the template is not applied, which is OK, because tracker1 is selected by default. Then, when you change the tracker to tracker2, I would expect the default template to be applied, but it is not (altough it is shown and can be selected by the user).

Environment

Environment:
  Redmine version                4.0.5.stable
  Ruby version                   2.6.10-p210 (2022-04-12) [x86_64-linux]
  Rails version                  5.2.3
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                sendmail
SCM:
  Git                            2.30.2
  Filesystem                     
Redmine plugins:
  localizable                    0.4.0
  redmine_agile                  1.6.4
  redmine_checklists             3.1.21
  redmine_ckeditor               1.2.3
  redmine_issue_templates        1.1.0
  redmine_slack                  0.2
  redmine_theme_changer          0.5.0
  redmineup_tags                 2.0.12

I tried it with all other plugins disabled, the behaviour is the same.

Visual Proof / Screenshot

2022-08-03_11-18 2022-08-03_11-18_1 2022-08-03_11-19 2022-08-03_11-19_1 2022-08-03_11-20

github-actions[bot] commented 1 year ago

Thank you for contributing to Redmine Issue Templates plugin!' first issue

Araki-Tokyo commented 1 year ago

We face a similar problem. We hope it will be improved.

ishikawa999 commented 1 year ago

Does using code from the 0.3-stable branch cause the same problem? When updating from 0.3 to 1.0, there was a change to "rewrite the JavaSctipt code from jQuery to plain JavaScript." That may have something to do with it.

sylvainfaivre commented 1 year ago

Well I tried to switch to the 0.3-stable branch and it doesn't seem to work at all : the issue template is not applied, and the "issue template" field is not present in the new issue page, even if I set the template as default for the default tracker. Is there anything I should be aware to make this version work ?

qay21 commented 1 year ago

We do have the same problem on latest master.

talhauzair-28 commented 1 year ago

Any update on this issue? I have faced the same issue, unable to resolve.

sylvainfaivre commented 1 year ago

A small update on this issue, it looks like a race condition. I reproduced the bug several times, and I noticed that :

DeaconF commented 1 year ago

Fix in Pullrequest works for reload after change tracker! #63 But if you click on "Do you replace subject and description? - Yes / No" the whole Redmine Header does not work anymore until you save or press F5