Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk upload - Transfer staff record #6413

Merged
merged 34 commits into from
Nov 28, 2024

Conversation

kapppa-joe
Copy link
Collaborator

Work done

  • Amend bulk upload worker file logic to handle a "TRANSFERSTAFFRECORD" column, which should indicate the new workplace that a worker should move into. The feature is meant to replace CHGSUB
  • Add validation for this column to screen out cases that could cause issue (e.g. same unique worker id)
  • Change bulkupload lambda runtime ver to nodejs18.x (as serverless no longer allows nodejs12.x)

Tests

Does this PR include tests for the changes introduced?

  • Yes
  • No, I found it difficult to test
  • No, they are not required for this change

column: 'UNIQUEWORKERID',
error:
'There are more than one worker with this UNIQUEWORKERID moving into the new workplace given in TRANSFERSTAFFRECORD.',
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a bit of duplication with these errors, I think we've already got a couple of functions which generate errors similar to this in one of the other validation files, could see if those could be reused and if it's hassle just make a function for it here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I know there's been talk of it being hard to find all the BU validation error/warning messages, it might be nice to have an object at the top of the file with the different error messages and then in the code it would just be something along the lines of addError(JSONWorker, errors.sameRefsMovingToWorkplace)

@kapppa-joe kapppa-joe force-pushed the spike/poc-for-bu-transfer-staff-record-column branch from 332d7f6 to a43e4e6 Compare November 22, 2024 13:51
@duncanc19 duncanc19 marked this pull request as ready for review November 28, 2024 08:55
@duncanc19 duncanc19 merged commit 5191be9 into main Nov 28, 2024
5 checks passed
@duncanc19 duncanc19 deleted the spike/poc-for-bu-transfer-staff-record-column branch November 28, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants