4

Is there some way to add a whole list of subcases at once?

I'm using Fogbugz for managing the creation of Web sites. Each time we sign up a new client, I want to be able to create a Case for the site, plus a bunch of subcases for the specific tasks involved in creating the site ... the list of subcases is going to be mostly the same each time. I'd like to be able to simply copy a list of case names into the Subcases box in the parent case's Edit page, but that currently doesn't work.

So, either I'm missing something here, and there is a way to do it, or ... can we have this feature?

flag

3 Answers

2

No, there is not a way to do this in the current product "out of the box." From what I can tell on these forums, its one of the more requested features so hopefully they will add it soon.

That said, duplication can be accomplish through the API. Recently one of our guys wrote a "case duplicator" that we use with some success. It requires the FogBugz C# wrapper: http://www.fogcreek.com/FogBugz/blog/post/C-wrapper-for-the-FogBugz-API.aspx

The following code takes in a Case number and duplicates that case and (optionally) all sub-cases then returns the Case number of the duplicate case:

int CopyCase(int caseNumber, int? parentCaseNumber, bool copySubCases)
    {
        XmlNode caseToCopy = this._FogBugz.XSearch(
            caseNumber.ToString(),
            "sTitle,sProject,sArea,sCategory,sPriority,hrsOrigEst,ixBugChildren,tags").Item(0);

        Dictionary<string, string> newCaseArgs = new Dictionary<string, string>(8);
        if (parentCaseNumber.HasValue)
            newCaseArgs.Add("ixBugParent", parentCaseNumber.Value.ToString());

        //TODO: tags (http://www.fogcreek.com/FogBugz/docs/70/topics/advanced/API.html)

        newCaseArgs.Add("sTitle", caseToCopy["sTitle"].InnerText);
        newCaseArgs.Add("sProject", caseToCopy["sProject"].InnerText);
        newCaseArgs.Add("sArea", caseToCopy["sArea"].InnerText);
        newCaseArgs.Add("sCategory", caseToCopy["sCategory"].InnerText);
        newCaseArgs.Add("sPriority", caseToCopy["sPriority"].InnerText);
        newCaseArgs.Add("hrsCurrEst", caseToCopy["hrsOrigEst"].InnerText);


        XmlDocument resultXml = this._FogBugz.XCmd("new", newCaseArgs);
        int result = int.Parse(resultXml["response"]["case"].Attributes["ixBug"].Value);

        if (copySubCases)
        {
            XmlNode subCaseNumbersNode = caseToCopy["ixBugChildren"];
            if (subCaseNumbersNode != null)
            {
                string[] subCaseNumbers = subCaseNumbersNode.InnerText.Split(",".ToCharArray());
                foreach (string subCaseNumber in subCaseNumbers)
                {
                    if (!string.IsNullOrEmpty(subCaseNumber))
                        this.CopyCase(int.Parse(subCaseNumber), result, copySubCases);
                }

            }
        }

        return result;
    }
link|flag
2

We use a customization script for this. it works for us, and also solves the problem about accumulating time by type of activity (i.e. how many QA hours, compared to developers, or to BA or doing reviews).

One inbound email can result in changes to multiple areas of programming. We have a process, where we create one sub-case per feature or area. within each 'feature' sub-case, we create sub-cases for BA, design, development, review, qa test runs and implementation. All the development time rolls up into the development sub-cases ,and marked with an area and category as such.

we added some js to create all the sub-cases according to our process. it uses the API and works really well. being new to Fogbugz as we were, it was costly to make; and I wish this or something similar was just part of the product.

It was originally sparked by my questions to FogCreek about qualifying time during timesheet entry e.g. I spent 2 hours doing xxxx kind of activity (e.g. dev, reviews, qa testing etc...). that would have simplified this whole thing for us.

if you are interested, I could show it working to you (.mp4?), but to post the code I would have to clean it up a bit first. i.e. have time

Mike

Here's a link to the .mp4 click here

link|flag
0

In other enterprise software such as Maximo, creating a template list of subcases would be the same as assigning a "Job Plan" for a "Work Order".

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.