Editing submitted date

General discussion of Mantis.

Moderators: Developer, Contributor

Editing submitted date

Postby jajr » Dec 13, 2010 1:14 pm

I've just starting to use Mantis and am in the process of entering some issues that I have accumulated over time by email.

I would like to enter the actual date the issue was sent to me, rather than the date I put them into Mantis, so I would like to know if there is a way to edit the submitted date of a bug.

Thanks for any help.

Jim
jajr
 
Posts: 1
Joined: Dec 13, 2010 1:05 pm

Re: Editing submitted date

Postby atrol » Dec 13, 2010 2:06 pm

It's not possible with standard installation of MantisBT
you could
a) change the source code of MantisBT and make the standard field editable
b) write a plugin
c) add an additional custom date field "Date of customer submit"
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 4626
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Editing submitted date

Postby squarebox » Dec 13, 2010 9:23 pm

i had the same issue when importing from our previous system. In teh end, i just opened up the DB and edited the submitted/created date directly. Which is definately not supported, so back up your db before you do it, but it was pretty straight forward.
squarebox
 
Posts: 12
Joined: Nov 19, 2009 1:51 am

Re: Editing submitted date

Postby MCBurner » Feb 01, 2012 6:16 am

Hi.

I was wondering if there is a "change ticket creation date" in newer versions of mantis as this request is older than a year now. Or a plugin that provides such a feature?
From what I know the date_submitted date for each ticket is only used in one table (mantis_bug_table) and there are no dependencies to other tables for this value. So as long as you change it very carefully within the db table itself - it shouldn't be a big problem in terms of database integrity.

I tried to find a code or a plugin but wasn't successfull....
My Mantis Installation: MantisBT-Version 1.2.8 - Schema-Version 183
Plugins: Email Reporting 0.8.4 used with WebMail (IMAP)
WebServer OS Linux 2.6.32-37 Ubuntu
PHP Version 5.3.8-nmm1
MySQL Server Version: 5.1.43
MCBurner
 
Posts: 18
Joined: Nov 14, 2011 7:56 am

Re: Editing submitted date

Postby atrol » Feb 02, 2012 3:00 am

MCBurner wrote:I was wondering if there is a "change ticket creation date" in newer versions of mantis as this request is older than a year now.
AFAIK there is no change since that time.
MCBurner wrote: it shouldn't be a big problem in terms of database integrity.
I agree.
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 4626
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Editing submitted date

Postby tmsayleb » Mar 31, 2012 9:57 am

you can solve this very easily by editing the file ../mantis/core/date_api.php and adding the value of -2 to the current year date function as follows:

function print_year_range_option_list( $p_year = 0, $p_start = 0, $p_end = 0) {
$t_current = date( "Y" )-2 ;
$t_forward_years = config_get( 'forward_year_count' ) ;

You may change put -1 or -2 or -3 to go back the number you like.
For the forward_year_count parameter, you can set it in config_defaults_inc.php file and change it from the default value (4) to any positive number.

Regards :D
tmsayleb
 
Posts: 1
Joined: Mar 31, 2012 9:41 am


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests