Skip to content
2 changes: 1 addition & 1 deletion models/contact/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class TContact extends TDoc implements Contact {
@Index(IndexKind.FullText)
city!: string

@Prop(TypeTimestamp(), contact.string.CreatedOn)
@Prop(TypeTimestamp(), contact.string.CreatedDate)
@ReadOnly()
createOn!: Timestamp
}
Expand Down
2 changes: 1 addition & 1 deletion models/contact/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default mergeIds(contactId, contact, {
TypeLabel: '' as IntlString,
Homepage: '' as IntlString,
Birthday: '' as IntlString,
CreatedOn: '' as IntlString,
CreatedDate: '' as IntlString,
Whatsapp: '' as IntlString,
WhatsappPlaceholder: '' as IntlString,
Skype: '' as IntlString,
Expand Down
2 changes: 1 addition & 1 deletion models/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class TDoc extends TObj implements Doc {
@Hidden()
space!: Ref<Space>

@Prop(TypeTimestamp(), core.string.Modified)
@Prop(TypeTimestamp(), core.string.ModifiedDate)
@Index(IndexKind.Indexed)
modifiedOn!: Timestamp

Expand Down
6 changes: 3 additions & 3 deletions models/recruit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class TApplicant extends TTask implements Applicant {
@Prop(TypeRef(contact.class.Employee), recruit.string.AssignedRecruiter)
declare assignee: Ref<Employee> | null

@Prop(TypeTimestamp(), contact.string.CreatedOn)
@Prop(TypeTimestamp(), contact.string.CreatedDate)
@ReadOnly()
createOn!: Timestamp
}
Expand Down Expand Up @@ -454,7 +454,7 @@ export function createModel (builder: Builder): void {
'description',
{
key: '@applications.modifiedOn',
label: core.string.Modified
label: core.string.ModifiedDate
}
],
hiddenKeys: ['name', 'space', 'modifiedOn']
Expand Down Expand Up @@ -484,7 +484,7 @@ export function createModel (builder: Builder): void {
'$lookup.channels',
{
key: '@applications.modifiedOn',
label: core.string.Modified
label: core.string.ModifiedDate
}
],
hiddenKeys: ['name', 'space', 'modifiedOn']
Expand Down
19 changes: 17 additions & 2 deletions models/tracker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export class TIssue extends TAttachedDoc implements Issue {
@Prop(Collection(tracker.class.TimeSpendReport), tracker.string.TimeSpendReports)
reports!: number

@Prop(TypeTimestamp(), tracker.string.CreatedOn)
@Prop(TypeTimestamp(), tracker.string.CreatedDate)
@ReadOnly()
createOn!: Timestamp

Expand Down Expand Up @@ -1352,7 +1352,22 @@ export function createModel (builder: Builder): void {
})

builder.mixin(tracker.class.Issue, core.class.Class, view.mixin.ClassFilters, {
filters: ['space']
filters: [
'status',
'assignee',
'createdBy',
'priority',
'labels',
'title',
'sprint',
'component',
'dueDate',
'createOn',
'modifiedOn',
'modifiedBy',
'space'
],
ignoreKeys: ['number', 'estimation', 'attachedTo']
})

builder.mixin(tracker.class.IssueTemplate, core.class.Class, view.mixin.ClassFilters, {
Expand Down
2 changes: 1 addition & 1 deletion models/tracker/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default mergeIds(trackerId, tracker, {
GotoMyIssues: '' as IntlString,
SearchIssue: '' as IntlString,
Parent: '' as IntlString,
CreatedOn: '' as IntlString,
CreatedDate: '' as IntlString,
ChangeStatus: '' as IntlString,
ConfigLabel: '' as IntlString,
ConfigDescription: '' as IntlString
Expand Down
2 changes: 2 additions & 0 deletions models/view/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export class TFilterMode extends TDoc implements FilterMode {
@Mixin(view.mixin.ClassFilters, core.class.Class)
export class TClassFilters extends TClass implements ClassFilters {
filters!: (string | KeyFilter)[]
ignoreKeys?: string[] | undefined
strict?: boolean | undefined
}

@Mixin(view.mixin.AttributeFilter, core.class.Class)
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export default plugin(coreId, {
Id: '' as IntlString,
Space: '' as IntlString,
Modified: '' as IntlString,
ModifiedDate: '' as IntlString,
ModifiedBy: '' as IntlString,
Class: '' as IntlString,
AttachedTo: '' as IntlString,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Id": "Id",
"Space": "Space",
"Modified": "Modified",
"ModifiedDate": "Modified date",
"ModifiedBy": "Modified by",
"Class": "Class",
"AttachedTo": "Attached to",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"Id": "Id",
"Space": "Пространство",
"Modified": "Изменено",
"ModifiedDate": "Дата изменения",
"ModifiedBy": "Изменен",
"Class": "Класс",
"AttachedTo": "Прикреплен к",
Expand Down
2 changes: 1 addition & 1 deletion plugins/contact-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"UseGravatar": "Gravatar",
"UseColor": "Color",
"NotSpecified": "Not specified",
"CreatedOn": "Created",
"CreatedDate": "Created date",
"Whatsapp": "Whatsapp",
"WhatsappPlaceholder": "Whatsapp",
"Skype": "Skype",
Expand Down
2 changes: 1 addition & 1 deletion plugins/contact-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"UseColor": "Цвет",
"AvatarProvider": "Тип аватара",
"NotSpecified": "Не указан",
"CreatedOn": "Создан",
"CreatedDate": "Дата создания",
"Whatsapp": "Whatsapp",
"WhatsappPlaceholder": "Whatsapp",
"Skype": "Skype",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
{
key: '',
presenter: recruit.component.VacancyModifiedPresenter,
label: core.string.Modified,
label: core.string.ModifiedDate,
props: { applications },
sortingKey: 'modifiedOn',
sortingFunction: modifiedSorting
Expand Down
2 changes: 1 addition & 1 deletion plugins/recruit-resources/src/components/Vacancies.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
{
key: '',
presenter: recruit.component.VacancyModifiedPresenter,
label: core.string.Modified,
label: core.string.ModifiedDate,
props: { applications },
sortingKey: 'modifiedOn',
sortingFunction: modifiedSorting
Expand Down
2 changes: 1 addition & 1 deletion plugins/tracker-assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@

"SevenHoursLength": "Seven Hours",
"EightHoursLength": "Eight Hours",
"CreatedOn": "Created on",
"CreatedDate": "Created date",
"HourLabel": "h",
"Saved": "Saved...",
"CreatedIssue": "Created issue",
Expand Down
2 changes: 1 addition & 1 deletion plugins/tracker-assets/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@

"SevenHoursLength": "Семь Часов",
"EightHoursLength": "Восемь Часов",
"CreatedOn": "Создана",
"CreatedDate": "Дата создания",
"HourLabel": "ч",
"Saved": "Сохранено...",
"CreatedIssue": "Создал(а) задачу",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
return
}
const value = getValue(attribute.name, attribute.type)
if (result.findIndex((p) => p.key === value) !== -1) {
if (result.findIndex((p) => p.attribute.name === value) !== -1) {
return
}
const filter = buildFilterKey(hierarchy, _class, value, attribute)
Expand Down Expand Up @@ -97,6 +97,12 @@
const clazz = hierarchy.getClass(_class)
const mixin = hierarchy.as(clazz, view.mixin.ClassFilters)
const result = getFilters(_class, mixin)

if (mixin.strict) {
// Attributes not specified in "mixing.filters" are ignored
return result
}

const allAttributes = hierarchy.getAllAttributes(_class)
buildFilterFor(_class, allAttributes, result, mixin)

Expand Down
3 changes: 3 additions & 0 deletions plugins/view/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ export interface FilteredView extends Preference {
export interface ClassFilters extends Class<Doc> {
filters: (KeyFilter | string)[]
ignoreKeys?: string[]

// Ignore attributes not specified in the "filters" array
strict?: boolean
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/sanity/tests/tracker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ test('report-time-from-main-view', async ({ page }) => {
await page.click('text="Issues"')
await page.click('button:has-text("View")')
await page.click('.ordering >> nth=0')
await page.click('text="Modified"')
await page.click('text="Modified date"')
await page.keyboard.press('Escape')

const values = [0.25, 0.5, 0.75, 1]
Expand Down