date_submitted is empty ???

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Uwe
Posts: 21
Joined: 05 Nov 2008, 10:13
Location: Flensburg, Germany

date_submitted is empty ???

Post by Uwe »

Hi,

I'm writing my own "custom_function_override_changelog_print_issue".
Within this function I want to display the date of submitting.
But the output for the date is: "1970-01-01".
To narrow down the problem I put
echo("sub: $t_bug->date_submitted");
echo("upd: $t_bug->last_updated");
into my code. The output is:
sub: upd: 1229099296
The date_submitted entry is empty which is of course not true!
Can anybody explain this?

--Uwe
Uwe
Posts: 21
Joined: 05 Nov 2008, 10:13
Location: Flensburg, Germany

Re: date_submitted is empty ???

Post by Uwe »

Maybe I can be more concrete.
I'm using Mantis V1.1.6 and that is my whole "custom_functions_inc.php" file:
<?php
function custom_function_override_changelog_print_issue( $p_issue_id )
{
$t_bug = bug_get( $p_issue_id, true ); # get bug-info
$t_1 = $t_bug->date_submitted;
$t_2 = $t_bug->last_updated;
$t_3 = $t_bug->priority;
echo("ID: $p_issue_id sub:$t_1 upd:$t_2 prio:$t_3 <br>");
}
?>

And that is the output:
ID: 835 sub: upd:1229185651 prio:30

"date_submitted" is empty whereas the other parameters have valid values.

I also tried some others like "reporter_id", "handler_id", "status" or "category".
Each of them is working....except "date_submitted".
I'm going mad!

Anybody who can check this code above on his or her machine?
Any comments are appreciated!
--Uwe
Uwe
Posts: 21
Joined: 05 Nov 2008, 10:13
Location: Flensburg, Germany

Re: date_submitted is empty ???

Post by Uwe »

It's a bug in "bug_api.php".
See http://www.mantisbt.org/bugs/view.php?id=10011 for details.
It  will be released in 1.1.7.
Post Reply