Status rework
#2844
Replies: 1 comment
-
@aplatoff @BykhovDenis Please take a look |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview of current Status like properties.
Example Instances
How Search is working
=> Should return by status from project1 and all similar named statues from project2.
And if we need to use status only from set of spaces.
How it work underline:
and after we recieve results from server client status middleware will upgrade doucments with
$status.[fieldName]: firstStatusId
and replace status field values with first status in returned variants.So all queries will properly work, since we listen for status and will update all queries with status's used.
How sorting is working
To properly perform sorting we need to extend FindOptions with SortMapping, to provide mapping of status values to rank or index.
So if query options has
sorting: {status: Order}
, we add custom sorting with following values:In mongo db adapter it will look like.
Status category mapping, for Lists and Kanbans
View package has
getCategories(_class, docs, key, viewlet) -> any[]
it return all categories for key, and sort them as decided by viewlet(we support sorting contribution per class).It is used by List and Kanban components. For Kanban and List, we will need additional config properly groupBy and use
$status.[fieldName]
as groupping, since it will contain first category in group value.How we search for Status to display in filters, dropdowns etc.
It will group by title identity for same status values and return only matched status.
Response before status updates:
Response after
If
space: project2
will be specified, we will recieve statuses for project2 only.ObjectFilter will be simplified to use this approach.
Code interfaces
All status documents live in status domain, so migration will move them into this one unified place.
Presentation vs Core Client
Presentation plugin will contain all necessary code to perform all manipulations. Core client will be not impacted, and all backup/migration and other system code will not depend on this functionality.
Beta Was this translation helpful? Give feedback.
All reactions