CDR Tickets

Issue Number 4534
Summary [Summaries] Display of Inserted Comments on QC Reports in Word
Created 2018-10-12 15:33:14
Issue Type Bug
Submitted By Juthe, Robin (NIH/NCI) [E]
Assigned To Englisch, Volker (NIH/NCI) [C]
Status Closed
Resolved 2019-05-24 16:03:46
Resolution Fixed
Path /home/bkline/backups/jira/ocecdr/issue.234345
Description

There seems to be an issue with the formatting of comments that are contained within insertion elements (might just be proposed insertions, but I am testing this). I'll add more details and examples soon.

This might be related to the changes in OCECDR-4482 in Ising, but I'm not sure.

More to come.

Comment entered 2018-10-12 16:37:32 by Juthe, Robin (NIH/NCI) [E]

Here's what I've found. The comments appear as they should when the RLSO or B/U QC report is run in my browser (Chrome); however, once I copy the report into Word, the formatting of comments within insertion elements (with either proposed or approved revision level) is thrown off. This happens upon copy/paste, before I run the macro. Here are the formatting issues:

1. The brackets around the comment and the word comment appear in regular text (not bold, not italicized).
2. The text of the comment itself matches the surrounding text of the inserted element - (i.e., bold for proposed insertions on the B/U QC report, bold and underlined for approved insertions on the same report). This text should also be bold and italicized.

CDR517309 (Cancer Genetics Overview) on QA contains some examples of inserted comments within the first paragraph of the summary.

Comment entered 2018-10-15 10:39:23 by Englisch, Volker (NIH/NCI) [C]

I don't think the Background issue is related to this. I'm wondering if the older ticket related to advisory comments has something to do with it.
I'll take a look.

Comment entered 2018-10-15 14:07:16 by Englisch, Volker (NIH/NCI) [C]

This does appear to be a problem with the CSS and probably the filters. However, I am surprised this issue wasn't caught during testing and hasn't been reported earlier.

Can you see how we missed you, ? :-)

Comment entered 2018-10-19 14:35:46 by Englisch, Volker (NIH/NCI) [C]

A little poking reveals that this specific problem is browser specific:

  • IE: The [Comment: label displays without color and the insertion text isn't bold/italic

  • Chrome: Looking good (in terms of comments inside insertion tags) but has other problems

  • FF: It displays all comment text/labels as regular text.

I will now have to investigate if it's possible to modify the CSS in a way that Word will understand but - as you can see from the fact that the comments are displayed correctly in the QC reports - there's nothing wrong with the way the filters are creating the reports.

Comment entered 2018-10-19 14:50:16 by Juthe, Robin (NIH/NCI) [E]

Thanks, Volker. I had been using IE (the default for QC reports, as you know), but I'll try Chrome and see if its problems are any less annoying. 🙂

Comment entered 2018-10-19 15:50:02 by Englisch, Volker (NIH/NCI) [C]

I noticed the image captions are centered instead of being aligned and the TOC entries are underlined (which can easily be changed). That's the only things I noticed glancing over the document.

It'll still be annoying, not sure if it's less though.

Comment entered 2018-10-29 13:03:22 by Juthe, Robin (NIH/NCI) [E]

While comments do look better in the Chrome version, tables unfortunately run off the page so I'd better stick with IE. 🙂

Comment entered 2018-10-29 16:19:17 by Englisch, Volker (NIH/NCI) [C]

I found another work-around that might be useful but involves several (possibly too many) steps. There exists an online service allowing you to convert all HTML styles into inline styles. The user would need to

  • save the QC report as a HTML document

  • open the saved HTML document

  • copy/paste the document into the webpage provided by the the project called juice

  • save the output to a HTML document

  • open the new document using Word.

The output in Word appears to look good. However, the text in tables is using a different font and font-size.

As Bob had suggested, in order for Word to process styles correctly those styles should be presented as inline styles. I was hoping to be able and preserve our styles and filters for the QC reports since those are working as expected but create a JavaScript tool to only modify Comment styles. This is how I stumbled across the tool juice listed above.

Comment entered 2018-10-29 16:19:24 by Englisch, Volker (NIH/NCI) [C]

I found another work-around that might be useful but involves several (possibly too many) steps. There exists an online service allowing you to convert all HTML styles into inline styles. The user would need to

  • save the QC report as a HTML document

  • open the saved HTML document

  • copy/paste the document into the webpage provided by the the project called juice

  • save the output to a HTML document

  • open the new document using Word.

The output in Word appears to look good. However, the text in tables is using a different font and font-size.

As Bob had suggested, in order for Word to process styles correctly those styles should be presented as inline styles. I was hoping to be able and preserve our styles and filters for the QC reports since those are working as expected but create a JavaScript tool to only modify Comment styles. This is how I stumbled across the tool juice listed above.

Comment entered 2018-10-29 16:20:52 by Englisch, Volker (NIH/NCI) [C]

In case you'd like to try it out here is the link to the tool juice:
http://automattic.github.io/juice/

Comment entered 2018-11-29 15:59:18 by Juthe, Robin (NIH/NCI) [E]

Volker and I reviewed the Juice tool together and unfortunately, tables run off the page with this output as well.

We discussed reverting the changes made in OCECDR-4482 on DEV in order to determine whether that caused the problem with the display of comments. If not, it might be a Word bug.

I've also noticed that additional white space appears on the QC report in place of comments that are not selected to be displayed. This might be related to the line breaks issue (OCECDR-4486).

We could use the following summary as an example: Genetics of Colorectal Cancer (CDR62863)

Comment entered 2019-01-03 14:39:17 by Juthe, Robin (NIH/NCI) [E]

Increased the priority on this as discussed in our status meeting.

Comment entered 2019-01-18 16:42:27 by Englisch, Volker (NIH/NCI) [C]

, since I have a new computer I'm trying to recreate the original problem first. I've modified CDR62902 on DEV adding regular and inserted comments for editorial board and advisory board. With the default settings for the QC report I see the internal comments suppressed and the external comments displayed. However, I see both, the editorial and advisory, external comments displayed when I expected only to see the external editorial board comment.

Do we have additional problems with the display of comments?

Comment entered 2019-01-31 11:01:30 by Juthe, Robin (NIH/NCI) [E]

I made some additional changes to 62902 on DEV to add comments within proposed and approved insertion elements in the first para. When you view the QC report in the browser, the comments look fine, but the formatting changes upon copy/paste into Word (see my first comment above). The display "takes on" the display of the surrounding text.

I am not seeing the Advisory Board comments with the default comment options selected (external, not advisory) so I think this is working as it should...

Comment entered 2019-02-14 16:21:13 by Englisch, Volker (NIH/NCI) [C]

I am using the CWD and I'm using all default options for the QC report. When you're saying "the comments look fine" for the QC report you mean "the comments are not displayed", right? You've entered Internal comments which are not displayed for the default QC report settings.

When I copy this QC report to Word is shows exactly as in the QC report - the comments aren't displayed.

I do see a problem in my test cases underneath the table when the comment is loosing Italics and bold and the string "[Comment" is displayed without the red color after the copy/paste to Word.

Comment entered 2019-02-14 16:24:03 by Englisch, Volker (NIH/NCI) [C]

QC Report Output

Word Display

Comment entered 2019-02-14 16:28:07 by Englisch, Volker (NIH/NCI) [C]

QC Report Output

Word Display

Comment entered 2019-03-08 17:29:58 by Englisch, Volker (NIH/NCI) [C]

Robin and I were looking at the different QC reports we were seeing and it turned out that the QC report I'm creating on the DEV-VM looks different from the appearance when Robin runs the report. However, I was able to reproduce Robin's behavior when running the QC report on Windows 10 using Parallels on my laptop.
I believe the problem is that the JavaScript for the report is not running in IE on the DEV-VM. There may be a specific setting on the DEV-VM preventing JS from running.

Comment entered 2019-04-03 16:12:39 by Englisch, Volker (NIH/NCI) [C]

I still have questions about the different combinations of how Comment elements may be displayed in each of the different permutations of options.  However, I have rewritten how the CSS gets applied to the comment elements which preserves the formatting of the QC report when the text is copy/pasted into Word.

I followed 's suggestion of using inline CSS to markup these elements.

Once I've talked with about the color palette of comments, these changes could be tested on DEV.

Comment entered 2019-05-09 11:42:23 by Juthe, Robin (NIH/NCI) [E]

I've reviewed the changes on DEV (CDR62902) and I think we should avoid using different colors for comments in insertion/deletion markup. If we use colors, then we would need to treat them differently for RLSO and B/U QC reports; it also makes some comments stand out more than others, which could be misleading or cause us to miss some of them. I think we should have all comments appear in black bold, italicized text and not be concerned with what markup elements are around it. I also tested copying/pasting the summaries into Word and the CSS was preserved. Yay!

Comment entered 2019-05-24 16:03:31 by Englisch, Volker (NIH/NCI) [C]

I've made the changes on DEV to set the CSS as discussed and ran a couple of QC reports with a bunch of Comments (OCECDR-4624 coming in handy).  So far everything is looking good for both, the QC output as well as the pasted display in MS-Word.

If you're happy with this, , we can push this change to the other tiers.

Comment entered 2019-06-20 11:10:46 by Juthe, Robin (NIH/NCI) [E]

We're getting close 🙂. Comments inside proposed insertion/deletion elements are still green. They should be black. Other comments including those inside approved insertions look good! Thanks.

Comment entered 2019-07-01 18:02:16 by Englisch, Volker (NIH/NCI) [C]

I've made additional changes to the filters

  • CDR335166: Module: Checkbox Formatter

  • CDR380957: Module: STYLE RS Insertion Deletion

Please verify on DEV.

 

Note: I will probably need to re-install these filters since Bob is in the process of setting up Joule on DEV.

Comment entered 2019-07-11 10:39:16 by Juthe, Robin (NIH/NCI) [E]

Checking this on DEV but inserted comments are displaying in green/red on the RLSO QC report so I'm guessing these filters may need to be reinstalled. I'll stay tuned! Thanks.

Comment entered 2019-07-11 11:29:36 by Englisch, Volker (NIH/NCI) [C]

I've re-installed the two modified filters.  Please give it another try.

Comment entered 2019-07-11 15:29:51 by Juthe, Robin (NIH/NCI) [E]

Looks great on DEV. Thank you!

Comment entered 2019-07-11 16:23:45 by Englisch, Volker (NIH/NCI) [C]

If Jira allowed me I would now add a Dancing Banana but I'll have to leave it at a simple: WooHoo!!!

Comment entered 2019-07-15 13:24:49 by Englisch, Volker (NIH/NCI) [C]

The filters have been installed on QA and are ready for your review.

Comment entered 2019-07-16 10:06:37 by Juthe, Robin (NIH/NCI) [E]

Verified on QA. Thank you!

Comment entered 2019-07-16 17:47:25 by Englisch, Volker (NIH/NCI) [C]

The filter changes have been copied to STAGE and PROD:

  • CDR335166: Module: Checkbox Formatter

  • CDR380957: Module: STYLE RS Insertion Deletion

The following commits are including these changes:
https://github.com/NCIOCPL/cdr-server/commit/fbc47dbd0

https://github.com/NCIOCPL/cdr-server/commit/fbc47dbd 

Please verify on PROD.

Comment entered 2019-07-17 16:33:51 by Juthe, Robin (NIH/NCI) [E]

Verified on PROD. Thank you!!

Attachments
File Name Posted User
Screen Shot 2019-02-14 at 16.21.52.png 2019-02-14 16:23:11 Englisch, Volker (NIH/NCI) [C]
Screen Shot 2019-02-14 at 16.22.13.png 2019-02-14 16:23:59 Englisch, Volker (NIH/NCI) [C]
Screen Shot 2019-02-14 at 16.26.33.png 2019-02-14 16:27:49 Englisch, Volker (NIH/NCI) [C]
Screen Shot 2019-02-14 at 16.26.53.png 2019-02-14 16:28:00 Englisch, Volker (NIH/NCI) [C]

Elapsed: 0:00:00.001388