BugNET

Open source issue tracking & project management
| Login

Import Update!

We are currently in transition and have moved our discussions to CodePlex. These forums will remain as reference until we launch of our new site in the upcoming weeks. After that they will be removed.

Thank you for your patience during our transition.

Forums

HomeHomeDevelopment and...Development and...General Develop...General Develop...Fix for issue creation bug in 0.7.942Fix for issue creation bug in 0.7.942
Previous
 
Next
New Post
7/9/2009 4:29 AM
 

Seems that the code is still passing in -1 instead of null values for the @FixedInversionID value simply run the query below to update the stored procedure.

 

ALTER PROCEDURE [dbo].[BugNet_Bug_CreateNewBug]
  @Summary nvarchar(500),
  @Description ntext,
  @ProjectId Int,
  @ComponentId Int,
  @StatusId Int,
  @PriorityId Int,
  @VersionId Int,
  @TypeId Int,
  @ResolutionId Int,
  @AssignedToUserName NVarChar(255),
  @ReporterUserName NVarChar(255),
  @DueDate datetime,
  @FixedInVersionId int,
  @Visibility int,
  @Estimation decimal(4,2)
AS
DECLARE @newIssueId Int
-- Get Reporter UserID
DECLARE @AssignedToUserId    UNIQUEIDENTIFIER
DECLARE @ReporterUserId        UNIQUEIDENTIFIER

SELECT @AssignedToUserId = UserId FROM aspnet_users WHERE Username = @AssignedToUserName
SELECT @ReporterUserId = UserId FROM aspnet_users WHERE Username = @ReporterUserName

if( @FixedInVersionId = -1)
    set @FixedInVersionId = null

    INSERT Bug
    (
        Summary,
        Description,
        ReporterUserId,
        ReportedDate,
        StatusId,
        PriorityId,
        TypeId,
        ComponentId,
        AssignedToUserId,
        ProjectId,
        ResolutionId,
        VersionId,
        LastUpdateUserId,
        LastUpdate,
        DueDate,
        FixedInVersionId,
        Visibility,
        Estimation
    )
    VALUES
    (
        @Summary,
        @Description,
        @ReporterUserId,
        GetDate(),
        @StatusId,
        @PriorityId,
        @TypeId,
        @ComponentId,
        @AssignedToUserId,
        @ProjectId,
        @ResolutionId,
        @VersionId,
        @ReporterUserId,
        GetDate(),
        @DueDate,
        @FixedInVersionId,
        @Visibility,
        @Estimation
    )
RETURN scope_identity()
 

 
New Post
7/9/2009 5:35 PM
 

Thanks for fixing this.

Also for those who are not aware, the estimation hours cannot be greater then or equal to 100. This can be fixed by applying a Regular Expression Validator control to the estimation field with the validation expression equal to ^\d{0,2}(\.\d{0,2})?$

 
Previous
 
Next
HomeHomeDevelopment and...Development and...General Develop...General Develop...Fix for issue creation bug in 0.7.942Fix for issue creation bug in 0.7.942


Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.