I have looked at the documentation . None of the listed functions that can be
overridden with custom functions will work for this. That is really my
question. I assume the only way to implement what it is currently doing is to
change the code directly again for the bug_report_advanced_page.php page. I
really didn't want to.
I wanted to figure out a way to override it more correctly. The code addition
in bug_report_advanced_page.php looks like this:
<!-- Custom Fields -->
<?php
$t_custom_fields_found = false;
$t_related_custom_field_ids = custom_field_get_linked_ids(
$t_project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
$t_def = custom_field_get_definition( $t_id );
#######################################
# Our custom code
# If custom field is "Product Release"
# Set default value of the custom field
# current project name
#######################################
if ( $t_def['name'] == 'Product Release' ) {
$t_project_name = project_get_field( $t_project_id,
'name' );
$t_def['default_value'] = $t_project_name;
}
if( ( $t_def['display_report'] || $t_def['require_report']) &&
custom_field_has_write_access_to_project( $t_id, $t_project_id ) ) {
$t_custom_fields_found = true;
?>
The custom field "Product Release" is an enumeration, but then this code was
added to basically select the default value.
If I can't do it, i'll figure out how to modify the code each time I upgrade,
in the event of changes to core mantis pages.
Thanks
KM
________________________________
From: Damien Regad <dre...@mantisbt.org>
To: mantisbt-help@lists.sourceforge.net
Sent: Tuesday, February 11, 2014 11:29 AM
Subject: Re: [mantisbt-help] How to customize a custom field default value
correctly
Your request is not 100% clear. Nevertheless, it sounds like you may
want to override custom_function_default_issue_create_notify()
See docs for details
http://www.mantisbt.org/docs/master-1.2.x/en/administration_guide/admin.customize.customfuncs.html
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.com/
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
mantisbt-help mailing list
mantisbt-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-help
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
mantisbt-help mailing list
mantisbt-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-help