Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/browsergym/workarena/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.2"
__version__ = "0.4.3"

import inspect
from logging import warning
Expand Down
2 changes: 1 addition & 1 deletion src/browsergym/workarena/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@

# Report date filter patch flag
REPORT_PATCH_FLAG = "WORKARENA_DATE_FILTER_PATCH"
REPORT_DATE_FILTER = "2024-04-01"
REPORT_DATE_FILTER = "2025-07-15"

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/browsergym/workarena/tasks/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ def setup_goal(self, page: playwright.sync_api.Page) -> Tuple[str | dict]:
self.fixed_config if self.fixed_config else self.random.choice(self.all_configs())
)
# ... set start URL based on config
# ...... some of the reports have need a date filter to be applied so we do this by patching a placeholder in the URL
self.start_url = self.instance.snow_url + self.config["url"]

# Produce goal string based on question type
Expand Down Expand Up @@ -603,6 +604,8 @@ def _generate_random_config(
"""
Generate a random configuration for the task

This can be used to regenerate configs that are valid under an updated date filter.

Parameters:
-----------
page: playwright.sync_api.Page
Expand Down Expand Up @@ -674,6 +677,7 @@ def _generate_random_config(

# On the fly generated report
if not report.get("sys_id", None):
# ... these receive a filter that is added through the URL
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"
# Report from the database
else:
Expand Down
Loading