-
Notifications
You must be signed in to change notification settings - Fork 14
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
#3920 - Update Expected Name for Disbursement File #3963
#3920 - Update Expected Name for Disbursement File #3963
Conversation
...esdc-integration/disbursement-receipt-integration/disbursement-receipt.processing.service.ts
Fixed
Show fixed
Hide fixed
...esdc-integration/disbursement-receipt-integration/disbursement-receipt.processing.service.ts
Fixed
Show fixed
Hide fixed
Any sample file name is added in PR?
|
@@ -50,7 +50,7 @@ export class DisbursementReceiptProcessingService { | |||
async process(auditUserId: number): Promise<ProcessSFTPResponseResult[]> { | |||
// Get the list of all files from SFTP ordered by file name. | |||
const fileSearch = new RegExp( | |||
`^${this.esdcConfig.environmentCode}EDU.PBC.DIS.D[\w]*\.[0-9]*`, | |||
`^${this.esdcConfig.environmentCode}EDU.PBC.DIS.[\\w]*\\.[0-9]*`, |
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.
The intermediate points should also be escaped:
^${this.esdcConfig.environmentCode}EDU\\.PBC\\.DIS\\.[\\w]*\\.[0-9]*
Now that the format is well known, a more precise regex could be used, as below.
^${this.esdcConfig.environmentCode}EDU\\.PBC\\.DIS.[0-9]{8}\\.[0-9]{3}$
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.
Thanks @andrewsignori-aot for the precise regex format. The PR is updated with this regex.
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.
It looks good, minor observation that the $
at the end was part of it, but it would not be a blocker 😉
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.
The anchor tag is now added. This $
works 🙂
Thanks @bidyashish for pointing it out. There is no sample file added to the PR. The file I used to process the disbursement receipts is similar to the file for the federal provincial part time disbursement file, and the content of the file was modified to match existing disbursement schedules in my local database for running sample processes. The file name was changed to "DEDU.PBC.DIS.20241119.001" to match the regex format for this PR, and the screenshots of the Bull Dashboard show the results of process summary. The regex is now using |
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.
LGTM
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.
Nice job, looks good 👍
Quality Gate passedIssues Measures |
${this.esdcConfig.environmentCode}EDU\\.PBC\\.DIS.[0-9]{8}\\.[0-9]{3}$
Screenshot of the Bull Dashboard completed task with the disbursement schedule records not found
Screenshot of the Bull Dashboard completed task with the disbursement schedule records found