Defects by Severity

Deprecation Warning! The content below is only applicable for use within deprecated 1.x versions of CA Agile Central's App SDK. Use of the component(s) and/or code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.1 documentation.

This example demonstrates the integration of multiple components through the SDK's standard-component, event-handling framework. A pie chart displays all defects states by severity and you can view details by selecting each slice.

defects by severity

Example Code

Copy and paste the following into a CA Agile Central custom page.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<!-- Copyright (c) 2010 CA Agile Central Software Development Corp. All rights reserved -->
   <title>Defects BySeverity Example</title>
   <meta name="Name" content="App Example: Defects By Severity" />
   <meta name="Version" content="2010.4" />
   <meta name="Vendor" content="CA Agile Central Software" />

   <script type="text/javascript" src="/apps/1.26/sdk.js"></script>
   <script type="text/javascript">

    function showDefects() {

       var rallyDataSource = new Agile CentralDataSource('__WORKSPACE_OID__',
       var wait;
       var table;
      var severityPieConfig = {
         title : "Defects by Severity",
        type : "Defect",
         attribute: "Severity",
        height : 400,
        width : 400

       var severityPieChart = new rally.sdk.ui.PieChart(severityPieConfig, rallyDataSource);
         function(p, eventArgs) {

      function showTable(results) {
        if(table) {
        var config = {
         columnKeys: ['FormattedID', 'Name', 'Priority'],
         height: "300px",
         width: "300px"
        table = new rally.sdk.ui.Table(config);

      function refreshTable(severity) {
        document.getElementById("defectsTitle").innerHTML = "Defects with Severity = " + severity;
        wait = new rally.sdk.ui.Wait();
        var queryObject = {
         type : 'defect',
         key : 'defects',
         fetch: 'Name,FormattedID,Priority',
         query: '(Severity = "' + severity + '")'

        rallyDataSource.findAll(queryObject, showTable);


       <td valign="top">
         <div id="severityPie" style="height:425px; width:450px;"></div>
       <td style="height:425px; width:450px" id="defectContainer" valign="top">
         <div id="defectsTitle" style="text-align:center; width: 100%; font-size:16px; margin-bottom: 20px"></div>
                 <div id="defects" style="height:350px; width:450px;"></div>


需要更多帮助? CA Agile Central 社区为您提供一站式自助和支持。要将反馈或支持请求提交到 CA Agile Central 支持、获取解答并与其他用户协作,请加入我们的 CA Agile Central 社区