mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-11-17 18:40:36 -05:00
Register vehicle field with SubtaskFieldCopier and ensure uniqueness
This commit is contained in:
1 parent
b2f65f90b6
commit
5eac85351d
1 file changed
+8
@@ -19,5 +19,13 @@ module RedmineQboVehicles
|
||||
Vehicles::Hooks::PdfHookListener
|
||||
Vehicles::Hooks::ViewHookListener
|
||||
Vehicles::Hooks::CustomerAppointmentShowHookListener
|
||||
|
||||
# If the SubtaskFieldCopier plugin is installed, register our fields
|
||||
if defined?(SubtaskFieldCopier)
|
||||
SubtaskFieldCopier.registered_fields << :vehicle
|
||||
|
||||
# Ensure there are no duplicates in case of hot-reloads in development mode
|
||||
SubtaskFieldCopier.registered_fields.uniq!
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user