githubbob42 / mingle2github2

0 stars 1 forks source link

Tech Debt: Move Attachment Index to IndexDB #5716

Open githubbob42 opened 5 years ago

githubbob42 commented 5 years ago

Mingle Card: 6080 Narrative

LocalStorage should be volatile so that we can clear it between versions.  Right now the attachment:index key keeps us from doing this.  The data in it is too important to clear between syncs.

Acceptance Criteria

All chatter attachment regression tests should still pass.

Analysis

I would move the data that is being stored in the localstorage for attachment:index to the files DB and create its own store/table called attachment:index which would have all the information that was previously in local storage populated within the new store.

The files that would need to be altered are attachment-picker.js, attachments/list, attachments/store, attachments/sync, and sync/migration – basically any module making calls to grab the attachment:index object.

Need to create a new migration method that takes existing users data in local storage attachment:index and moves it on an upversion.

Related Stories

[alpine_mobile/#5847] Re-architect attachment support

[alpine_mobile/#6039] Update download sync to use Files API

[alpine_mobile/#6054] Update file/attachment upload to use Files API

Tasks

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

Defects

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

Impact Analysis

Developers: Fill in this section during code review.

Test Plan

| | |
|-|-|
|**project repo**|
|**repo user**|
|**PR#**|
|alpine-mobile|
|githubbob42|
|3033|
|alpine-server|
|githubbob42|
|273|

NOTES

Test it...

This needs regression testing for all file attachment situations.

SyncToMobile, Upload Files (Online and Offline), Attachments on new jobs/tickets and existing jobs/tickets, and any other scenarios involving attachments as this PR changes where the attachment index is stored.

Test this on upversions as well (From version 3353 to this PR, Bi-weekly to this PR, AND any other version to this PR). We want to ensure users do not lose any information whether migrating from the default version as well as any other version the user may be on. Existing users should not lose any existing data but instead, it should be relocated from local storage to indexedDB. Test the upversion after creating new jobs and adding attachments as well as existing ones and adding attachments (both offline).

QA Test Analysis:

Before the Pull Request

!clip-088b-b820.png!{height: 411px; width: 1000px;}

After The PR

!clip-560b-a756.png!{height: 451px; width: 1000px;}

githubbob42 commented 5 years ago

Feature: #5486 Re-architect attachment support (Mingle)

githubbob42 commented 5 years ago

Godswill : 02/05/2019 12:47 CST File attachments are not syncing to back office on IOS 12 Beta.

githubbob42 commented 5 years ago

Godswill : 01/24/2019 10:33 CST file attachments not working properly on ipads

githubbob42 commented 5 years ago

Pull Request #3033