-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BugFix - 36130 Inactive activity becomes active after adding to SR #3486
BugFix - 36130 Inactive activity becomes active after adding to SR #3486
Conversation
…hen add the group to shared repository and reload the solution. Inactive activity becomes active. RC: When we mark an activity as linked, then it's Active property is overriden with LinkedActive property. Fix: After marking the activity as linked, change the Active state of Activity back to what it was previously.
WalkthroughThe recent update focuses on enhancing the handling of activities within a business flow. Specifically, it adjusts how an activity's link status is managed, ensuring that its active state is preserved even as its type and parent identification are updated. This refinement aims to maintain the integrity of activity states during modifications, optimizing the workflow management process. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1889-1892]
Optimize the UnMarkActivityAsLink
method to avoid redundant retrieval of the same activity object.
- Activities.FirstOrDefault(act => act.Guid == activityGuid).Type = eSharedItemType.Regular;
- Activities.FirstOrDefault(act => act.Guid == activityGuid).ParentGuid = parentGuid;
+ var activity = Activities.FirstOrDefault(act => act.Guid == activityGuid);
+ if (activity != null)
+ {
+ activity.Type = eSharedItemType.Regular;
+ activity.ParentGuid = parentGuid;
+ }
…sActiveAfterAddingToSR
Thank you for your contribution.
Before submitting this PR, please make sure:
Summary by CodeRabbit