berti92 / mega_calendar

Plugin for redmine: Brings a better calendar and more opportunities to display issues and holidays
http://www.devbert.de/index.php/en/project/megacalendar/
MIT License
70 stars 51 forks source link

Issue page: long text fields missing with mega_calendar and field option to use full width #95

Closed injectstar closed 2 years ago

injectstar commented 3 years ago

I have found out that long text fields like the description are not displayed on the issue page after enabling the plugin. For some reason it does not seem to happen in all projects, but it happens only with those 2 factors present:

1.) mega_calendar plugin installed 2.) long text field is set on full width layout

However, these fields stay editable in all situations. It seems the plugin recognizes only those attributes which are in the <div class="attributes">. full width text fields are usually in separated follow-up containers e.g <div class="cf_20 attribute">

System information:

Redmine version 4.1.1.stable Ruby version 2.6.6-p146 (2020-03-31) [x86_64-linux] Rails version 5.2.4.2 Environment production Database adapter PostgreSQL Mailer queue ActiveJob::QueueAdapters::AsyncAdapter Mailer delivery smtp SCM: Subversion 1.10.4 Mercurial 4.8.2 Bazaar 2.8.0 Git 2.20.1 Filesystem Redmine plugins: issue_mail_with_attachments 0.9.0 mega_calendar 1.7.3 redmine_ckeditor 1.2.3 redmine_custom_auto_complete 0.0.1 redmine_local_avatars 1.0.5.2.0 sidebar_hide 0.0.8

https://www.redmine.org/issues/34091

Xtrapat commented 2 years ago

In case someone wants to create a Pull Request or just get a Solution to this Problem for their own Redmine Installation:

The Issue can be fixed by adding <%= render_full_width_custom_fields_rows(@issue) %> around Line 104 in the file app/views/issues/show.html.erb in the mega_calendar plugin folder. Add it just before <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %> .

The custom_fields should be showing now. I have not noticed any undesirable after effects. Tested on Redmine 4.2 & Mega Calendar 1.7.5.