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

Analyze grant award start and end date update logic #813

Closed
rpoet-jh opened this issue Nov 1, 2023 · 1 comment · Fixed by eclipse-pass/pass-support#100
Closed

Analyze grant award start and end date update logic #813

rpoet-jh opened this issue Nov 1, 2023 · 1 comment · Fixed by eclipse-pass/pass-support#100
Assignees
Labels
bug Something isn't working Grant loader
Milestone

Comments

@rpoet-jh
Copy link
Contributor

rpoet-jh commented Nov 1, 2023

As part of the cutover, I did grant data analysis comparing grant data between stage and prod. I noticed one thing that is happening that needs investigation to figure out if we are updating grant award start and end dates when we should. Here is the scenario:

in the stage database, there is a grant localkey johnshopkins.edu:grant:144866 with an award start date of 2024-05-01 00:00:00 and award end date of 2027-04-30 00:00:00.

in the prod database, I noticed the same grant had award start date of 2023-09-01 00:00:00 and award end date of 2026-08-31 00:00:00

when I query coeus, I get one row back with matching award start and end dates and with an update ts of 2023-10-18 03:30:01, and the award dates matching the grant in prod. so this is good for the prod data.

however, i ran the grant loader process in stage earlier this morning with a start date of 2023-10-11, so the record of the grant above would have been included, so I thought the award dates on the grant should have updated. However, I see in the code that checks if the grant needs to be updated only checks if the award end date coming for coeus is after the one in pass (meaning update if coeus end date is farther in the future than the one in pass). so it didn't update the grant.
from what I can gather, the award start and end date changed for this grant in coeus, both becoming earlier than what was originally entered. Seems like the pass grant should update in this case.

Jim did some looking too, and here is his comment:

ok, so i see it now, a single entry. this looks to be maybe an edit of the original record, not a subsequent grant. we'd like the behavior in this case to update both the start and end dates for the grant, but it isn't clear to me how we would differentiate an edit from a grant extension in order to get the dates to express what we want. i think maybe we ought to create a ticket to look into it, but we may decide to let it slide, as i hope this is an uncommon case.

@rpoet-jh rpoet-jh converted this from a draft issue Nov 1, 2023
@rpoet-jh rpoet-jh added this to the Post 1.1.0 milestone Nov 1, 2023
@dkriethof dkriethof removed this from the Post 1.2.0 milestone Nov 28, 2023
@rpoet-jh
Copy link
Contributor Author

Related to this issue, in testing I hit this exception when updating a grant that had a null award end date in pass, then a record coming in to update the grant to an actual date:

Caused by: java.lang.NullPointerException: Cannot invoke "java.time.chrono.ChronoZonedDateTime.toEpochSecond()" because "<parameter1>" is null
	at java.base/java.time.chrono.ChronoZonedDateTime.isAfter(Unknown Source)
	at org.eclipse.pass.support.grant.data.jhu.JhuPassUpdater.grantNeedsUpdate(JhuPassUpdater.java:261)
	at org.eclipse.pass.support.grant.data.jhu.JhuPassUpdater.updateGrantIfNeeded(JhuPassUpdater.java:92)
	at org.eclipse.pass.support.grant.data.AbstractDefaultPassUpdater.updateGrantInPass(AbstractDefaultPassUpdater.java:544)
	at org.eclipse.pass.support.grant.data.AbstractDefaultPassUpdater.updateGrants(AbstractDefaultPassUpdater.java:300)
	at org.eclipse.pass.support.grant.data.AbstractDefaultPassUpdater.updatePass(AbstractDefaultPassUpdater.java:92)
	at org.eclipse.pass.support.grant.GrantLoaderApp.run(GrantLoaderApp.java:183)

@rpoet-jh rpoet-jh added the bug Something isn't working label Feb 28, 2024
@rpoet-jh rpoet-jh added this to the 1.5.0 milestone Feb 28, 2024
@rpoet-jh rpoet-jh self-assigned this Feb 28, 2024
@rpoet-jh rpoet-jh moved this from Backlog to In Progress in Eclipse PASS Feb 28, 2024
@rpoet-jh rpoet-jh moved this from In Progress to Peer Review/QA in Eclipse PASS Mar 12, 2024
@rpoet-jh rpoet-jh linked a pull request Mar 13, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Peer Review/QA to Done in Eclipse PASS Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Grant loader
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants