Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add progress bar to detail view #81

Merged
merged 78 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
b712729
Refactor user types
maximilianruesch Nov 27, 2023
f9db363
Add create issue for server
maximilianruesch Nov 27, 2023
106a19a
Fix create issue for cloud
maximilianruesch Nov 27, 2023
f940580
Add jira server info to provider class
maximilianruesch Nov 27, 2023
52aebb7
Add implementation for executing api calls in a versioned manner
maximilianruesch Nov 27, 2023
5494f24
Add test implementation for getIssueTypesWithFieldsMap
maximilianruesch Nov 27, 2023
60f7867
Fix issues with changed types
maximilianruesch Nov 27, 2023
db70900
Merge branch 'task/fix-create-issue-for-server' into refactor/impleme…
maximilianruesch Nov 27, 2023
874a2aa
Add error when jira server version is unsupported
maximilianruesch Nov 27, 2023
51dc1b3
Fix server provider for creating epics
maximilianruesch Nov 27, 2023
5e9c1a4
started implementation of Epic View
trueliquid Nov 28, 2023
4669222
implements Button to access Epic List View
trueliquid Nov 28, 2023
ff4f822
Removed Search Bar for now
trueliquid Nov 30, 2023
37ad385
Added Button to open Epic View
trueliquid Nov 30, 2023
39fafcf
Added Epic Card
trueliquid Nov 30, 2023
cd239e3
Added Create Epic Button to Epic View
trueliquid Nov 30, 2023
87d6df4
Add first epic detail view version
maximilianruesch Dec 1, 2023
e13b3e4
Modify type of comment
maximilianruesch Dec 1, 2023
a9c9808
Created first Version of Epic Detail View with a hardcoded Epic
JulianRupprecht Dec 4, 2023
571c669
Epic List View shows epics missing type and status
trueliquid Dec 4, 2023
9f53b21
Removed Issue Type and status label since it is not in the mockup
trueliquid Dec 4, 2023
12c01b8
accidentally removed summary text on epic card
trueliquid Dec 4, 2023
16c8b92
Adapted Progressbar to mockup
JulianRupprecht Dec 5, 2023
6046dd7
Adapted Detail View to mockup
JulianRupprecht Dec 5, 2023
d1f7efc
Merge branch 'task/fix-create-issue-for-server' into refactor/impleme…
maximilianruesch Dec 5, 2023
5c385da
Merge branch 'main' into refactor/implement-different-implementations…
maximilianruesch Dec 5, 2023
56a348f
Merge branch 'refactor/implement-different-implementations-for-server…
maximilianruesch Dec 5, 2023
b22a345
Merge branch 'story/Fast-Epic-List-View' into story/add-epic-detail-view
JulianRupprecht Dec 6, 2023
0a7c358
Fixed EpicDetailView bugs
JulianRupprecht Dec 6, 2023
ff44905
Merge branch 'story/Fast-Epic-List-View' into story/add-epic-detail-view
JulianRupprecht Dec 6, 2023
c6be370
Revert accidental changes
JulianRupprecht Dec 6, 2023
6663b0f
Revert accidental changes
maximilianruesch Dec 6, 2023
76101a2
Formatting and remove redundant code
trueliquid Dec 6, 2023
d41db66
Remove code used for epic search
trueliquid Dec 6, 2023
cb455ce
Merge remote-tracking branch 'origin/story/Fast-Epic-List-View' into …
trueliquid Dec 6, 2023
0f1a562
Merge branch 'refactor/implement-different-implementations-for-server…
maximilianruesch Dec 6, 2023
bb62626
Merge branch 'main' into story/Fast-Epic-List-View
maximilianruesch Dec 6, 2023
bb0296f
Fix linting issues
maximilianruesch Dec 6, 2023
5013be1
Fix linting issues again
maximilianruesch Dec 6, 2023
355548a
Merge branch 'story/Fast-Epic-List-View' into story/add-epic-detail-view
maximilianruesch Dec 6, 2023
3bcf2de
Merge branch 'main' into story/add-epic-detail-view
maximilianruesch Dec 6, 2023
1aed7e5
Fix formatting and linting
maximilianruesch Dec 6, 2023
f5f6c45
Remove unused code
maximilianruesch Dec 6, 2023
ef4db64
Enable editing epic summary
maximilianruesch Dec 6, 2023
de5a049
Remove progress bar
maximilianruesch Dec 6, 2023
d2728a9
Revert "Remove progress bar"
maximilianruesch Dec 6, 2023
029d042
Fix assignee select
maximilianruesch Dec 6, 2023
6f5e301
Fix label select
maximilianruesch Dec 6, 2023
8f52fb4
Fix reporter select
maximilianruesch Dec 6, 2023
d438ee1
Remove comment and attachments
maximilianruesch Dec 6, 2023
6e7303a
Merge branch 'story/add-epic-detail-view' into story/add-progress-bar…
maximilianruesch Dec 6, 2023
330e65f
Merge branch 'main' into story/add-progress-bar-to-detail-view
maximilianruesch Dec 6, 2023
e1ca50d
Change total story points design and add "In progress" progress bar
ValsiRod Dec 11, 2023
c14d2b2
Add support for child issues view for Epic detailed view
ValsiRod Dec 13, 2023
0465006
Updates on ChildIssues problem
ValsiRod Dec 17, 2023
90caaec
Show of ChildIssues in the detailed view of an Epic
ValsiRod Dec 17, 2023
2bab46c
Connection between story points and progress bar with child issues.
ValsiRod Dec 17, 2023
0f5e343
made child issues in EpicDetailView non draggable
trueliquid Dec 17, 2023
9d95879
Improvements for progress bar and SP circles
ValsiRod Dec 18, 2023
cf0d14b
Merge remote-tracking branch 'origin/story/add-progress-bar-to-detail…
ValsiRod Dec 18, 2023
12c58bb
Expand child issues length to match PB and SP circles.
ValsiRod Dec 18, 2023
0996413
Refactor story points to common component and simplify
maximilianruesch Dec 19, 2023
81269e8
Simplify expressions for child issues
maximilianruesch Dec 19, 2023
9133b21
Refactor epic typing and secure epic key identification
maximilianruesch Dec 19, 2023
3b9118f
Move child issue components
maximilianruesch Dec 19, 2023
15db1d6
Fix epic types and display
maximilianruesch Dec 19, 2023
45897bc
Simplify story points helpers
maximilianruesch Dec 19, 2023
f3792c7
Remove epics from epics
maximilianruesch Dec 19, 2023
2707cbd
Fix story points
maximilianruesch Dec 19, 2023
cb27fd1
Add time fields for epics
maximilianruesch Dec 19, 2023
1a92f28
Revert accidental code style changes
maximilianruesch Dec 19, 2023
012437c
Revert accidental code style changes again
maximilianruesch Dec 19, 2023
b7e439b
Fix types and remove unused epic code
maximilianruesch Dec 19, 2023
00385ad
Fix epic detail view
maximilianruesch Dec 20, 2023
e4ecfd3
Remove comment
maximilianruesch Dec 20, 2023
2ec7a2f
Fix styling and description
maximilianruesch Dec 20, 2023
5cb018b
Fix story points badge styling
maximilianruesch Dec 20, 2023
8241512
Fix epic detail view
maximilianruesch Dec 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions electron/providers/jira-cloud-provider/JiraCloudProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ export class JiraCloudProvider implements IProvider {
async getIssuesByProject(project: string): Promise<Issue[]> {
return new Promise((resolve, reject) => {
this.getRestApiClient(3)
.get(`/search?jql=project=${project}&maxResults=10000`)
.get(`/search?jql=project=${project}&maxResults=10000&fields=*all`)
.then(async (response) => {
resolve(this.fetchIssues(response))
resolve(this.fetchIssues(response, false))
})
.catch((error) => {
reject(new Error(`Error fetching issues by project: ${this.handleFetchIssuesError(error)}`))
Expand All @@ -424,7 +424,7 @@ export class JiraCloudProvider implements IProvider {
this.getAgileRestApiClient('1.0')
.get(`/sprint/${sprintId}/issue`)
.then(async (response) => {
resolve(this.fetchIssues(response))
resolve(this.fetchIssues(response, true))
})
.catch((error) => {
reject(new Error(`Error fetching issues by sprint: ${this.handleFetchIssuesError(error)}`))
Expand All @@ -440,15 +440,15 @@ export class JiraCloudProvider implements IProvider {
this.getAgileRestApiClient('1.0')
.get(`/board/${boardId}/backlog?jql=project=${project}&maxResults=500`)
.then(async (response) => {
resolve(this.fetchIssues(response))
resolve(this.fetchIssues(response, true))
})
.catch((error) => {
reject(new Error(`Error fetching issues by project: ${this.handleFetchIssuesError(error)}`))
})
})
}

async fetchIssues(response: AxiosResponse): Promise<Issue[]> {
async fetchIssues(response: AxiosResponse, isAgile: boolean): Promise<Issue[]> {
const rankCustomField = this.customFields.get("Rank") || ""
return new Promise((resolve) => {
const issues: Promise<Issue[]> = Promise.all(
Expand All @@ -459,18 +459,30 @@ export class JiraCloudProvider implements IProvider {
status: element.fields.status.name,
type: element.fields.issuetype.name,
storyPointsEstimate: await this.getIssueStoryPointsEstimate(element.key),
epic: element.fields.parent?.fields.summary,
epic: {
issueKey: element.fields.parent?.key,
summary: element.fields.parent?.fields.summary,
},
labels: element.fields.labels,
assignee: {
displayName: element.fields.assignee?.displayName,
avatarUrls: element.fields.assignee?.avatarUrls,
},
rank: element.fields[rankCustomField],
description: element.fields.description,
// IMPROVE: Remove boolean flag
description: (isAgile ? element.fields.description : element.fields.description?.content),
subtasks: element.fields.subtasks,
created: element.fields.created,
updated: element.fields.updated,
comment: element.fields.comment,
comment: {
comments: element.fields.comment.comments.map((commentElement) => ({
id: commentElement.id,
body: (isAgile ? commentElement.body : commentElement.body[0]?.content[0]?.text),
author: commentElement.author,
created: commentElement.created,
updated: commentElement.updated,
})),
},
projectId: element.fields.project.id,
sprint: element.fields.sprint,
attachments: element.fields.attachment,
Expand Down Expand Up @@ -658,7 +670,7 @@ export class JiraCloudProvider implements IProvider {
{
fields: {
summary,
parent: { key: epic },
parent: { key: epic.issueKey },
issuetype: { id: type },
project: {
id: projectId,
Expand Down Expand Up @@ -756,8 +768,8 @@ export class JiraCloudProvider implements IProvider {
...(summary && {
summary,
}),
...(epic && {
parent: { key: epic },
...(epic && epic.issueKey && {
parent: { key: epic.issueKey },
}),
...(type && {
issuetype: { id: type },
Expand Down Expand Up @@ -820,7 +832,7 @@ export class JiraCloudProvider implements IProvider {
}
}

reject(new Error(`Error creating issue: ${specificError}`))
reject(new Error(`Error editing issue: ${specificError}`))
})
})
}
Expand Down Expand Up @@ -853,7 +865,9 @@ export class JiraCloudProvider implements IProvider {
response.data.issues.map(async (element: JiraIssue) => ({
issueKey: element.key,
summary: element.fields.summary,
epic: element.fields.epic,
labels: element.fields.labels,
description: element.fields.description.content[0]?.content[0]?.text,
assignee: {
displayName: element.fields.assignee?.displayName,
avatarUrls: element.fields.assignee?.avatarUrls,
Expand Down
16 changes: 11 additions & 5 deletions electron/providers/jira-server-provider/JiraServerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export class JiraServerProvider implements IProvider {
async getIssuesByProject(project: string, boardId: number): Promise<Issue[]> {
return new Promise((resolve, reject) => {
this.getAgileRestApiClient('1.0')
.get(`/board/${boardId}/issue?jql=project=${project}&maxResults=10000`)
.get(`/board/${boardId}/issue?jql=project=${project}&maxResults=10000&fields=*all`)
.then((response) => resolve(this.fetchIssues(response)))
.catch((error) => reject(new Error(`Error in fetching issues: ${error}`)))
})
Expand Down Expand Up @@ -336,7 +336,10 @@ export class JiraServerProvider implements IProvider {
status: element.fields.status.name,
type: element.fields.issuetype.name,
storyPointsEstimate: await this.getIssueStoryPointsEstimate(element.key),
epic: element.fields.parent?.fields.summary,
epic: {
issueKey: element.fields.parent?.key,
summary: element.fields.parent?.fields.summary,
},
labels: element.fields.labels,
assignee: {
displayName: element.fields.assignee?.displayName,
Expand Down Expand Up @@ -515,7 +518,7 @@ export class JiraServerProvider implements IProvider {
{
fields: {
summary,
parent: { key: epic },
parent: { key: epic.issueKey },
issuetype: { id: type },
project: {
id: projectId,
Expand Down Expand Up @@ -583,6 +586,9 @@ export class JiraServerProvider implements IProvider {
issueKey: element.key,
summary: element.fields.summary,
labels: element.fields.labels,
created: element.fields.created,
updated: element.fields.updated,
description: element.fields.description.content,
assignee: {
displayName: element.fields.assignee?.displayName,
avatarUrls: element.fields.assignee?.avatarUrls,
Expand Down Expand Up @@ -854,8 +860,8 @@ export class JiraServerProvider implements IProvider {
...(summary && {
summary,
}),
...(epic && {
parent: { key: epic },
...(epic && epic.issueKey && {
parent: { key: epic.issueKey },
}),
...(type && {
issuetype: { id: type },
Expand Down
4 changes: 2 additions & 2 deletions src/components/BacklogView/Issue/IssueCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ export function IssueCard({
>
{issueKey}
</Text>
{epic && (
{epic.issueKey && (
<Badge mr={5} color="violet">
{epic}
{epic.summary}
</Badge>
)}
{labels?.length !== 0 &&
Expand Down
2 changes: 1 addition & 1 deletion src/components/BacklogView/helpers/backlogHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const searchIssuesFilter = (
.issues.filter(
(issue: Issue) =>
issue.summary.toLowerCase().includes(currentSearch.toLowerCase()) ||
issue.epic?.toLowerCase().includes(currentSearch.toLowerCase()) ||
issue.epic.summary?.toLowerCase().includes(currentSearch.toLowerCase()) ||
issue.assignee?.displayName
?.toLowerCase()
.includes(currentSearch.toLowerCase()) ||
Expand Down
5 changes: 5 additions & 0 deletions src/components/BacklogView/helpers/queryFetchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { Issue, Sprint, SprintCreate } from "types"
export const getSprints = (boardId: number): Promise<Sprint[]> =>
window.provider.getSprints(boardId)

export const getIssuesByProject = (
projectKey: string | undefined,
boardId: number
): Promise<Issue[]> => window.provider.getIssuesByProject(projectKey || "", boardId)

export const getIssuesBySprint = (
sprintId: number | undefined
): Promise<Issue[]> => window.provider.getIssuesBySprint(sprintId || 0)
Expand Down
1 change: 1 addition & 0 deletions src/components/CreateIssue/CreateIssueModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function CreateIssueModal({
status: "To Do",
reporter: currentUser,
priority: { id: "" },
epic: { issueKey: undefined }
} as Issue,
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateIssue/Fields/EpicSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function EpicSelect({
searchable
clearable
withinPortal
{...form.getInputProps("epic")}
{...form.getInputProps("epic.issueKey")}
/>
</Box>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateIssue/Fields/IssueTypeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function IssueTypeSelect({
) {
form.setFieldValue("sprintId", null as unknown as string)
form.setFieldValue("storyPointsEstimate", null as unknown as number)
form.setFieldValue("epic", null as unknown as string)
form.setFieldValue("epic.issueKey", undefined)
}
form.setFieldValue("status", "To Do")
form.setFieldValue("priority.id", null)
Expand Down
22 changes: 12 additions & 10 deletions src/components/DetailView/Components/EditableEpic/EditableEpic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@ export function EditableEpic({
}: {
projectId: string
issueKey: string
epic: string
epic: {
issueKey?: string,
summary?: string,
}
}) {
const [showEpicInput, setshowEpicInput] = useState(false)
const [showEpicInput, setShowEpicInput] = useState(false)
const { data: epics } = useQuery({
queryKey: ["epics", projectId],
queryFn: () => getEpicsByProject(projectId),
})
const [selectedEpic, setselectedEpic] = useState(epic)
const [selectedEpic, setSelectedEpic] = useState(epic.issueKey)
const mutationEpic = useMutation({
mutationFn: (epicKey: string) =>
editIssue({ epic: epicKey } as Issue, issueKey),
mutationFn: (epicKey: string) => editIssue({ epic: { issueKey: epicKey } } as Issue, issueKey),
onError: () => {
showNotification({
message: `An error occured while modifing the Epic 😢`,
message: `An error occurred while modifing the Epic 😢`,
color: "red",
})
},
Expand All @@ -49,7 +51,7 @@ export function EditableEpic({
placeholder=""
nothingFound="No Options"
data={
epics && epics instanceof Array
epics
? epics.map((epicItem) => ({
value: epicItem.issueKey,
label: epicItem.summary,
Expand All @@ -61,16 +63,16 @@ export function EditableEpic({
itemComponent={SelectItem}
value={selectedEpic}
onChange={(value) => {
setselectedEpic(value!)
setSelectedEpic(value!)
mutationEpic.mutate(value!)
setshowEpicInput(false)
setShowEpicInput(false)
}}
w="300px"
/>
) : (
<Group>
<Text
onClick={() => setshowEpicInput(true)}
onClick={() => setShowEpicInput(true)}
sx={{
":hover": { textDecoration: "underline", cursor: "pointer" },
}}
Expand Down
23 changes: 0 additions & 23 deletions src/components/DetailView/Components/EditableEpic/queries.ts

This file was deleted.

Loading