Named Basket

Features

  1. Save current document/task basket as a new named basket, overwrite an existing one or add to an existing one
  2. 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
  3. Delete selected named basket
  4. 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
  5. 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)
  6. Specific private named basket is the Recently Viewed Items

  7. Baskets will be not mirrored in case of a dual environment

Properties

  1. The named basket belong to a contract and optionally to a group and they determine who is able to see/access the named basket.
  2. The named basket can be private, e.g. access only for the creator (privateFlag)
  3. The named basket can contain objects from different contract/group, and all items listed regardless of user access rights.
  4. The named basket can contain documents, comments, users and named baskets even mixed. (objectTypeId)
  5. The named basket can contain more revisions of one document.
  6. The named basket can contain document without revision, i.e. always the latest revision
  7. Maximum number of elements can be limited by a configuration variable, Recently Viewed Items is limited anyway

  8. 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

  1. 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

  2. NamedBasketSearch - search a named basket and display the list

    • in app/tran/nbasket/search
    • started from left menu Comment or Document Search Basket
  3. NamedBasketList - display a list of named basket, with delete and display options

    • in app/tran/nbasket/list
    • started from NamedBasketSearch

  4. NamedBasketDetail - display properties (description, private flag) and content of the selected basket

    • in app/tran/nbasket/detail
    • started from NamedBasketList

  5. NamedBasketUpdate - update properties (description, private flag) of the selected basket

    • in app/tran/nbasket/update
    • started from NamedBasketDetail

Permissions

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

  1. Do we handle "latest revision" option in Document basket? - TN: no
  2. Should we rename the whole object set from 'basket' to 'list'? - TN: no

NamedBasket (last edited 2012-09-04 09:36:01 by 195)

Copyright 2008-2014, SoftXS GmbH, Switzerland