File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/browsergym/workarena/tasks Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,7 @@ def setup_goal(self, page: playwright.sync_api.Page) -> Tuple[str | dict]:
304304 self .fixed_config if self .fixed_config else self .random .choice (self .all_configs ())
305305 )
306306 # ... set start URL based on config
307+ # ...... some of the reports have need a date filter to be applied so we do this by patching a placeholder in the URL
307308 self .start_url = self .instance .snow_url + self .config ["url" ]
308309
309310 # Produce goal string based on question type
@@ -603,6 +604,8 @@ def _generate_random_config(
603604 """
604605 Generate a random configuration for the task
605606
607+ This can be used to regenerate configs that are valid under an updated date filter.
608+
606609 Parameters:
607610 -----------
608611 page: playwright.sync_api.Page
@@ -674,6 +677,7 @@ def _generate_random_config(
674677
675678 # On the fly generated report
676679 if not report .get ("sys_id" , None ):
680+ # ... these receive a filter that is added through the URL
677681 url = f"/now/nav/ui/classic/params/target/sys_report_template.do%3Fsysparm_field%3D{ report ['field' ]} %26sysparm_type%3D{ report ['type' ]} %26sysparm_table%3D{ report ['table' ]} %26sysparm_from_list%3Dtrue%26sysparm_chart_size%3Dlarge%26sysparm_manual_labor%3Dtrue%26sysparm_query=sys_created_on<javascript:gs.dateGenerate('{ REPORT_DATE_FILTER } ','00:00:00')^EQ"
678682 # Report from the database
679683 else :
You can’t perform that action at this time.
0 commit comments