Named Basket
Contents
Features
- Save current document/task basket as a new named basket, overwrite an existing one or add to an existing one
- Search named basket
- Search by description, number, creator, perhaps by contained object code
- Replace current document/task basket with selected named basket
- Add selected named basket to the current document/task basket
- Delete selected named basket
- List content of the named basket with the ability to remove items, convert document-revision pair to simple document (i.e. always the latest revision)
- Perhaps convert simple document to document-revision pair
The REST drawing/revision list transaction can accept a basketId as a search criterion
Implemented in app/form/DrawingSearchForm
- Also allow search to be made using basketIds from the Web GUI (Implement later)
Specific private named basket is the Recently Viewed Items
- Baskets will be not mirrored in case of a dual environment
Properties
- The named basket belong to a contract and optionally to a group and they determine who is able to see/access the named basket.
- The named basket can be private, e.g. access only for the creator (privateFlag)
- The named basket can contain objects from different contract/group, and all items listed regardless of user access rights.
- The named basket can contain documents, comments, users and named baskets even mixed. (objectTypeId)
- The named basket can contain more revisions of one document.
- The named basket can contain document without revision, i.e. always the latest revision
Maximum number of elements can be limited by a configuration variable, Recently Viewed Items is limited anyway
- System basket types (systemFlag) are hidden for the users. It is possible to disable creation of e.g. mixed basket by setting mixed baskets to system.
New BusinessTransactions
NamedBasketSave - save the content of the basket in a new named basket, overwrite an existing one or add to an existing one
- in app/tran/nbasket/save
started from BasketList/DrawingBasketList by new buttons
NamedBasketSearch - search a named basket and display the list
- in app/tran/nbasket/search
- started from left menu Comment or Document Search Basket
NamedBasketList - display a list of named basket, with delete and display options
- in app/tran/nbasket/list
started from NamedBasketSearch
NamedBasketDetail - display properties (description, private flag) and content of the selected basket
- in app/tran/nbasket/detail
started from NamedBasketList
NamedBasketUpdate - update properties (description, private flag) of the selected basket
- in app/tran/nbasket/update
started from NamedBasketDetail
Permissions
New transaction names will be introduced to limit access to non-private named baskets as NamedBasketNew, NamedBasketUpd, NamedBasketSearch, NamedBasketView, NamedBasketDel. But everybody can create, update, search, delete and view his private baskets.
NamedBasketNew, NamedBasketUpd are assigned to Admin, DocumentNewUpdate and TaskNewupdate roles
NamedBasketDel is assigned to Admin Role
NamedBasketSearch,NamedBasketView are assigned to Admin, DocumentView, TaskView, DocumentNewUpdate and TaskNewupdate roles
Database Model
create table BasketTypeRef ( basketTypeId INTEGER not null, code CHAR(32) not null, name VARCHAR(128) not null, description VARCHAR(255) , objectTypeId INTEGER not null, systemFlag INTEGER not null default 0, -- Created by the system only privateFlag INTEGER not null default 0, -- Access only for the creator define CHAR(32) not null, sortOrder INTEGER , primary key (basketTypeId) ); create table Baskets ( basketId INTEGER not null, basketTypeId INTEGER not null, -- Document, Comment, User, Mixed, Recently viewed items, etc. basketCode CHAR(64) not null, -- {basketTypeCode}-NNN name VARCHAR(128) not null, description VARCHAR(255) , contractId INTEGER not null, groupId INTEGER not null, privateFlag INTEGER not null, -- Access only for the creator creatorUserId INTEGER not null, createDatetime DATETIME not null, modUserId INTEGER , modDatetime DATETIME , primary key (basketId), foreign key (basketTypeId) references BasketTypeRef (basketTypeId), foreign key (contractId) references ContractRef (contractId), foreign key (groupId) references Groups (groupId), foreign key (creatorUserId) references Users (userId), foreign key (modUserId) references Users (userId) ); create table BasketItems ( basketItemId INTEGER not null, basketId INTEGER not null, sortOrder INTEGER not null, origSortOrder INTEGER not null, objectTypeId1 INTEGER not null, -- Document or Comment objectId1 INTEGER not null, -- drawingId or commentId objectTypeId2 INTEGER , -- Revision or NULL objectId2 INTEGER , -- revisionId or NULL createDatetime TIMESTAMP default 0, primary key (basketItemId ), foreign key (basketId) references Baskets (basketId), ); create unique index UI_BASKETITEMS on BasketItems( basketId, objectId1, objectId2 );
Open Points
- Do we handle "latest revision" option in Document basket? - TN: no
- Should we rename the whole object set from 'basket' to 'list'? - TN: no