diff --git a/src/pcards.ts b/src/pcards.ts index 6a595d8..7eca19b 100644 --- a/src/pcards.ts +++ b/src/pcards.ts @@ -4,6 +4,7 @@ import Q = require("q"); const userStoryTemplate = require("./templates/user-story.handlebars"); const bugTemplate = require("./templates/bug.handlebars"); const taskTemplate = require("./templates/task.handlebars"); +const techDebtTemplate = require("./templates/tech-debt.handlebars"); const extensionContext = VSS.getExtensionContext(); const client = WITClient.getClient(); @@ -52,6 +53,7 @@ const printWorkItems = { let bugCard: any; let userStoryCard: any; let taskCard: any; + let techDebtCard: any; if (page.type === "Bug") { bugCard = bugTemplate({ @@ -79,6 +81,15 @@ const printWorkItems = { }); } + if (page.type === "Technical Debt") { + techDebtCard = techDebtTemplate({ + number: page.id, + title: page.title, + description: page.description, + acceptance_criteria: page.acceptance_criteria + }); + } + if (page.type === "Bug") { workItems.innerHTML += bugCard; } @@ -88,8 +99,11 @@ const printWorkItems = { if (page.type === "Task") { workItems.innerHTML += taskCard; } - if (page.type !== "User Story" && page.type !== "Bug" && page.type !== "Task") { - workItems.innerHTML += "
Work item type not supported. Submit pull requests here: https://github.com/ryanjones/pcards
"; + if (page.type === "Technical Debt") { + workItems.innerHTML += techDebtCard; + } + if (page.type !== "User Story" && page.type !== "Bug" && page.type !== "Task" && page.type !== "Technical Debt") { + workItems.innerHTML += `
Work item type (${page.type}) not supported. Submit pull requests here: https://github.com/ryanjones/pcards
`; } }); document.body.appendChild(workItems); diff --git a/src/templates/tech-debt.handlebars b/src/templates/tech-debt.handlebars new file mode 100644 index 0000000..a1f0e68 --- /dev/null +++ b/src/templates/tech-debt.handlebars @@ -0,0 +1,43 @@ +
+
+
+
+ Title: {{title}} +
+
+
+
+
+
+ Description:
+ {{{description}}} +
+
+
+
Dev
+
+
+
+
UX
+
+
+
+
+
+
+ Product Owner: +
+
+ {{number}} +
+
+ +
+ +
+
+ Acceptance Criteria:
+ {{{acceptance_criteria}}} +
+
+
\ No newline at end of file diff --git a/static/pcards.html b/static/pcards.html index e115f34..00d286f 100644 --- a/static/pcards.html +++ b/static/pcards.html @@ -31,6 +31,10 @@ .border-blue { border: 4px solid #009ccc; } + + .border-purple { + border: 4px solid #6900cc; + } .container { width: 620px;