Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#585 closed (fixed)

Deletion of entire project

Reported by: Fredrik Levander Owned by: Fredrik Levander
Milestone: Proteios SE 2.10 Keywords:
Cc:

Description (last modified by Fredrik Levander)

Users of Proteios sometimes want to restart from the beginning with entering data into a project, for example after finding out that the wrong search settings were used etcetera. There should be a possibility to delete an entire project, which deletes data so that dependency problems are solved. Thus for a project the following needs to be scheduled for deletion, in this order:

(Features) Hits Jobs Spectrum Searches Files (all files found in the project directory or it's subdirectories) Directories The project itself

The first step is to mark all items as deleted. When empty trash is executed, this should be executed as a plug-in #620, since it will put heavy load on mysql and tomcat, and should be run as a job.

Change History (13)

comment:1 Changed 14 years ago by Gregory Vincic

Owner: olle deleted

The reason for this not being solved is that it's difficult. I will implement a intermediary solution where users may close a project, thus removing it from their list view. (See #587 Close projects)

comment:2 Changed 14 years ago by Gregory Vincic

Milestone: Proteios SE 2.9Proteios SE Future Release

comment:3 Changed 14 years ago by Fredrik Levander

Milestone: Proteios SE Future ReleaseProteios SE 2.10

comment:4 Changed 14 years ago by Fredrik Levander

Description: modified (diff)

comment:5 Changed 14 years ago by Fredrik Levander

Description: modified (diff)

comment:6 Changed 14 years ago by Fredrik Levander

Owner: set to Fredrik Levander
Status: newassigned

comment:7 Changed 14 years ago by Fredrik Levander

(In [3443]) Refs #585. Added support for scheduling project parts for deletion. The project itself is not deleted, but only marked as closed.

comment:8 Changed 14 years ago by Fredrik Levander

(In [3445]) Merging test branch with trunk. Refs #585, Refs #614, Refs #621.

comment:9 Changed 14 years ago by Fredrik Levander

Resolution: fixed
Status: assignedclosed

The project is not deleted, but the content is. There are still some foreign key constraints to handle before the projects should be deleted completely

comment:10 Changed 13 years ago by olle

(In [3952]) Refs #704. Refs #585. Refs #287. Project table tool bar updated to remove the "Delete" button coupled to action DeleteItems, and rename button "Trash Project" coupled to action TrashProject to new name "Delete":

  1. Class/file action/project/ListMyProjects.java in client/servlet/

updated:

  1. Public method void runMe() updated to remove the "Delete" button

coupled to action DeleteItems from the tool bar of the project table.

  1. Class/file gui/Toolbar.java in client/servlet/ updated:

a Public method void clear() updated to first check if instance variable ArrayList<AbstractLink> toolbar differs from null, before calling its clear() method.

  1. English dictionary file locale/en/dictionary in client/servlet/

updated by changing the string value for key TrashProject from "Trash Project" to "Delete".

comment:11 Changed 13 years ago by olle

(In [3957]) Refs #704. Refs #585. Class/file action/project/TrashProject.java in client/servlet/ updated to no longer create a job owned by the project to delete, as this made the job itself be marked as deleted:

  1. Protected method void runMe() updated to set the active

project to null before creating the job.

comment:12 Changed 13 years ago by olle

(In [3958]) Refs #704. Refs #585. Class/file plugins/ProjectToTrash.java in plugin/ updated:

  1. Public method

void run(Request request, Response response, ProgressReporter progress) updated:

  1. The Project item was re-created with the new DbControl from

the id value of the former, as this eliminates the need to call reattachItem(...).

  1. The lists of directories and files in the project is now obtained

by calling new private methods List<Directory> directoryTree(DbControl dc, List<Directory> dirList, Directory startDir) and List<File> filesInDirectories(DbControl dc, List<Directory> dirList), respectively.

  1. New private method

List<Directory> directoryTree(DbControl dc, List<Directory> dirList, Directory startDir) added. It obtains a list of all directories that have the start directory as ancestor.

  1. New private method

List<File> filesInDirectories(DbControl dc, List<Directory> dirList) added. It obtains a list of all files in a list of directories.

comment:13 Changed 13 years ago by olle

Addendum to commit message for changeset [3958] entered 2010-11-05 12:09 by olle:

Refs #704. Refs #585. Class/file plugins/ProjectToTrash.java in plugin/ updated:

  1. Public method

void run(Request request, Response response, ProgressReporter progress) updated:
...

  1. The project is marked as deleted instead of closed.

...

Closing of a project can still be performed when editing the properties of a project item. Closed projects may be filtered out from showing up when listing projects.

Note: See TracTickets for help on using tickets.