Skip to content

Commit

Permalink
Release version 2.2
Browse files Browse the repository at this point in the history
This version contains smaller bugfixes regarding compatibility of java
applets with the newest web browser versions.

Changes:
- Appletwindow is now resizable
- agileMantis icon for expert applets appears in the taskbar
Bugfixes:
- error message showing when starting an applet was removed
- update statistics now correctly recalculates the values
  • Loading branch information
jazsch committed May 22, 2017
1 parent 5154c93 commit 9153ee5
Show file tree
Hide file tree
Showing 21 changed files with 1,897 additions and 1,189 deletions.
35 changes: 7 additions & 28 deletions agileMantis.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function register() {
$this->name = "agileMantis";
$this->description = "Enables Scrum on your MantisBT-Installation";
$this->page = "info";
$this->version = "2.1.2";
$this->version = "2.2";
$this->requires = array( "MantisCore" => "1.2.5" );
$this->author = "gadiv GmbH";
$this->contact = "[email protected]";
Expand Down Expand Up @@ -77,7 +77,6 @@ function config() {
'gadiv_workday_in_hours' => '8',
'gadiv_storypoint_mode' => 0,
'gadiv_fibonacci_length' => 12,
'gadiv_taskboard' => 0,
'gadiv_sprint_length' => 28,
'gadiv_scrum' => 0,
'gadiv_daily_scrum' => 0,
Expand All @@ -93,6 +92,7 @@ function config() {
function events () {
return array (
'EVENT_LOAD_TASKBOARD' => EVENT_TYPE_EXECUTE,
'EVENT_LOAD_DAILYSCRUM' => EVENT_TYPE_EXECUTE,
'EVENT_LOAD_STATISTICS' => EVENT_TYPE_EXECUTE,
'EVENT_LOAD_USERSTORY' => EVENT_TYPE_EXECUTE,
'EVENT_LOAD_SETTINGS' => EVENT_TYPE_EXECUTE,
Expand Down Expand Up @@ -645,7 +645,7 @@ function getDBVersion() {
*/
function upgrade() {

plugin_config_set( 'gadiv_agilemantis_version', $this->version = "2.1.2" );
plugin_config_set( 'gadiv_agilemantis_version', $this->version = "2.2" );

$this->installConfigurationParams();

Expand Down Expand Up @@ -897,11 +897,7 @@ function event_view_bug_details ( $p_event , $p_project_id ) {
if( $sprint_name == "" ) {
$disable_sprint_button = 'disabled';
} else {
if( plugin_config_get( 'gadiv_taskboard' ) == 0 ) {
$page_backlog = plugin_page( "sprint_backlog.php" );
} else {
$page_backlog = plugin_page( "taskboard.php" );
}
$page_backlog = plugin_page( "sprint_backlog.php" );
}
require_once( AGILEMANTIS_CORE_URI."agile_mantis_custom_fields_inc.php" );

Expand Down Expand Up @@ -1200,6 +1196,7 @@ function event_bug_action ( $p_event, $p_action, $p_bug_id ) {
# add menu items to mantis main menu between "Summary" and "Manage"
function event_add_structure() {
global $agilemantis_commonlib;
global $agilemantis_sprint;

$user = $agilemantis_commonlib->getAdditionalUserFields( auth_get_current_user_id() );
$menu = array();
Expand All @@ -1219,25 +1216,11 @@ function event_add_structure() {
|| $user[0]['developer'] == 1
|| $user[0]['administrator'] == 1 ) {

if( plugin_config_get( 'gadiv_taskboard' ) == 0 ) {
$menu[0] = '<a href="' . plugin_page( "sprint_backlog.php" ) .
'" class="agile_menu">Sprint Backlog</a>';
} else {
$menu[0] = '<a href="' . plugin_page( "taskboard.php" ) .
'" class="agile_menu">Sprint Backlog</a>';
}
}

# add daily scrum board
if( ( $user[0]['participant'] == 1
|| $user[0]['developer'] == 1
|| $user[0]['administrator'] == 1 )
&& plugin_config_get( 'gadiv_daily_scrum' ) == 1 ) {

$menu[1] = '<a href="' . plugin_page("daily_scrum_meeting.php") .
'" class="agile_menu">Daily Scrum Meeting</a>';
}

# add agileMantis menu item
if( current_user_is_administrator() || $user[0]['administrator'] == 1 ) {
$menu[3] = '<a href="' . plugin_page( "info.php" ) .
Expand Down Expand Up @@ -1345,11 +1328,7 @@ function installConfigurationParams(){
if( !config_is_set( 'plugin_agileMantis_gadiv_userstory_unit_mode' ) ) {
config_set( 'plugin_agileMantis_gadiv_userstory_unit_mode', 'h' );
}

if( !config_is_set( 'plugin_agileMantis_gadiv_taskboard' ) ) {
config_set( 'plugin_agileMantis_gadiv_taskboard', 0 );
}


if( !config_is_set( 'plugin_agileMantis_gadiv_daily_scrum' ) ) {
config_set( 'plugin_agileMantis_gadiv_daily_scrum', 0 );
}
Expand Down
2 changes: 1 addition & 1 deletion core/config_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
define( "AGILEMANTIS_DEMO_VERSION_HOST", 'agilemantis.sourceforge.net' );

// URL to agileMantisExpert order website
define( "AGILEMANTIS_ORDER_PAGE_URL", 'http://wp12122798.server-he.de/' );
define( "AGILEMANTIS_ORDER_PAGE_URL", 'https://getagilemantislicense.com/' );

// URL to agileMantisExpert plugin download
define( "AGILEMANTIS_EXPERT_DOWNLOAD_LINK" ,
Expand Down
59 changes: 58 additions & 1 deletion core/schnittstelle.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,75 @@
case 'loadSprint':
$agilemantis_sprint->sprint_id = $_POST['sprintName'];
$sprintData = $agilemantis_sprint->getSprintById();

# convert dates
$sprint_start_date = explode( '-', $sprintData['start'] );
$sprint_end_date = explode( '-', $sprintData['end'] );
$sprintData['start'] = mktime( 0, 0, 0, $sprint_start_date[1], $sprint_start_date[2], $sprint_start_date[0] );
$sprintData['end'] = mktime( 0, 0, 0, $sprint_end_date[1], $sprint_end_date[2], $sprint_end_date[0] );

# get product backlog name
$pb = new gadiv_productBacklog();
$pbName = $agilemantis_pb->getProductBacklogNameById( $sprintData['pb_id'] );

# Difference between two dates
$t_end_date = $sprintData['end'];
if( time() >= $sprintData['start'] ) {
$t_start_date = time();
} else {
$t_start_date = $sprintData['start'] ;
}

if( $sprintData['status'] == 0 ) {
$t_start_date = $sprintData['start'] ;
}

$t_time_difference = $t_end_date - $t_start_date;
$t_amount_of_days = ceil( $t_time_difference / 86400 );

if( $t_amount_of_days == 0 && $t_end_date > time() ) {
$t_amount_of_days = 1;
} elseif( $t_amount_of_days <= 0 ) {
$t_amount_of_days = 0;
}

#calcuating rest capacity
$t_remaining_effort = 0;
$t_userstories = $agilemantis_sprint->getSprintStories( $sprintData['name'], false );
if( !empty( $t_userstories ) ) {
foreach( $t_userstories as $num => $row ) {
$t_userstory_tasks = $agilemantis_sprint->getSprintTasks( $row['id'], 0 );
if( !empty( $t_userstory_tasks ) ) {
foreach( $t_userstory_tasks as $key => $value ) {
$t_remaining_effort += $value['rest_capacity'];
}
}
}
}

if( $t_remaining_effort <= 0 ) {
$t_remaining_effort = 0;
}

# calculating rest capacity
$t_capacity = $agilemantis_av->getTeamCapacity( $sprintData['team_id'], date( 'Y-m-d', $t_start_date ), date( 'Y-m-d', $t_end_date ) );

if( $t_capacity == "" ) {
$t_capacity = 0;
}

echo '<sprint>';
echo '<id>' . $sprintData['id'] . '</id>';
echo '<name>' . $agilemantis_commonlib->safeCData($sprintData['name']) . '</name>';
echo '<convertedName>' . $agilemantis_commonlib->safeCData(string_display_line_links(utf8_decode($sprintData['name']))) . '</convertedName>';
echo '<status>' . $sprintData['status'] . '</status>';
echo '<timeRemaining>' . $t_amount_of_days . '</timeRemaining>';
echo '<effortRemaining>' . sprintf( "%.2f", $t_remaining_effort ) . '</effortRemaining>';
echo '<capacityRemaining>' . sprintf( "%.2f", $t_capacity ) . '</capacityRemaining>';
echo '<team>' . $agilemantis_sprint->getTeamById( $sprintData['team_id'] ) . '</team>';
echo '<start>' . date( 'd.m.Y', $sprintData['start'] ) . '</start>';
echo '<end>' . date( 'd.m.Y', $sprintData['end'] ) . '</end>';
echo '<description>' . $agilemantis_commonlib->safeCData($sprintData['description']) .'</description>';
echo '<description>' . $agilemantis_commonlib->safeCData( string_display_links( $sprintData['description'] ) ) .'</description>';
echo '<productBacklog>' . $agilemantis_commonlib->safeCData($pbName) . '</productBacklog>';
echo '</sprint>';
break;
Expand Down Expand Up @@ -929,6 +983,9 @@
$agilemantis_tasks->setConfigValue( $_POST['config_id'], 0, $_POST['value'] );
echo 1;
break;
case 'getPluginParameter':
echo config_get( $_POST['config_id'], null, $user_id );
break;
case 'revokeUserstory':
if( $_POST['userstory_id'] > 0 ) {
$agilemantis_tasks->doUserStoryToSprint( $_POST['userstory_id'], "" );
Expand Down
2 changes: 1 addition & 1 deletion lang/strings_english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@
$s_plugin_agileMantis_statistics_edit = 'Edit Statistics';

# Taskboard
$s_plugin_agileMantis_taskboard_title = 'Edit Taskboard';
$s_plugin_agileMantis_taskboard_title = 'Taskboard';

# Version
$s_plugin_agileMantis_version_issue = 'Issues';
Expand Down
2 changes: 1 addition & 1 deletion lang/strings_german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
$s_plugin_agileMantis_statistics_edit = 'Statistiken bearbeiten';

# Taskboard
$s_plugin_agileMantis_taskboard_title = 'Taskboard bearbeiten';
$s_plugin_agileMantis_taskboard_title = 'Taskboard';

# Version
$s_plugin_agileMantis_version_issue = 'Einträge';
Expand Down
8 changes: 4 additions & 4 deletions libs/class_product_backlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ function getAllUndoneUserStories( $product_backlog ) {

$row['storyPoints'] = $this->getCustomFieldValueById( $row['id'], $this->sp );

if( plugin_config_get( 'gadiv_ranking_order' ) == '1' ) {
if( config_get( 'plugin_agileMantis_gadiv_ranking_order' ) == '1' ) {
$row['rankingOrder'] = $this->getCustomFieldValueById( $row['id'], $this->ro );
}

if( plugin_config_get( 'gadiv_tracker_planned_costs' ) == '1' ) {
if( config_get( 'plugin_agileMantis_gadiv_ranking_order' ) == '1' ) {
$row['plannedWork'] = $this->getCustomFieldValueById( $row['id'], $this->pw );
}

Expand Down Expand Up @@ -478,11 +478,11 @@ function getUserStoriesByProductBacklogName( $product_backlog ) {
continue;
}

if( plugin_config_get( 'gadiv_ranking_order' ) == '1' ) {
if( config_get( 'plugin_agileMantis_gadiv_ranking_order' ) == '1' ) {
$row['rankingOrder'] = $this->getCustomFieldValueById( $row['id'], $this->ro );
}

if( plugin_config_get( 'gadiv_tracker_planned_costs' ) == '1' ) {
if( config_get( 'plugin_agileMantis_gadiv_tracker_planned_costs' ) == '1' ) {
$row['plannedWork'] = $this->getCustomFieldValueById( $row['id'], $this->pw );
}

Expand Down
Loading

0 comments on commit 9153ee5

Please sign in to comment.