View Issue Details

IDProjectCategoryView StatusLast Update
0011965mantisbtattachmentspublic2014-09-23 18:06
Reportercas 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.2.1 
Target VersionFixed in Version 
Summary0011965: File download counter
Description

We wanted to know how many times a file (attached to a bug) was downloaded.
Sfter some analysis it appears to be a very simple adjustment.

Steps To Reproduce

Add field downloaded (int 10 default 0) to mantis_bug_file_table
bug_api.php, function bug_get_attachments, add field downloaded
file_api, function file_get_visible _attachments add the lines :
$t_downloaded = $t_row[downloaded];
$t_attachment[downloaded] = $t_downloaded;
just before if( $t_can_download ) {
file_download.php, add the following lines:

Update download counter

$query2 = update $t_bug_file_table set downloaded=downloaded+1 WHERE id= . $v_id;
$result2 = db_query_bound( $query2 );
just after (line 75):
if ( !file_can_download_bug_attachments( $v_bug_id ) ) {access_denied();}
Last change in print-api.php, function print bug_attachment_list. add the line:
$t_downloaded = $t_attachment[downloaded] ;
just after $t_date_added=
Finally change the actual line that prints the attachment with:
echo $t_href_end .   . $t_href_start . $t_file_display_name . $t_href_end . $t_href_clicket . ( . $t_filesize . . lang_get( bytes ) . ) . <span class=\italic> . $t_date_added . Downloaded: . $t_downloaded . time(s)</span>;

Tagspatch

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0007060 closedatrol Add a downloads counter for attachment 

Activities

cas

cas

2010-05-28 05:47

reporter  

ScreenShot001.png (12,906 bytes)
ScreenShot001.png (12,906 bytes)
atrol

atrol

2012-03-14 17:39

developer   ~0031459

Reopened, the issue is not fixed in master-1.2.x or master branch at the official repository.

grangeway

grangeway

2012-10-20 20:00

reporter   ~0033295

this is fixed in the mantis-2.x branch

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036217

Marking as acknowledged not resolved/closed to track that change gets ported to master-2.0.x branch

Issue History

Date Modified Username Field Change
2010-05-28 05:47 cas New Issue
2010-05-28 05:47 cas File Added: ScreenShot001.png
2010-05-29 10:48 dhx Tag Attached: patch
2011-01-19 02:46 atrol Relationship added has duplicate 0007060
2012-03-03 20:32 grangeway Status new => resolved
2012-03-03 20:32 grangeway Resolution open => fixed
2012-03-03 20:32 grangeway Assigned To => grangeway
2012-03-04 02:10 vboctor Status resolved => closed
2012-03-14 17:39 atrol Note Added: 0031459
2012-03-14 17:39 atrol Status closed => feedback
2012-03-14 17:39 atrol Resolution fixed => reopened
2012-10-20 20:00 grangeway Note Added: 0033295
2012-10-20 20:00 grangeway Status feedback => resolved
2012-10-20 20:00 grangeway Fixed in Version => 1.3.0-beta.1
2012-10-20 20:00 grangeway Resolution reopened => fixed
2013-04-05 17:56 grangeway Status resolved => acknowledged
2013-04-05 17:56 grangeway Note Added: 0036217
2013-04-05 18:57 grangeway Relationship added related to 0015721
2013-04-06 06:45 grangeway Status acknowledged => closed
2013-04-06 07:22 grangeway Status closed => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2013-04-27 16:54 atrol Tag Attached: 2.0.x fixed
2013-04-27 16:54 atrol Assigned To grangeway =>
2013-04-27 16:54 atrol Resolution fixed => open
2013-04-27 16:54 atrol Fixed in Version 1.3.0-beta.1 =>
2013-04-27 16:54 atrol Steps to Reproduce Updated View Revisions
2013-04-27 16:54 atrol Status resolved => new
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-09-23 18:06 grangeway Tag Detached: 2.0.x fixed