Skip to content

Feature #134 closing studies based on selection#135

Closed
junaidferoz wants to merge 202 commits into
devfrom
feat-134-close_all_studies_options
Closed

Feature #134 closing studies based on selection#135
junaidferoz wants to merge 202 commits into
devfrom
feat-134-close_all_studies_options

Conversation

@junaidferoz
Copy link
Copy Markdown
Collaborator

@junaidferoz junaidferoz commented Mar 26, 2026

Selective Study Closing with Workflow and User Filters

Previously, users could only close all studies at once. This feature adds the ability to selectively close studies by filtering them based on workflow type and/or user, reducing the risk of unintentionally closing studies and providing finer-grained control over bulk operations.

New User Features

  • Workflow filter: Select a specific workflow type when closing studies, or choose "All workflows" to close studies across all workflows.
  • User filter: Optionally filter studies by the user who owns them, with a default "Any user" option for unfiltered behavior.
  • Scoped confirmation: The confirmation dialog now displays which workflow and user filters are applied, along with an approximate count of studies to be closed.

New Dev Features

  • Extended studyCloseBulk handler: Backend now accepts optional workflowId and userId parameters to filter study lists before closing.
  • Server-side validation: All filtering is enforced on the backend to ensure malicious client requests cannot close out-of-scope studies.

Improvements

  • Filtered progress reporting: Progress indicators now reflect only the studies being closed within the selected scope, providing accurate feedback.
  • Enhanced safety: Users can preview exactly which studies will be affected before confirming the bulk close operation

router.go(0) calls the browser's native history.go(0) under the hood, which forces a full page reload.
This resets the vuex store back to its initial state, ensuring the correct user data is displayed after login.
Without this, there is currently no explicit store reset on logout, which caused the previous user's data to persist into the next session.
Copy link
Copy Markdown
Collaborator

@dennis-zyska dennis-zyska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at this pull request again. The solution needs to be revised. It would not work well. Imagine you have a hundred students; for each student, there is a study. If you were to list all the usernames in a select box, it would not be easy to select. That is why I suggested a table listing all open studies, like in "Saved templates" Modal, but with a filterable column for workflows and a search for the user. We therefore have a BasicTable you can use. From the user's perspective, it would be easier to handle.

@junaidferoz
Copy link
Copy Markdown
Collaborator Author

Hi @dennis-zyska,

You were right. The earlier implementation did not support filtering and other such features, which would be tedious if we have 1000s of open studies with multiple users. So i have changed the implementation. the UI looks like this now.

image

@junaidferoz
Copy link
Copy Markdown
Collaborator Author

Just so you guys dont get surprised by the high number of commits, i was updating this branch

@junaidferoz
Copy link
Copy Markdown
Collaborator Author

Closing this PR, due to very high number of commits. For further changes, please see this PR #197

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants