View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0013323 | mantisbt | relationships | public | 2011-09-18 17:26 | 2012-01-24 02:19 |
| Reporter | vincent_sels | Assigned To | dregad | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | duplicate | ||
| Product Version | 1.2.8 | ||||
| Summary | 0013323: Add the option to be able to link to read-only tickets | ||||
| Description | Adding a relationship to another ticket isn't really 'altering' the ticket, in my opinion. Same goes for cloning (which requires adding a relationship). I would like an option where you could specify that adding relationships to (and from) read-only tickets is allowed. | ||||
| Tags | patch | ||||
| Attached Files | 0013323_2.diff (2,461 bytes)
--- C:/Documents and Settings/vsel/mantisbt-1.2.8/config_defaults_inc.php Mon Sep 26 21:54:19 2011
+++ C:/Documents and Settings/vsel/mantisbt-edited/config_defaults_inc.php Mon Sep 26 22:01:48 2011
@@ -2723,6 +2723,13 @@
* @global int $g_view_additional_information_threshold
*/
$g_view_additional_information_threshold = DEVELOPER;
+
+ /**
+ * when set to ON, it is allowed to link other tickets to a read-only ticket.
+ * This will allow reporters to link to tickets too.
+ * @global int $g_allow_link_to_readonly_tickets
+ */
+ $g_allow_link_to_readonly_tickets = ON;
/************************************
* MantisBT Look and Feel Variables *
--- C:/Documents and Settings/vsel/mantisbt-1.2.8/bug_report.php Mon Sep 26 22:03:22 2011
+++ C:/Documents and Settings/vsel/mantisbt-edited/bug_report.php Tue Sep 20 14:59:24 2011
@@ -44,7 +44,9 @@
}
$t_master_bug = bug_get( $f_master_bug_id, true );
project_ensure_exists( $t_master_bug->project_id );
+ if ( config_get( 'allow_link_to_readonly_tickets' ) == OFF ) {
access_ensure_bug_level( config_get( 'update_bug_threshold', null, null, $t_master_bug->project_id ), $f_master_bug_id );
+ }
$t_project_id = $t_master_bug->project_id;
} else {
$f_project_id = gpc_get_int( 'project_id' );
--- C:/Documents and Settings/vsel/mantisbt-1.2.8/bug_report_page.php Mon Sep 26 22:04:10 2011
+++ C:/Documents and Settings/vsel/mantisbt-edited/bug_report_page.php Tue Sep 20 14:58:52 2011
@@ -56,7 +56,10 @@
$t_bug = bug_get( $f_master_bug_id, true );
# the user can at least update the master bug (needed to add the relationship)...
+
+ if ( config_get( 'allow_link_to_readonly_tickets' ) == OFF ) {
access_ensure_bug_level( config_get( 'update_bug_threshold', null, null, $t_bug->project_id ), $f_master_bug_id );
+ }
#@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of
# what the current project is set to.
--- C:/Documents and Settings/vsel/mantisbt-1.2.8/core/html_api.php Wed Sep 28 20:29:58 2011
+++ C:/Documents and Settings/vsel/mantisbt-edited/core/html_api.php Wed Sep 28 20:26:42 2011
@@ -1660,7 +1660,7 @@
echo '</td>';
}
- if( !$t_readonly ) {
+ if( !$t_readonly || config_get( 'allow_link_to_readonly_tickets' ) == ON ) {
# CREATE CHILD button
echo '<td class="center">';
html_button_bug_create_child( $p_bug_id );
| ||||
|
I achieved this by adding the following setting: $g_allow_link_to_readonly_tickets = ON; And altering the following code in bug_report and bug_report_page:
Not sure if that's the proper way to do it though... |
|
|
Also, in core\html_api:
-- Added this to the diff file (_2), please remove the old one. |
|
|
Another change required in bug_report_page (pretty obvious): |
|
|
As mentioned by you in 0011290, this is a duplicate so I'm marking it as resolved. |
|