You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Legal API, batch job, etc: need "short reason" for limited restoration expiry #25473
This supersedes the background and comments below. Or see the latest Figma designs.
To do:
option 1: in "expired-limited-restoration" job, add reason = "Limited Restoration Expired on March 8, 2024"
this will be used by the UI to display the historical reason
option 2: in "expired-limited-restoration" job, add reason = "Limited Restoration Expired" and add expiryDate = "2024-03-24"
this will be used by the UI to format and display the historical reason
Background
A property needs to be added to the Put Back Off filing to identify the "short reason", in this case, limited restoration expiry.
Sample Put Back Off filing in filings response:
We cannot use the existing orderDetails because it is too verbose and it is free-form text (ie, will be entered by staff in future PutBackOff filings).
We need a new property, reason (or can be named something else), which is both a fixed value (eg, from an enum) and can be used to directly display in the UI as the reason the business is historical, ie, instead of "Unknown" here:
Talk to Jacqueline about the exact text to make this "reason". Note that future PutBackOff filings, from the UI, will need to prompt staff for the reason. This should be implemented as a drop-down list so that responses are fixed (not free-form). This reason would also be displayed across from the Historical badge, same as limited restoration expiry.
PS While you're here, could the orderDetails string be updated to remove the reference to "put back off filing"? Talk to Jacqueline about what it should say. See criteria below:
Design Criteria
Criteria
When the business has been set as historical due to limited restoration expiry, display text next to the historical badge:
"Limited Restoration Expired on March 8, 2024"
The date should be the expiry date of the limited restoration
Change the data.applicationDate in the Put Back Off filing to be the day that the limited restoration expired (eg, "2024-03-08").
Limited restorations expire at the end of the day (11:59pm). Change the batch job to find expired limited restorations accordingly.no change needed
@AimeeGao , what "time" does the batch job use to identify expired limited restorations? I assume it's the beginning of the day, not the end of the day...?
Change the data.applicationDate in the Put Back Off filing to be the day that the limited restoration expired (eg, "2024-03-08").[ ] Limited restorations expire at the end of the day (11:59pm). Change the batch job to find expired limited restorations accordingly.
@AimeeGao , what "time" does the batch job use to identify expired limited restorations? I assume it's the beginning of the day, not the end of the day...?
Hey, Sev. The batch job runs at 11:59 PM every night to get all expired limited restorations and update their status to historical.
Thanks, Aimee. That should be fine, right, or do you think it's better to run the job at 00:00 (or later)?
We have discussed with Mihai about the execution time of the cron job before and he was fine with running it at 11:59 pm. Do you think we need to re-discuss the runtime of the job with him 👀
This morning, Mihai and I we discussed that the Limited Restoration expires at 11:59 PM.
Theoretically, if the job runs at 11:59 then it will pick up Limited Restorations that just expired, right? If yes then no need to change the job schedule.
This morning, Mihai and I we discussed that the Limited Restoration expires at 11:59 PM.
Theoretically, if the job runs at 11:59 then it will pick up Limited Restorations that just expired, right? If yes then no need to change the job schedule.
Thanks for confirming. yes, the cron job is currently working this way 👍🏻
@ketaki-deodhar , what about applicationDate? I would like that to be just yyyy-mm-dd but I don't know what impacts that might have elsewhere, like in the Filer...?
@severinbeauvais
In metadata application date is set as below (see screenshot) and this is for all the filings. There is no check for a type of filing right now.
Are you thinking of changing the date only for this case? Can be done but needs a bit more work for sure and as it is for all filings now it is bit risky too.
I agree: don't change Application Date if it affects other filings.
Option 1: return the new reason property including the formatted date.
Option 2: add another property expiryDate in yyyy-mm-dd format that the UI can use to display the reason (eg, data.order.reason + "on" + formatDate(date.order.expiryDate).
I am ok with either of these options, for Option 2 currently we don't have access to expiryDate of limited restoration in putbackoff filing and i don't have clear picture on how we are planning to implement reason property
The Put Back Off filing is created by a batch job that looks for expired Limited Restoration businesses. It should have access to Expiry Date (yyyy-mm-dd even though it's 11:59 pm). Also, this is the only place that the new Reason property is added/used (for now).
Activity
severinbeauvais commentedon Jan 23, 2025
@jacqueline-williams-549 Please provide approved "reason" for PutBackOff due to limited restory expiry. Thanks!
severinbeauvais commentedon Jan 30, 2025
ALSO THIS!!
data.applicationDatein the Put Back Off filing to be the day that the limited restoration expired (eg, "2024-03-08").Limited restorations expire at the end of the day (11:59pm). Change the batch job to find expired limited restorations accordingly.no change needed@AimeeGao , what "time" does the batch job use to identify expired limited restorations? I assume it's the beginning of the day, not the end of the day...?
AimeeGao commentedon Jan 30, 2025
Hey, Sev. The batch job runs at 11:59 PM every night to get all expired limited restorations and update their status to historical.
severinbeauvais commentedon Jan 30, 2025
Thanks, Aimee. That should be fine, right, or do you think it's better to run the job at 00:00 (or later)?
AimeeGao commentedon Jan 30, 2025
We have discussed with Mihai about the execution time of the cron job before and he was fine with running it at 11:59 pm. Do you think we need to re-discuss the runtime of the job with him 👀
severinbeauvais commentedon Jan 30, 2025
This morning, Mihai and I we discussed that the Limited Restoration expires at 11:59 PM.
Theoretically, if the job runs at 11:59 then it will pick up Limited Restorations that just expired, right? If yes then no need to change the job schedule.
severinbeauvais commentedon Jan 30, 2025
@ketaki-deodhar I am assuming that we can change
data.applicationDatefrom "2024-03-08T23:59:00.00000+00:00" to "2024-03-08"...If we do that, is there any impact to the Filer or COLIN data? Re: ##25231
AimeeGao commentedon Jan 30, 2025
Thanks for confirming. yes, the cron job is currently working this way 👍🏻
ketaki-deodhar commentedon Feb 1, 2025
From what I understand the date format has to be "2024-03-08T23:59:00.00000+00:00"

severinbeauvais commentedon Feb 3, 2025
@ketaki-deodhar , what about
applicationDate? I would like that to be just yyyy-mm-dd but I don't know what impacts that might have elsewhere, like in the Filer...?ketaki-deodhar commentedon Feb 5, 2025
A little bit more explanation:
@severinbeauvais
In metadata application date is set as below (see screenshot) and this is for all the filings. There is no check for a type of filing right now.
Are you thinking of changing the date only for this case? Can be done but needs a bit more work for sure and as it is for all filings now it is bit risky too.
@vysakh-menon-aot please add onto it If I am missing anything.
severinbeauvais commentedon Feb 5, 2025
It's better if we avoid special cases.
I agree: don't change Application Date if it affects other filings.
Option 1: return the new
reasonproperty including the formatted date.Option 2: add another property
expiryDatein yyyy-mm-dd format that the UI can use to display the reason (eg, data.order.reason + "on" + formatDate(date.order.expiryDate).@vysakh-menon-aot Thoughts?
vysakh-menon-aot commentedon Feb 5, 2025
I am ok with either of these options, for Option 2 currently we don't have access to expiryDate of limited restoration in putbackoff filing and i don't have clear picture on how we are planning to implement reason property
severinbeauvais commentedon Feb 5, 2025
The Put Back Off filing is created by a batch job that looks for expired Limited Restoration businesses. It should have access to Expiry Date (yyyy-mm-dd even though it's 11:59 pm). Also, this is the only place that the new Reason property is added/used (for now).
vysakh-menon-aot commentedon Feb 5, 2025
Yeah! these has to be included in filing json https://github.com/bcgov/lear/blob/main/jobs/expired-limited-restoration/file_expired_limited_restoration.py#L104