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

Data Fix: Expiration date mismatch for 'REAPPLY' #24237

Open
eve-git opened this issue Nov 5, 2024 · 0 comments
Open

Data Fix: Expiration date mismatch for 'REAPPLY' #24237

eve-git opened this issue Nov 5, 2024 · 0 comments
Labels
Names Team Name Request Name Examination Team

Comments

@eve-git
Copy link
Collaborator

eve-git commented Nov 5, 2024

NRs were applied 'REAPPLY', but the expiration date update appears to have been applied only in PostgreSQL and not in Oracle. We need to ensure consistency between both databases.

The query to search NRs that had 'REAPPLY':

select DISTINCT ON (r.nr_num) r.nr_num, r.expiration_date at time zone 'America/Vancouver', r.state_cd from requests r, events e
where r.id = e.nr_id
and e.action like '%REAPPLY'
and r.expiration_date > CURRENT_timestamp
and r.state_cd in ('APPROVED', 'CONDITIONAL')
order by nr_num;

Not all NRs have the issue, the result need to compare with what in oracle:

select r.nr_num, ri.expiration_date from request r, request_instance ri
where r.request_id = ri.request_id
and r.nr_num in ('NR 0272696',    -- the nr_nums are from the result set of the postgresql query above
'NR 0276718',
'NR 0292725',
'NR 0294303',
'NR 0304514',
'NR 0305665')
and ri.end_event_id is null;

for example:
in postgresql:

"nr_num"	"timezone"	"state_cd"
"NR 0272696"	"2024-12-17 22:59:00"	"APPROVED"
"NR 0276718"	"2024-12-19 22:59:00"	"APPROVED"
"NR 0292725"	"2024-11-29 22:59:00"	"APPROVED"
"NR 0294303"	"2024-12-24 22:59:00"	"CONDITIONAL"
"NR 0304514"	"2024-11-05 23:59:00"	"APPROVED"
"NR 0305665"	"2024-11-26 22:59:00"	"APPROVED"

while, in Oracle:
image.png

@eve-git eve-git added the Names Team Name Request Name Examination Team label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Names Team Name Request Name Examination Team
Projects
None yet
Development

No branches or pull requests

1 participant