Modify status of the completed export job

Description

Purpose/Overview:
Currently when the job completes and the export file is generated the job status is set to Success. However, sometimes the file is created but only a part of the export succeeds due to some records erroring out.

Requirements/Scope:

  1. For the jobs that exported successfully are the records set the status to: Completed

  2. For the jobs that exported with some errors to: Completed with errors

Corresponding UI story is https://folio-org.atlassian.net/browse/UIDEXP-145

Acceptance criteria:

  • The appropriate status is displayed for jobs with and without errors

  • Migration scripts are created and tested

  • Unit tests are written

  • API tests are updated/written

Environment

None

Potential Workaround

None

has to be finished together with

Checklist

hide

TestRail: Results

Activity

Show:

Kruthi VuppalaSeptember 5, 2020 at 11:35 PM

Also, the API tests are yet to be merged

Kruthi VuppalaSeptember 5, 2020 at 3:25 PM

verified on folio-testing using UI:
1. Run a job with valid UUIDs
2. Run a job with 2 valid UUIDs and 1 invalid

https://folio-testing-okapi.dev.folio.org/data-export/job-executions?query=status=(COMPLETED%20OR%20COMPLETED_WITH_ERRORS%20OR%20FAIL)%20sortBy%20completedDate/sort.descending&limit=25

RESPONSE:

{ "jobExecutions" : [ { "id" : "65efa5f4-fef4-4233-b5b5-7d8fecd33bf9", "hrId" : "2", "exportedFiles" : [ { "fileId" : "9647f26c-1fb5-4c12-b552-9eb0902a9ab0", "fileName" : "MDEXP-256-2.mrc" } ], "jobProfileId" : "6f7f3cd7-9f24-42eb-ae91-91af1cd54d0a", "jobProfileName" : "Default job profile", "progress" : { "exported" : 2, "failed" : 1, "total" : "3" }, "completedDate" : "2020-09-05T15:24:01.115+0000", "startedDate" : "2020-09-05T15:24:00.577+0000", "runBy" : { "firstName" : "DIKU", "lastName" : "ADMINISTRATOR" }, "status" : "COMPLETED_WITH_ERRORS" }, { "id" : "8b628278-2e54-4565-ad51-e63b2bed0a1c", "hrId" : "1", "exportedFiles" : [ { "fileId" : "33753130-8ff7-4bfb-bd9e-bb62f80790b4", "fileName" : "MDEXP-256-1.mrc" } ], "jobProfileId" : "6f7f3cd7-9f24-42eb-ae91-91af1cd54d0a", "jobProfileName" : "Default job profile", "progress" : { "exported" : 3, "failed" : 0, "total" : "3" }, "completedDate" : "2020-09-05T15:23:39.238+0000", "startedDate" : "2020-09-05T15:23:37.752+0000", "runBy" : { "firstName" : "DIKU", "lastName" : "ADMINISTRATOR" }, "status" : "COMPLETED" } ], "totalRecords" : 2 }

Igor GorchakovSeptember 5, 2020 at 1:15 PM

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Concorde

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created August 3, 2020 at 6:35 PM
Updated September 6, 2020 at 12:02 AM
Resolved September 5, 2020 at 3:25 PM
TestRail: Cases
TestRail: Runs

Flag notifications