VirtualBox

Ignore:
Timestamp:
Jun 3, 2016 4:40:06 PM (9 years ago)
Author:
vboxsync
Message:

Fetch and show all failures reasons for a test in the main listing. The SQL is getting uglier and uglier...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuitestresult.py

    r61424 r61453  
    838838
    839839        # Reason:
    840         oReason = None;
    841         #assert (oEntry.oFailureReason is None) == (oEntry.tsFailureReasonAssigned is None);
    842         if oEntry.oFailureReason is not None:
    843             sReasonTitle  = 'Reason:  \t%s\n' % ( oEntry.oFailureReason.sShort, );
    844             sReasonTitle += 'Category:\t%s\n' % ( oEntry.oFailureReason.oCategory.sShort, );
    845             sReasonTitle += 'Assigned:\t%s\n' % ( self.formatTsShort(oEntry.tsFailureReasonAssigned), );
    846             sReasonTitle += 'By User: \t%s\n' % ( oEntry.oFailureReasonAssigner.sUsername, );
    847             if oEntry.sFailureReasonComment is not None and len(oEntry.sFailureReasonComment) > 0:
    848                 sReasonTitle += 'Comment: \t%s\n' % ( oEntry.sFailureReasonComment, );
    849             if oEntry.oFailureReason.iTicket is not None and oEntry.oFailureReason.iTicket > 0:
    850                 sReasonTitle += 'xTracker:\t#%s\n' % ( oEntry.oFailureReason.iTicket, );
    851             for i, sUrl in enumerate(oEntry.oFailureReason.asUrls):
     840        aoReasons = [];
     841        for oIt in oEntry.aoFailureReasons:
     842            sReasonTitle  = 'Reason:  \t%s\n' % ( oIt.oFailureReason.sShort, );
     843            sReasonTitle += 'Category:\t%s\n' % ( oIt.oFailureReason.oCategory.sShort, );
     844            sReasonTitle += 'Assigned:\t%s\n' % ( self.formatTsShort(oIt.tsFailureReasonAssigned), );
     845            sReasonTitle += 'By User: \t%s\n' % ( oIt.oFailureReasonAssigner.sUsername, );
     846            if oIt.sFailureReasonComment is not None and len(oIt.sFailureReasonComment) > 0:
     847                sReasonTitle += 'Comment: \t%s\n' % ( oIt.sFailureReasonComment, );
     848            if oIt.oFailureReason.iTicket is not None and oIt.oFailureReason.iTicket > 0:
     849                sReasonTitle += 'xTracker:\t#%s\n' % ( oIt.oFailureReason.iTicket, );
     850            for i, sUrl in enumerate(oIt.oFailureReason.asUrls):
    852851                sUrl = sUrl.strip();
    853852                if len(sUrl) > 0:
    854853                    sReasonTitle += 'URL#%u:  \t%s\n' % ( i, sUrl, );
    855             oReason = WuiTmLink(oEntry.oFailureReason.sShort, WuiAdmin.ksScriptName,
    856                                 { WuiAdmin.ksParamAction: WuiAdmin.ksActionFailureReasonDetails,
    857                                   FailureReasonData.ksParam_idFailureReason: oEntry.oFailureReason.idFailureReason },
    858                                 sTitle = sReasonTitle);
     854            aoReasons.append(WuiTmLink(oIt.oFailureReason.sShort, WuiAdmin.ksScriptName,
     855                                       { WuiAdmin.ksParamAction: WuiAdmin.ksActionFailureReasonDetails,
     856                                         FailureReasonData.ksParam_idFailureReason: oIt.oFailureReason.idFailureReason },
     857                                       sTitle = sReasonTitle));
    859858
    860859        return [
     
    886885            oEntry.tsElapsed,
    887886            aoTestSetLinks,
    888             oReason
     887            aoReasons
    889888        ];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette