Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9c1dce1
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e7815ec
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 22, 2011

  1. Send email notifications when updating bugs using the SOAP API

    Fix #13339 : Email notifications through mantis mylyn connector / SOAP
    rombert committed Sep 22, 2011

    Verified

    This commit was signed with the committer’s verified signature.
    anthonyfok Anthony Fok
    Copy the full SHA
    95216ca View commit details

Commits on Sep 23, 2011

  1. Fix display of upgrade_warning.php

    - use the correct html header
    - encode '<' and '>' chars
    rombert committed Sep 23, 2011
    Copy the full SHA
    cbbe1dd View commit details
  2. SOAP API: Ensure that helper_get_current_project() resolves to the re…

    …quested project
    
    Fixes #13324: Adding or updating issue with mylyn causes error #13
    rombert committed Sep 23, 2011
    Copy the full SHA
    e7815ec View commit details
Showing with 14 additions and 10 deletions.
  1. +3 −4 admin/upgrade_warning.php
  2. +11 −6 api/soap/mc_issue_api.php
7 changes: 3 additions & 4 deletions admin/upgrade_warning.php
Original file line number Diff line number Diff line change
@@ -33,9 +33,8 @@

$f_advanced = gpc_get_bool( 'advanced', false );

html_begin();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>MantisBT Administration - Check Installation </title>
<link rel="stylesheet" type="text/css" href="admin.css" />
@@ -56,10 +55,10 @@

<p><strong>WARNING:</strong> - Always backup your database data before upgrading. For example, if you use a mysql database, From the command line you can do this with the mysqldump command.</p>
<p>eg:</p>
<p><tt>mysqldump -u[username] -p[password] [database_name] > [filename]</tt></p>
<p><tt>mysqldump -u[username] -p[password] [database_name] &gt; [filename]</tt></p>
<p>This will dump the contents of the specified database into the specified filename.</p>
<p>If an error occurs you can re-create your previous database by just importing your backed up database data. You'll need to drop and recreate your database (or remove each table).</p>
<p><tt>mysql -u[username] -p[password] [database_name] < [filename]</tt></p>
<p><tt>mysql -u[username] -p[password] [database_name] &lt; [filename]</tt></p>

<p>Upgrades may take several minutes depending on the size of your database.</p>

17 changes: 11 additions & 6 deletions api/soap/mc_issue_api.php
Original file line number Diff line number Diff line change
@@ -507,6 +507,9 @@ function mc_issue_get_id_from_summary( $p_username, $p_password, $p_summary ) {
* @return integer The id of the created issue.
*/
function mc_issue_add( $p_username, $p_password, $p_issue ) {

global $g_project_override;

$t_user_id = mci_check_login( $p_username, $p_password );
if( $t_user_id === false ) {
return mci_soap_fault_login_failed();
@@ -515,6 +518,7 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
$t_project = $p_issue['project'];

$t_project_id = mci_get_project_id( $t_project );
$g_project_override = $t_project_id; // ensure that helper_get_current_project() calls resolve to this project id

if( !mci_has_readwrite_access( $t_user_id, $t_project_id ) ) {
return mci_soap_fault_access_denied( $t_user_id );
@@ -681,6 +685,8 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
* @return integer The id of the created issue.
*/
function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
global $g_project_override;

$t_user_id = mci_check_login( $p_username, $p_password );
if( $t_user_id === false ) {
return mci_soap_fault_login_failed();
@@ -695,6 +701,8 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
if( !mci_has_readwrite_access( $t_user_id, $t_project_id ) ) {
return mci_soap_fault_access_denied( $t_user_id );
}

$g_project_override = $t_project_id; // ensure that helper_get_current_project() calls resolve to this project id

$t_project_id = mci_get_project_id( $p_issue['project'] );
$t_reporter_id = isset( $p_issue['reporter'] ) ? mci_get_user_id( $p_issue['reporter'] ) : $t_user_id ;
@@ -806,10 +814,6 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
$t_bug_data->target_version = isset( $p_issue['target_version'] ) ? $p_issue['target_version'] : '';
}


# submit the issue
$t_is_success = $t_bug_data->update( /* update_extended */ true, /* bypass_email */ true );

mci_issue_set_custom_fields( $p_issue_id, $p_issue['custom_fields'], true );
if ( isset ( $p_issue['monitors'] ) )
mci_issue_set_monitors( $p_issue_id , $t_user_id, $p_issue['monitors'] );
@@ -830,7 +834,6 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
if ( bugnote_exists( $t_bugnote_id ) ) {
bugnote_set_text( $t_bugnote_id, $t_note['text'] );
bugnote_set_view_state( $t_bugnote_id, $t_view_state_id == VS_PRIVATE );
$t_eta_id = isset( $p_issue['eta'] ) ? mci_get_eta_id( $p_issue['eta'] ) : config_get('default_bug_eta');
bugnote_date_update( $t_bugnote_id );
if ( isset( $t_note['time_tracking'] ) )
bugnote_set_time_tracking( $t_bugnote_id, mci_get_time_tracking_from_note( $p_issue_id, $t_note ) );
@@ -846,7 +849,9 @@ function mc_issue_update( $p_username, $p_password, $p_issue_id, $p_issue ) {
}
}

return $t_is_success;
# submit the issue
return $t_bug_data->update( /* update_extended */ true, /* bypass_email */ true );

}

/**