Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3937,8 +3937,14 @@ public ModelAndView getView(DeleteForm deleteForm, boolean reshow, BindException

List<ExpData> datas = getDatas(deleteForm, false);
List<ExpRun> runs = getRuns(datas);
ConfirmDeleteView view = new ConfirmDeleteView("Data", ShowDataAction.class, datas, deleteForm, runs);

return new ConfirmDeleteView("Data", ShowDataAction.class, datas, deleteForm, runs);
// GitHub Issue #1446: show ConfirmDeleteView with a message indicating if not all of the ids resolve within the container context
int unresolved = deleteForm.getIds(false).size() - datas.size();
if (unresolved == 0)
return view;

return new VBox(new HtmlView(DIV(unresolved + " of the selected items could not be found in this folder.")), view);
}

private List<ExpRun> getRuns(List<ExpData> datas)
Expand All @@ -3953,7 +3959,8 @@ private List<ExpData> getDatas(DeleteForm deleteForm, boolean clear)
for (long dataId : deleteForm.getIds(clear))
{
ExpData data = ExperimentService.get().getExpData(dataId);
if (data != null)
// GitHub Issue #1446: deleteObjects() only deletes within getContainer(), so don't resolve data from other folders
if (data != null && data.getContainer().equals(getContainer()))
{
datas.add(data);
}
Expand Down
Loading