diff options
author | Angel Avila | 2013-04-18 00:00:03 +0000 |
---|---|---|
committer | Angel Avila | 2013-04-19 19:25:47 +0000 |
commit | 444a2e450f442329739a665c2a8d976491b0d7c6 (patch) | |
tree | b20c9a8a35460d936845bc50cf5dcfd21421ee16 | |
parent | 1afb7704eb11b178294373b93238501850e64cab (diff) | |
download | org.eclipse.osee-444a2e450f442329739a665c2a8d976491b0d7c6.tar.gz org.eclipse.osee-444a2e450f442329739a665c2a8d976491b0d7c6.tar.xz org.eclipse.osee-444a2e450f442329739a665c2a8d976491b0d7c6.zip |
bug[ats_84Z75]: Fix stale date in servers cache on Purge
Change-Id: I7dbcdec3f82cdf89783e19202d7fec782f53fa15
15 files changed, 156 insertions, 31 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java index b1a2287b1bb..f2921e379ed 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/AtsBranchManagerCore.java @@ -92,8 +92,11 @@ public class AtsBranchManagerCore { long now = new Date().getTime(); boolean notSet = hridToWorkingBranchCacheUpdated.get(teamArt.getHumanReadableId()) == null; if (notSet || force || (now - hridToWorkingBranchCacheUpdated.get(teamArt.getHumanReadableId()) > 1000)) { - hridToWorkingBranchCache.put(teamArt.getHumanReadableId(), - getWorkingBranchExcludeStates(teamArt, BranchState.REBASELINED, BranchState.DELETED)); + hridToWorkingBranchCache.put( + teamArt.getHumanReadableId(), + getWorkingBranchExcludeStates(teamArt, BranchState.REBASELINED, BranchState.DELETED, BranchState.PURGED, + BranchState.COMMIT_IN_PROGRESS, BranchState.CREATION_IN_PROGRESS, BranchState.DELETE_IN_PROGRESS, + BranchState.PURGE_IN_PROGRESS)); hridToWorkingBranchCacheUpdated.put(teamArt.getHumanReadableId(), now); } return hridToWorkingBranchCache.get(teamArt.getHumanReadableId()); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java index a2dfe4e6e24..e11e809d973 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java @@ -181,7 +181,7 @@ public class BranchEventTest { verifyReceivedBranchStatesEvent(branchEventListener.getFirstResults(), BranchEventType.Purging, guid); verifyReceivedBranchStatesEvent(branchEventListener.getSecondResults(), BranchEventType.Purged, guid); - Assert.assertEquals(BranchState.CREATED, workingBranch.getBranchState()); + Assert.assertEquals(BranchState.PURGED, workingBranch.getBranchState()); Assert.assertEquals(StorageState.PURGED, workingBranch.getStorageState()); Assert.assertFalse(workingBranch.isEditable()); Assert.assertFalse("Branch should not exist", BranchManager.branchExists(guid)); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java index 4eb7e0fa2f2..70fc4ef6252 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchStateTest.java @@ -128,6 +128,32 @@ public class BranchStateTest { } @Test + public void testPurgeState() throws OseeCoreException, InterruptedException { + String originalBranchName = "Purged State Branch"; + Branch workingBranch = null; + boolean branchPurged = false; + try { + workingBranch = BranchManager.createWorkingBranch(BRANCH, originalBranchName); + assertEquals(BranchState.CREATED, workingBranch.getBranchState()); + assertTrue(workingBranch.isEditable()); + + BranchManager.purgeBranch(workingBranch); + branchPurged = true; + + assertEquals(BranchState.PURGED, workingBranch.getBranchState()); + assertTrue(workingBranch.getArchiveState().isArchived()); + assertTrue(!workingBranch.isEditable()); + assertTrue(workingBranch.getBranchState().isPurged()); + } finally { + if (workingBranch != null && !branchPurged) { + // needed to allow for archiving to occur + Thread.sleep(5000); + BranchManager.purgeBranch(workingBranch); + } + } + } + + @Test public void testCommitState() throws OseeCoreException, InterruptedException { String originalBranchName = "Commit State Branch"; Branch workingBranch = null; diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java index 722735088d7..4bc331660f5 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java @@ -161,9 +161,15 @@ public class Branch extends AbstractOseeType<String> implements WriteableBranch, @Override public boolean isEditable() { BranchState state = getBranchState(); - return !state.isCommitInProgress() && !state.isCommitted() && !state.isRebaselined() && // - !state.isDeleted() && !state.isCreationInProgress() && // - !getArchiveState().isArchived() && !isPurged(); + return (state.isCreated() || state.isModified() || state.isRebaselineInProgress()) && getArchiveState().isUnArchived(); + } + + public boolean isCreated() { + return getStorageState() == StorageState.CREATED; + } + + public boolean isModified() { + return getStorageState() == StorageState.MODIFIED; } public boolean isPurged() { @@ -174,6 +180,14 @@ public class Branch extends AbstractOseeType<String> implements WriteableBranch, return getBranchState() == BranchState.DELETED; } + public boolean isDeleteInProgress() { + return getBranchState() == BranchState.DELETE_IN_PROGRESS; + } + + public boolean isPurgeInProgress() { + return getBranchState() == BranchState.PURGE_IN_PROGRESS; + } + @Override public String toString() { return getName(); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchFactory.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchFactory.java index d9decdb4044..1923759c43e 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/BranchFactory.java @@ -68,6 +68,7 @@ public class BranchFactory implements IOseeTypeFactory { branch.setArchived(isArchived); branch.setBranchState(branchState); branch.setBranchType(branchType); + branch.setStorageState(storageState); } cache.cache(branch); return branch; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/BranchState.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/BranchState.java index 5580e3d573a..7cfe94efa4f 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/BranchState.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/BranchState.java @@ -14,7 +14,6 @@ package org.eclipse.osee.framework.core.enums; * @author Roberto E. Escobar */ public enum BranchState { - UNKNOWN(-1), CREATED(0), MODIFIED(1), COMMITTED(2), @@ -22,7 +21,10 @@ public enum BranchState { DELETED(4), REBASELINE_IN_PROGRESS(5), COMMIT_IN_PROGRESS(6), - CREATION_IN_PROGRESS(7); + CREATION_IN_PROGRESS(7), + DELETE_IN_PROGRESS(8), + PURGE_IN_PROGRESS(9), + PURGED(10); private final int value; @@ -38,6 +40,14 @@ public enum BranchState { return this == BranchState.COMMIT_IN_PROGRESS; } + public boolean isCreated() { + return this == BranchState.CREATED; + } + + public boolean isModified() { + return this == BranchState.MODIFIED; + } + public boolean isCommitted() { return this == BranchState.COMMITTED; } @@ -58,6 +68,18 @@ public enum BranchState { return this == BranchState.DELETED; } + public boolean isPurged() { + return this == BranchState.PURGED; + } + + public boolean isDeleteInProgress() { + return this == BranchState.DELETE_IN_PROGRESS; + } + + public boolean isPurgeInProgress() { + return this == BranchState.PURGE_IN_PROGRESS; + } + public static BranchState getBranchState(int value) { for (BranchState type : values()) { if (type.getValue() == value) { diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java index 6850b017e08..0b4525da217 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java @@ -147,12 +147,14 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { BranchCache cache = caching.getBranchCache(); if (updateRequest.isServerUpdateMessage()) { for (Branch branch : updated) { - if (StorageState.CREATED == branch.getStorageState()) { + if (branch.isCreated()) { branch.setStorageState(StorageState.MODIFIED); } branch.clearDirty(); cache.decache(branch); - cache.cache(branch); + if (!branch.isPurged()) { + cache.cache(branch); + } } } else { cache.storeItems(updated); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java index cd4473b9751..0315687079d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java @@ -279,10 +279,10 @@ public class ChangeArtifactType { private IdJoinQuery populateBranchIdsJoinIdTable() throws OseeDataStoreException, OseeCoreException { IdJoinQuery branchJoin = JoinUtility.createIdJoinQuery(); - // loop through all non-archieved non-deleted + // loop through all non-archieved non-deleted non-purged BranchFilter branchFilter = new BranchFilter(BranchArchivedState.UNARCHIVED); - branchFilter.setNegatedBranchStates(BranchState.DELETED); + branchFilter.setNegatedBranchStates(BranchState.PURGED, BranchState.DELETED); for (Branch branch : BranchManager.getBranches(branchFilter)) { branchJoin.add(branch.getId()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java index 58d14bfd5ae..da4dd7769ac 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/DeleteBranchOperation.java @@ -43,13 +43,23 @@ public class DeleteBranchOperation extends AbstractOperation { ArtifactCache.deCache(this.branch); try { - branch.setBranchState(BranchState.DELETED); + branch.setBranchState(BranchState.DELETE_IN_PROGRESS); branch.setArchived(true); OseeEventManager.kickBranchEvent(this, new BranchEvent(BranchEventType.Deleting, branch.getGuid())); BranchManager.persist(branch); + + branch.setBranchState(BranchState.DELETED); + OseeEventManager.kickBranchEvent(this, new BranchEvent(BranchEventType.Deleted, branch.getGuid())); + BranchManager.persist(branch); } catch (Exception ex) { - branch.setBranchState(originalState); - branch.setArchived(originalArchivedState.isArchived()); + try { + branch.setBranchState(originalState); + branch.setArchived(originalArchivedState.isArchived()); + OseeEventManager.kickBranchEvent(this, new BranchEvent(BranchEventType.StateUpdated, branch.getGuid())); + BranchManager.persist(branch); + } catch (Exception ex2) { + log(ex2); + } throw ex; } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java index fde57220ada..720e886521b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/PurgeBranchHttpRequestOperation.java @@ -15,6 +15,8 @@ import java.util.Map; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.osee.framework.core.data.IOseeBranch; import org.eclipse.osee.framework.core.data.OseeServerContext; +import org.eclipse.osee.framework.core.enums.BranchArchivedState; +import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.CoreTranslatorId; import org.eclipse.osee.framework.core.enums.Function; import org.eclipse.osee.framework.core.enums.StorageState; @@ -48,26 +50,43 @@ public final class PurgeBranchHttpRequestOperation extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws OseeCoreException { - OseeEventManager.kickBranchEvent(getClass(), new BranchEvent(BranchEventType.Purging, branch.getGuid())); - - PurgeBranchRequest requestData = new PurgeBranchRequest(branch.getId(), recursive); Map<String, String> parameters = new HashMap<String, String>(); parameters.put("function", Function.PURGE_BRANCH.name()); + BranchState currentState = branch.getBranchState(); + BranchArchivedState archivedState = branch.getArchiveState(); + ArtifactCache.deCache(branch); - AcquireResult response = - HttpClientMessage.send(OseeServerContext.BRANCH_CONTEXT, parameters, CoreTranslatorId.PURGE_BRANCH_REQUEST, - requestData, null); + branch.setBranchState(BranchState.PURGE_IN_PROGRESS); + branch.setArchived(true); + OseeEventManager.kickBranchEvent(getClass(), new BranchEvent(BranchEventType.Purging, branch.getGuid())); + + AcquireResult response = null; + try { + PurgeBranchRequest requestData = new PurgeBranchRequest(branch.getId(), recursive); + response = + HttpClientMessage.send(OseeServerContext.BRANCH_CONTEXT, parameters, CoreTranslatorId.PURGE_BRANCH_REQUEST, + requestData, null); + } catch (OseeCoreException ex) { + try { + branch.setBranchState(currentState); + branch.setArchived(archivedState.isArchived()); + OseeEventManager.kickBranchEvent(getClass(), + new BranchEvent(BranchEventType.StateUpdated, branch.getGuid())); + } catch (Exception ex2) { + log(ex2); + } + throw ex; + } if (response.wasSuccessful()) { branch.setStorageState(StorageState.PURGED); + branch.setBranchState(BranchState.PURGED); branch.setArchived(true); - - //The access control list could be updated here - BranchManager.decache(branch); + BranchManager.getCache().reloadCache(); OseeEventManager.kickBranchEvent(getClass(), new BranchEvent(BranchEventType.Purged, branch.getGuid())); } } -}
\ No newline at end of file +} diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/BranchRemoteEventHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/BranchRemoteEventHandler.java index 99b2b015c5d..935e9739081 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/BranchRemoteEventHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/handlers/BranchRemoteEventHandler.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.internal.event.handlers; +import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.exception.OseeCoreException; import org.eclipse.osee.framework.core.model.Branch; import org.eclipse.osee.framework.messaging.event.res.msgs.RemoteBranchEvent1; @@ -38,6 +39,7 @@ public class BranchRemoteEventHandler implements EventHandlerRemote<RemoteBranch private void updateBranches(Sender sender, BranchEvent branchEvent) { BranchEventType eventType = branchEvent.getEventType(); + Branch branch = null; try { switch (eventType) { case Committing: @@ -46,18 +48,35 @@ public class BranchRemoteEventHandler implements EventHandlerRemote<RemoteBranch case Purging: return; case Committed: - Branch branch = BranchManager.getBranchByGuid(branchEvent.getBranchGuid()); + branch = BranchManager.getBranchByGuid(branchEvent.getBranchGuid()); Artifact artifact = BranchManager.getAssociatedArtifact(branch); TransactionManager.clearCommitArtifactCacheForAssociatedArtifact(artifact); break; + case Purged: + handleBranchRemoval(BranchState.PURGED, branchEvent.getBranchGuid()); + break; + case Deleted: + handleBranchRemoval(BranchState.DELETED, branchEvent.getBranchGuid()); + break; default: break; } - // TODO Need to update only branch(s) that changed, not refresh all branches cause it will + // Need to update only branch(s) that changed, not refresh all branches cause it will // clear any local flags that have not yet been persisted to the database like DELETED or COMMIT_IN_PROGRESS BranchManager.refreshBranches(); } catch (Exception ex) { EventUtil.eventLog("REM: updateBranches", ex); } } + + private void handleBranchRemoval(BranchState state, String guid) throws OseeCoreException { + if (BranchManager.branchExists(guid)) { + Branch branch = BranchManager.getBranchByGuid(guid); + branch.setBranchState(state); + branch.setArchived(true); + branch.clearDirty(); + BranchManager.decache(branch); + } + } + } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java index 56756276651..a5a0a8d98ef 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java @@ -20,7 +20,6 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; import java.util.logging.Level; - import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -412,6 +411,15 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor case REBASELINED: warningStr = "Branch Rebaselined, Please Close Artifact Explorer."; break; + case DELETE_IN_PROGRESS: + warningStr = "Branch Delete in Progress, Please Close Artifact Explorer."; + break; + case PURGE_IN_PROGRESS: + warningStr = "Branch Purge in Progress, Please Close Artifact Explorer."; + break; + case PURGED: + warningStr = "Branch Purged, Please Close Artifact Explorer."; + break; default: break; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java index 73b22aab8e2..cbbd67dedee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java @@ -137,7 +137,7 @@ public class BranchStateHealthCheck extends DatabaseHealthOperation { branchData.setBranchState(BranchState.CREATED); branchData.setReason("System Root should always be set to created"); } - } else if (state != BranchState.DELETED && state != BranchState.COMMIT_IN_PROGRESS && state != BranchState.REBASELINE_IN_PROGRESS) { + } else if (state == BranchState.CREATED || state == BranchState.MODIFIED || state == BranchState.COMMITTED || state == BranchState.REBASELINED || state == BranchState.CREATION_IN_PROGRESS) { if (BranchType.WORKING.equals(type)) { if (isRebaselined(branchData)) { branchData.setBranchState(BranchState.REBASELINED); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java index b9df98359af..920e7920fe7 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java @@ -49,8 +49,7 @@ public final class MockBranchProvider implements BranchProvider { child3.setBranchType(BranchType.MERGE); child3.setParentBranch(parent); - Branch grandChild1 = new Branch(GUID.create(), "grandChild1", BranchType.MERGE, BranchState.UNKNOWN, false); - grandChild1.setBranchState(BranchState.DELETED); + Branch grandChild1 = new Branch(GUID.create(), "grandChild1", BranchType.MERGE, BranchState.DELETED, false); grandChild1.setArchived(true); grandChild1.setParentBranch(child1); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java index c3f511beaa4..9345030b99d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java @@ -12,6 +12,7 @@ package org.eclipse.osee.orcs.db.internal.callable; import org.eclipse.osee.database.schema.DatabaseTxCallable; +import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.StorageState; import org.eclipse.osee.framework.core.exception.OseeArgumentException; import org.eclipse.osee.framework.core.exception.OseeCoreException; @@ -71,6 +72,7 @@ public class PurgeBranchDatabaseCallable extends DatabaseTxCallable<Branch> { branch.setStorageState(StorageState.PURGED); branchCache.storeItems(branch); + branch.setBranchState(BranchState.PURGED); branch.internalRemovePurgedBranchFromParent(); } return branch; |