Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This feature provides users with the ability to know what is going on by co-workers and customers. It provides a timeline view of actions with ability to jump to the affected issues for more details. Conflicts: my_view_page.php
- Loading branch information
Showing
13 changed files
with
716 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for assignment of issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for assignment of issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueAssignedTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
private $handler_id; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id, $p_handler_id ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
$this->handler_id = $p_handler_id; | ||
} | ||
|
||
function skip() { | ||
if( !access_has_bug_level( config_get( 'view_handler_threshold' ), $this->issue_id ) ) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public function html() { | ||
if( $this->user_id == $this->handler_id ) { | ||
$t_string = sprintf( lang_get( 'timeline_issue_assigned_to_self' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ); | ||
} else { | ||
$t_string = sprintf( lang_get( 'timeline_issue_assigned' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ), user_get_name( $this->handler_id ) ); | ||
} | ||
|
||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . $t_string . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for creation of issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for creation of issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueCreatedTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
} | ||
|
||
public function html() { | ||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . sprintf( lang_get( 'timeline_issue_created' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ) . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for users monitoring issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for users monitoring issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueMonitorTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
private $monitor; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id, $p_monitor ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
$this->monitor = $p_monitor; | ||
} | ||
|
||
public function html() { | ||
$t_string = $this->monitor ? lang_get( 'timeline_issue_monitor' ) : lang_get( 'timeline_issue_unmonitor' ); | ||
|
||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . sprintf( $t_string, user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ) . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for creation of issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for creation of issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueNoteCreatedTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
private $issue_note_id; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id, $p_issue_note_id ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
$this->issue_note_id = $p_issue_note_id; | ||
} | ||
|
||
public function skip() { | ||
if( !bugnote_exists( $this->issue_note_id ) ) { | ||
return true; | ||
} | ||
|
||
if( !access_has_bugnote_level( VIEWER, $this->issue_note_id ) ) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
public function html() { | ||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . sprintf( lang_get( 'timeline_issue_note_created' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ) . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for status change of issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for status change of issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueStatusChangeTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
private $old_status; | ||
private $new_status; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id, $p_old_status, $p_new_status ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
$this->old_status = $p_old_status; | ||
$this->new_status = $p_new_status; | ||
} | ||
|
||
public function html() { | ||
$t_resolved = config_get( 'bug_resolved_status_threshold' ); | ||
$t_closed = config_get( 'bug_closed_status_threshold' ); | ||
|
||
if( $this->old_status < $t_closed && $this->new_status >= $t_closed ) { | ||
$t_string = sprintf( lang_get( 'timeline_issue_closed' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ); | ||
} else if( $this->old_status < $t_resolved && $this->new_status >= $t_resolved ) { | ||
$t_string = sprintf( lang_get( 'timeline_issue_resolved' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ); | ||
} else if( $this->old_status >= $t_resolved && $this->new_status < $t_resolved ) { | ||
$t_string = sprintf( lang_get( 'timeline_issue_reopened' ), user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ) ); | ||
} else { | ||
return; | ||
} | ||
|
||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . $t_string . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
# MantisBT - A PHP based bugtracking system | ||
|
||
# MantisBT is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# MantisBT is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Timeline event class for users tagging issues. | ||
* @copyright Copyright 2014 MantisBT Team - mantisbt-dev@lists.sourceforge.net | ||
* @link http://www.mantisbt.org | ||
* @package MantisBT | ||
*/ | ||
|
||
/** | ||
* Timeline event class for users tagging issues. | ||
* | ||
* @package MantisBT | ||
* @subpackage classes | ||
*/ | ||
class IssueTagTimelineEvent extends TimelineEvent { | ||
private $issue_id; | ||
private $tag_name; | ||
private $tag; | ||
|
||
public function __construct( $p_timestamp, $p_user_id, $p_issue_id, $p_tag_name, $p_tag ) { | ||
parent::__construct( $p_timestamp, $p_user_id, $p_issue_id ); | ||
|
||
$this->issue_id = $p_issue_id; | ||
$this->tag_name = $p_tag_name; | ||
$this->tag = $p_tag; | ||
} | ||
|
||
public function html() { | ||
$t_string = $this->tag ? lang_get( 'timeline_issue_tagged' ) : lang_get( 'timeline_issue_tagged' ); | ||
|
||
$t_html = $this->html_start(); | ||
$t_html .= '<div class="action">' . sprintf( $t_string, user_get_name( $this->user_id ), string_get_bug_view_link( $this->issue_id ), $this->tag_name ) . '</div>'; | ||
$t_html .= $this->html_end(); | ||
|
||
return $t_html; | ||
} | ||
} |
Oops, something went wrong.