Skip to content

Commit

Permalink
Merge pull request #3486 from Ginger-Automation/BugFix/36130-Inactive…
Browse files Browse the repository at this point in the history
…ActivityBecomesActiveAfterAddingToSR

BugFix - 36130 Inactive activity becomes active after adding to SR
  • Loading branch information
Maheshkale447 authored Feb 13, 2024
2 parents ed02882 + 3715cf3 commit 284ee1c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1871,8 +1871,11 @@ public bool MarkActivityAsLink(Guid activityGuid, Guid parentGuid)
{
if (Activities.Any(act => act.Guid == activityGuid))
{
Activities.FirstOrDefault(act => act.Guid == activityGuid).Type = eSharedItemType.Link;
Activities.FirstOrDefault(act => act.Guid == activityGuid).ParentGuid = parentGuid;
Activity activity = Activities.First(a => a.Guid == activityGuid);
bool wasPreviouslyActive = activity.Active;
activity.Type = eSharedItemType.Link;
activity.Active = wasPreviouslyActive;
activity.ParentGuid = parentGuid;
return true;
}
return false;
Expand Down

0 comments on commit 284ee1c

Please sign in to comment.