From f51b6c4dc3b727c10648bbba695f3c134c505fd5 Mon Sep 17 00:00:00 2001 From: ireic Date: Mon, 6 Jan 2020 18:37:31 +0100 Subject: [PATCH] Added better content to guest account seeds --- api/src/database/createGuestAccount.ts | 108 +++++++++++++++++++------ 1 file changed, 82 insertions(+), 26 deletions(-) diff --git a/api/src/database/createGuestAccount.ts b/api/src/database/createGuestAccount.ts index 93d2e74..edbb096 100644 --- a/api/src/database/createGuestAccount.ts +++ b/api/src/database/createGuestAccount.ts @@ -6,9 +6,9 @@ import { createEntity } from 'utils/typeorm'; const seedUsers = (): Promise => { const users = [ createEntity(User, { - email: 'gaben@jira.guest', - name: 'Lord Gaben', - avatarUrl: 'https://i.ibb.co/6RJ5hq6/gaben.jpg', + email: 'rick@jira.guest', + name: 'Pickle Rick', + avatarUrl: 'https://i.ibb.co/7JM1P2r/picke-rick.jpg', }), createEntity(User, { email: 'yoda@jira.guest', @@ -16,9 +16,9 @@ const seedUsers = (): Promise => { avatarUrl: 'https://i.ibb.co/6n0hLML/baby-yoda.jpg', }), createEntity(User, { - email: 'rick@jira.guest', - name: 'Pickle Rick', - avatarUrl: 'https://i.ibb.co/7JM1P2r/picke-rick.jpg', + email: 'gaben@jira.guest', + name: 'Lord Gaben', + avatarUrl: 'https://i.ibb.co/6RJ5hq6/gaben.jpg', }), ]; return Promise.all(users); @@ -42,12 +42,12 @@ const seedIssues = (project: Project): Promise => { title: 'This is an issue of type: Task.', type: IssueType.TASK, status: IssueStatus.BACKLOG, - priority: IssuePriority.LOWEST, + priority: IssuePriority.HIGH, listPosition: 1, + description: `

Your teams can collaborate in Jira applications by breaking down pieces of work into issues. Issues can represent tasks, software bugs, feature requests or any other type of project work.


Jira Software (software projects) issue types:


Bug 🐞

A bug is a problem which impairs or prevents the functions of a product.


Story 📗

A user story is the smallest unit of work that needs to be done.


Task 🗳

A task represents work that needs to be done.

`, estimate: 8, reporterId: users[1].id, project, - users: [users[0]], }), createEntity(Issue, { title: "Click on an issue to see what's behind it.", @@ -55,81 +55,137 @@ const seedIssues = (project: Project): Promise => { status: IssueStatus.BACKLOG, priority: IssuePriority.LOW, listPosition: 2, - description: 'Nothing in particular.', + description: `

Key terms to know


Issues

A Jira 'issue' refers to a single work item of any type or size that is tracked from creation to completion. For example, an issue could be a feature being developed by a software team, a to-do item for a marketing team, or a contract that needs to be written by a legal team.


Projects

A project is, quite simply, a collection of issues that are held in common by purpose or context. Issues grouped into projects can be configured in a variety of ways, ranging from visibility restrictions to available workflows.


Workflows

Workflows represent the sequential path an issues takes from creation to completion. A basic workflow might look something like this:


Jira workflow diagram


In this case, Open, Done, and the labels in between represent the status an issue can take, while the arrows represent potential transitions from one status to another.


Agile

Agile is not a Jira Software-specific term. It's a work philosophy that originated in the software development field and has since expanded to a variety of other industries. While we won't belabor the definition here (there are great resources for that!), agile emphasizes an iterative approach to work informed by customer feedback where delivery occurs incrementally and continuously. The ideal agile team can move quickly and adapt to changing requirements without missing much of a beat.


Server

With Jira Software Server, you host Jira Software on your own hardware and customize your setup however you'd like. This is generally the best option for teams who need to manage all the details, have stricter requirements for data governance, and don't mind the additional complexity of hosting themselves.


Data Center


Data Center


With Jira Software Data Center, you can host Jira Software on your own hardware or with IaaS vendors like AWS and Azure. This is generally the best option for enterprise teams who need uninterrupted access to Jira Software and performance at scale.


`, estimate: 40, reporterId: users[2].id, project, }), createEntity(Issue, { - title: 'Try dragging and sorting issues.', - type: IssueType.BUG, + title: 'Try dragging issues to different columns to transition their status.', + type: IssueType.STORY, status: IssueStatus.BACKLOG, priority: IssuePriority.MEDIUM, listPosition: 3, + description: `

An issue's status indicates its current place in the project's workflow. Here's a list of the statuses that come with JIRA products, depending on what projects you've created on your site.


Jira software issue statuses:


Backlog

The issue is waiting to be picked up in a future sprint.


Selected

The issue is open and ready for the assignee to start work on it.


In Progress

This issue is being actively worked on at the moment by the assignee.


Done

Work has finished on the issue.

`, estimate: 15, reporterId: users[1].id, project, users: [users[2]], }), createEntity(Issue, { - title: 'You can use markdown for issue descriptions.', + title: 'You can use rich text with images in issue descriptions.', type: IssueType.STORY, status: IssueStatus.BACKLOG, - priority: IssuePriority.HIGH, + priority: IssuePriority.LOWEST, listPosition: 4, - description: '#### Colons can be used to align columns.', + description: `

🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🍈 🍒 🍑 🍍 🥭 🥥 🥝 🍅 🍆 🥑 🥦 🥒 🥬 🌶 🌽 🥕 🥔 🍠 🥐 🍞 🥖 🥨 🥯 🧀 🥚 🍳 🥞 🥓 🥩 🍗 🍖 🌭 🍔 🍟 🍕 🥪 🥙 🌮 🌯 🥗 🥘 🥫 🍝 🍜 🍲 🍛 🍣 🍱 🥟 🍤 🍙 🍚 🍘 🍥 🥮 🥠 🍢 🍡 🍧 🍨 🍦 🥧 🍰 🎂 🍮 🍭 🍬 🍫 🍿 🧂 🍩 🍪 🌰 🥜 🍯 🥛 🍼 ☕️ 🍵 🥤 🍶 🍺 🍻 🥂 🍷 🥃 🍸 🍹 🍾 🥄 🍴 🍽 🥣 🥡 🥢

`, estimate: 4, reporterId: users[0].id, project, users: [users[2]], }), createEntity(Issue, { - title: 'You must assign priority from lowest to highest to all issues.', + title: 'Each issue can be assigned priority from lowest to highest.', type: IssueType.TASK, status: IssueStatus.SELECTED, priority: IssuePriority.HIGHEST, listPosition: 5, + description: `

An issue's priority indicates its relative importance. The default priorities are listed below. Both the priorities and their meanings can be customized by your administrator to suit your organization. Learn more about configuring priorities and their descriptions.


Jira software issue priorities:


Highest ⬆️

This problem will block progress.


High ⬆️

Serious problem that could block progress.


Medium ⬆️

Has the potential to affect progress.


Low ⬇️

Minor problem or easily worked around.


Lowest ⬇️

Trivial problem with little or no impact on progress.

`, estimate: 15, reporterId: users[2].id, project, }), createEntity(Issue, { - title: 'You can assign labels to issues.', + title: 'Each issue has a single reporter but can have multiple assignees.', type: IssueType.STORY, status: IssueStatus.SELECTED, - priority: IssuePriority.MEDIUM, + priority: IssuePriority.HIGH, listPosition: 6, + description: `

Try assigning Pickle Rick to this issue. 🥒 🥒 🥒


`, estimate: 55, reporterId: users[1].id, project, - users: [users[0]], + users: [users[0], users[1]], + }), + createEntity(Issue, { + title: + 'You can track how many hours were spent working on an issue, and how many hours remain.', + type: IssueType.TASK, + status: IssueStatus.INPROGRESS, + priority: IssuePriority.LOWEST, + listPosition: 7, + description: `

Before you start work on an issue, you can set a time or other type of estimate to calculate how much work you believe it'll take to resolve it. Once you've started to work on a specific issue, log time to keep a record of it.


  • Open the issue and select ••• > Time tracking
  • Fill in the Time Spent field
  • Fill in the Time Remaining field and click Save


That's it!

💯💯

`, + estimate: 12, + reporterId: users[0].id, + project, }), createEntity(Issue, { title: 'Try leaving a comment on this issue.', type: IssueType.TASK, - status: IssueStatus.SELECTED, + status: IssueStatus.DONE, priority: IssuePriority.MEDIUM, listPosition: 7, + description: `

Adding comments to an issue is a useful way to record additional detail about an issue, and collaborate with team members. Comments are shown in the Comments section when you view an issue.


  1. Open the issue on which to add your comment.
  2. Click the Add a comment button.
  3. (tick) Keyboard shortcutm
  4. In the Comment text box, type your comment, using as many lines as you require. (tick) 
  5. Click the Save button to save the comment.
`, estimate: 12, reporterId: users[0].id, project, + users: [users[1]], }), ]; return Promise.all(issues); }; -const seedComments = (issue: Issue, user: User): Promise => - createEntity(Comment, { - body: "Be nice to each other! Don't be mean to each other!", - issueId: issue.id, - userId: user.id, - }); +const seedComments = (issues: Issue[], users: User[]): Promise => { + const comments = [ + createEntity(Comment, { + body: 'An old silent pond...\nA frog jumps into the pond,\nsplash! Silence again.', + issueId: issues[0].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'Autumn moonlight-\na worm digs silently\ninto the chestnut.', + issueId: issues[1].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'In the twilight rain\nthese brilliant-hued hibiscus -\nA lovely sunset.', + issueId: issues[2].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'A summer river being crossed\nhow pleasing\nwith sandals in my hands!', + issueId: issues[3].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: "Light of the moon\nMoves west, flowers' shadows\nCreep eastward.", + issueId: issues[4].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'In the moonlight,\nThe color and scent of the wisteria\nSeems far away.', + issueId: issues[5].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'O snail\nClimb Mount Fuji,\nBut slowly, slowly!', + issueId: issues[6].id, + userId: users[2].id, + }), + createEntity(Comment, { + body: 'Everything I touch\nwith tenderness, alas,\npricks like a bramble.', + issueId: issues[7].id, + userId: users[2].id, + }), + ]; + return Promise.all(comments); +}; const createGuestAccount = async (): Promise => { const users = await seedUsers(); const project = await seedProject(users); const issues = await seedIssues(project); - await seedComments(issues[0], project.users[0]); + await seedComments(issues, project.users); return users[0]; };