Delete a project

11 posts, 0 answers
  1. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 27 Jul 2010 Link to this post

    Hi all,

    How can I delete a project?

    Regards,
    Daniel
  2. David Harris
    Admin
    David Harris avatar
    1 posts

    Posted 27 Jul 2010 Link to this post

    Hello Daniel,

    Project deletion is not supported. You can simply erase existing details if you wish to 'start fresh'.

    Kind regards,
    David Harris
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 27 Jul 2010 Link to this post

    Thanks Harris.

    Will it be supported in future, or is this due to design choices?
    Anyway, I'll delete the data for now.

    Regards,
    Daniel
  4. David Harris
    Admin
    David Harris avatar
    1 posts

    Posted 27 Jul 2010 Link to this post

    Hello Daniel,

    Currently there are no plans to support project deletion however if user feedback indicates this would be a desirable feature we will certainly look to add it in a future release.

    Best wishes,
    David Harris
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Aaron
    Aaron avatar
    4 posts
    Member since:
    Jul 2010

    Posted 28 Jul 2010 Link to this post

    I think that it would make sense to allow for deletion or archival of projects.

    I created several test projects with different project templates.  Now I have several projects that I would update with real project information, except I can't change the project template either.  This could happen if I forgot to choose the project template, or if I chose the wrong one.

    So now I'm left with empty projects with the wrong project templates.
  6. Missing user
    Missing user avatar

    Posted 29 Jul 2010 Link to this post

    Hi Aaron,

    Thanks for the feedback. Based on what we have seen so far, this is a feature we are going to look at adding to a future version of TeamPulse.

    For right now, if you have not entered any data into the projects and have nothing to lose from deleting them, you could uninstall and reinstall TeamPulse, this will drop the current database and create a fresh one. Hopefully this helps you out.

    Also, to play it safe, make sure to deactivate your install of TeamPulse before uninstalling.

    Kind regards,
    Jesse Dyck
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Siingh
    Siingh avatar
    32 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2010 Link to this post

    Hi Telerik
    How about deleting project directly from sql server table will it generate? error or safe to delete from table?




    Kind Regards:
    Hariindarr Siingh
    McConnell Dowell SEA
  8. MNP
    MNP avatar
    40 posts
    Member since:
    Apr 2008

    Posted 30 Jul 2010 Link to this post

    +1 for this ability as well.

    For example. I didn't set the Template when I first created a project. Now I can't change it after the fact. It would be nice if we had the ability to delete a project.

    -Matt
  9. David Harris
    Admin
    David Harris avatar
    1 posts

    Posted 03 Aug 2010 Link to this post

    Hello Siingh,

    Deleting a project through SQL is definitely doable, but there is some work involved due to triggers and constraints. In an effort to help the community between now and when we get a release out which includes the functionality via the UI, we have created a script to allow you to manually perform this action.

    To use the script, you will need to know the Project ID of the project you wish to delete. This can be retrieved via the URL in your browser when the project is open. For example, when open to the Dashboard I get a URL like this:

    http://localhost:9898/#/Project/3/Dashboard

    In this case, the Project ID is 3.

    To run the script, open SQL Server Management Studio and create a new query. Paste the contents of the script from below, then take the Project ID value and replace the placeholder text PASTE_PROJECT_ID_HERE with that integer value.

    WARNING: *** This script is run at your own risk! Telerik is not responsible for any loss of data that may occur! ***

    You are encouraged to perform a full database backup prior to running the script, as modifications cannot be undone!

    USE TeamPulse
      
    BEGIN TRAN DeleteProject
      
    DECLARE @ProjectIDToDelete INT
    SET @ProjectIDToDelete = PASTE_PROJECT_ID_HERE
      
    Print 'Disabling all triggers...'
      
    SET NOCOUNT ON
      
    IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'#AllTriggers') AND type in (N'U'))
    DROP TABLE #AllTriggers
      
    SELECT T.Name as TrigName, o.Name as TabName, s.Name as SchemaName
    INTO #AllTriggers
    FROM sys.triggers T join sys.objects o
    ON T.parent_Id = o.object_ID
    JOIN sys.schemas s
    ON o.schema_Id = s.Schema_ID
      
    DECLARE TrigCurs Cursor
    FOR SELECT TrigName, TabName, SchemaName FROM #AllTriggers
      
    OPEN TrigCurs
      
    DECLARE @TrigName varchar(250), @TabName varchar(250), @SchameName VarChar(250), @cmd varchar(1000)
      
    FETCH Next FROM TrigCurs INTO @TrigName , @TabName , @SchameName 
      
    WHILE @@Fetch_Status = 0 
    BEGIN 
    SET @cmd = 'disable trigger all on ['+ @SchameName+'].['+@TabName+'];' 
    EXEC (@cmd)
      
    FETCH Next FROM TrigCurs INTO @TrigName , @TabName , @SchameName 
    END
      
    Print 'Deleting Project data...'
      
    delete from AttachmentFile where ProjectID = @ProjectIDToDelete
    delete from Attachment where ProjectID = @ProjectIDToDelete
    delete from TestCase where ProjectID = @ProjectIDToDelete
    delete from Task where ProjectID = @ProjectIDToDelete
    delete from Hyperlink where ProjectID = @ProjectIDToDelete
    delete from StoryPersona where ProjectID = @ProjectIDToDelete
    delete from StoryRelationship where ProjectID = @ProjectIDToDelete
    delete from StoryRichDescription where ProjectID = @ProjectIDToDelete
    delete from Story where ProjectID = @ProjectIDToDelete
    delete from SynchronizationError where ProjectID = @ProjectIDToDelete
    delete from Area where ProjectID = @ProjectIDToDelete
    delete from Iteration where ProjectID = @ProjectIDToDelete
    delete from Timeline where ProjectID = @ProjectIDToDelete
    delete from Persona where ProjectID = @ProjectIDToDelete
    delete from ProjectUser where ProjectID = @ProjectIDToDelete
    delete from ProjectSync where ProjectID = @ProjectIDToDelete
    delete from ProjectTag where ProjectID = @ProjectIDToDelete
    delete from project where projectid = @ProjectIDToDelete
      
    Print 'Enabling all triggers...'
      
    DECLARE TrigCurs2 Cursor
    FOR SELECT TrigName, TabName, SchemaName from #AllTriggers
      
    OPEN TrigCurs2
      
    DECLARE @TrigName2 varchar(250), @TabName2 varchar(250), @SchameName2 VarChar(250), @cmd2 varchar(1000)
      
    FETCH Next from TrigCurs2 into @TrigName2 , @TabName2 , @SchameName2 
      
    WHILE @@Fetch_Status = 0
    BEGIN
    SET @cmd2 = 'enable trigger all on ['+ @SchameName2+'].['+@TabName2+'];' 
    EXEC (@cmd2)
      
    FETCH Next FROM TrigCurs2 INTO @TrigName2 , @TabName2 , @SchameName2
    END
      
    DROP TABLE #AllTriggers
      
      
    COMMIT TRAN DeleteProject
      
    Print 'Script Complete.'

    Regards,
    David Harris
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Rich
    Rich avatar
    6 posts
    Member since:
    Feb 2010

    Posted 03 Aug 2010 Link to this post

    Thanks Dave!  This will be helpful and I understand it is at our own risk.  Your database structures are pretty easy to follow so we should be able to recognize / adjust as needed.
  11. Aaron
    Aaron avatar
    4 posts
    Member since:
    Jul 2010

    Posted 11 Aug 2010 Link to this post

    Thanks for the script.  It seems to work great!

    -A
Back to Top