Пример #1
0
 // Constructors
 internal QField(int fieldId, string value, FieldType type, IQRecord record)
 {
     FieldId = fieldId;
     Type    = type;
     Record  = record; // needs to be before Value.
     Value   = value;
 }
Пример #2
0
        public void UntestedTest()
        {
            InitConnection();
            List <GrantedAppsInfo> appsLst = qbApp.GrantedDBs();
            IQTable testTab = null;

            foreach (var app in appsLst)
            {
                foreach (var tab in app.GrantedTables)
                {
                    if (tab.Name == "APITestApp: APIUntested")
                    {
                        testTab = qbApp.GetTable(tab.Dbid);
                        break;
                    }
                }

                if (testTab != null)
                {
                    break;
                }
            }
            testTab.Query();
            IQRecord rec       = testTab.Records[0];
            var      htmlStr   = rec["RichText"];
            var      multiText = rec["MultiLine"];
            var      mselect   = rec["MultiSelect"];
        }
Пример #3
0
 // Constructors
 internal QField(int fieldId, string value, FieldType type, IQRecord record)
 {
     FieldId = fieldId;
     Type = type;
     Record = record; // needs to be before Value.
     Value = value;
 }
Пример #4
0
        public void LargeDeleteHandling()
        {
            InitConnection();
            List <GrantedAppsInfo> appsLst = qbApp.GrantedDBs();

            foreach (var app in appsLst)
            {
                foreach (var tab in app.GrantedTables)
                {
                    if (tab.Name == "APITestApp: APIBigDelTestTable")
                    {
                        IQTable tbl = qbApp.GetTable(tab.Dbid);
                        qbApp.DeleteTable(tbl);
                        break;
                    }
                }
            }
            IQTable testTable = qbApp.NewTable("APIBigDelTestTable", "dummyRec");

            testTable.Columns.Add(new QColumn("NumberValue", FieldType.@float));
            testTable.Columns.Add(new QColumn("TextValue", FieldType.text));

            for (int i = 0; i < 500; i++)
            {
                IQRecord newRec = testTable.NewRecord();
                newRec["NumberValue"] = i;
                newRec["TextValue"]   = "Record " + i;
                testTable.Records.Add(newRec);
            }
            testTable.AcceptChanges();

            List <int> delList = new List <int>
            {
                5,
                6,
                7,
                8,
                9,
                10
            };
            Random rndSrc = new Random();

            while (delList.Count < 120)
            {
                int addVal = rndSrc.Next(500);
                if (!delList.Contains(addVal))
                {
                    delList.Add(addVal);
                }
            }
            foreach (int i in delList.OrderByDescending(x => x))
            {
                testTable.Records.RemoveAt(i);
            }
            testTable.AcceptChanges();

            testTable.Query();
            Assert.AreEqual(testTable.Records.Count, 380, "Big Record deletion fails");
        }
Пример #5
0
 public bool Equals(IQRecord record)
 {
     if (ReferenceEquals(null, record))
     {
         return(false);
     }
     if (ReferenceEquals(this, record))
     {
         return(true);
     }
     return(record.RecordId == RecordId);
 }
Пример #6
0
        public int GetUserIDByUserName(String userName)
        {
            int uID = -1;

            table = application.GetTable(GetTableID("Users"));
            table.Query();
            IQRecord tempUser = table.Records.Where(x => x[1] == userName).SingleOrDefault();

            if (tempUser != null)
            {
                Int32.TryParse(tempUser[0], out uID);
            }
            return(uID);
        }
Пример #7
0
        public Pitch GrabPitch(int pitchID)
        {
            Pitch pitch = null;

            table = application.GetTable(GetTableID("Pitches"));
            table.Query();
            IQRecord pitchRecord = table.Records.Where(x => x[0] == pitchID.ToString()).SingleOrDefault();

            if (pitchRecord != null)
            {
                pitch = new Pitch(pitchID, pitchRecord[1], pitchRecord[2]);
            }
            return(pitch);
        }
 internal QField(int fieldId, object value, FieldType type, IQRecord record, IQColumn column,  bool QBinternal)
 {
     FieldId = fieldId;
     Type = type;
     Record = record; // needs to be before Value.
     Column = column;
     if (QBinternal)
     {
         QBValue = (string)value;
     }
     else
     {
         Value = value;
     }
 }
Пример #9
0
        public void TestDuration()
        {
            InitConnection();

            IQTable testTable = qbApp.GetTable("bnrmadvx3");

            TimeSpan tstVal = new TimeSpan(1, 23, 55, 11);
            IQRecord newRec = testTable.NewRecord();

            newRec["DurationTest"] = tstVal;
            testTable.Records.Add(newRec);
            testTable.AcceptChanges();
            testTable.Query();
            IQRecord loopRec = testTable.Records[0];

            Assert.AreEqual(tstVal, loopRec["DurationTest"], "Duration doesn't round trip");
        }
Пример #10
0
        /*
        * Sprintly POST API for creating or updating items:
        *
        * POST
        Create a new item for the given product. This endpoint allows you to create new items within your products. It will return the newly created item on success.

        Arguments:
        number (string, optional) The Sprintly item number to update; if left blank or empty then it creates a new item
        type (string, required) What kind of item you'd like to create. Only story, task, defect, and test are valid values.
        title (string, required for task, defect, and test) The title of item.
        who (string, required for story) The who part of the story.
        what (string, required for story) The what part of the story.
        why (string, required for story) The why part of the story.
        description (string) A description detailing the item. Markdown is allowed.
        score (string) The initial score of the document. Only ~, S, M, L, and XL are valid values.
        status (string): Status of the new item. Default is backlog. Only backlog, in-progress, completed, and accepted are valid values.
        assigned_to (integer) The user's id which the item should assigned to.
        tags (string) A comma separated list of tags to assign to the item (e.g. foo,bar,some other tag,baz).
        */
        public static string CreateUpdateSprintlyItem(string sprint, IQRecord record, string id)
        {
            Dictionary<string,string> item = new Dictionary<string,string>();
             if (!String.IsNullOrEmpty(id)) item["id"] = id;
             //item["qbid"] = record["Record ID#"];
             //item["qbtype"] = record["Type"];
             item["type"] = ConvertToSprintlyType(record["Type"], record["Change Type"]);
             item["title"] = record["Description"];
             //item["who"] = String.Empty;
             //item["what"] = String.Empty;
             //item["why"] = String.Empty;
             item["description"] = record["Details"];
             item["score"] = ConvertToSprintlyScore(record["Effort"]);
             item["status"] = ConvertToSprintlyStatus(record["Status"]);
             item["assigned_to"] = ConvertToSprintlyAssignedTo(record["Assigned"]);
             item["tags"] = ConvertToSprintlyTags(sprint,record);
             if (String.IsNullOrEmpty(item["tags"])) return string.Empty; // do not add an item with no tags
             foreach (var keyvalue in item) {
            Console.WriteLine("Item[{0}] = {1}", keyvalue.Key,keyvalue.Value);
             }
             Console.WriteLine(String.Empty);

             String createItemRequestString = String.Format(
              "/api/products/12011/items.json" +
              "?title={0}"
             /*+ "&who={2}"
             + "&what={3}"
             + "&why={4}"*/
             + "&description={1}"
             + "&score={2}"
             + "&status={3}"
             + "&assigned_to={4}"
             + "&tags={5}"
             , PercentEncodeRfc3986(item["title"]), /*item["who"], item["what"], item["why"],*/ PercentEncodeRfc3986(item["description"]),
               item["score"], item["status"], PercentEncodeRfc3986(item["assigned_to"]), PercentEncodeRfc3986(item["tags"]));
             if (!String.IsNullOrEmpty(id))
             {
             createItemRequestString = createItemRequestString.Replace("items.json", "items/" + id + ".json");
             }
             else
             {
             createItemRequestString += "&type=" + item["type"];
             }
             return SprintlyAPIRequest("POST",createItemRequestString);
        }
Пример #11
0
        public Recording GetRecording(int userID, int RecordingID)
        {
            Recording record = null;

            table = application.GetTable(GetTableID("Recordings"));
            table.Query();
            IQRecord recording = table.Records.Where(x => x[1] == userID.ToString() && x[0] == RecordingID.ToString()).SingleOrDefault();

            recording.DownloadFile("Recording", HttpContext.Current.Server.MapPath("/DataHolding/"), 1);
            FileStream fs = File.Create(HttpContext.Current.Server.MapPath("/DataHolding/") + recording[3]);
            int        id;

            if (Int32.TryParse(recording[0], out id))
            {
                record = new Recording(id, recording[2]);
            }
            return(record);
        }
Пример #12
0
 internal QField(int fieldId, object value, FieldType type, IQRecord record, IQColumn column, bool QBinternal)
 {
     FieldId = fieldId;
     Type    = type;
     Record  = record; // needs to be before Value.
     Column  = column;
     if (QBinternal)
     {
         QBValue = (string)value;
     }
     else
     {
         Value = value;
     }
     if (type == FieldType.text && value != null)
     {
         UncleanText = CSVUncleanRegEx.IsMatch((string)value);
     }
     else
     {
         UncleanText = false;
     }
 }
Пример #13
0
        public bool CreateUser(String userName, String password)
        {
            table = application.GetTable(GetTableID("Users"));
            //check the passwords before calling method
            table.Query();
            bool     userCreated = false;
            IQRecord tempUser    = table.Records.Where(x => x[1] == userName).SingleOrDefault();

            if (tempUser == null)
            {
                tempUser    = table.NewRecord();
                tempUser[0] = curUserID.ToString();
                tempUser[1] = userName;
                tempUser[2] = password;
                table.Records.Add(tempUser);
                table.AcceptChanges();
                userCreated = true;
            }
            else
            {
                //Error username exists
            }
            return(userCreated);
        }
Пример #14
0
        public bool SignIn(String userName, String password)
        {
            table = application.GetTable(GetTableID("Users"));
            table.Query();
            bool     userLoggedIn = false;
            IQRecord prevUser     = table.Records.Where(x => x[1] == userName).SingleOrDefault();

            if (prevUser != null)
            {
                if (prevUser[2] == password)
                {
                    userLoggedIn = true;
                }
                else
                {
                    //User found wrong password
                }
            }
            else
            {
                //User not found, make sure that person entered their name correctly
            }
            return(userLoggedIn);
        }
Пример #15
0
        public static string GetSprintlyItemByTags(string tags, IQRecord record)
        {
            String getItemRequestString = String.Format("/api/products/12011/items.json?tags={0}&type={1}&status=backlog,in-progress,completed,accepted",
            PercentEncodeRfc3986(tags),
            ConvertToSprintlyType(record["Type"], record["Change Type"]));

             string jsonResponse = SprintlyAPIRequest("GET",getItemRequestString);
             if (String.IsNullOrEmpty(jsonResponse)) return String.Empty;
             // TODO: sort of a hack to get the Sprintly Item number. Refactor to serialize JSON to C# Item and use JsonConvert.DeserializeObject<Item>(json);
             int ix = jsonResponse.IndexOf("\"number\":") + 9;
             if (ix == -1) return String.Empty;
             string id = jsonResponse.Substring(ix);
             string[] s = id.Split(',');
             id = s[0];
             //Console.WriteLine("******* Id: " + id);
             return id;
        }
 // Constructors
 internal QField(int fieldId, object value, FieldType type, IQRecord record, IQColumn column)
     : this(fieldId, value, type, record, column, false)
 {
 }
Пример #17
0
        public void BasicCreationAndRoundTripTest()
        {
            InitConnection();
            List <GrantedAppsInfo> appsLst = qbApp.GrantedDBs();

            foreach (var app in appsLst)
            {
                foreach (var tab in app.GrantedTables)
                {
                    if (tab.Name == "APITestApp: APITestTable")
                    {
                        IQTable tbl = qbApp.GetTable(tab.Dbid);
                        qbApp.DeleteTable(tbl);
                        break;
                    }
                }
            }

            IQTable testTable = qbApp.NewTable("APITestTable", "dummyRec");

            testTable.Columns.Add(new QColumn("TextTest", FieldType.text));
            testTable.Columns.Add(new QColumn("FloatTest", FieldType.@float));
            testTable.Columns.Add(new QColumn("CheckboxTest", FieldType.checkbox));
            testTable.Columns.Add(new QColumn("DateTest", FieldType.date));
            testTable.Columns.Add(new QColumn("TimeStampTest", FieldType.timestamp));
            testTable.Columns.Add(new QColumn("TimeOfDayTest", FieldType.timeofday));
            testTable.Columns.Add(new QColumn("DurationTest", FieldType.duration));
            testTable.Columns.Add(new QColumn("CurrencyTest", FieldType.currency));
            testTable.Columns.Add(new QColumn("PercentTest", FieldType.percent));
            testTable.Columns.Add(new QColumn("EmailTest", FieldType.email));
            testTable.Columns.Add(new QColumn("PhoneTest", FieldType.phone));
            testTable.Columns.Add(new QColumn("UrlTest", FieldType.url));
            testTable.Columns.Add(new QColumn("MultiTextTest", FieldType.multitext));
            testTable.Columns.Add(new QColumn("RatingTest", FieldType.rating));
            testTable.Columns.Add(new QColumn("FileTest", FieldType.file));

            foreach (string val in multiTextOptions)
            {
                testTable.Columns["MultiTextTest"].AddChoice(val);
            }

            TestRecord exemplar = new TestRecord();

            exemplar.SetupTestValues();

            IQRecord inRec = testTable.NewRecord();

            inRec["TextTest"]      = exemplar.textVal;
            inRec["FloatTest"]     = exemplar.floatVal;
            inRec["CheckboxTest"]  = exemplar.checkboxVal;
            inRec["DateTest"]      = exemplar.dateVal;
            inRec["TimeStampTest"] = exemplar.timeStampVal;
            inRec["TimeOfDayTest"] = exemplar.timeOfDayVal;
            inRec["DurationTest"]  = exemplar.durationVal;
            inRec["CurrencyTest"]  = exemplar.currencyVal;
            inRec["PercentTest"]   = exemplar.percentVal;
            inRec["EmailTest"]     = exemplar.emailVal;
            inRec["PhoneTest"]     = exemplar.phoneVal;
            inRec["UrlTest"]       = exemplar.urlVal;
            inRec["MultiTextTest"] = exemplar.multiTextVal;
            inRec["RatingTest"]    = exemplar.ratingVal;

            Assert.AreEqual(exemplar.textVal, inRec["TextTest"], "Strings setter fails");
            Assert.AreEqual(exemplar.floatVal, inRec["FloatTest"], "Floats setter fails");
            Assert.AreEqual(exemplar.checkboxVal, inRec["CheckboxTest"], "Checkboxes setter fails");
            Assert.AreEqual(exemplar.dateVal, inRec["DateTest"], "Dates setter fails");
            Assert.AreEqual(exemplar.timeStampVal, inRec["TimeStampTest"], "TimeStamps setter fails");
            Assert.AreEqual(exemplar.timeOfDayVal, inRec["TimeOfDayTest"], "TimeOfDays setter fails");
            Assert.AreEqual(exemplar.durationVal, inRec["DurationTest"], "Durations setter fails");
            Assert.AreEqual(exemplar.currencyVal, inRec["CurrencyTest"], "Currency setter fails");
            Assert.AreEqual(exemplar.percentVal, inRec["PercentTest"], "Percent setter fails");
            Assert.AreEqual(exemplar.emailVal, inRec["EmailTest"], "Email setter fails");
            Assert.AreEqual(exemplar.phoneVal, inRec["PhoneTest"], "Phone setter fails");
            Assert.AreEqual(exemplar.urlVal, inRec["UrlTest"], "Url setter fails");
            Assert.AreEqual(exemplar.multiTextVal, inRec["MultiTextTest"], "MultiTextSetter fails");
            Assert.AreEqual(exemplar.ratingVal, inRec["RatingTest"], "RatingSetter fails");
            testTable.Records.Add(inRec);
            testTable.AcceptChanges();

            Assert.AreEqual(exemplar.textVal, inRec["TextTest"], "Strings wrong post upload");
            Assert.AreEqual(exemplar.floatVal, inRec["FloatTest"], "Floats wrong post upload");
            Assert.AreEqual(exemplar.checkboxVal, inRec["CheckboxTest"], "Checkboxes wrong post upload");
            Assert.AreEqual(exemplar.dateVal, inRec["DateTest"], "Dates wrong post upload");
            Assert.AreEqual(exemplar.timeStampVal, inRec["TimeStampTest"], "TimeStamps wrong post upload");
            Assert.AreEqual(exemplar.timeOfDayVal, inRec["TimeOfDayTest"], "TimeOfDays wrong post upload");
            Assert.AreEqual(exemplar.durationVal, inRec["DurationTest"], "Durations wrong post upload");
            Assert.AreEqual(exemplar.currencyVal, inRec["CurrencyTest"], "Currency wrong post upload");
            Assert.AreEqual(exemplar.percentVal, inRec["PercentTest"], "Percent wrong post upload");
            Assert.AreEqual(exemplar.emailVal, inRec["EmailTest"], "Email wrong post upload");
            Assert.AreEqual(exemplar.phoneVal, inRec["PhoneTest"], "Phone wrong post upload");
            Assert.AreEqual(exemplar.urlVal, inRec["UrlTest"], "Url wrong post upload");
            Assert.IsTrue(exemplar.multiTextVal.SetEquals((HashSet <int>)inRec["MultiTextTest"]), "MultiText wrong post upload");
            Assert.AreEqual(exemplar.ratingVal, inRec["RatingTest"], "Rating wrong post upload");
            testTable.Records.Clear();
            testTable.Query();

            IQRecord outRec = testTable.Records[0];

            Assert.AreEqual(exemplar.textVal, outRec["TextTest"], "Strings roundtrip fail");
            Assert.AreEqual(exemplar.floatVal, outRec["FloatTest"], "Floats roundtrip fail");
            Assert.AreEqual(exemplar.checkboxVal, outRec["CheckboxTest"], "Checkboxes roundtrip fail");
            Assert.AreEqual(exemplar.dateVal, outRec["DateTest"], "Dates roundtrip fail");
            Assert.AreEqual(exemplar.timeStampVal, outRec["TimeStampTest"], "TimeStamps roundtrip fail");
            Assert.AreEqual(exemplar.timeOfDayVal, outRec["TimeOfDayTest"], "TimeOfDays roundtrip fail");
            Assert.AreEqual(exemplar.durationVal, outRec["DurationTest"], "Durations roundtrip fail");
            Assert.AreEqual(exemplar.currencyVal, outRec["CurrencyTest"], "Currencies roundtrip fail");
            Assert.AreEqual(exemplar.percentVal, outRec["PercentTest"], "Percents roundtrip fail");
            Assert.AreEqual(exemplar.emailVal, outRec["EmailTest"], "Emails roundtrip fail");
            Assert.AreEqual(exemplar.phoneVal, outRec["PhoneTest"], "Phones roundtrip fail");
            Assert.AreEqual(exemplar.urlVal, outRec["UrlTest"], "Url roundtrip fail");
            Assert.IsTrue(exemplar.multiTextVal.SetEquals((HashSet <int>)outRec["MultiTextTest"]), "MultiText roundtrip fail");
            Assert.AreEqual(exemplar.ratingVal, outRec["RatingTest"], "Rating roundtrip fail");

            exemplar.Setup2ndValues();
            outRec["TextTest"]      = exemplar.textVal;
            outRec["FloatTest"]     = exemplar.floatVal;
            outRec["CheckboxTest"]  = exemplar.checkboxVal;
            outRec["DateTest"]      = exemplar.dateVal;
            outRec["TimeStampTest"] = exemplar.timeStampVal;
            outRec["TimeOfDayTest"] = exemplar.timeOfDayVal;
            outRec["DurationTest"]  = exemplar.durationVal;
            outRec["CurrencyTest"]  = exemplar.currencyVal;
            outRec["PercentTest"]   = exemplar.percentVal;
            outRec["EmailTest"]     = exemplar.emailVal;
            outRec["PhoneTest"]     = exemplar.phoneVal;
            outRec["UrlTest"]       = exemplar.urlVal;
            outRec["MultiTextTest"] = exemplar.multiTextVal;
            outRec["RatingTest"]    = exemplar.ratingVal;

            testTable.AcceptChanges();
            testTable.Query();

            IQRecord outRec2 = testTable.Records[0];

            Assert.AreEqual(exemplar.textVal, outRec2["TextTest"], "Strings update fail");
            Assert.AreEqual(exemplar.floatVal, outRec2["FloatTest"], "Floats update fail");
            Assert.AreEqual(exemplar.checkboxVal, outRec2["CheckboxTest"], "Checkboxes update fail");
            Assert.AreEqual(exemplar.dateVal, outRec2["DateTest"], "Dates update fail");
            Assert.AreEqual(exemplar.timeStampVal, outRec2["TimeStampTest"], "TimeStamps update fail");
            Assert.AreEqual(exemplar.timeOfDayVal, outRec2["TimeOfDayTest"], "TimeOfDays update fail");
            Assert.AreEqual(exemplar.durationVal, outRec2["DurationTest"], "Durations update fail");
            Assert.AreEqual(exemplar.currencyVal, outRec2["CurrencyTest"], "Currencies update fail");
            Assert.AreEqual(exemplar.percentVal, outRec2["PercentTest"], "Percents update fail");
            Assert.AreEqual(exemplar.emailVal, outRec2["EmailTest"], "Emails update fail");
            Assert.AreEqual(exemplar.phoneVal, outRec2["PhoneTest"], "Phones update fail");
            Assert.AreEqual(exemplar.urlVal, outRec2["UrlTest"], "Url update fail");
            Assert.IsTrue(exemplar.multiTextVal.SetEquals((HashSet <int>)outRec2["MultiTextTest"]), "MultiText update fail");
            Assert.AreEqual(exemplar.ratingVal, outRec2["RatingTest"], "Rating update fail");
        }
Пример #18
0
        public void DeletionTest()
        {
            InitConnection();
            List <GrantedAppsInfo> appsLst = qbApp.GrantedDBs();

            foreach (var app in appsLst)
            {
                foreach (var tab in app.GrantedTables)
                {
                    if (tab.Name == "APITestApp: APIDelTestTable")
                    {
                        IQTable tbl = qbApp.GetTable(tab.Dbid);
                        qbApp.DeleteTable(tbl);
                        break;
                    }
                }
            }
            IQTable testTable = qbApp.NewTable("APIDelTestTable", "dummyRec");

            testTable.Columns.Add(new QColumn("NumberValue", FieldType.@float));
            testTable.Columns.Add(new QColumn("TextValue", FieldType.text));

            IQRecord newRec = testTable.NewRecord();

            newRec["NumberValue"] = 0;
            newRec["TextValue"]   = "Zeroeth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 1;
            newRec["TextValue"]   = "First";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 2;
            newRec["TextValue"]   = "Second";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 3;
            newRec["TextValue"]   = "Third";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 4;
            newRec["TextValue"]   = "Fourth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 5;
            newRec["TextValue"]   = "Fifth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 6;
            newRec["TextValue"]   = "Sixth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 7;
            newRec["TextValue"]   = "Seventh";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 8;
            newRec["TextValue"]   = "Eighth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 9;
            newRec["TextValue"]   = "Ninth";
            testTable.Records.Add(newRec);
            newRec = testTable.NewRecord();
            newRec["NumberValue"] = 10;
            newRec["TextValue"]   = "Tenth";
            testTable.Records.Add(newRec);
            testTable.AcceptChanges();

            testTable.Records.RemoveAt(10);
            testTable.Records.RemoveAt(8);
            testTable.Records.RemoveAt(7);
            testTable.Records.RemoveAt(6);
            testTable.Records.RemoveAt(3);
            testTable.Records.RemoveAt(1);
            testTable.AcceptChanges();

            testTable.Query();
            Assert.AreEqual(testTable.Records.Count, 5, "Record deletion fails");
        }
Пример #19
0
 // Constructors
 internal QField(int fieldId, object value, FieldType type, IQRecord record, IQColumn column) : this(fieldId, value, type, record, column, false)
 {
 }
Пример #20
0
 // Sprintly tags (string) A comma separated list of tags to assign to the item (e.g. foo,bar,some other tag,baz).
 private static string ConvertToSprintlyTags(string sprint, IQRecord record)
 {
     string tags = String.Format("{0},QB#{1}", sprint, record["Record ID#"]);   // tag with the QB Issue # for auto-sync
      if (!String.IsNullOrEmpty(record["Product Area"])) tags += String.Format(",{0}", record["Product Area"]);
      if (!String.IsNullOrEmpty(record["Priority"])) tags += String.Format(",{0}", record["Priority"]);
      if (record["Change Type"] == "Bug") tags += String.Format(",S{0}", record["Severity"]);
      if (!String.IsNullOrEmpty(record["Resolution"])) tags += String.Format(",{0}", record["Resolution"]);
      return tags.ToLower();
 }
Пример #21
0
 public bool Equals(IQRecord record)
 {
     if (ReferenceEquals(null, record)) return false;
     if (ReferenceEquals(this, record)) return true;
     return record.RecordId == RecordId;
 }