|
162 | 162 | }
|
163 | 163 |
|
164 | 164 | $t_def = custom_field_get_definition( $t_id );
|
165 |
| - if( !custom_field_set_value( $t_id, $t_bug_id, gpc_get_custom_field( "custom_field_$t_id", $t_def['type'], '' ), false ) ) { |
| 165 | + 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 ) ) { |
166 | 166 | error_parameters( lang_get_defaulted( custom_field_get_field( $t_id, 'name' ) ) );
|
167 | 167 | trigger_error( ERROR_CUSTOM_FIELD_INVALID_VALUE, ERROR );
|
168 | 168 | }
|
|
191 | 191 |
|
192 | 192 | # update relationship target bug last updated
|
193 | 193 | bug_update_date( $t_bug_id );
|
194 |
| - |
| 194 | + |
195 | 195 | # Send the email notification
|
196 | 196 | email_relationship_added( $f_master_bug_id, $t_bug_id, relationship_get_complementary_type( $f_rel_type ) );
|
197 | 197 | }
|
198 |
| - |
| 198 | + |
199 | 199 | # copy notes from parent
|
200 | 200 | if ( $f_copy_notes_from_parent ) {
|
201 |
| - |
| 201 | + |
202 | 202 | $t_parent_bugnotes = bugnote_get_all_bugnotes( $f_master_bug_id );
|
203 |
| - |
| 203 | + |
204 | 204 | foreach ( $t_parent_bugnotes as $t_parent_bugnote ) {
|
205 |
| - |
| 205 | + |
206 | 206 | $t_private = $t_parent_bugnote->view_state == VS_PRIVATE;
|
207 | 207 |
|
208 |
| - bugnote_add( $t_bug_id, $t_parent_bugnote->note, $t_parent_bugnote->time_tracking, |
| 208 | + bugnote_add( $t_bug_id, $t_parent_bugnote->note, $t_parent_bugnote->time_tracking, |
209 | 209 | $t_private, $t_parent_bugnote->note_type, $t_parent_bugnote->note_attr,
|
210 | 210 | $t_parent_bugnote->reporter_id, /* send_email */ FALSE , /* log history */ FALSE);
|
211 | 211 | }
|
212 | 212 | }
|
213 |
| - |
| 213 | + |
214 | 214 | # copy attachments from parent
|
215 | 215 | if ( $f_copy_attachments_from_parent ) {
|
216 | 216 | file_copy_attachments( $f_master_bug_id, $t_bug_id );
|
|
0 commit comments