Skip to content

Commit

Permalink
Merge pull request #23 from hidetak/develop
Browse files Browse the repository at this point in the history
modified for security alert and something
  • Loading branch information
hidetak authored Sep 4, 2022
2 parents e81ed71 + d28c504 commit f2182dc
Show file tree
Hide file tree
Showing 3 changed files with 352 additions and 85 deletions.
36 changes: 18 additions & 18 deletions lib/trello-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class TrelloCSV {
labelGreen: labels['green']
? labels['green']
: labels['lime']
? labels['lime']
: '-',
? labels['lime']
: '-',
member,
currentListName: cardsMap[key].currentListName,
}
Expand Down Expand Up @@ -231,8 +231,8 @@ class TrelloCSV {
labelGreen: labels['green']
? labels['green']
: labels['lime']
? labels['lime']
: '-',
? labels['lime']
: '-',
member: commentMember,
currentListName: cardsMap[key].currentListName,
})
Expand All @@ -252,8 +252,8 @@ class TrelloCSV {
labelGreen: labels['green']
? labels['green']
: labels['lime']
? labels['lime']
: '-',
? labels['lime']
: '-',
member,
currentListName: cardsMap[key].currentListName,
}
Expand Down Expand Up @@ -282,8 +282,8 @@ class TrelloCSV {
labelGreen: labels['green']
? labels['green']
: labels['lime']
? labels['lime']
: '-',
? labels['lime']
: '-',
member,
currentListName: cardsMap[key].currentListName,
}
Expand All @@ -303,7 +303,7 @@ class TrelloCSV {
// Card毎の見積もりを集計するためにcardsMapに集計した情報もlistに追加
for (let cid in cardsMap) {
if (cardsMap[cid].tmpInfo) {
list.push(cardsMap[cid].tmpInfo)
list.splice(0, 0, cardsMap[cid].tmpInfo)
} else {
console.error(
`there is card ${cardsMap[cid].name}, but there is no action info`
Expand Down Expand Up @@ -416,7 +416,7 @@ class TrelloCSV {
for (let d of list) {
doneByGroup[d[groupby]] =
doneByGroup[d[groupby]] === false ||
!this.checkListNameByCardId('Done', d.cardId)
!this.checkListNameByCardId('Done', d.cardId)
? false
: true
total += d.resultTime + d.reviewTime
Expand Down Expand Up @@ -518,8 +518,8 @@ class TrelloCSV {
numberOfRemainCardsEachGroup[
'all'
] = numberOfRemainCardsEachGroup['all']
? numberOfRemainCardsEachGroup['all'] + 1
: 1
? numberOfRemainCardsEachGroup['all'] + 1
: 1
remainPointsEachGroup['all'] = remainPointsEachGroup['all']
? remainPointsEachGroup['all'] + d.point
: d.point
Expand All @@ -528,8 +528,8 @@ class TrelloCSV {
numberOfRemainCardsEachGroup[
d[groupby]
] = numberOfRemainCardsEachGroup[d[groupby]]
? numberOfRemainCardsEachGroup[d[groupby]] + 1
: 1
? numberOfRemainCardsEachGroup[d[groupby]] + 1
: 1
remainPointsEachGroup[d[groupby]] = remainPointsEachGroup[
d[groupby]
]
Expand Down Expand Up @@ -563,11 +563,11 @@ class TrelloCSV {
for (let d of allDaysCountList) {
csv += `"${moment(d.time).format('YYYY-MM-DD HH:mm')}","${
d.allPoints
}","${d.donePoints}","${d.remainPointsEachGroup['all']}"`
}","${d.donePoints}","${d.remainPointsEachGroup['all']}"`
for (let k of keys) {
csv += `,"${
d.remainPointsEachGroup[k] ? d.remainPointsEachGroup[k] : '0'
}"`
}"`
}
csv += '\n'
}
Expand All @@ -584,13 +584,13 @@ class TrelloCSV {
for (let d of allDaysCountList) {
csv += `"${moment(d.time).format('YYYY-MM-DD HH:mm')}","${
d.numberOfAllCards
}","${d.numberOfDoneCards}","${d.numberOfRemainCardsEachGroup['all']}"`
}","${d.numberOfDoneCards}","${d.numberOfRemainCardsEachGroup['all']}"`
for (let k of keys) {
csv += `,"${
d.numberOfRemainCardsEachGroup[k]
? d.numberOfRemainCardsEachGroup[k]
: '0'
}"`
}"`
}
csv += '\n'
}
Expand Down
Loading

0 comments on commit f2182dc

Please sign in to comment.