fix: sub display filter params for fetching issues (#2972)

* fix add subgroup issue FED-1101

* fix subgroup by None assignee FED-1100

* fix grouping by asignee or labels FED-1096

* fix create view popup FED-1093

* fix subgroup exception in swimlanes

* fix show sub issue filter FED-1102
This commit is contained in:
rahulramesha 2023-12-02 18:23:07 +05:30 committed by sriram veeraghanta
parent 6392a24098
commit 979e6fe383
9 changed files with 68 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import { EFilterType } from "store/issues/types";
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
// helpers
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { isNil } from "../project-issues/utils";
// services
import { WorkspaceService } from "services/workspace.service";
@ -377,6 +378,12 @@ export class GlobalIssuesFilterStore extends IssueFilterBaseStore implements IGl
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
sub_issue: false,
};

View File

@ -6,6 +6,7 @@ import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOption
import { EFilterType } from "store/issues/types";
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
import { isNil } from "../project-issues/utils";
interface IProjectIssuesFiltersOptions {
filters: IIssueFilterOptions;
@ -285,9 +286,13 @@ export class ProfileIssuesFilterStore extends IssueFilterBaseStore implements IP
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "profile_issues");

View File

@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface IProjectIssuesFilters {
filters: IIssueFilterOptions | undefined;
@ -78,9 +79,13 @@ export class ProjectArchivedIssuesFilterStore
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface ICycleIssuesFilterOptions {
filters: IIssueFilterOptions;
@ -118,9 +119,13 @@ export class CycleIssuesFilterStore extends IssueFilterBaseStore implements ICyc
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface IProjectIssuesFilters {
filters: IIssueFilterOptions | undefined;
@ -75,9 +76,13 @@ export class ProjectDraftIssuesFilterStore extends IssueFilterBaseStore implemen
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface IModuleIssuesFilterOptions {
filters: IIssueFilterOptions;
@ -118,9 +119,13 @@ export class ModuleIssuesFilterStore extends IssueFilterBaseStore implements IMo
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface IViewIssuesFilterOptions {
filters: IIssueFilterOptions;
@ -118,9 +119,13 @@ export class ViewIssuesFilterStore extends IssueFilterBaseStore implements IView
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
import { RootStore } from "store/root";
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
import { EFilterType } from "store/issues/types";
import { isNil } from "../utils";
interface IProjectIssuesFilters {
filters: IIssueFilterOptions | undefined;
@ -75,9 +76,13 @@ export class ProjectIssuesFilterStore extends IssueFilterBaseStore implements IP
start_date: userFilters?.filters?.start_date || undefined,
target_date: userFilters?.filters?.target_date || undefined,
type: userFilters?.displayFilters?.type || undefined,
sub_issue: userFilters?.displayFilters?.sub_issue || true,
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
start_target_date: userFilters?.displayFilters?.start_target_date || true,
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
? true
: userFilters?.displayFilters?.show_empty_groups,
start_target_date: isNil(userFilters?.displayFilters?.start_target_date)
? true
: userFilters?.displayFilters?.start_target_date,
};
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");

View File

@ -0,0 +1,5 @@
export const isNil = (value: any) => {
if (value === undefined || value === null) return true;
return false;
};