diff --git a/lib/redmine_qbo_vehicles.rb b/lib/redmine_qbo_vehicles.rb index c41670c..69d0a1a 100644 --- a/lib/redmine_qbo_vehicles.rb +++ b/lib/redmine_qbo_vehicles.rb @@ -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 \ No newline at end of file