Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.
<?php
$DefaultProjectId = 1;
$DefaultPriorityId = 1;
$DefaultTypeId = 1;
$DefaultReporterId = 1;
$DefaultProjectComponentId = 1;
$IssueList = array();
$IssueList[] = array('Summary' => 'Summary of Issue #1', 'Description' => 'Description of Issue #1');
$IssueList[] = array('Summary' => 'Summary of Issue #2', 'Description' => 'Description of Issue #2');
$IssueList[] = array('Summary' => 'Summary of Issue #3', 'Description' => 'Description of Issue #3');
require_once('EventManager.php');
$EventManagerInstance = EventManager::instance();
require_once('Issue.php');
require_once('Issueprojectcomponent.php');
foreach($IssueList as $IssueProperty) {
$anIssue = new Issue();
$anIssue->setSummary($IssueProperty['Summary']);
$anIssue->setDescription($IssueProperty['Description']);
$anIssue->setCreationDate(mktime());
$anIssue->setUpdateDate(mktime());
$anIssue->setProjectId($DefaultProjectId);
$anIssue->setPriority($DefaultPriorityId);
$anIssue->setType($DefaultTypeId);
$anIssue->InitializeStatus();
$anIssue->setReporter($DefaultReporterId);
$anIssue->save();
$newIssueComponent = new Issueprojectcomponent();
$newIssueComponent->setIssue($anIssue);
$newIssueComponent->setProjectcomponentid($DefaultProjectComponentId);
$newIssueComponent->save();
$EventManagerInstance->IssueAdded($anIssue, $DefaultReporterId);
}
?>