Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with RedmineUP Helpdesk plugin (Redmine 3.4x) #52

Open
alterdaemon opened this issue Oct 23, 2018 · 5 comments
Open

Compatibility with RedmineUP Helpdesk plugin (Redmine 3.4x) #52

alterdaemon opened this issue Oct 23, 2018 · 5 comments

Comments

@alterdaemon
Copy link

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")
@deecay
Copy link
Owner

deecay commented Oct 24, 2018

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.

@alterdaemon
Copy link
Author

alterdaemon commented Oct 24, 2018

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.

@lublasco
Copy link

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!

@ashrafalzyoud
Copy link

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

@ashrafalzyoud
Copy link

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants