redmine_pivot_table icon indicating copy to clipboard operation
redmine_pivot_table copied to clipboard

Compatibility with RedmineUP Helpdesk plugin (Redmine 3.4x)

Open alterdaemon opened this issue 6 years ago • 5 comments

You need to add the following line:

    elsif c.name.to_s == "helpdesk_ticket"
      formatted_issue[c.caption] = ""

in /plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb

after

issues.each{|i|
  formatted_issue = {}
  @query.available_columns.each{|c|
    if c.name.to_s == "id"
      formatted_issue["ID"] = column_content(c, i)

Also I had no luck with the date conversion so I had to revert to the previous code:

  if column_content(c, i).to_s != ""
  # formatted_issue[c.caption+"(U)"] = Date.strptime(column_content(c, i), strpformat).strftime("%Y-W%U") # org
  formatted_issue[c.caption+"(U)"] = Date.parse(column_content(c, i)).strftime("%Y-W%U") # working
  # formatted_issue[c.caption+"(U)"] = Date.strptime(column_content(c, i),I18n.t(:"date.formats.default", {:locale => I18n.locale })).strftime("%Y-W%U")

alterdaemon avatar Oct 23 '18 18:10 alterdaemon

Hi,

What kind of error do you see now? I do not want to use plugin-specific string such as "helpdesk_ticket". I will try to do something more robust.

deecay avatar Oct 24 '18 00:10 deecay

I understand but I needed a quick fix. The problem lies in a quite complex column rendered by helpdesk plugin which contains image, link and html

\redmine_contacts_helpdesk\lib\redmine_helpdesk\patches\queries_helper_patch.rb

     elsif column.name.eql?(:helpdesk_ticket) && issue.customer && issue.is_a?(Issue)
        contact_tag(issue.customer, :size => "32", :type => "avatar", :class => "avatar") +
        content_tag(:div,
          content_tag(:p, link_to(issue.subject, issue_path(issue)), :class => 'ticket-name') +
          content_tag(:p, content_tag(:small, issue.description.gsub("(\n|\r)", "").strip.truncate(100)), :class => "ticket-description") +
          content_tag(:p, "#{content_tag('span', '', :class => "icon #{helpdesk_ticket_source_icon(issue.helpdesk_ticket)}", :title => l(:label_note_type_email))} #{l(:label_helpdesk_from)}: #{contact_tag(issue.customer, :type => "plain")}, ".html_safe + l(:label_updated_time, time_tag(issue.helpdesk_ticket.last_message_date)).html_safe, :class => "contact-info"),
        :class => 'ticket-data')

I am not able to recreate the error now but it was complaining about helpdesk_ticket icon tag.

alterdaemon avatar Oct 24 '18 00:10 alterdaemon

Hi, it would be great if this compatibility "pivot table - redmineup helpdesk" could be achieved. This plugin is a great idea but I can't use it in my application due to this incompatibility.

Also I couldn't make them work together with the patches indicated by @dgutkowsky

Thanks in advance!

lublasco avatar Nov 27 '18 12:11 lublasco

im same problem are any one find the soultion??? @deecay @dgutkowsky @lublasco @miloja

ashrafalzyoud avatar Sep 01 '20 14:09 ashrafalzyoud

ActionView::Template::Error (undefined method `link_to_deal' for #<#Class:0x0000560fecd1a9f0:0x00007fe534a6f218>): 55: <% if @table == "activity" %> 56: data = <%= raw parse_events(@events).to_json %>; 57: <% else %> 58: data = <%= raw parse_issues(@issues).to_json %>; 59: <% end %> 60: 61: var dateFormat = $.pivotUtilities.derivers.dateFormat;

plugins/redmine_contacts/lib/redmine_contacts/patches/compatibility/application_helper_patch.rb:44:in block in format_object_with_contact' plugins/redmine_contacts/lib/redmine_contacts/patches/compatibility/application_helper_patch.rb:43:in map' plugins/redmine_contacts/lib/redmine_contacts/patches/compatibility/application_helper_patch.rb:43:in format_object_with_contact' plugins/redmine_contacts_invoices/lib/redmine_invoices/patches/application_helper_patch.rb:37:in format_object_with_invoices' plugins/redmine_people/lib/redmine_people/patches/application_helper_patch.rb:67:in format_object_with_people' app/helpers/queries_helper.rb:250:in column_value' plugins/redmine_contacts/lib/redmine_contacts/patches/queries_helper_patch.rb:66:in column_value_with_contacts' plugins/redmineup_tags/lib/redmineup_tags/patches/queries_helper_patch.rb:43:in column_value_with_tags' plugins/redmine_checklists/lib/redmine_checklists/patches/queries_helper_patch.rb:51:in column_value_with_checklists' plugins/redmine_contacts_invoices/lib/redmine_invoices/patches/queries_helper_patch.rb:41:in column_value_with_invoices' plugins/redmine_finance/lib/redmine_finance/patches/queries_helper_patch.rb:48:in column_value_with_finance' plugins/redmine_people/lib/redmine_people/patches/queries_helper_patch.rb:71:in column_value_with_people' plugins/redmine_products/lib/redmine_products/patches/queries_helper_patch.rb:55:in column_value_with_products' app/helpers/queries_helper.rb:218:in column_content' plugins/redmine_contacts_helpdesk/lib/redmine_helpdesk/patches/queries_helper_patch.rb:50:in column_content_with_helpdesk' plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb:81:in block (2 levels) in parse_issues' plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb:78:in each' plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb:78:in block in parse_issues' plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb:76:in each' plugins/redmine_pivot_table/app/helpers/pivottables_helper.rb:76:in parse_issues' plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:58:in _plugins_redmine_pivot_table_app_views_pivottables_index_html_erb__3035146999886158181_47313198832540' lib/redmine/sudo_mode.rb:65:in sudo_mode'

ashrafalzyoud avatar Sep 01 '20 14:09 ashrafalzyoud