More cleanups
This commit is contained in:
@@ -1,71 +1,54 @@
|
||||
<p>
|
||||
<label for="settings_rocketchat_url">Rocket.Chat URL</label>
|
||||
<input type="text" id="settings_rocketchat_url" size=80 value="<%= settings['rocketchat_url'] %>" name="settings[rocketchat_url]" placeholder="https://rocket.chat/hooks/my_rocket_chat_token" />
|
||||
<%= content_tag(:label, l(:label_settings_messenger_url)) %>
|
||||
<%= text_field_tag('settings[messenger_url]', @settings[:messenger_url], size: 60, placeholder: 'https://rocket.chat/hooks/my_rocket_chat_token') %>
|
||||
<em class="info"><%= t(:messenger_url_info_html) %></em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Generate an "Incoming WebHook" URL from the <a href="https://rocket.chat/docs/administrator-guides/integrations/">Integrations configuration page on Rocket.Chat</a>.
|
||||
This URL can be changed on a per-project basis by creating a <a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Rocket.Chat Channel">project custom field</a>
|
||||
named "Rocket.Chat URL" (without quotes).
|
||||
<%= content_tag(:label, l(:label_settings_messenger_icon)) %>
|
||||
<%= text_field_tag('settings[messenger_icon]', @settings[:messenger_icon], size: 60) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_channel">Rocket.Chat Channel</label>
|
||||
<input type="text" id="settings_channel" value="<%= settings['channel'] %>" name="settings[channel]" placeholder="redmine" />
|
||||
<%= content_tag(:label, l(:label_settings_messenger_channel)) %>
|
||||
<%= text_field_tag('settings[messenger_channel]', @settings[:messenger_channel], size: 30, placeholder: 'redmine') %>
|
||||
<em class="info"><%= t(:messenger_channel_info_html) %></em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The channel can be changed on a per-project basis by creating a
|
||||
<a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Rocket.Chat Channel">project custom field</a>
|
||||
named "Rocket.Chat Channel" (without quotes).
|
||||
<%= content_tag(:label, l(:label_settings_messenger_username)) %>
|
||||
<%= text_field_tag('settings[messenger_username]', @settings[:messenger_username], size: 30) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_icon">Rocket.Chat Icon</label>
|
||||
<input type="text" id="settings_icon" value="<%= settings['icon'] %>" name="settings[icon]" />
|
||||
<%= content_tag(:label, l(:label_settings_auto_mentions)) %>
|
||||
<%= check_box_tag 'settings[auto_mentions]', 1, @settings[:auto_mentions] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_username">Rocket.Chat Username</label>
|
||||
<input type="text" id="settings_username" value="<%= settings['username'] %>" name="settings[username]" placeholder="redmine.bot" />
|
||||
<%= content_tag(:label, l(:label_settings_display_watchers)) %>
|
||||
<%= check_box_tag 'settings[display_watchers]', 1, @settings[:display_watchers] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_auto_mentions">Display watchers?</label>
|
||||
<input type="checkbox" id="settings_display_watchers" value="1" name="settings[display_watchers]" <%= settings['display_watchers'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_post_updates)) %>
|
||||
<%= check_box_tag 'settings[post_updates]', 1, @settings[:post_updates] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_auto_mentions">Convert names to mentions?</label>
|
||||
<input type="checkbox" id="settings_auto_mentions" value="1" name="settings[auto_mentions]" <%= settings['auto_mentions'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_new_include_description)) %>
|
||||
<%= check_box_tag 'settings[new_include_description]', 1, @settings[:new_include_description] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_post_updates">Post issue updates?</label>
|
||||
<input type="checkbox" id="settings_post_updates" value="1" name="settings[post_updates]" <%= settings['post_updates'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_updated_include_description)) %>
|
||||
<%= check_box_tag 'settings[updated_include_description]', 1, @settings[:updated_include_description] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_new_include_description">Description in new issue?</label>
|
||||
<input type="checkbox" id="settings_new_include_description" value="1" name="settings[new_include_description]" <%= settings['new_include_description'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_post_private_issues)) %>
|
||||
<%= check_box_tag 'settings[post_private_issues]', 1, @settings[:post_private_issues] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_updated_include_description">Description in update issue?</label>
|
||||
<input type="checkbox" id="settings_updated_include_description" value="1" name="settings[updated_include_description]" <%= settings['updated_include_description'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_post_private_notes)) %>
|
||||
<%= check_box_tag 'settings[post_private_notes]', 1, @settings[:post_private_notes] %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_post_updates">Post updates for private issues?</label>
|
||||
<input type="checkbox" id="settings_post_private_issues" value="1" name="settings[post_private_issues]" <%= settings['post_private_issues'] == '1' ? 'checked="checked"' : '' %> />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_post_updates">Post private notes?</label>
|
||||
<input type="checkbox" id="settings_post_private_notes" value="1" name="settings[post_private_notes]" <%= settings['post_private_notes'] == '1' ? 'checked="checked"' : '' %> />
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="settings_post_wiki_updates">Post Wiki updates?</label>
|
||||
<input type="checkbox" id="settings_post_wiki_updates" value="1" name="settings[post_wiki_updates]" <%= settings['post_wiki_updates'] == '1' ? 'checked="checked"' : '' %> />
|
||||
<%= content_tag(:label, l(:label_settings_post_wiki_updates)) %>
|
||||
<%= check_box_tag 'settings[post_wiki_updates]', 1, @settings[:post_wiki_updates] %>
|
||||
</p>
|
||||
|
||||
16
config/locales/de.yml
Normal file
16
config/locales/de.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# German strings
|
||||
de:
|
||||
label_settings_messenger_channel: Messenger Channel
|
||||
label_settings_messenger_username: Messenger Benutzer
|
||||
label_settings_messenger_url: Messenger URL
|
||||
label_settings_messenger_icon: Messenger Icon
|
||||
messenger_channel_info_html: 'The channel can be changed on a per-project basis by creating a <a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Rocket.Chat Channel">project custom field</a> named "Messenger Channel" (without quotes).'
|
||||
messenger_url_info_html: 'Generate an "Incoming WebHook" URL from the <a href="https://rocket.chat/docs/administrator-guides/integrations/">Integrations configuration page on Rocket.Chat</a>. This URL can be changed on a per-project basis by creating a <a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Messenger Channel">project custom field</a> named "Messenger URL" (without quotes).'
|
||||
label_settings_auto_mentions: Convert names to mentions?
|
||||
label_settings_display_watchers: Display watchers?
|
||||
label_settings_post_updates: Post issue updates?
|
||||
label_settings_new_include_description: Description in new issue?
|
||||
label_settings_updated_include_description: Description in update issue?
|
||||
label_settings_post_private_issues: Post updates for private issues?
|
||||
label_settings_post_private_notes: Post private notes?
|
||||
label_settings_post_wiki_updates: Post Wiki updates?
|
||||
16
config/locales/en.yml
Normal file
16
config/locales/en.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# English strings
|
||||
en:
|
||||
label_settings_messenger_channel: Messenger Channel
|
||||
label_settings_messenger_username: Messenger username
|
||||
label_settings_messenger_url: Messenger URL
|
||||
label_settings_messenger_icon: Messenger Icon
|
||||
messenger_channel_info_html: 'The channel can be changed on a per-project basis by creating a <a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Rocket.Chat Channel">project custom field</a> named "Messenger Channel" (without quotes).'
|
||||
messenger_url_info_html: 'Generate an "Incoming WebHook" URL from the <a href="https://rocket.chat/docs/administrator-guides/integrations/">Integrations configuration page on Rocket.Chat</a>. This URL can be changed on a per-project basis by creating a <a href="/custom_fields/new?type=ProjectCustomField&custom_field[name]=Messenger Channel">project custom field</a> named "Messenger URL" (without quotes).'
|
||||
label_settings_auto_mentions: Convert names to mentions?
|
||||
label_settings_display_watchers: Display watchers?
|
||||
label_settings_post_updates: Post issue updates?
|
||||
label_settings_new_include_description: Description in new issue?
|
||||
label_settings_updated_include_description: Description in update issue?
|
||||
label_settings_post_private_issues: Post updates for private issues?
|
||||
label_settings_post_private_notes: Post private notes?
|
||||
label_settings_post_wiki_updates: Post Wiki updates?
|
||||
10
init.rb
10
init.rb
@@ -9,13 +9,13 @@ Redmine::Plugin.register :redmine_messenger do
|
||||
description 'Messenger integration for Slack, Rocketchat and Mattermost support'
|
||||
version '0.6.2-dev'
|
||||
|
||||
requires_redmine version_or_higher: '3.3.0'
|
||||
requires_redmine version_or_higher: '3.0.0'
|
||||
|
||||
settings default: {
|
||||
callback_url: 'https://rocket.chat/hooks/my_rocket_chat_token',
|
||||
channel: 'redmine',
|
||||
icon: 'https://raw.githubusercontent.com/phlegx/redmine_rocketchat/assets/icon.png',
|
||||
username: 'redmine.bot',
|
||||
messenger_url: '',
|
||||
messenger_channel: 'redmine',
|
||||
messenger_icon: 'https://raw.githubusercontent.com/alphanodes/redmine_messenger/assets/icon.png',
|
||||
messenger_username: 'redmine.bot',
|
||||
display_watchers: '0',
|
||||
auto_mentions: '1',
|
||||
post_updates: '1',
|
||||
|
||||
@@ -6,4 +6,10 @@ Rails.configuration.to_prepare do
|
||||
|
||||
# Hooks
|
||||
require_dependency 'redmine_messenger/hooks'
|
||||
|
||||
module RedmineMessenger
|
||||
def self.settings
|
||||
Setting[:plugin_redmine_messenger].blank? ? {} : Setting[:plugin_redmine_messenger]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ require 'httpclient'
|
||||
|
||||
module RedmineMessenger
|
||||
class MessengerListener < Redmine::Hook::Listener
|
||||
def redmine_rocketchat_issues_new_after_save(context={})
|
||||
def redmine_rocketchat_issues_new_after_save(context = {})
|
||||
issue = context[:issue]
|
||||
|
||||
channels = channels_for_project issue.project
|
||||
@@ -14,10 +14,10 @@ module RedmineMessenger
|
||||
return unless channels.present? && url
|
||||
return if issue.is_private? && post_private_issues != '1'
|
||||
|
||||
msg = "[#{escape issue.project}] #{escape issue.author} created <#{object_url issue}|#{escape issue}>#{mentions issue.description if Setting.plugin_redmine_rocketchat[:auto_mentions] == '1'}"
|
||||
msg = "[#{escape issue.project}] #{escape issue.author} created <#{object_url issue}|#{escape issue}>#{mentions issue.description if RedmineMessenger.settings[:auto_mentions] == '1'}"
|
||||
|
||||
attachment = {}
|
||||
attachment[:text] = escape issue.description if issue.description && Setting.plugin_redmine_rocketchat[:new_include_description] == '1'
|
||||
attachment[:text] = escape issue.description if issue.description && RedmineMessenger.settings[:new_include_description] == '1'
|
||||
attachment[:fields] = [{
|
||||
title: I18n.t(:field_status),
|
||||
value: escape(issue.status.to_s),
|
||||
@@ -36,7 +36,7 @@ module RedmineMessenger
|
||||
title: I18n.t(:field_watcher),
|
||||
value: escape(issue.watcher_users.join(', ')),
|
||||
short: true
|
||||
} if Setting.plugin_redmine_rocketchat[:display_watchers] == '1'
|
||||
} if RedmineMessenger.settings[:display_watchers] == '1'
|
||||
|
||||
speak msg, channels, attachment, url
|
||||
end
|
||||
@@ -50,20 +50,20 @@ module RedmineMessenger
|
||||
post_private_issues = post_private_issues_for_project(issue.project)
|
||||
post_private_notes = post_private_notes_for_project(issue.project)
|
||||
|
||||
return unless channels.present? and url and Setting.plugin_redmine_rocketchat[:post_updates] == '1'
|
||||
return if issue.is_private? and post_private_issues != '1'
|
||||
return if journal.private_notes? and post_private_notes != '1'
|
||||
return unless channels.present? && url && RedmineMessenger.settings[:post_updates] == '1'
|
||||
return if issue.is_private? && post_private_issues != '1'
|
||||
return if journal.private_notes? && post_private_notes != '1'
|
||||
|
||||
msg = "[#{escape issue.project}] #{escape journal.user.to_s} updated <#{object_url issue}|#{escape issue}>#{mentions journal.notes if Setting.plugin_redmine_rocketchat[:auto_mentions] == '1'}"
|
||||
msg = "[#{escape issue.project}] #{escape journal.user.to_s} updated <#{object_url issue}|#{escape issue}>#{mentions journal.notes if RedmineMessenger.settings[:auto_mentions] == '1'}"
|
||||
|
||||
attachment = {}
|
||||
attachment[:text] = escape journal.notes if journal.notes && Setting.plugin_redmine_rocketchat[:updated_include_description] == '1'
|
||||
attachment[:text] = escape journal.notes if journal.notes && RedmineMessenger.settings[:updated_include_description] == '1'
|
||||
attachment[:fields] = journal.details.map { |d| detail_to_field d }
|
||||
|
||||
speak msg, channels, attachment, url
|
||||
end
|
||||
|
||||
def model_changeset_scan_commit_for_issue_ids_pre_issue_update(context={})
|
||||
def model_changeset_scan_commit_for_issue_ids_pre_issue_update(context = {})
|
||||
issue = context[:issue]
|
||||
journal = issue.current_journal
|
||||
changeset = context[:changeset]
|
||||
@@ -72,8 +72,8 @@ module RedmineMessenger
|
||||
url = url_for_project issue.project
|
||||
post_private_issues = post_private_issues_for_project(issue.project)
|
||||
|
||||
return unless channels.present? and url and issue.save
|
||||
return if issue.is_private? and post_private_issues != '1'
|
||||
return unless channels.present? && url && issue.save
|
||||
return if issue.is_private? && post_private_issues != '1'
|
||||
|
||||
msg = "[#{escape issue.project}] #{escape journal.user.to_s} updated <#{object_url issue}|#{escape issue}>"
|
||||
|
||||
@@ -82,25 +82,25 @@ module RedmineMessenger
|
||||
if Setting.host_name.to_s =~ /\A(https?\:\/\/)?(.+?)(\:(\d+))?(\/.+)?\z/i
|
||||
host, port, prefix = $2, $4, $5
|
||||
revision_url = Rails.application.routes.url_for(
|
||||
:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => repository.project,
|
||||
:repository_id => repository.identifier_param,
|
||||
:rev => changeset.revision,
|
||||
:host => host,
|
||||
:protocol => Setting.protocol,
|
||||
:port => port,
|
||||
:script_name => prefix
|
||||
controller: 'repositories',
|
||||
action: 'revision',
|
||||
id: repository.project,
|
||||
repository_id: repository.identifier_param,
|
||||
rev: changeset.revision,
|
||||
host: host,
|
||||
protocol: Setting.protocol,
|
||||
port: port,
|
||||
script_name: prefix
|
||||
)
|
||||
else
|
||||
revision_url = Rails.application.routes.url_for(
|
||||
:controller => 'repositories',
|
||||
:action => 'revision',
|
||||
:id => repository.project,
|
||||
:repository_id => repository.identifier_param,
|
||||
:rev => changeset.revision,
|
||||
:host => Setting.host_name,
|
||||
:protocol => Setting.protocol
|
||||
controller: 'repositories',
|
||||
action: 'revision',
|
||||
id: repository.project,
|
||||
repository_id: repository.identifier_param,
|
||||
rev: changeset.revision,
|
||||
host: Setting.host_name,
|
||||
protocol: Setting.protocol
|
||||
)
|
||||
end
|
||||
|
||||
@@ -111,8 +111,8 @@ module RedmineMessenger
|
||||
speak msg, channels, attachment, url
|
||||
end
|
||||
|
||||
def controller_wiki_edit_after_save(context = { })
|
||||
return unless Setting.plugin_redmine_rocketchat[:post_wiki_updates] == '1'
|
||||
def controller_wiki_edit_after_save(context = {})
|
||||
return unless RedmineMessenger.settings[:post_wiki_updates] == '1'
|
||||
|
||||
project = context[:project]
|
||||
page = context[:page]
|
||||
@@ -125,7 +125,7 @@ module RedmineMessenger
|
||||
channels = channels_for_project project
|
||||
url = url_for_project project
|
||||
|
||||
return unless channels.present? and url
|
||||
return unless channels.present? && url
|
||||
|
||||
attachment = nil
|
||||
unless page.content.comments.empty?
|
||||
@@ -136,24 +136,22 @@ module RedmineMessenger
|
||||
speak comment, channels, attachment, url
|
||||
end
|
||||
|
||||
def speak(msg, channels, attachment=nil, url=nil)
|
||||
return if channels.blank?
|
||||
def speak(msg, channels, attachment = nil, url = nil)
|
||||
return if channels.blank?
|
||||
|
||||
url = Setting.plugin_redmine_rocketchat[:rocketchat_url] unless url
|
||||
username = Setting.plugin_redmine_rocketchat[:username]
|
||||
icon = Setting.plugin_redmine_rocketchat[:icon]
|
||||
url = RedmineMessenger.settings[:messenger_url] unless url
|
||||
username = RedmineMessenger.settings[:messenger_username]
|
||||
icon = RedmineMessenger.settings[:messenger_icon]
|
||||
|
||||
params = {
|
||||
:text => msg,
|
||||
:link_names => 1,
|
||||
text: msg,
|
||||
link_names: 1
|
||||
}
|
||||
|
||||
params[:username] = username if username
|
||||
|
||||
|
||||
params[:attachments] = [attachment] if attachment
|
||||
|
||||
if icon and not icon.empty?
|
||||
if icon.present?
|
||||
if icon.start_with? ':'
|
||||
params[:icon_emoji] = icon
|
||||
else
|
||||
@@ -169,7 +167,7 @@ module RedmineMessenger
|
||||
client.ssl_config.cert_store.set_default_paths
|
||||
client.ssl_config.ssl_version = :auto
|
||||
client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
||||
client.post_async url, {:payload => params.to_json}
|
||||
client.post_async url, payload: params.to_json
|
||||
rescue Exception => e
|
||||
Rails.logger.warn("cannot connect to #{url}")
|
||||
Rails.logger.warn(e)
|
||||
@@ -178,6 +176,7 @@ module RedmineMessenger
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def escape(msg)
|
||||
msg.to_s.gsub('&', '&').gsub('<', '<').gsub('>', '>')
|
||||
end
|
||||
@@ -185,67 +184,67 @@ module RedmineMessenger
|
||||
def object_url(obj)
|
||||
if Setting.host_name.to_s =~ /\A(https?\:\/\/)?(.+?)(\:(\d+))?(\/.+)?\z/i
|
||||
host, port, prefix = $2, $4, $5
|
||||
Rails.application.routes.url_for(obj.event_url({:host => host, :protocol => Setting.protocol, :port => port, :script_name => prefix}))
|
||||
Rails.application.routes.url_for(obj.event_url(host: host, protocol: Setting.protocol, port: port, script_name: prefix))
|
||||
else
|
||||
Rails.application.routes.url_for(obj.event_url({:host => Setting.host_name, :protocol => Setting.protocol}))
|
||||
Rails.application.routes.url_for(obj.event_url(host: Setting.host_name, protocol: Setting.protocol))
|
||||
end
|
||||
end
|
||||
|
||||
def url_for_project(proj)
|
||||
return nil if proj.blank?
|
||||
|
||||
cf = ProjectCustomField.find_by_name('Rocket.Chat URL')
|
||||
cf = ProjectCustomField.find_by_name('Messenger URL')
|
||||
|
||||
[
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(url_for_project proj.parent),
|
||||
Setting.plugin_redmine_rocketchat[:rocketchat_url],
|
||||
RedmineMessenger.settings[:messenger_url]
|
||||
].flatten.find(&:present?)
|
||||
end
|
||||
|
||||
def post_private_issues_for_project(proj)
|
||||
return nil if proj.blank?
|
||||
|
||||
cf = ProjectCustomField.find_by_name('Rocket.Chat Post private issues')
|
||||
cf = ProjectCustomField.find_by_name('Messenger Post private issues')
|
||||
[
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(post_private_issues_for_project proj.parent),
|
||||
Setting.plugin_redmine_rocketchat[:post_private_issues],
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(post_private_issues_for_project proj.parent),
|
||||
RedmineMessenger.settings[:post_private_issues]
|
||||
].flatten.find(&:present?)
|
||||
end
|
||||
|
||||
def post_private_notes_for_project(proj)
|
||||
return nil if proj.blank?
|
||||
|
||||
cf = ProjectCustomField.find_by_name('Rocket.Chat Post private notes')
|
||||
cf = ProjectCustomField.find_by_name('Messenger Post private notes')
|
||||
[
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(post_private_notes_for_project proj.parent),
|
||||
Setting.plugin_redmine_rocketchat[:post_private_notes],
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(post_private_notes_for_project proj.parent),
|
||||
RedmineMessenger.settings[:post_private_notes]
|
||||
].flatten.find(&:present?)
|
||||
end
|
||||
|
||||
def channels_for_project(proj)
|
||||
return nil if proj.blank?
|
||||
|
||||
cf = ProjectCustomField.find_by_name('Rocket.Chat Channel')
|
||||
cf = ProjectCustomField.find_by_name('Messenger Channel')
|
||||
val = [
|
||||
(proj.custom_value_for(cf).value rescue nil),
|
||||
(channels_for_project proj.parent),
|
||||
Setting.plugin_redmine_rocketchat[:channel],
|
||||
RedmineMessenger.settings[:messenger_channel]
|
||||
].flatten.find(&:present?)
|
||||
|
||||
# Channel name '-' or empty '' is reserved for NOT notifying
|
||||
return [] if val.nil? or val.to_s == ''
|
||||
return [] if val.nil? || val.to_s == ''
|
||||
return [] if val.to_s == '-'
|
||||
return val.split(",") if val.is_a? String
|
||||
return val.split(',') if val.is_a? String
|
||||
val
|
||||
end
|
||||
|
||||
def detail_to_field(detail)
|
||||
field_format = nil
|
||||
|
||||
if detail.property == "cf"
|
||||
if detail.property == 'cf'
|
||||
key = CustomField.find(detail.prop_key).name rescue nil
|
||||
title = key
|
||||
field_format = CustomField.find(detail.prop_key).field_format rescue nil
|
||||
|
||||
Reference in New Issue
Block a user