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

feat: #6932 Added Task By Id API with rootEpic field #6933

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

badalkhatri0924
Copy link
Contributor

@badalkhatri0924 badalkhatri0924 commented Oct 4, 2023

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

@nx-cloud
Copy link

nx-cloud bot commented Oct 4, 2023

☁️ Nx Cloud Report

CI 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


🟥 Failed Commands
nx serve api -c=production --prod

Sent with 💌 from NxCloud.

return null;
}
} catch (error) {
return null;
Copy link
Member

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 = `
Copy link
Member

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.

Copy link
Member

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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;
Copy link
Collaborator

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(
Copy link
Collaborator

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 = `
Copy link
Collaborator

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.

@rahul-rocket rahul-rocket merged commit 456cab0 into develop Oct 5, 2023
@rahul-rocket rahul-rocket deleted the feat/#6932-root-epic branch October 5, 2023 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants