diff --git a/Source/Source.API.php b/Source/Source.API.php index 282a2e7..9cff020 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -427,12 +427,20 @@ $t_bugs_added = array_diff( $this->bugs, $this->__bugs ); $t_bugs_deleted = array_diff( $this->__bugs, $this->bugs ); + $this->load_repo(); + if ( count( $t_bugs_deleted ) ) { $t_bugs_deleted = join( ',', $t_bugs_deleted ); $t_query = "DELETE FROM $t_bug_table WHERE change_id=" . $this->id . " AND bug_id IN ( $t_bugs_deleted )"; db_query_bound( $t_query ); + + foreach( $t_bugs_deleted as $t_bug_id ) { + plugin_history_log( $t_bug_id, 'changeset_unlinked', + event_signal( 'EVENT_SOURCE_SHOW_CHANGESET', array( $this->repo, $this ) ), + '', $this->user_id, 'Source' ); + } } if ( count( $t_bugs_added ) > 0 ) { @@ -450,6 +458,12 @@ } db_query_bound( $t_query, $t_params ); + + foreach( $t_bugs_added as $t_bug_id ) { + plugin_history_log( $t_bug_id, 'changeset_linked', + event_signal( 'EVENT_SOURCE_SHOW_CHANGESET', array( $this->repo, $this ) ), + '', $this->user_id, 'Source' ); + } } } diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt index ede76fd..d23e1a8 100644 --- a/Source/lang/strings_english.txt +++ b/Source/lang/strings_english.txt @@ -73,6 +73,9 @@ $s_plugin_Source_buglink_regex_2 = 'Bug Link PCRE Pass 2'; $s_plugin_Source_reset = 'Reset to default'; +$s_plugin_Source_changeset_attached = 'Changeset attached'; +$s_plugin_Source_changeset_removed = 'Changeset removed'; + $s_plugin_Source_ensure_delete = 'Do you really want to delete the "%s" repository and all of its history?'; $s_plugin_Source_ensure_import_full = 'This will import to a new copy of your repository, and then destroy the old repository data, and may require use of shell access. Do you wish to continue?'; $s_plugin_Source_ensure_import_latest = 'This will attempt to import recent data for your repository, and may require use of shell access. Do you wish to continue?';