1

I would like to tag all existing reports in a project where cases has zip-files attached.

I am thinking in the lines of this (pseudo) example:

Array project = getCasesInProject(project);
foreach (case in project)
{
    Array attachment = getAttachmentsInCase(case);
    foreach(attachment)
    {
        if(attachment.type == zip) addTag("hasZip")
    }
}
flag
My original intention is that I easily want to find cases that has zip files attached. The above is my initial design suggestion. If anyone have alternative methods of processing case attachments it certainly would be interesting to have a look at it. Thanks! – Nicolaj Schweitz Dec 20 2009 at 13:33

1 Answer

0

You'll probably have to loop through the bugs, then the bug events, then the attachments.

Here's a link to the documentation.

<rgAttachments>
<attachment>
<sFileName>Test Word.doc</sFileName> -- name of the attached file
<sURL>default.asp?pg=pgDownload&amp;pgType=pgAttachment&amp;ixBugEvent=756&amp;sPart=2&amp;sTicket=&amp;sFileName=Test%20Word.doc</sURL> -- url to hit to get the contents of the attached file (add on token=<yourtoken>)
</attachment>
</rgAttachments>
link|flag

Your Answer

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