|
20 | 20 | REPORT_RETRIEVAL_MINMAX_CONFIG_PATH, |
21 | 21 | REPORT_RETRIEVAL_VALUE_CONFIG_PATH, |
22 | 22 | REPORT_DATE_FILTER, |
| 23 | + REPORT_TIME_FILTER, |
23 | 24 | REPORT_PATCH_FLAG, |
24 | 25 | ) |
25 | 26 | from ..instance import SNowInstance |
@@ -305,7 +306,9 @@ def setup_goal(self, page: playwright.sync_api.Page) -> Tuple[str | dict]: |
305 | 306 | ) |
306 | 307 | # ... set start URL based on config |
307 | 308 | # ...... some of the reports have need a date filter to be applied so we do this by patching a placeholder in the URL |
308 | | - self.start_url = self.instance.snow_url + self.config["url"] |
| 309 | + self.start_url = self.instance.snow_url + self.config["url"].replace( |
| 310 | + "REPORT_DATE_FILTER", REPORT_DATE_FILTER |
| 311 | + ).replace("REPORT_TIME_FILTER", REPORT_TIME_FILTER) |
309 | 312 |
|
310 | 313 | # Produce goal string based on question type |
311 | 314 | chart_locator = ( |
@@ -678,7 +681,7 @@ def _generate_random_config( |
678 | 681 | # On the fly generated report |
679 | 682 | if not report.get("sys_id", None): |
680 | 683 | # ... these receive a filter that is added through the URL |
681 | | - 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" |
| 684 | + 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}','{REPORT_TIME_FILTER}')^EQ" |
682 | 685 | # Report from the database |
683 | 686 | else: |
684 | 687 | url = f"/now/nav/ui/classic/params/target/sys_report_template.do%3Fjvar_report_id={report['sys_id']}" |
|
0 commit comments