-
Notifications
You must be signed in to change notification settings - Fork 19
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
Submit action for 'No Errors Found' modal #23636
base: feature/APPEALS-49620-and-APPEALS-49626
Are you sure you want to change the base?
Submit action for 'No Errors Found' modal #23636
Conversation
app/controllers/tasks_controller.rb
Outdated
@@ -187,6 +187,37 @@ def request_hearing_disposition_change | |||
end | |||
|
|||
def upload_transcription_to_vbms | |||
file_paths = ReviewTranscriptTask.find_by(id: task.id).appeal.hearings.first.transcription_files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change ReviewTranscriptTask.find_by(task.id)...
to task
You already have the task - you do not need to query the db again using the id of the task you have already fetched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mchbidwell Getting from ReviewTranscriptTask to TranscriptionFile seems prone to wackiness - tasks
-> appeals
-> hearings
(could be multiple hearings for an appeal) -> transcription_files
In the implementation here, we're arbitrarily grabbing .first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
private | ||
|
||
def create_document_params(appeal, file_name, current_file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it may need to belong in another class - probably not the responsibility of TasksController
app/controllers/tasks_controller.rb
Outdated
file_paths = ReviewTranscriptTask.find_by(id: task.id).appeal.hearings.first.transcription_files | ||
.where(file_type: "pdf").map(&:fetch_file_from_s3!) | ||
|
||
appeal = ReviewTranscriptTask.find_by(id: task.id).appeal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again ReviewTranscriptTask.find_by(id: task.id)
can just be task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Resolves APPEALS-64077
Description
As a Caseflow User I need the ability to upload the "final PDF" to the selected Appellants eFolder endpoint in VBMS so that files can be retrieved when needed.
As a Caseflow Developer I need to;
Create a new method on submit for 'No Errors Found'
1- DocketNumber_interenalHearingID_HearingClassName.pdf
2- Upload the PDF file to the Appellants eFolder location in VBMS
Acceptance Criteria
Testing Plan
Frontend
Hearing Admin Team cases
No errors found: Upload transcript to VBMS
Upload to VBMS
Tests
Test Coverage
Did you include any test coverage for your code? Check below:
Code Climate
Your code does not add any new code climate offenses? If so why?