mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
Register customer and estimate fields with SubtaskFieldCopier if the plugin is installed, ensuring uniqueness to prevent duplicates.
This commit is contained in:
1 parent
ba40496421
commit
04a0eede5f
1 file changed
+9
@@ -29,6 +29,15 @@ module RedmineQbo
|
||||
RedmineQbo::Hooks::IssuesHookListener
|
||||
RedmineQbo::Hooks::UsersShowHookListener
|
||||
RedmineQbo::Hooks::ViewHookListener
|
||||
|
||||
# If the SubtaskFieldCopier plugin is installed, register our fields
|
||||
if defined?(SubtaskFieldCopier)
|
||||
SubtaskFieldCopier.registered_fields << :customer
|
||||
SubtaskFieldCopier.registered_fields << :estimate
|
||||
|
||||
# Ensure there are no duplicates in case of hot-reloads in development mode
|
||||
SubtaskFieldCopier.registered_fields.uniq!
|
||||
end
|
||||
end
|
||||
|
||||
def self.settings
|
||||
|
||||
Reference in new issue
Block a user