Target version on status change to "assigned"

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Target version on status change to "assigned"

Post by Reinder »

I would like to add the field "target version" on the page bug_change_status_page.php when I assign it to someone. I can now only change the "assigned to" field and add comments. I can now only do this when I resolve the issue (from status assigned to resolved).

Kr,
Reinder
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Target version on status change to "assigned"

Post by istvanb »

I understand your question, and I believe you made a legit point here. In the other hand I dont believe it is possible with the current release of mantis. You need to modify probably one or two php files. Its not a very big deal though.

Just to make one point: when you move the issue to "resolved" you have the "fixed in version" and not the target version.
istvanb
Posts: 226
Joined: 22 Aug 2010, 21:00

Re: Target version on status change to "assigned"

Post by istvanb »

Actually I made a mod which does the job for you:

open your bug_change_status_page.php and make a search for the following string: "<!-- Fixed in Version -->"

couple lines below the string you will find something like this:
<?php }
} ?>

Now hit couple enters below this and copy the followings:

Code: Select all

<?php
if ( config_get( 'bug_assigned_status' ) == $f_new_status ) {
	$t_show_product_version = ( ON == config_get( 'show_product_version' ) )
		|| ( ( AUTO == config_get( 'show_product_version' ) )
					&& ( count( version_get_all_rows( $t_bug->project_id ) ) > 0 ) );
	if ( $t_show_product_version ) {
?>

<!-- TARGET Version -->
<tr <?php echo helper_alternate_class() ?>>
	<td class="category">
		<?php echo lang_get( 'target_version' ) ?>
	</td>
	<td>
		<select name="target_version">
			<?php print_version_option_list( bug_get_field( $f_bug_id, 'target_version' ),
							bug_get_field( $f_bug_id, 'project_id' ), VERSION_ALL ) ?>
		</select>
	</td>
</tr>
<?php }
	} ?>
Please note that I am not an expert in php nor in Mantis. I think this will work, but I take no responsibility for the solution. Also note that this change changes one your basic php files, so if you will upgrade to a newer release this change will disappear.

Feel free to test it though, its seems to work fine.

I am wondering if Atrol agrees.
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Re: Target version on status change to "assigned"

Post by Reinder »

Cheers, this seems to work! Hope it works on the running application as well....
Post Reply