[MODEXPW-53] Process submitted records Created: 27/Sep/21  Updated: 17/Dec/21  Resolved: 17/Dec/21

Status: Closed
Project: mod-data-export-worker
Components: None
Affects versions: None
Fix versions: None

Type: Story Priority: P3
Reporter: Magda Zacharska Assignee: Illia Daliek
Resolution: Done Votes: 0
Labels: bulk-edit-pilot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: Microsoft Word bulk_edit_user_record_after_edit.csv     PNG File create job.PNG     PNG File get job.PNG     PNG File test user before edit.PNG     File test user.json     PNG File updated user.png     PNG File upload a file.PNG     File user after update job.json    
Issue links:
Defines
defines UXPROD-3318 User records - bulk edit - pilot impl... Closed
Sprint: Firebird Sprint 129
Story Points: 5
Development Team: Firebird

 Description   

Purpose/Overview:
Once the user uploads the file with modified records and confirms the edit, the records will need to be submitted for the update

Requirements/Scope:

  1. Each record from the file is processed

Approach:
1) Endpoint for uploading files to mod-data-export-worker reused.
2) New value for bulk edit export type added to the JobCommand
3) A separate job should be implemented in the mod-data-export-worker

Acceptance criteria:

  • All records are processed


 Comments   
Comment by Magda Zacharska [ 19/Nov/21 ]

Illia Daliek please do not make changes to the description of the jira after it was estimated by the team. Also, please do not make changes to the acceptance criteria without letting PO know. Any required changes should be discussed and documented in the comments to the ticket.

Comment by Illia Daliek [ 17/Dec/21 ]

Verified on the snapshot.
In advance I prepared two users, one of them is a mainly tested user and the second for having a proxy user.

Here is the main user before running bulk edit update user records job, user id - 774cc489-15ff-44b5-abb4-9702035b8a07.

test user.json

Here is the edited CSV file. I changed mostly all the fields. Some empty fields as departments and others should be populated.
bulk_edit_user_record_after_edit.csv

1) Create a JobCommand with export type BULK_EDIT_UPDATE and entity type USER
POST /data-export-spring/jobs

2) Grab the job id
3) Upload a file for the job by /bulk-edit/jobId/upload
The required header is Content-Type = multipart/form-data (and X-Okapi-Token with X-Okapi-Tenant as usual)
Post a file as "form-data" request

4) Get the job by id /data-export-spring/jobs/jobId
The job has SUCCESSFUL status and the progress bar object.

5) Verify that the user was updated. Get /users?query=id==774cc489-15ff-44b5-abb4-9702035b8a07
The fields were changed as they were modified in a file.
user after update job.json

Generated at Thu Feb 08 22:30:21 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.