Skip to content

Feat 134 close all studies options#197

Draft
junaidferoz wants to merge 3 commits into
devfrom
feat-158-close_all_studies_options
Draft

Feat 134 close all studies options#197
junaidferoz wants to merge 3 commits into
devfrom
feat-158-close_all_studies_options

Conversation

@junaidferoz
Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings May 5, 2026 20:17
@junaidferoz junaidferoz changed the title Feat 158 close all studies options Feat 134 close all studies options May 5, 2026
@junaidferoz junaidferoz marked this pull request as draft May 5, 2026 20:20
@junaidferoz junaidferoz marked this pull request as draft May 5, 2026 20:20
@junaidferoz junaidferoz self-assigned this May 5, 2026
@junaidferoz junaidferoz added frontend requires changes in the frontend of CARE doing marked as someone is working on this labels May 5, 2026
@junaidferoz junaidferoz linked an issue May 5, 2026 that may be closed by this pull request
@junaidferoz junaidferoz requested a review from dennis-zyska May 5, 2026 20:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a safer bulk-close workflow by letting users select specific open studies to close (rather than closing everything), and enhances progress feedback during long-running bulk operations.

Changes:

  • Reworks the bulk-close modal UI to show a selectable/filterable table of open studies and disables closing when nothing is selected.
  • Extends the studyCloseBulk socket handler to optionally operate on an explicit list of study IDs and to return a closedCount.
  • Improves progress bar display by showing (current / total) alongside the percentage.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
frontend/src/components/dashboard/study/BulkCloseModal.vue Replaces “close all” confirmation with a selectable table of open studies and emits an id-list based bulk close request.
frontend/src/basic/Modal.vue Enhances progress UI to show item counts in addition to percent complete.
backend/webserver/sockets/study.js Adds id-list mode for bulk closing, returns closedCount, and improves progress emission efficiency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const wf = this.$store.getters["table/workflow/get"](id);
return {
value: id,
name: wf?.name ? `${wf.name} (id ${id})` : `Workflow ${id}`,
Comment on lines +17 to +20
v-model="selectedStudies"
:columns="columns"
:data="tableRows"
:options="tableOptions"
Comment on lines +163 to +167
name: study.name || `Study ${study.id}`,
workflowName: workflow?.name || `Workflow ${study.workflowId ?? "-"}`,
ownerName,
createdAt: new Date(study.createdAt).toLocaleString(),
};
Comment on lines 186 to +190
* @socketEvent studyCloseBulk
* @param data The data required for the bulk close operation.
* @param data.projectId the project ID of the studies to close
* @param data.ignoreClosedState if true, also close studies that are already closed
* @param data.progressId the ID of the progress bar to update
* @param data.progressId optional id for progressUpdate events
Comment on lines 197 to +201
async closeBulk(data, options) {
const projectId = Number(data.projectId);
const ignoreClosedState = data.ignoreClosedState === true;
const progressId = data.progressId;
let studies;
!s.template,
);
} else {
studies = await this.models["study"].getAllByKey("projectId", data.projectId);
Combine session overview UI refactor, study dashboard updates, and nav migration adjustments into one feature commit for cleaner review and merge.
@junaidferoz
Copy link
Copy Markdown
Collaborator Author

Hello, this commit (23cc9d9) is just me updating this feature branch

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we don't need to change the basic component. for bulk assignment creation i used progressbar you can use the same code to make it work.

/**
* Modal for bulk closing studies
* Modal for bulk closing studies (optional filters: workflow, study user)
* @author: Dennis Zyska
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add your name in the author you created this functionality right?

@akash9676
Copy link
Copy Markdown
Collaborator

add also https://github.com/UKPLab/CARE/pull/164/changes all the changes from karim merge req are inside this merge req i think we only need to change study.js, bulkclose.vue and study.vue

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

Labels

doing marked as someone is working on this frontend requires changes in the frontend of CARE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Study Closing Type Selection

3 participants