Customize TFS work items part 1

by iatanasov 26. May 2010 07:54

 

<TRANSITION from="In Progress" to="Ready For Test">
          <REASONS>
            <DEFAULTREASON value="Ready for testing" />
          </REASONS>
          <FIELDS>
            <FIELD refname="System.AssignedTo">
                <ALLOWEDVALUES expanditems="true">
                    <LISTITEM value="[project]\QA" />
                </ALLOWEDVALUES>
              <COPY from="value" value="Team member" />
            </FIELD>
          </FIELDS>
          <ACTIONS>
            <ACTION value="Microsoft.VSTS.Actions.Checkin" />
            <ACTION value="Microsoft.TeamSystem.Actions.Checkin" />
          </ACTIONS>
        </TRANSITION>

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

TFS

LINQ IS NULL

by iatanasov 26. February 2008 15:42

category.ParentCategoryId = @parentCategoryId

 or

category.ParentCategoryId = null and this sql didn't return result, because expect category.ParentCategoryId is null.

Then I test another way to delive null value 

 if (parentCategoryId == null)
            {
                var query = from
                                    category in this.productsHelpDataContext.Categories
                            orderby
                                    category.Order ascending
                            where
                                category.ParentCategoryId == null

                            select category;

                return query.Select(category => category);
            }
            else
            {
                var query = from
                                    category in this.productsHelpDataContext.Categories
                            orderby
                                    category.Order ascending
                            where
                                category.ParentCategoryId == parentCategoryId
                            select category;

                return query.Select(category => category);
            }

In other word LINQ to SQL strict follow sql script convention.

Currently rated 3.7 by 6 people

  • Currently 3.666667/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

MS SQL

How to convert sql varchar to sql int list

by iatanasov 29. January 2008 18:51
DECLARE @TEST VARCHAR(30)
SET @TEST = '1,2,3,47, 89, 67'
DECLARE @Current INT


DECLARE @LISTINT TABLE (Number INT)

WHILE (LEN(@TEST) > 0)
BEGIN
    IF (Charindex(',', @TEST) > 0)
    BEGIN
        SET @Current = LEFT(@TEST, Charindex(',', @TEST) - 1)
        
        SET @TEST = RIGHT(@TEST, LEN(@TEST) - Charindex(',', @TEST))
        
    END
    ELSE
    BEGIN
        SET @Current = CAST(@TEST AS INT)
        SET @TEST = NULL
    END

    INSERT INTO @LISTINT VALUES(@Current)
    SET @Current = NULL
END

SELECT Number
FROM @LISTINT

Currently rated 4.0 by 5 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

MS SQL

Powered by BlogEngine.NET 1.1.0.7
Theme by Mads Kristensen

About the author

Ivan Atanasov - web developer
E-mail me Send mail Subscribe Feed

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Pages

    Recent posts

    Recent comments

    Authors

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012 it-coder.com

    Sign in