func (r *GormWorkItemLinkRepository) deleteLink(ctx context.Context, lnk WorkItemLink, suppressorID uuid.UUID) error {
	log.Info(ctx, map[string]interface{}{
		"wil_id": lnk.ID,
	}, "Deleting the work item link")

	tx := r.db.Delete(&lnk)
	if tx.RowsAffected == 0 {
		return errors.NewNotFoundError("work item link", lnk.ID.String())
	}
	if tx.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"wil_id": lnk.ID,
			"err":    tx.Error,
		}, "unable to delete work item link")
		return errors.NewInternalError(tx.Error.Error())
	}
	// save a revision of the deleted work item link
	if err := r.revisionRepo.Create(ctx, suppressorID, RevisionTypeDelete, lnk); err != nil {
		return errs.Wrapf(err, "error while deleting work item")
	}
	return nil
}
// Delete deletes the work item link with the given id
// returns NotFoundError or InternalError
Delete deletes the work item link with the given id
returns NotFoundError or InternalError
// Delete deletes the work item link with the given id // returns NotFoundError or InternalError
func (r *GormWorkItemLinkRepository) deleteLink(ctx context.Context, lnk WorkItemLink, suppressorID uuid.UUID) error {
	log.Info(ctx, map[string]interface{}{
		"wil_id": lnk.ID,
	}, "Deleting the work item link")
	tx := r.db.Delete(&lnk)
	if tx.RowsAffected == 0 {
		return errors.NewNotFoundError("work item link", lnk.ID.String())
	}
	if tx.Error != nil {
		log.Error(ctx, map[string]interface{}{
			"wil_id": lnk.ID,
			"err":    tx.Error,
		}, "unable to delete work item link")
		return errors.NewInternalError(tx.Error.Error())
	}
	if err := r.revisionRepo.Create(ctx, suppressorID, RevisionTypeDelete, lnk); err != nil {
		return errs.Wrapf(err, "error while deleting work item")
	}
	return nil
}
func ( r * GormWorkItemLinkRepository ) deleteLink ( ctx context . Context , lnk WorkItemLink , suppressorID uuid . UUID ) error { log . Info ( ctx , map [ string ] interface { } { " " : lnk . ID , } , " " ) tx := r . db . Delete ( & lnk ) if tx . RowsAffected == 0 { return errors . NewNotFoundError ( " " , lnk . ID . String ( ) ) } if tx . Error != nil { log . Error ( ctx , map [ string ] interface { } { " " : lnk . ID , " " : tx . Error , } , " " ) return errors . NewInternalError ( tx . Error . Error ( ) ) } if err := r . revisionRepo . Create ( ctx , suppressorID , RevisionTypeDelete , lnk ) ; err != nil { return errs . Wrapf ( err , " " ) } return nil }
Delete deletes the work item link with the given id
returns NotFoundError or InternalError
Delete deletes the work item link with the given id returns NotFoundError or InternalError
// save a revision of the deleted work item link