May I introduce a number of hour in ETA field ?

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
EmeJIbka
Posts: 3
Joined: 08 Sep 2009, 04:16
Contact:

May I introduce a number of hour in ETA field ?

Post by EmeJIbka »

I wanna use a input-box, not a drop-down list.
But i don`n know how...

thx.

P.S. sorry, for my bad english.
tom_glebas
Posts: 14
Joined: 07 Sep 2009, 23:19

Re: May I introduce a number of hour in ETA field ?

Post by tom_glebas »

Two possible solutions include:

1. modifying the code in bug_update_advanced_page.php

Code: Select all

		<select <?php echo helper_get_tab_index() ?> name="eta">
			<?php print_enum_string_option_list( 'eta', $t_bug->eta ) ?>
		</select>
Replace the <select> statements with code for an input box. You will need to display the current value, not just an empty imput box.

or

2. changing the unumeration of the ETA dropdown list in config_defaults_inc.php and lang/strings_english.txt to a set of numbers, i.e. change

Code: Select all

$g_eta_enum_string	= '10:none,20:< 1 day,30:2-3 days,40:< 1 week,50:< 1 month,60:> 1 month';
to

Code: Select all

$g_eta_enum_string = '10:1,20:2,30:3,40:4,505,60:6;
and change

Code: Select all

$s_eta_enum_string = '10:none,20:< 1 day,30:2-3 days,40:< 1 week,50:< 1 month,60:> 1 month';
to

Code: Select all

$s_eta_enum_string = '10:1,20:2,30:3,40:4,505,60:6;
Changes should not be made in config_defaults_inc.php, but in config_inc.php- but you can use the info in config_defaults_inc.php as a model for adding to config_inc.php.
EmeJIbka
Posts: 3
Joined: 08 Sep 2009, 04:16
Contact:

Re: May I introduce a number of hour in ETA field ?

Post by EmeJIbka »

1. modifying the code in bug_update_advanced_page.php
How can i see "eta" on view all bug page ?
2. changing the unumeration of the ETA dropdown list in config_defaults_inc.php and lang/strings_english.txt to a set of numbers, i.e. change
I wanna see a text, not a combo-bob. But, unfortunaly, this is a only way (combo-box).
tom_glebas
Posts: 14
Joined: 07 Sep 2009, 23:19

Re: May I introduce a number of hour in ETA field ?

Post by tom_glebas »

1 You can modify the columns shown in the view_all_bugs page using the configuration files. Copy this line from config_defaults_inc.php:

Code: Select all

$g_view_issues_page_columns = array ( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category', 'status', 'last_updated', 'summary', );
and paste it into config_inc.php, and then edit it to include "eta"

Code: Select all

$g_view_issues_page_columns = array( 'selection', 'edit', 'priority', 'id', 'sponsorship_total', 'bugnotes_count', 'attachment', 'category', 'status', 'last_updated', 'summary', 'eta');
You can rearrange the order, include other fields or drop fields by following the instructions in the comments just before the above line in config_defaults_inc.php.

2 The only way I know to show text input instead of a drop down is to change the code in bug_update_page.php and bug_update_advanced_page.php from "<select>" statements to a "<input type=text...>" statement
Post Reply