forked from github/plane
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:
parent
581c89fb5f
commit
66b728db90
@ -6,6 +6,7 @@ import { EFilterType } from "store/issues/types";
|
|||||||
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
|
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
|
||||||
// helpers
|
// helpers
|
||||||
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
||||||
|
import { isNil } from "../project-issues/utils";
|
||||||
// services
|
// services
|
||||||
import { WorkspaceService } from "services/workspace.service";
|
import { WorkspaceService } from "services/workspace.service";
|
||||||
|
|
||||||
@ -377,6 +378,12 @@ export class GlobalIssuesFilterStore extends IssueFilterBaseStore implements IGl
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || 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,
|
sub_issue: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOption
|
|||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
||||||
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
|
import { IssueFilterBaseStore } from "../project-issues/base-issue-filter.store";
|
||||||
|
import { isNil } from "../project-issues/utils";
|
||||||
|
|
||||||
interface IProjectIssuesFiltersOptions {
|
interface IProjectIssuesFiltersOptions {
|
||||||
filters: IIssueFilterOptions;
|
filters: IIssueFilterOptions;
|
||||||
@ -285,9 +286,13 @@ export class ProfileIssuesFilterStore extends IssueFilterBaseStore implements IP
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "profile_issues");
|
||||||
|
@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface IProjectIssuesFilters {
|
interface IProjectIssuesFilters {
|
||||||
filters: IIssueFilterOptions | undefined;
|
filters: IIssueFilterOptions | undefined;
|
||||||
@ -78,9 +79,13 @@ export class ProjectArchivedIssuesFilterStore
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface ICycleIssuesFilterOptions {
|
interface ICycleIssuesFilterOptions {
|
||||||
filters: IIssueFilterOptions;
|
filters: IIssueFilterOptions;
|
||||||
@ -118,9 +119,13 @@ export class CycleIssuesFilterStore extends IssueFilterBaseStore implements ICyc
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface IProjectIssuesFilters {
|
interface IProjectIssuesFilters {
|
||||||
filters: IIssueFilterOptions | undefined;
|
filters: IIssueFilterOptions | undefined;
|
||||||
@ -75,9 +76,13 @@ export class ProjectDraftIssuesFilterStore extends IssueFilterBaseStore implemen
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface IModuleIssuesFilterOptions {
|
interface IModuleIssuesFilterOptions {
|
||||||
filters: IIssueFilterOptions;
|
filters: IIssueFilterOptions;
|
||||||
@ -118,9 +119,13 @@ export class ModuleIssuesFilterStore extends IssueFilterBaseStore implements IMo
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
@ -11,6 +11,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface IViewIssuesFilterOptions {
|
interface IViewIssuesFilterOptions {
|
||||||
filters: IIssueFilterOptions;
|
filters: IIssueFilterOptions;
|
||||||
@ -118,9 +119,13 @@ export class ViewIssuesFilterStore extends IssueFilterBaseStore implements IView
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
@ -8,6 +8,7 @@ import { handleIssueQueryParamsByLayout } from "helpers/issue.helper";
|
|||||||
import { RootStore } from "store/root";
|
import { RootStore } from "store/root";
|
||||||
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueParams } from "types";
|
||||||
import { EFilterType } from "store/issues/types";
|
import { EFilterType } from "store/issues/types";
|
||||||
|
import { isNil } from "../utils";
|
||||||
|
|
||||||
interface IProjectIssuesFilters {
|
interface IProjectIssuesFilters {
|
||||||
filters: IIssueFilterOptions | undefined;
|
filters: IIssueFilterOptions | undefined;
|
||||||
@ -75,9 +76,13 @@ export class ProjectIssuesFilterStore extends IssueFilterBaseStore implements IP
|
|||||||
start_date: userFilters?.filters?.start_date || undefined,
|
start_date: userFilters?.filters?.start_date || undefined,
|
||||||
target_date: userFilters?.filters?.target_date || undefined,
|
target_date: userFilters?.filters?.target_date || undefined,
|
||||||
type: userFilters?.displayFilters?.type || undefined,
|
type: userFilters?.displayFilters?.type || undefined,
|
||||||
sub_issue: userFilters?.displayFilters?.sub_issue || true,
|
sub_issue: isNil(userFilters?.displayFilters?.sub_issue) ? true : userFilters?.displayFilters?.sub_issue,
|
||||||
show_empty_groups: userFilters?.displayFilters?.show_empty_groups || true,
|
show_empty_groups: isNil(userFilters?.displayFilters?.show_empty_groups)
|
||||||
start_target_date: userFilters?.displayFilters?.start_target_date || true,
|
? 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");
|
const filteredParams = handleIssueQueryParamsByLayout(userFilters?.displayFilters?.layout, "issues");
|
||||||
|
5
web/store/issues/project-issues/utils.ts
Normal file
5
web/store/issues/project-issues/utils.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export const isNil = (value: any) => {
|
||||||
|
if (value === undefined || value === null) return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user