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

server-side short-lived code for backfilling data from spreadsheet #586

Merged
merged 3 commits into from Dec 1, 2020

Conversation

nelztruss
Copy link
Contributor

EASI-972

Changes proposed in this pull request:

  • Quick and dirty code (only manually tested) for importing the ~172 records from a spreadsheet... Not expected to live long, e.g. will be removed once the data is in.

@nelztruss
Copy link
Contributor Author

This is what it looked like running on my local:

$ curl 127.0.0.1:8080/api/v1/backfill --data-raw '{
        "intake": {
                "id": "00000000-0000-0000-0000-000000000991",
		"euaUserId": null,
		"status": "",
		"requestType": "",
		"requester": "Nelz Test",
		"component": null,
		"businessOwner": null,
		"businessOwnerComponent": null,
		"productManager": null,
		"productManagerComponent": null,
		"isso": null,
		"trbCollaborator": null,
		"oitSecurityCollaborator": null,
		"eaCollaborator": null,
		"projectName": "Example 990",
		"projectAcronym": null,
		"existingFunding": null,
		"fundingSource": null,
		"fundingNumber": null,
		"businessNeed": null,
		"solution": null,
		"processStatus": null,
		"eaSupportRequest": null,
		"existingContract": null,
		"costIncrease": null,
		"costIncreaseAmount": null,
		"contractor": null,
		"contractVehicle": null,
		"contractStartMonth": null,
		"contractStartYear": null,
		"contractEndMonth": null,
		"contractEndYear": null,
		"createdAt": null,
		"updatedAt": null,
		"submittedAt": null,
		"decidedAt": null,
		"ArchivedAt": null,
		"grtDate": null,
		"grbDate": null,
		"alfabetID": null,
		"grtReviewEmailBody": null,
		"requesterEmailAddress": null,
		"businessCase": null,
		"lcid": null,
		"lcidExpiresAt": null,
		"lcidScope": null,
		"lifecycleNextSteps": null,
		"decisionNextSteps": null,
		"rejectionReason": null
	},
	"notes": [
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"systemIntakeId": "00000000-0000-0000-0000-000000000000",
			"createdAt": null,
			"authorId": "",
			"authorName": null,
			"content": "Note 01"
		},
		{
			"id": "00000000-0000-0000-0000-000000000000",
			"systemIntakeId": "00000000-0000-0000-0000-000000000000",
			"createdAt": null,
			"authorId": "",
			"authorName": null,
			"content": "Note 02"
		}
	]
}'

$ curl 127.0.0.1:8080/api/v1/system_intake/00000000-0000-0000-0000-000000000991 | jq .
{
  "id": "00000000-0000-0000-0000-000000000991",
  "euaUserId": null,
  "status": "CLOSED",
  "requestType": "NEW",
  "requester": "Nelz Test",
  "component": null,
  "businessOwner": null,
  "businessOwnerComponent": null,
  "productManager": null,
  "productManagerComponent": null,
  "isso": null,
  "trbCollaborator": null,
  "oitSecurityCollaborator": null,
  "eaCollaborator": null,
  "projectName": "Example 990",
  "projectAcronym": null,
  "existingFunding": null,
  "fundingSource": null,
  "fundingNumber": null,
  "businessNeed": null,
  "solution": null,
  "processStatus": null,
  "eaSupportRequest": null,
  "existingContract": null,
  "costIncrease": null,
  "costIncreaseAmount": null,
  "contractor": null,
  "contractVehicle": null,
  "contractStartMonth": null,
  "contractStartYear": null,
  "contractEndMonth": null,
  "contractEndYear": null,
  "createdAt": "2020-11-23T21:17:22.610805Z",
  "updatedAt": "2020-11-23T21:17:22.610805Z",
  "submittedAt": null,
  "decidedAt": null,
  "ArchivedAt": null,
  "grtDate": null,
  "grbDate": null,
  "alfabetID": null,
  "grtReviewEmailBody": null,
  "requesterEmailAddress": null,
  "businessCase": null,
  "lcid": null,
  "lcidExpiresAt": null,
  "lcidScope": null,
  "lifecycleNextSteps": null,
  "decisionNextSteps": null,
  "rejectionReason": null
}

$ curl 127.0.0.1:8080/api/v1/system_intake/00000000-0000-0000-0000-000000000991/notes | jq .
[
  {
    "id": "37620e28-bf09-48e1-b0b7-d7b0cccff43f",
    "systemIntakeId": "00000000-0000-0000-0000-000000000991",
    "createdAt": "2020-11-23T21:17:22.623133Z",
    "authorId": "ABCD",
    "authorName": null,
    "content": "Note 01"
  },
  {
    "id": "8a110ecb-2c46-469d-8209-aaf06444fd31",
    "systemIntakeId": "00000000-0000-0000-0000-000000000991",
    "createdAt": "2020-11-23T21:17:22.630305Z",
    "authorId": "ABCD",
    "authorName": null,
    "content": "Note 02"
  }
]

@nelztruss nelztruss requested review from jim, mojotalantikite and a team November 23, 2020 21:37
@nelztruss nelztruss marked this pull request as ready for review November 30, 2020 23:59
@nelztruss nelztruss merged commit 7cb4e28 into master Dec 1, 2020
@nelztruss nelztruss deleted the nelz-api-backfill branch December 1, 2020 00:00
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.

None yet

3 participants