added issue_notification
This commit is contained in:
parent
37b6afd896
commit
5527dd04b1
@ -296,6 +296,11 @@ commit_review_notification = "yes"
|
||||
;------------------------------------------------------------------------------
|
||||
commit_notification_url = ""
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Send notification upon new issue registration if yes
|
||||
;------------------------------------------------------------------------------
|
||||
issue_notification = "yes"
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Codepot sets this revision property to assign a tag to a specific revision.
|
||||
;------------------------------------------------------------------------------
|
||||
|
@ -266,6 +266,8 @@ class Issue extends Controller
|
||||
//}
|
||||
else
|
||||
{
|
||||
$issue_url_base = $this->input->post('issue_url_base');
|
||||
|
||||
$issue = new stdClass();
|
||||
$issue->projectid = $projectid;
|
||||
$issue->summary = $this->input->post('issue_new_summary');
|
||||
@ -332,13 +334,28 @@ class Issue extends Controller
|
||||
|
||||
if ($status == '')
|
||||
{
|
||||
if ($this->issues->createWithFiles ($login['id'], $issue, $attached_files, $this->upload) === FALSE)
|
||||
$issue_sno = $this->issues->createWithFiles ($login['id'], $issue, $attached_files, $this->upload);
|
||||
if ($issue_sno === FALSE)
|
||||
{
|
||||
$status = 'error - ' . $this->issues->getErrorMessage();
|
||||
}
|
||||
else
|
||||
{
|
||||
$status = 'ok';
|
||||
|
||||
if (CODEPOT_ISSUE_NOTIFICATION)
|
||||
{
|
||||
// TODO: message localization
|
||||
$email_subject = sprintf (
|
||||
'New issue #%d for %s by %s in %s',
|
||||
$issue_sno, $issue->owner, $login['id'], $projectid
|
||||
);
|
||||
|
||||
$email_message = $issue_url_base . '/' . $this->converter->AsciiToHex((string)$issue_sno) . "\r\n" . $issue->summary;
|
||||
$this->projects->emailMessageToMembers (
|
||||
$projectid, $this->login, $email_subject, $email_message
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -176,6 +176,7 @@ $(function () {
|
||||
form_data.append ('issue_new_owner', $('#issue_home_new_owner').val());
|
||||
form_data.append ('issue_new_summary', $('#issue_home_new_summary').val());
|
||||
form_data.append ('issue_new_description', $('#issue_home_new_description').val());
|
||||
form_data.append ('issue_url_base', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/issue/show/{$project->id}"; ?>'));
|
||||
|
||||
$('#issue_home_new_form').dialog('disable');
|
||||
$.ajax({
|
||||
|
@ -96,7 +96,8 @@ function load_ini ($file)
|
||||
array ('email_sender', 'string', ''),
|
||||
array ('commit_notification', 'boolean', TRUE),
|
||||
array ('commit_review_notification', 'boolean', TRUE),
|
||||
array ('commit_notification_url', 'string', ''),
|
||||
array ('commit_notification_url', 'string', ''), // used by the svn post-commit script
|
||||
array ('issue_notification', 'boolean', TRUE),
|
||||
|
||||
array ('svn_tag_property', 'string', 'codepot:tag'),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user