My view with custom fields.

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
mjaq
Posts: 2
Joined: 11 Apr 2017, 10:50

My view with custom fields.

Post by mjaq »

Hello,

Can anyone know how to add custom field value on any "my view" boxes?
2020-01-15_08-48-36.jpg
2020-01-15_08-48-36.jpg (244.64 KiB) Viewed 4747 times
Regards,
Marek
mpa
Posts: 22
Joined: 15 Jan 2008, 12:34

Re: My view with custom fields.

Post by mpa »

Edit file my_view_inc.php
Example show OS and OS-build.

Code: Select all

# -- Loop over bug rows and create $v_* variables --
$t_count = count( $t_rows );
if( $t_count == 0 ) {
	echo '<tr><td>&#160;</td></tr>';
}
for( $i = 0;$i < $t_count; $i++ ) {
	$t_bug = $t_rows[$i];

[u]	$t_os = string_display_line_links( $t_bug->os ); # show (OS)
	$t_os_build = string_display_line_links( $t_bug->os_build ); # show (OS_build)[/u]

	$t_summary = string_display_line_links( $t_bug->summary );
	$t_last_updated = date( config_get( 'normal_date_format' ), $t_bug->last_updated );
And a bit just before # type project name if viewing 'all projects' or bug is in subproject

Code: Select all

	# -- extra column --?>
	<td class="wrap width-13">
		<?php
			if( ON == config_get( 'show_bug_project_links' ) && helper_get_current_project() != $t_bug->project_id ) {
				echo '<span>[', string_display_line( project_get_name( $t_bug->project_id ) ), '] </span>';
			}
			$t_bug_url = string_get_bug_view_url( $t_bug->id );
			echo '<span><a href="' . $t_bug_url . '">' . $t_os . '</a></span><br />';
	?>

		<?php
	# os_build
	echo '<span class="small">' . $t_os_build . '</span>';
	?>
	
	</td>
	
	<?php
Post Reply