-
Notifications
You must be signed in to change notification settings - Fork 567
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
feat: #6932 Added Task By Id API with rootEpic field #6933
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 8500f5a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
return null; | ||
} | ||
} catch (error) { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@badalkhatri0924 this is not good, think I don't need to explain why?
CC: @rahul-rocket
|
||
async findParentUntilEpic(issueId: string): Promise<Task> { | ||
// Define the recursive SQL query | ||
const query = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@badalkhatri0924 we can't use TypeORM for that? If not, will it work well for both SQLite and PostgreSQL? I would also suggest to define such SQL Queries in some constants separately so we can easy find them / see them and improve them (best would be to use DB stored procedures / views when available, but it will be overkill if we do it very rarely). I would do a bit more research how to organize such queries with usage of TypeORM etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rahul-rocket please see comment above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evereq We will try to apply TypeORM for this query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evereq I tried doing it with TypeORM but could implement it, spent 1 Hour for then, Should I spent more time?
@@ -44,6 +44,8 @@ export interface ITask extends IBasePerTenantAndOrganizationEntityModel { | |||
taskStatusId?: ITaskStatus['id']; | |||
taskSizeId?: ITaskSize['id']; | |||
taskPriorityId?: ITaskPriority['id']; | |||
|
|||
rootEpic?: ITask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@badalkhatri0924 So you used rootEpic
as ITask type while below use as boolean
type. So please change it.
Note: You can use includeRootEpic
.
description: 'Record not found', | ||
}) | ||
@Get(':id') | ||
async findById( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@badalkhatri0924 We have missing permissions here?
|
||
async findParentUntilEpic(issueId: string): Promise<Task> { | ||
// Define the recursive SQL query | ||
const query = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evereq We will try to apply TypeORM for this query.
PR
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.
Task: #6932