githubbob42 / mingle2github2

0 stars 1 forks source link

Enhance indexes for incremental sync #3786

Closed githubbob42 closed 8 years ago

githubbob42 commented 8 years ago

Mingle Card: 4111 Narrative

When storing sobject data during a sync, we need to be able ensure appropriate indexes are available for use when querying.

We currently generate indexes for:

When querying for certain “known” entities, we want to be able to provide custom indexes to enable proprietary filtering, such as:

Analysis

It may be acceptable to either:

There may be some value in the “generic” approach, for example, ensuring all entities with “Sequence_Number” are sorted by default without requiring bespoke code for particular sobjects. 

The current price book table has the following names indexes:

  1. hasPriceBook: 'Price_Book' – used to show that items exist for the given price book id
  2. priceBook: ['Price_Book', 'Sequence_Number'] – get all items for given pricebook, sorted by sequence number
    1. We don’t need this, it was implemented to assist in deleting price book items when you no longer need that price book.
  3. catalogItemId: ['Price_Book', 'Catalog_Item'] – find catalog item(s) for given pricebook *should* be unique but is not enforced
    1. We need this because contacts and equipment are referenced by the catalog item id
  4. ticketItemTypeName: ['Price_Book', 'Ticket_Item_Record_Type', 'Sequence_Number'] – find catalog item(s) for given pricebook, by record type, sorted by sequence number

Looking at the above set of indexes, we can probably simplify:

Acceptance Criteria

There shouldn’t be any observable impact to behavior withing the app (nothing will be using these extra indexes yet). However, we should try to keep an eye on:

Related Stories

4100

Tasks

{{table query: SELECT Number, Name, Owner, 'Task Status' WHERE Type = Task and Story = THIS CARD}}

Defects

{{ table query: SELECT Number, Name, Owner, 'Status' WHERE Type = Defect and 'Related Story' = THIS CARD }}

Test Plan

githubbob42 commented 8 years ago

Matthew Todd : 05/05/2016 15:18 CDT Testing has been completed and has passed on multiple users and tablets using the pr1836 branch.

githubbob42 commented 8 years ago

Pull Request #1836