Add user details in mapping profiles/job profiles

Description

Overview
Add details of user name to mapping profiles and job profile APIs , similar to how it was done for job execution

Acceptance Criteria

  • User details are stored both on create and update

  • unit tests updated

  • API tests updated

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Andrii Novytskyi June 1, 2020 at 1:29 PM

Today found an issue with permissions, pushed a fix. Will create merged a PR for API tests tomorrow, after env rebuild.

Andrii Novytskyi June 1, 2020 at 7:43 AM
Edited

Verified at folio-testing:
1. Call create mapping profile,with absent user info:

  • REQUEST:
    curl --location --request POST 'https://folio-testing-okapi.aws.indexdata.com:443/data-export/mappingProfiles' \
    --header 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjQyNmM1MTZjLTNkN2ItNTEwYS05ZmEzLTMzZWMwNDViN2RhMiIsImlhdCI6MTU5MDk5NzI1MiwidGVuYW50IjoiZGlrdSJ9.r-1qR_eNjO3nsIMbDho4oN-BmVxIt4FN6fhDc20KlkA' \
    --header 'X-Okapi-Tenant: diku' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "name": "Mapping profile",
    "description": "Mapping profile description",
    "recordTypes": [
    "INSTANCE"
    ],
    "outputFormat": "MARC",
    "transformations": [
    {
    "fieldId": "electronicAccess.linkText",
    "path": "$electronicAccess[*].linkText",
    "transformation": "001",
    "enabled": "true",
    "recordType": "INSTANCE"
    }
    ]
    }'

2. Response with proper user info: Status 201 created
{
"id": "7c39fea7-0111-4ee7-a141-fdf4a7cda6a0",
"name": "Mapping profile",
"description": "Mapping profile description",
"recordTypes": [
"INSTANCE"
],
"transformations": [
{
"fieldId": "electronicAccess.linkText",
"path": "$electronicAccess[*].linkText",
"enabled": true,
"transformation": "001",
"recordType": "INSTANCE"
}
],
"userInfo": {
"firstName": "DIKU",
"lastName": "ADMINISTRATOR",
"userName": "diku_admin"
},
"outputFormat": "MARC",
"metadata": {
"createdDate": "2020-06-01T07:40:52.686+0000",
"createdByUserId": "426c516c-3d7b-510a-9fa3-33ec045b7da2",
"updatedDate": "2020-06-01T07:40:52.686+0000",
"updatedByUserId": "426c516c-3d7b-510a-9fa3-33ec045b7da2"
}
}

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Concorde

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 18, 2020 at 5:33 PM
Updated June 3, 2020 at 9:51 PM
Resolved June 3, 2020 at 9:51 PM
TestRail: Cases
TestRail: Runs