Permalink
Browse files

Add config for default relationship when cloning a bug

Introduce a new global config $g_default_bug_relationship_clone, used to
preset the selection list relationship of a cloned bug with its parent.

Defaults to BUG_REL_NONE.

Fix #12450
  • Loading branch information...
1 parent 47d3558 commit 1f9c4bd1ee3b55c07669f8459f7b5be6d9028684 @dregad dregad committed Sep 19, 2011
Showing with 9 additions and 3 deletions.
  1. +1 −1 bug_report_page.php
  2. +8 −2 config_defaults_inc.php
View
@@ -553,7 +553,7 @@
<?php echo lang_get( 'relationship_with_parent' ) ?>
</th>
<td>
- <?php relationship_list_box( BUG_REL_NONE, "rel_type", false, true ) ?>
+ <?php relationship_list_box( config_get( 'default_bug_relationship_clone' ), "rel_type", false, true ) ?>
<?php echo '<strong>' . lang_get( 'bug' ) . ' ' . bug_format_id( $f_master_bug_id ) . '</strong>' ?>
</td>
</tr>
@@ -1226,6 +1226,12 @@
$g_default_bug_eta = ETA_NONE;
/**
+ * Default relationship between a new bug and its parent when cloning it
+ * @global int $g_default_bug_relationship_clone
+ */
+$g_default_bug_relationship_clone = BUG_REL_NONE;
+
+/**
* Default global category to be used when an issue is moved from a project to another
* that doesn't have a category with a matching name. The default is 1 which is the "General"
* category that is created in the default database.
@@ -4059,7 +4065,7 @@
* 4 Options currently exist for log destination:
* a) '': The default value (empty string) means default PHP error log settings
* b) 'file': Log to a specific file - specified as 'file:/var/log/mantis.log'
- * c) 'firebug': make use of firefox's firebug addon from http://getfirebug.com/ - Note: if user is
+ * c) 'firebug': make use of firefox's firebug addon from http://getfirebug.com/ - Note: if user is
* not running firefox, this options falls through to the default php error log settings.
* d) 'page': Display log output at bottom of the page.
* @global string $g_log_destination
@@ -4068,7 +4074,7 @@
/**
* Indicates the access level required for a user to see the log output (if log_destination is page)
- * Note that this threshold is compared against the user's default global access level rather than
+ * Note that this threshold is compared against the user's default global access level rather than
* the threshold based on the current active project.
*
* @global int $g_show_log_threshold

0 comments on commit 1f9c4bd

Please sign in to comment.