Skip to content
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

RDISCROWD-5704 Completed col in workers task browse #835

Merged
merged 2 commits into from
Apr 26, 2023
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 pybossa/view/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ def tasks_browse(short_name, page=1, records_per_page=None):

# show columns that are permitted for regular users
if regular_user:
dict_args["display_columns"] = ["task_id", "priority", "created"]
dict_args["display_columns"] = ["task_id", "priority", "finish_time", "created"]
# show task.info columns that are configured under tasklist_columns
dict_args["display_info_columns"] = project.info.get('tasklist_columns', [])
# restrict filter columns to the columns configured under project settings
Expand Down
8 changes: 5 additions & 3 deletions test/test_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -9481,14 +9481,16 @@ def test_tasks_browse_allow_taskrun_edit_works(self, check_password):
res = self.app.get(url, follow_redirects=True)
assert res.status_code == 200, res.status_code
dom = BeautifulSoup(res.data)
# confirm that only "Tash #, Priority and Created are listed"
# confirm that only "Tash #, Priority, Created, and Completed are listed"
th_tags = dom.findAll("th", {"class": "sortable"})
expected_columns = ["Task #", "Priority", "Created"]
expected_columns = ["Task #", "Priority", "Created", "Completed"]
print(th_tags)
assert len(th_tags) == len(expected_columns), th_tags
th_tag_1, th_tag_2, th_tag_3 = th_tags[0].text.strip(), th_tags[1].text.strip(), th_tags[2].text.strip()
th_tag_1, th_tag_2, th_tag_3, th_tag_4 = th_tags[0].text.strip(), th_tags[1].text.strip(), th_tags[2].text.strip(), th_tags[3].text.strip()
assert th_tag_1 == expected_columns[0], f"found column {th_tag_1}, expected column {expected_columns[0]} not present"
assert th_tag_2 == expected_columns[1], f"found column {th_tag_3}, expected column {expected_columns[1]} not present"
assert th_tag_3 == expected_columns[2], f"found column {th_tag_3}, expected column {expected_columns[2]} not present"
assert th_tag_4 == expected_columns[3], f"found column {th_tag_4}, expected column {expected_columns[3]} not present"

@with_context
def test_projects_account(self):
Expand Down