|
212 | 212 | }
|
213 | 213 |
|
214 | 214 | $t_def = custom_field_get_definition( $t_id );
|
215 |
| - if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], '' ), false ) ) { |
| 215 | + if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], $t_def['default_value'] ), false ) ) { |
216 | 216 | error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
|
217 | 217 | trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
|
218 | 218 | }
|
|
241 | 241 |
|
242 | 242 | # Send the email notification
|
243 | 243 | email_relationship_added( $f_master_bug_id, $t_bug_id, relationship_get_complementary_type( $f_rel_type ) );
|
244 |
| - |
| 244 | + |
245 | 245 | # update relationship target bug last updated
|
246 | 246 | bug_update_date( $t_bug_id );
|
247 | 247 | }
|
248 | 248 |
|
249 | 249 | # copy notes from parent
|
250 | 250 | if ( $f_copy_notes_from_parent ) {
|
251 |
| - |
| 251 | + |
252 | 252 | $t_parent_bugnotes = bugnote_get_all_bugnotes( $f_master_bug_id );
|
253 |
| - |
| 253 | + |
254 | 254 | foreach ( $t_parent_bugnotes as $t_parent_bugnote ) {
|
255 |
| - |
| 255 | + |
256 | 256 | $t_private = $t_parent_bugnote->view_state == VS_PRIVATE;
|
257 | 257 |
|
258 |
| - bugnote_add( $t_bug_id, $t_parent_bugnote->note, $t_parent_bugnote->time_tracking, |
| 258 | + bugnote_add( $t_bug_id, $t_parent_bugnote->note, $t_parent_bugnote->time_tracking, |
259 | 259 | $t_private, $t_parent_bugnote->note_type, $t_parent_bugnote->note_attr,
|
260 | 260 | $t_parent_bugnote->reporter_id, /* send_email */ FALSE , /* date submitted */ 0,
|
261 | 261 | /* date modified */ 0, /* log history */ FALSE);
|
262 | 262 | }
|
263 | 263 | }
|
264 |
| - |
| 264 | + |
265 | 265 | # copy attachments from parent
|
266 | 266 | if ( $f_copy_attachments_from_parent ) {
|
267 | 267 | file_copy_attachments( $f_master_bug_id, $t_bug_id );
|
|
0 commit comments