Open Araki-Tokyo opened 1 year ago
Thank you for contributing to Redmine Issue Templates plugin!' first issue
Hi, @Araki-Tokyo Thank you for reporting this issue.
Now I am not the maintainer, but this feature has been added at https://github.com/akiko-pusu/redmine_issue_templates/issues/302.
The part where the watcher is selected is implemented using Redmine's native helper method.
So, as you can see from the method on the Redmine side, a limit of 21 names is set. ( IssuesHelper#users_for_new_issue_watchers
)
# Returns an array of users that are proposed as watchers
# on the new issue form
def users_for_new_issue_watchers(issue)
users = issue.watcher_users.select{|u| u.status == User::STATUS_ACTIVE}
assignable_watchers = issue.project.principals.assignable_watchers.limit(21)
if assignable_watchers.size <= 20
users += assignable_watchers.sort
end
users.uniq
end
A. If you think this experimental feature is useful (built-in fields / custom fields select), you can apply this helper method and set up your own method in the Issue Template.
B. Alternatively, you can submit a request to the Redmine repository itself to be able to retrieve all watcher lists, or a list with a user-specified limit.
Personally, I think proposal B is the way to go. If you are interested in OSS activities, you could create a pull request in either repository.
Also, I didn't get much feedback on this experimental feature when I added it, so this feature may be discontinued in the future in favor of stability and maintainability. Please give it a +1 if you think it is valid.
Hi,
Thanks for the useful information!
I tried above Suggestion - A way on PR #33, and it seems to work as I expected. 😄
(Related comments are other PR #32 side.) https://github.com/agileware-jp/redmine_issue_templates/pull/32#issuecomment-1179520751
Thanks!
If there are 20 or less project members, you can use the ticket template to set up watcher as the default member. However, if there are more than 21 project members, the "Select Field" list value will not be displayed at all, and watcher settings will not be possible. I would like to be able to set watchers as default members even if there are more than 21 project members. Could some of you please make this happen?