View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026127 | mantisbt | attachments | public | 2019-09-12 00:37 | 2019-10-01 14:07 |
Reporter | anatoly.kabakov | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | confirmed | Resolution | open | ||
Summary | 0026127: 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 | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
if you follow the sequence of actions:
|
|
By inserting I assume you mean pasting. In my opinion, this feature works as designed. |
|
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? 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? |
|
I do not paste a screenshot, I paste text from excel - this automatically inserts a screenshot of the copied excel cell |
|
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.
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 ? |
|
@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. |
|
For the record, the same issue was reported in forums.
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...
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). Thoughts ? |
|
@dregard When you paste an image, the browser generates two entries: one for the file name and the other for the actual image so defaulting to text/plain will be equal to disabling the paste functionality altogether. |
|
@syncguru, I think you misunderstood what I was saying...
In other words, I'm suggesting to give preference to pasting text vs an image, when both are present in the clipboard. If there is only an image, it would still be pasted. If you think this is not acceptable, then what about the proposed alternative, to ask the user what they actually want to paste ? |
|
There are always multiple formats available. I have not seen a case where there was only a single entry in the clipboard.
I like this suggestion. The next step here is to repro locally and see what mantisbt gets from clipboard then see if we can find a good solution. Asking the user is an option. |
|