[Spike] Preview of the records before the changes are committed

RolePersonComments
Solution ArchitectLooks adequate, but it makes sense to also explicitly document expectations and assumptions about the amount of data
Java LeadDone. Assumptions/questions are in progress.
UI Lead
Product Owner


MODEXPW-81 - Getting issue details... STATUS  - Spike - Preview of the records before the changes are committed

UXPROD-3705 - Getting issue details... STATUS  - Bulk Edit - User data - in app approach

Approach

Initially client uploads csv-file with edited records for updating in the DB. At the present moment this file should be generated and saved automatically.

High-level approach:

  1. Client uploads csv-file with identifiers.
  2. Items retrieving starts automatically and asynchronously.
  3. Client makes changes on the corresponding forms on UI and send PUT request with ContentUpdate request.
  4. Bulk Edit app waits for completing point 2), after that application applies changes and save them to the generated csv-file on server side.
  5. Client may download this file
  6. Client may start Bulk Edit UPDATE. In this case standard updating flow can be executed with the only one change - csv-file with updated data is made automatically (not manually as for users).

Assumptions/Questions

1) Number of items to update? Statistics, predictions?

2) Saving csv? Cleaning mechanism?

API Changes


MethodPathProvided permissionsRequestResponseDescriptionNotes
GET

/bulk-edit/{jobId}/preview/users

bulk-edit.preview.users.collection.getNA

200 OK (userCollection.json)

Get users preview

MODEXPW-89 - Getting issue details... STATUS

GET

/bulk-edit/{jobId}/preview/items

bulk-edit.preview.items.collection.getNA

200 OK (itemCollection.json)

Get items preview

MODEXPW-92 - Getting issue details... STATUS

POST/bulk-edit/{jobId}/content-update/uploadbulk-edit.items.content-update.upload.postContentUpdateCollection

201 CREATED

(itemCollection.json)

Update records based on ContentUpdateCollection request and return updated items collection. Should support limit query parameter to control number of returned items.

MODEXPW-90 - Getting issue details... STATUS

GET/bulk-edit/{jobId}/preview/updated-items/downloadbulk-edit.preview.updated-items.download.getNA

200 OK

(csv-file with items)

Download preview as csv-file

MODEXPW-91 - Getting issue details... STATUS


Schemas ContentUpdateCollection

PropertyTypeDefaultRequiredNotes
entityTypeenum[USER, ITEM]NYType of entity: USER or ITEM
contentUpdatesarray<ContentUpdate>NYArray of content updates
totalRecordsintegerNYTotal number of content updates records


Schemas ContentUpdate

PropertyTypeDefaultRequiredNotes
optionenumNYOption to change
actionenumNYChanging action
valueobjectNNNew value

UPDATE: Supporting of the USERS In-App together with ITEMS

MethodPathProvided permissionsRequestResponseDescriptionNotes
GET

/bulk-edit/{jobId}/preview/users

bulk-edit.preview.users.collection.getNA

200 OK (userCollection.json)

Get users preview

MODEXPW-89 - Getting issue details... STATUS

GET

/bulk-edit/{jobId}/preview/items

bulk-edit.preview.items.collection.getNA

200 OK (itemCollection.json)

Get items preview

MODEXPW-92 - Getting issue details... STATUS

POST/bulk-edit/{jobId}/item-content-update/uploadbulk-edit.items.content-update.upload.postItemContentUpdateCollection

201 CREATED

(itemCollection.json)

Update records based on ItemContentUpdateCollection request and return updated items collection. Should support limit query parameter to control number of returned items.

MODEXPW-90 - Getting issue details... STATUS

POST/bulk-edit/{jobId}/user-content-update/uploadbulk-edit.users.content-update.upload.postUserContentUpdateCollection

201 CREATED

(userCollection.json)

Update records based on UserContentUpdateCollection request and return updated users collection. Should support limit query parameter to control number of returned users.

MODEXPW-180 - Getting issue details... STATUS

GET/bulk-edit/{jobId}/preview/updated-items/downloadbulk-edit.preview.updated-items.download.getNA

200 OK

(csv-file with items)

Download preview as csv-file

MODEXPW-91 - Getting issue details... STATUS


Schema ItemContentUpdateCollection

PropertyTypeDefaultRequiredNotes
itemContentUpdatesarray<ItemContentUpdate>NYArray of item content updates
totalRecordsintegerNYTotal number of content updates records


Schema UserContentUpdateCollection

PropertyTypeDefaultRequiredNotes
userContentUpdatesarray<UserContentUpdate>NYArray of user content updates
totalRecordsintegerNYTotal number of content updates records


Schema ItemContentUpdate

PropertyTypeDefaultRequiredNotes
optionenumNYOption to change
actionenumNYChanging action
valueobjectNNNew value

Schema UserContentUpdate

PropertyTypeDefaultRequiredNotes
optionenumNYOption to change
actionenumNYChanging action
valueobjectNNNew value