Commit 4a221a11 authored by cividesk's avatar cividesk

jira: get security level

parent fb90551d
......@@ -602,6 +602,7 @@ CREATE TABLE IF NOT EXISTS `jira_issue` (
`summary` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
`type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
`priority` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
`security` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`reporter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`assignee` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
`status` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
......@@ -610,17 +611,18 @@ CREATE TABLE IF NOT EXISTS `jira_issue` (
`updated` datetime DEFAULT NULL,
`resolved` datetime DEFAULT NULL,
PRIMARY KEY (`jira_id`),
KEY `project` (`project`),
UNIQUE KEY `issue` (`issue`),
KEY `created` (`created`),
KEY `resolved` (`resolved`),
KEY `type` (`type`),
KEY `priority` (`priority`),
KEY `security` (`security`),
KEY `reporter` (`reporter`),
KEY `assignee` (`assignee`),
KEY `status` (`status`),
KEY `resolution` (`resolution`),
KEY `type` (`type`),
KEY `priority` (`priority`),
KEY `project` (`project`),
KEY `updated` (`updated`)
KEY `created` (`created`),
KEY `updated` (`updated`),
KEY `resolved` (`resolved`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- --------------------------------------------------------
......
......@@ -66,7 +66,7 @@ foreach($repos as $repo) {
// Now update all user records
echo "Updating users ...";
echo $updated = $skipped = 0;
$updated = $skipped = 0;
$query = "SELECT DISTINCT author_login FROM github_commit WHERE author_login > ''";
foreach ($dbh->query($query) as $row) {
$client->setPage(); // reinitialize the results pager
......
......@@ -10,8 +10,8 @@ $stm_id = $dbh->prepare("
DELETE FROM jira_issue WHERE issue=:issue
");
$stm_ii = $dbh->prepare("
INSERT INTO jira_issue (jira_id, project, issue, summary, type, priority, reporter, assignee, status, resolution, created, updated, resolved)
VALUES (:jira_id, :project, :issue, :summary, :type, :priority, :reporter, :assignee, :status, :resolution, :created, :updated, :resolved);
INSERT INTO jira_issue (jira_id, project, issue, summary, type, priority, security, reporter, assignee, status, resolution, created, updated, resolved)
VALUES (:jira_id, :project, :issue, :summary, :type, :priority, :security, :reporter, :assignee, :status, :resolution, :created, :updated, :resolved);
");
$stm_vd = $dbh->prepare("
DELETE FROM jira_version WHERE issue=:issue;
......@@ -51,6 +51,8 @@ foreach ($projects as $project) {
$stm_ii->bindParam(':type', $issueType['name']);
$priority = $issue->getPriority();
$stm_ii->bindParam(':priority', $priority['name']);
$security = $issue->get('Security Level');
$stm_ii->bindValue(':security', $security ? $security['name'] : NULL);
$reporter = $issue->getReporter();
$stm_ii->bindParam(':reporter', $reporter['name']);
$assignee = $issue->getAssignee();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment