Skip to content

importer fix for old st george hander#86

Merged
shilpigoeldev merged 5 commits into
developfrom
st_george_old_import_fix_new
Jun 24, 2024
Merged

importer fix for old st george hander#86
shilpigoeldev merged 5 commits into
developfrom
st_george_old_import_fix_new

Conversation

@NImeson

@NImeson NImeson commented Jun 24, 2024

Copy link
Copy Markdown
Collaborator

What?
PR to fix issue with running two handlers for one provider (St George's BRCA).

How ?
Replacing the ebatch registry code and provider code before data is persisted in the database will permit two seperate handlers to be run for the same provider code.

Testing?
Added relevant test case for method.

Anything Else?

Comment thread lib/import/brca/providers/st_george_old/st_george_handler_old.rb Outdated
end

test 'process_fields' do
e_batch = EBatch.create(original_filename: 'test_file',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm assuming this e_batch isn't persisted, it'd be invalid with RJ7_2. e_batch.reload shows that it is persisted as part of handler.finalize.

@shilpigoeldev shilpigoeldev Jun 24, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes that's right ...Its because , we change the e_batch properties via handler using instance variable, So any change made there is reflected in e_batch as well and that gets persisted in database.. EBatch.last.provider also gives same thing.

@shilpigoeldev shilpigoeldev merged commit 717bd1d into develop Jun 24, 2024
@shilpigoeldev shilpigoeldev deleted the st_george_old_import_fix_new branch June 24, 2024 11:15
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.

3 participants