Editing submitted date

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
jajr
Posts: 1
Joined: 13 Dec 2010, 18:05

Editing submitted date

Post by jajr »

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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Editing submitted date

Post by atrol »

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
squarebox
Posts: 12
Joined: 19 Nov 2009, 06:51

Re: Editing submitted date

Post by squarebox »

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.
MCBurner
Posts: 18
Joined: 14 Nov 2011, 12:56

Re: Editing submitted date

Post by MCBurner »

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
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Editing submitted date

Post by atrol »

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
tmsayleb
Posts: 1
Joined: 31 Mar 2012, 14:41

Re: Editing submitted date

Post by tmsayleb »

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
Post Reply