Display the username who updated issue in the my view page ?
Moderators: Developer, Contributor
Display the username who updated issue in the my view page ?
Hi All,
I would like to add the user who "edited or updated the issue last" in the My View page . Will it possible to add. If possible how ?
Mantis 1.2.3
Apache 2.2
MySQL 5
PHP 5
Regards
Jithin K
I would like to add the user who "edited or updated the issue last" in the My View page . Will it possible to add. If possible how ?
Mantis 1.2.3
Apache 2.2
MySQL 5
PHP 5
Regards
Jithin K
- Attachments
-
- requirement.JPG (77.72 KiB) Viewed 19099 times
Re: Display the username who updated issue in the my view pa
Just a quick and dirty code line to see how it works
Insert the following line after line 502 of my_view_inc.php
As always: Be aware that your modifications are lost when updating MantisBT and might not work the same way in newer versions!
Insert the following line after line 502 of my_view_inc.php
Code: Select all
print_user ( $t_bug->handler_id );
Re: Display the username who updated issue in the my view pa
Hi Atrol,
Thank you very much for your response.
What i mean is
1. Display the username who edited /updated/ change the status of the issue in the My view page .
While adding your code "print_user ( $t_bug->handler_id );" , it shows assigned username.
Can i Display the username who edited /updated/ change the status of the issue there ?
Regards
Jithin K
Thank you very much for your response.
What i mean is
1. Display the username who edited /updated/ change the status of the issue in the My view page .
While adding your code "print_user ( $t_bug->handler_id );" , it shows assigned username.
Can i Display the username who edited /updated/ change the status of the issue there ?
Regards
Jithin K
Re: Display the username who updated issue in the my view pa
My code was just to give you a hint where you have to change code and a function which should be used when displaying usersjithinkcs wrote: What i mean is
1. Display the username who edited /updated/ change the status of the issue in the My view page .
While adding your code "print_user ( $t_bug->handler_id );" , it shows assigned username.
Can i Display the username who edited /updated/ change the status of the issue there ?
You can find the information you need in mantis_bug_history_table
Re: Display the username who updated issue in the my view pa
Hi Atrol,
Thanks for your response
Jithin
Thanks for your response
Jithin
Re: Display the username who updated issue in the my view pa
Hi Atrol,
I did it . Thank u very much
I did it . Thank u very much
Re: Display the username who updated issue in the my view pa
Great to hear,
I hope you will not get any performance issues.
If this page is used by a lot of users your database might get stressed.
Also be aware that this page does a autorefresh. But shouldn't be too bad as long as you didn't change $g_min_refresh_delay (default is 10 minutes)
I hope you will not get any performance issues.
If this page is used by a lot of users your database might get stressed.
Also be aware that this page does a autorefresh. But shouldn't be too bad as long as you didn't change $g_min_refresh_delay (default is 10 minutes)
Re: Display the username who updated issue in the my view pa
Hi Atrol,
I didn't get any performance issue till now. I didn't change the $g_min_refresh_delay.
Thanks for response.
Regards
Jithin K
I didn't get any performance issue till now. I didn't change the $g_min_refresh_delay.
Thanks for response.
Regards
Jithin K
Re: Display the username who updated issue in the my view pa
Hello jithinkcs,
Would you happen to have the code you used to do this? I am trying to do something similar, just on the view all page.
Thank you,
Doug D
Would you happen to have the code you used to do this? I am trying to do something similar, just on the view all page.
Thank you,
Doug D
Re: Display the username who updated issue in the my view pa
Hi,
I added the following line under 502 my_view_inc.php.
$query = "SELECT user_id FROM mantis_bug_history_table WHERE bug_id=$t_bug->id ORDER BY date_modified DESC";
if ($result=mysql_query($query))
{
if ($row=mysql_fetch_row($result))
{
echo " - ";
echo "Last edited by ";
print_user($row[0]);
}
else
{
}
}
else
{
#echo "<!-- SQL Error ".mysql_error()." -->";
}
I added the following line under 502 my_view_inc.php.
$query = "SELECT user_id FROM mantis_bug_history_table WHERE bug_id=$t_bug->id ORDER BY date_modified DESC";
if ($result=mysql_query($query))
{
if ($row=mysql_fetch_row($result))
{
echo " - ";
echo "Last edited by ";
print_user($row[0]);
}
else
{
}
}
else
{
#echo "<!-- SQL Error ".mysql_error()." -->";
}