Issue Number | 4565 |
---|---|
Summary | [Media] Modify Media Caption and Content Report to include images |
Created | 2019-01-11 10:17:12 |
Issue Type | Improvement |
Submitted By | Osei-Poku, William (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-07-15 18:05:57 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.238558 |
We want to be able to see the respective images while using the Media Caption and Content report. Please modify the report and the report interface to include an optional feature of having the image included in a new column.
I have a couple comments regarding this request:
This is an Excel report. I do not know at this point if it's possible to include images within the cells of a spreadsheet.
The change request is release dependent and should be moved to Joule.
~oseipokuw, are we talking about adding a link to the images or including the actual image in an Excel cell?
If we're talking about the actual image - and if the Python software allows us to achieve this - there would still be a bunch of questions regarding the size of the image to be displayed (full size, thumb nail, etc.).
The preference is for adding the image to the spreadsheet instead of a link. I think a thumbnail would do. Also, if we get the ability to resize the image in the spreadsheet, that would be helpful. If that is not possible, please let me know what we should expect and that might just be good enough.
If you want the ability to resize a thumbnail you will still need the picture to be available using higher resolution which may make the spreadsheet as a whole pretty large depending on how many images are included. Don't try to send those document in an email. 🙂
So far, I have not been able to identify if it's possible to resize an image in such a way that the cell size adjusts with the image size.
As I mentioned before, we will have to identify if Excel allows us to present the images in a way you're expecting and then we'll have to identify if the Python library supports this. There is a bunch of preliminary testing that goes along with this ticket and I will have to enter the story point estimate accordingly.
I've been able to write a test program which allows me to add images to a spreadsheet, so we should be able to make the requested changes.
This report is almost finished, but I need some input from you ~oseipokuw.
The problem I'm having is to determine the "right" size for the images within the Image column. Images are not place "inside" of a cell but they are anchored to a cell. This is because images are more often than not larger than a row in Excel and you want to display the entire image. One option is now to specify the height of a column according to the image height - this will display the image as a regular thumbnail picture but it may hide portions of the text in the other rows. Another option is not to specify the row height. This will display all of the text in the content and caption fields but this would "stretch" the image to the height of that automatically set row height.
The first option looks better but likely requires adjusting row heights manually by the users.
We also want to decide the size of the image inside of the Image column.
Please have a look at the report on DEV but keep in mind that the entire portion to create the Excel report has been rewritten, so you do want to ensure everything else still looks as expected.
Please have a look at the report on DEV but keep in mind that the entire portion to create the Excel report has been rewritten, so you do want to ensure everything else still looks as expected.
I am getting a python script error message:
<type 'exceptions.NameError'> |
Python 2.7.13: D:\Python\python.exe |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
D:\Inetpub\wwwroot\cgi-bin\cdr\MediaCaptionContent.py in **() |
{color:#909090}{{ 469 image = get_image(doc.id, height=200, width=200, return_stream=True)}} |
{color}|
{color:#909090}{{ 470 except Exception as e:}} |
{color}|
|
{color:#909090}{{ 472 args = doc.cdr_id, doc.has_blob, e}} |
{color}|
{color:#909090}{{ 473 sys.stderr.write("{} ({}) failed: {}\n".format(*args))}} |
{color}|
bail undefined |
<type 'exceptions.NameError'>: name 'bail' is
not defined
{{ }}args = ("name 'bail' is not defined",)
{{ }}message = "name 'bail' is not defined"
D:\cdr\Log\tmpbfvt7r.html contains the description of this error.
The first option looks better but likely requires adjusting row heights manually by the users.
I agree. Let's proceed with the first option, with the knowledge that there is the possibility of manually adjusting columns to see al text. I don't see this as a big problem since the current option to run the report to see all the text remains.
Could you please let me know what options you are changing/choosing? I'm not able to reproduce the error at the moment.
The criteria are below. I think the problem happens when you select a date range from around March of 2017. Otherwise, it appears to work fine without any problems.
Good catch, ~oseipokuw!
The report failed when a media document was picked up that did not link to an image file. This has been fixed now and is on DEV.
The report looks good on DEV. We'll do more testing and let you know if we find any problems. Thanks!
~oseipokuw, can I assume that you didn't run into any additional problems with the report and I can merge these changes into the Joule branch?
Yes. Further tests did not reveal any problems.
Verified on DEV. Thanks!
The changes have been merged into our release branch Joule.
Verified on QA. Thanks!
Verifid on PROD. Thanks!
File Name | Posted | User |
---|---|---|
Caption and conent report.png | 2019-07-15 14:19:38 | Osei-Poku, William (NIH/NCI) [C] |
CaptionandContent.JPG | 2019-07-15 14:23:50 | Osei-Poku, William (NIH/NCI) [C] |
Elapsed: 0:00:00.001429