View Issue Details

IDProjectCategoryView StatusLast Update
0026127mantisbtattachmentspublic2019-09-17 04:07
Reporteranatoly.kabakov Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status confirmedResolutionopen 
Summary0026127: when inserting data from excel, an attachment is added .png = screenshot of the data
Description

when inserting data from excel, an attachment is added .png = screenshot of the data
number of added .png = number of inserts
example of a file from which the data in the attachment was copied (summary and description of this issue copied-pasted from this file
version Mantis >= 2.22.0
possibly related to 0021797
tested in browsers: Firefox 69 and Google Chrom 76.0.3809.132

TagsNo tags attached.

Relationships

related to 0021797 closedsyncguru Add support for pasting images as attachments 

Activities

2019-09-12 00:37

 

issue.xlsx (7,859 bytes)
изображение.png (235 bytes)   
изображение.png (235 bytes)   
anatoly.kabakov

anatoly.kabakov

2019-09-12 00:56

reporter   ~0062768

if you follow the sequence of actions:

  1. insert the same data into text editor
  2. copy data from a text editor
  3. Paste into Mantis
    then inserted as text
dregad

dregad

2019-09-12 04:35

developer   ~0062769

when inserting data from excel, an attachment is added .png = screenshot of the data

By inserting I assume you mean pasting.

In my opinion, this feature works as designed.
Could you please explain why you consider this as a problem, and what you believe should be the expected behavior ?

anatoly.kabakov

anatoly.kabakov

2019-09-12 06:18

reporter   ~0062774

The screenshots from this issue do not contain any information, they only take up space in the database (the text "when inserting data from excel, an attachment is added .png = screenshot of the data" was pasting - part of this text is on the screenshot)

Each insert of such information leads to the creation of a separate screenshot - why?
I pasting the specified excel cell into the fields: summary and description - 2 screenshots were created

if I needed to pasting the inclusion of one Excel cell 5 times in the current comment, then 5 screenshots would be attached to the comment

Is this behavior of Mantis regulated by some kind of option?

anatoly.kabakov

anatoly.kabakov

2019-09-12 06:55

reporter   ~0062775

I do not paste a screenshot, I paste text from excel - this automatically inserts a screenshot of the copied excel cell

dregad

dregad

2019-09-16 10:10

developer   ~0062813

I think the problem is due to the fact that Excel is copying data to the clipboard in multiple formats, including a bitmap which is considered as a file attachment when pasting into Mantis.

This is the result of a single copy operation of an Excel cell.

DataTransferItem {kind: "string", type: "text/plain"}
DataTransferItem {kind: "string", type: "text/html"}
DataTransferItem {kind: "string", type: "text/rtf"}
DataTransferItem {kind: "file", type: "image/png"}  <== that's your screenshot

There are probably other scenarios where clipboard contents is available both as text and bitmap. The question is to identify these scenarios on the receiving end, and decide how to handle it properly.

@syncguru, any ideas ?

syncguru

syncguru

2019-09-16 16:30

developer   ~0062827

@dregad .. interesting behavior from Excel. Your analysis is correct. We pick the last entry from the clipboard since it has the target file type and continues.
A workaround for this is to use an intermediary before pasting in Mantis. Past into a text editor (i.e. sublime) then copy that and paste into Mantis.

dregad

dregad

2019-09-17 04:07

developer   ~0062833

For the record, the same issue was reported in forums.

@syncguru

A workaround for this is to use an intermediary before pasting in Mantis. Past into a text editor (i.e. sublime) then copy that and paste into Mantis.

As far as workarounds go, I think it would be easier to just remove the unwanted pasted attachment from MantisBT before submitting the issue or bugnote.

You did not answer my earlier question...

The question is to identify these scenarios on the receiving end, and decide how to handle it properly.

I've been thinking about this some, and if there are multiple formats available in the clipboard, we should default to pasting text/plain (and ignore image files).
Alternatively, we could ask the user what they actually want to paste (text or image).

Thoughts ?

Issue History

Date Modified Username Field Change
2019-09-12 00:37 anatoly.kabakov New Issue
2019-09-12 00:37 anatoly.kabakov File Added: issue.xlsx
2019-09-12 00:37 anatoly.kabakov File Added: изображение.png
2019-09-12 00:37 anatoly.kabakov File Added: изображение-2.png
2019-09-12 00:56 anatoly.kabakov Note Added: 0062768
2019-09-12 04:29 dregad Relationship added related to 0021797
2019-09-12 04:35 dregad Assigned To => dregad
2019-09-12 04:35 dregad Status new => feedback
2019-09-12 04:35 dregad Note Added: 0062769
2019-09-12 06:18 anatoly.kabakov Note Added: 0062774
2019-09-12 06:18 anatoly.kabakov Status feedback => assigned
2019-09-12 06:55 anatoly.kabakov Note Added: 0062775
2019-09-16 10:10 dregad Note Added: 0062813
2019-09-16 10:11 dregad Assigned To dregad =>
2019-09-16 10:11 dregad Status assigned => confirmed
2019-09-16 16:30 syncguru Note Added: 0062827
2019-09-17 04:07 dregad Note Added: 0062833