diff --git a/lib/redmine_webhook/custom_field_value_wrapper.rb b/lib/redmine_webhook/custom_field_value_wrapper.rb index 58c0433..3eeef03 100644 --- a/lib/redmine_webhook/custom_field_value_wrapper.rb +++ b/lib/redmine_webhook/custom_field_value_wrapper.rb @@ -6,6 +6,7 @@ class RedmineWebhook::CustomFieldValueWrapper def to_hash { custom_field_id: @custom_field_value.custom_field_id, + custom_field_name: @custom_field_value.custom_field.name, value: @custom_field_value.value } end diff --git a/lib/redmine_webhook/custom_field_wrapper.rb b/lib/redmine_webhook/custom_field_wrapper.rb deleted file mode 100644 index d1c126e..0000000 --- a/lib/redmine_webhook/custom_field_wrapper.rb +++ /dev/null @@ -1,13 +0,0 @@ -class RedmineWebhook::CustomFieldWrapper - def initialize(custom_field) - @custom_field = custom_field - end - - def to_hash - { - id: @custom_field.id, - name: @custom_field.name, - possible_values: @custom_field.possible_values - } - end -end diff --git a/lib/redmine_webhook/issue_wrapper.rb b/lib/redmine_webhook/issue_wrapper.rb index 323d087..6eb9bd9 100644 --- a/lib/redmine_webhook/issue_wrapper.rb +++ b/lib/redmine_webhook/issue_wrapper.rb @@ -20,7 +20,6 @@ module RedmineWebhook :estimated_hours => @issue.estimated_hours, :is_private => @issue.is_private, :lock_version => @issue.lock_version, - :custom_fields => @issue.custom_fields.collect { |custom_field| RedmineWebhook::CustomFieldWrapper.new(custom_field).to_hash }, :custom_field_values => @issue.custom_field_values.collect { |value| RedmineWebhook::CustomFieldValueWrapper.new(value).to_hash }, :project => RedmineWebhook::ProjectWrapper.new(@issue.project).to_hash, :status => RedmineWebhook::StatusWrapper.new(@issue.status).to_hash,