View Issue Details

IDProjectCategoryView StatusLast Update
0022323mantisbtfeaturepublic2017-11-30 00:09
ReporteraavagyanAssigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version2.1.0 
Target VersionFixed in Version 
Summary0022323: Missing whole "Attached Files" section
Description

With all the great improvements in new MantisBT 2.x, me and my users (piloting new version with selected users) are confused about not finding "Attached Files" section, as well as central "Upload file" box (only under the 'add note' - something we have disabled in MantisBT 1.2.x). We use MantisBT more like case management system - and we use attachments extensively. People opening the case would like to see the case with all the supporting attachments. Now attachments are mixed-up with notes. It means that one needs to travel over all notes to collect attachments!? Some of our tickets have up to 200 notes and dozens of attachments. With new setup these cases are basically unmanageable - only 'small' tickets are more-or-less OK - while still not convenient.

Can we have config option to re-enable display of attachments displayed in the old way - grouped together and not scattered in "Activity" messed-up with notes?

Thank you,
Avetis

TagsNo tags attached.

Relationships

related to 0021727 closedvboctor Show attachments inline with notes 
has duplicate 0023340 closedatrol Missing whole "Attached Files" section 

Activities

cas

cas

2017-02-07 03:25

reporter   ~0055518

Last edited: 2017-02-22 13:07

View 3 revisions

In case you need this functionality, do the following:
add in config_inc.php, the following line:

$g_show_attachments     =   ON;

This makes it configurable, not absolutely neeeded but good practice,
Now open up bug_view_inc.php and goto line 727.
This is right after this section:

if( $t_custom_fields_found ) {
    # spacer
    echo '<tr class="spacer"><td colspan="6"></td></tr>';
    echo '<tr class="hidden"></tr>';
}

Just behind this section, add the following code:

# Attachments
if ( ON == config_get('show_attachments') ) {
    echo '<tr ', helper_alternate_class(), '>';
    echo '<td class="category"><a name="attachments" id="attachments" />', lang_get( 'attached_files' ), '</td>';
    echo '<td colspan="5">';
    print_bug_attachments_list( $t_bug_id, null);
    echo '</td></tr>';
} 

Here you are, your list is back in the main screen.

cas

cas

2017-02-07 03:27

reporter   ~0055519

This way it looks a bit funny because of the HTML thing.
In reality both the words 'spacer' and 'attachments' are prefixed with a '#' sign

cas

cas

2017-02-07 03:34

reporter   ~0055520

Last edited: 2017-02-07 05:32

View 2 revisions

Changed 2 more lines to be in line with new lay-out, so it should read:

if ( ON == config_get('show_attachments') ) {
    echo '<tr ', helper_alternate_class(), '>';
    echo '<th class="bug-attachments category">', lang_get( 'attached_files' ), '</th>';
    echo '<td class="bug-attachments" colspan="5">';
    print_bug_attachments_list( $t_bug_id, null);
    echo '</td></tr>';
}
aavagyan

aavagyan

2017-02-07 05:20

reporter   ~0055521

Thanks a lot! Works nicely.

Users can possibly use file attach under the 'add note' - doesn't seem to be a big problem. The only missing thing is date next to the attached file, but I looked into functions - it is removed in version 2.x so 'hack' needs to be deeper. My users would possible agree to live without date displayed in this box.

Can these changes be made part of next release?

dregad

dregad

2017-02-07 05:39

developer   ~0055523

@cas I edited your notes to add the markdown formatting so the code is displayed raw.

It was the decision of @vboctor to handle attachments upload and display at note level moving forward, so I let him comment on the eventuality of adding back the notion of "issue-level" attachments.

I have to say that I personally do not like the fact that a document uploaded as part of an issue's initial report appears as a separate bug note; this is made worse by the fact that I like to have notes sorted reverse (most recent first), so the initial attachments appear last.

It's worth mentioning that the current data model would not allow us to differentiate a note vs an issue attachment (currently this is an arbitrary link is based on the upload timestamp).

cas

cas

2017-02-07 06:37

reporter   ~0055527

@aavagyan, it makes sense that the date is taken away since that is visible within the note. Can be added but most likely then also will show up within the note which is not desirable.
@dregad, would agree with you, that is why I dived into this since I have the same wish. Not being able to distinguish between note vs issue attachment does not bother me too much. It is still visible within the notes.
@vboctor, I do understand where you are coming from, that is why I made the switch. Why not incorporate with default switch set to OFF? Saves us from hacking each version and more people happy (overal this version 2 is a step in the right direction anyway).

aavagyan

aavagyan

2017-02-07 06:44

reporter   ~0055528

I strongly believe that "ticket" or "issue" or "case" (no matter what is the term used) needs to have the main information, with supporting documentation (files) as "core" informational unit, whereas notes and the rest (e.g. change-sets, time-tracking info, issue log, etc.), can be appended to it as needed. It looks like it can be achieved more or less easily by displaying "File attachments" block. Config option would be even better to satisfy different needs, e.g.:

  • option 1: show attachments only centrally (don't know if central 'upload' is needed or "upload-in-note" is OK);
  • option 2: show attachment centrally, but also as "activity" item;
  • option 3: show attachments only as "activity" item.

Wikipedia:
"Mantis Bug Tracker is a free and open source, web-based bug tracking system. The most common use of MantisBT is to track software defects. However, MantisBT is often configured by users to serve as a more generic issue tracking system and project management tool."

I think that change is especially needed if we would like to keep last sentence valid.

dnewman

dnewman

2017-02-09 05:11

reporter   ~0055610

This is something that my department would also like to see reinstated. I agree with @aavagyan that for use as a project management tool having all attachments collated within one area is immensely useful.

When uploading items such as: functional or business requirements, this could prove quite costly if they were missed. This is more likely to occur if they are 'hidden' away within the notes/activities section.

A configuration option would be ideal.

dnewman

dnewman

2017-02-09 05:13

reporter   ~0055611

@cas I will test out those options on a test build of Mantis. Thank you for the effort.

aavagyan

aavagyan

2017-02-10 10:51

reporter   ~0055643

Discovered small glitch with this fix. Opening inline (+ sign) shows image in the top-block and not showing it in 'activity' block...

udaymantis

udaymantis

2017-02-17 10:35

reporter   ~0055718

The fix provided above works great, except that the details are coming on multiple lines as shown in the attachment here. Is there a way to make the details come on one line?



AttachedFiles.JPG (88,216 bytes)
AttachedFiles.JPG (88,216 bytes)
cas

cas

2017-02-22 12:46

reporter   ~0055748

Just change this line:
echo '<td class="bug-attachments" colspan="5">';
into:
echo '<td class="bug-attachments" colspan="7">';

Should do the trick!

dregad

dregad

2017-02-22 13:11

developer   ~0055749

in 0022323:0055518

echo '<tr ', helper_alternate_class(), '>';

Please note that helper_alternate_class() function is deprecated and will be removed in a future version of MantisBT

cas

cas

2017-02-23 11:07

reporter   ~0055767

Last edited: 2017-02-23 12:22

View 2 revisions

In order to be future compliant, I think that the line:
echo '<tr ', helper_alternate_class(), '>';
should read:
echo '<tr class="bug-attachments">';
So, the correct adjustment would be:

# Attachments
if ( ON == config_get('show_attachments') ) {
   echo '<tr class="bug-attachments">';
    echo '<td class="category"><a name="attachments" id="attachments">', lang_get( 'attached_files' ), '</td>';
    echo '<td class="bug-attachments" colspan="7">';
    print_bug_attachments_list( $t_bug_id, null);
    echo '</td></tr>';
}
aavagyan

aavagyan

2017-02-24 09:34

reporter   ~0055777

@cas I think it is colspan=5

helfy022

helfy022

2017-09-07 10:14

reporter   ~0057637

Hello,

Is there an official means of making available the "Attached Files" section without modifying the core configuration suite?

Thanks,
Ryan.

dzaggiel

dzaggiel

2017-09-08 09:44

reporter   ~0057646

@cas thanx for tip but how to delete comments with attachments since they are already in the attached file box?

cas

cas

2017-09-10 05:15

reporter   ~0057648

@dzaggiel, the attachements will show up on both places. Not much to do avbout that.

dzaggiel

dzaggiel

2017-09-11 05:25

reporter   ~0057673

@cas ahh :( It is possible to add a date and time to attachements?

helfy022

helfy022

2017-09-11 21:29

reporter   ~0057685

Hello,

In addition to the previous question, please also comment when possible on the question posed in this comment:

https://www.mantisbt.org/bugs/view.php?id=22323#c57637

Thanks very much,
Ryan.

cas

cas

2017-09-12 02:51

reporter   ~0057689

@ Ryan,
the direction of Mantis is set by the development team, see also https://www.mantisbt.org/bugs/view.php?id=22323#c55523 .
Hopefully they follow the suggestion made by myself but there is no guarantee for that.

@dzaggiel,
adding date/time requires adjustment of core functions which I wouldlike to avoid.
First and formost, I hope that this section is re-enabled again.

ycap

ycap

2017-09-13 04:13

reporter   ~0057709

Hello,
I have the same need.
The attached file section was very usefull in Mantis v1.2.15, it's almost indispensable for my use.
Do you know if it is planned to be added in a future version ?
Thanks
Yannick

cas

cas

2017-09-14 15:56

reporter   ~0057715

really no clue. for now this is an easy fix!

Issue History

Date Modified Username Field Change
2017-02-06 09:37 aavagyan New Issue
2017-02-06 09:48 atrol Relationship added related to 0021727
2017-02-07 03:25 cas Note Added: 0055518
2017-02-07 03:27 cas Note Added: 0055519
2017-02-07 03:34 cas Note Added: 0055520
2017-02-07 05:20 aavagyan Note Added: 0055521
2017-02-07 05:31 dregad Note Edited: 0055518 View Revisions
2017-02-07 05:32 dregad Note Edited: 0055520 View Revisions
2017-02-07 05:39 dregad Note Added: 0055523
2017-02-07 06:37 cas Note Added: 0055527
2017-02-07 06:44 aavagyan Note Added: 0055528
2017-02-09 05:11 dnewman Note Added: 0055610
2017-02-09 05:13 dnewman Note Added: 0055611
2017-02-10 10:51 aavagyan Note Added: 0055643
2017-02-17 10:35 udaymantis File Added: AttachedFiles.JPG
2017-02-17 10:35 udaymantis Note Added: 0055718
2017-02-22 12:46 cas Note Added: 0055748
2017-02-22 13:07 dregad Note Edited: 0055518 View Revisions
2017-02-22 13:11 dregad Note Added: 0055749
2017-02-23 11:07 cas Note Added: 0055767
2017-02-23 12:22 dregad Note Edited: 0055767 View Revisions
2017-02-24 09:34 aavagyan Note Added: 0055777
2017-09-07 10:14 helfy022 Note Added: 0057637
2017-09-08 09:44 dzaggiel Note Added: 0057646
2017-09-10 05:15 cas Note Added: 0057648
2017-09-11 05:25 dzaggiel Note Added: 0057673
2017-09-11 09:49 helfy022 Issue cloned: 0023340
2017-09-11 09:49 helfy022 Relationship added related to 0023340
2017-09-11 09:54 atrol Relationship replaced has duplicate 0023340
2017-09-11 21:29 helfy022 Note Added: 0057685
2017-09-12 02:51 cas Note Added: 0057689
2017-09-13 04:13 ycap Note Added: 0057709
2017-09-14 15:56 cas Note Added: 0057715