projects
/
mantis2gitlab
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5dc047a
)
The version we used to actually import
master
author
markus schnalke
<meillo@marmaro.de>
Mon, 25 Feb 2019 14:23:00 +0000
(15:23 +0100)
committer
markus schnalke
<meillo@marmaro.de>
Sun, 2 Jan 2022 09:45:03 +0000
(10:45 +0100)
m2gl.js
patch
|
blob
|
history
diff --git
a/m2gl.js
b/m2gl.js
index
8f46ec2
..
2a13ff5
100644
(file)
--- a/
m2gl.js
+++ b/
m2gl.js
@@
-216,6
+216,7
@@
function importIssue(mantisIssue) {
var milestoneId = '';
var labels = getLabels(mantisIssue);
var author = getUserByMantisUsername(mantisIssue.Reporter);
var milestoneId = '';
var labels = getLabels(mantisIssue);
var author = getUserByMantisUsername(mantisIssue.Reporter);
+ var created = mantisIssue.Created.replace(" ", "T") + "Z";
log_progress("Importing: #" + issueId + " - " + title + " ...");
log_progress("Importing: #" + issueId + " - " + title + " ...");
@@
-225,6
+226,7
@@
function importIssue(mantisIssue) {
assignee_id: assignee && assignee.gl_id,
milestone_id: milestoneId,
labels: labels,
assignee_id: assignee && assignee.gl_id,
milestone_id: milestoneId,
labels: labels,
+ created_at: created,
sudo: gitlabSudo,
private_token: gitlabAdminPrivateToken
};
sudo: gitlabSudo,
private_token: gitlabAdminPrivateToken
};
@@
-243,10
+245,14
@@
function importIssue(mantisIssue) {
} else {
// insert
console.log("inserting: " + data.title + " (Issueid: " + issueId + ")");
} else {
// insert
console.log("inserting: " + data.title + " (Issueid: " + issueId + ")");
+ data.iid = issueId;
+ return insertAndCloseIssue(issueId, data, isClosed(mantisIssue));
+/*
return insertSkippedIssues(issueId-1)
.then(function() {
return insertAndCloseIssue(issueId, data, isClosed(mantisIssue));
});
return insertSkippedIssues(issueId-1)
.then(function() {
return insertAndCloseIssue(issueId, data, isClosed(mantisIssue));
});
+*/
}
});
}
}
});
}
@@
-377,6
+383,10
@@
function getDescription(row) {
description += "\n\n" + value.split("$$$$").join("\n\n")
}
description += "\n\n" + value.split("$$$$").join("\n\n")
}
+ if (value = row.Attachments) {
+ description += "\n\n" + value.split("$$$$").join("\n\n")
+ }
+
description = description.replace(/\\n/g, "\n");
description = description.replace(/\\t/g, " ");
description = description.replace(/``/g, '"');
description = description.replace(/\\n/g, "\n");
description = description.replace(/\\t/g, " ");
description = description.replace(/``/g, '"');