Skip to content

Dirt/pm 33527/multi delete task types#7910

Draft
prograhamming wants to merge 1 commit into
dirt/pm-33527/server-db-combinedfrom
dirt/pm-33527/multi-delete-task-types
Draft

Dirt/pm 33527/multi delete task types#7910
prograhamming wants to merge 1 commit into
dirt/pm-33527/server-db-combinedfrom
dirt/pm-33527/multi-delete-task-types

Conversation

@prograhamming

Copy link
Copy Markdown
Contributor

🎟️ Tracking

📔 Objective

📸 Screenshots

Comment on lines +321 to +332
foreach (var deleteTaskType in deleteTaskTypes)
{
var deleteTask = new Dirt.Models.OrganizationDeleteTask
{
OrganizationId = organization.Id,
TaskType = deleteTaskType,
CreationDate = creationDate,
RevisionDate = creationDate,
};
deleteTask.SetNewId();
await dbContext.OrganizationDeleteTasks.AddAsync(deleteTask);
}

namespace Bit.Infrastructure.EntityFramework.Dirt.Models;

public class OrganizationDeleteTask : Core.Dirt.Entities.OrganizationDeleteTask
@prograhamming prograhamming changed the base branch from main to dirt/pm-33527/server-db-combined July 1, 2026 16:33
Comment on lines +18 to +21
@OrganizationDeleteTaskId UNIQUEIDENTIFIER = NULL,
@OrganizationDeleteTaskType TINYINT = NULL,
@OrganizationDeleteTaskCreationDate DATETIME2(7) = NULL,
@OrganizationDeleteTasks [dbo].[OrganizationDeleteTaskArray] READONLY

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Should @OrganizationDeleteTasks argument default to NULL?

⚠️ Remove @OrganizationDeleteTaskId, @OrganizationDeleteTaskType, @OrganizationDeleteTaskCreationDate arguments and usage since they are replaced by @OrganizationDeleteTasks

END
GO

CREATE OR ALTER PROCEDURE [dbo].[Organization_DeleteById]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Update existing migrations and sql scripts from #7783 rather than creating new ones since those have not been merged into main yet

Comment on lines +203 to +206
-- Legacy single-task path. Retained so callers still running the previous server
-- version keep working during a rolling deployment; safe to remove once fully rolled.
ELSE IF @OrganizationDeleteTaskId IS NOT NULL
BEGIN

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Remove if statement since @OrganizationDeleteTasks replaces @OrganizationDeleteTaskId

Comment on lines +188 to 191
-- Legacy single-task path. Retained so callers still running the previous server
-- version keep working during a rolling deployment; safe to remove once fully rolled.
ELSE IF @OrganizationDeleteTaskId IS NOT NULL
BEGIN

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Remove if statement since @OrganizationDeleteTasks replaces @OrganizationDeleteTaskId usage

Comment on lines 3 to +6
@OrganizationDeleteTaskId UNIQUEIDENTIFIER = NULL,
@OrganizationDeleteTaskType TINYINT = NULL,
@OrganizationDeleteTaskCreationDate DATETIME2(7) = NULL
@OrganizationDeleteTaskCreationDate DATETIME2(7) = NULL,
@OrganizationDeleteTasks [dbo].[OrganizationDeleteTaskArray] READONLY

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Remove the three single task arguments in preference of the one multiple tasks argument

❓ Should @OrganizationDeleteTasks default to NULL


private async Task DeleteInternalAsync(Organization organization, OrganizationDeleteTaskType? taskType)
private async Task DeleteInternalAsync(Organization organization,
IEnumerable<OrganizationDeleteTaskType> taskTypes)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Can/do we want to keep taskTypes optional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants