You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

扩展Estimation Board:为卡片添加更多属性的技术求助

Fixing Custom Card Fields in Rally Estimation Board App

Hey there! Let's work through this issue step by step—looks like you're close, just a couple of small tweaks needed to get those extra fields showing up on your cards.

First: Fix the Syntax Error in Your Config

The immediate blocker here is a missing comma in your cardboardConfig object. JavaScript object properties require commas to separate them, and you’re missing one after enableRanking: false. That’s why your cardConfig property is being completely ignored by the interpreter.

Here’s the corrected config with the fix:

var cardboardConfig = {
    types: [],
    attribute: "PlanEstimate",
    columns: columns,
    maxCardsPerColumn: 200,
    items: that._getItems,
    sortAscending: true,
    order: "Rank",
    enableRanking: false, // Added missing comma here!
    cardConfig: { fields: ['Iteration', 'ScheduleState']}
};

Second: Adjust Field References for Associated Objects

For fields like Iteration (which is a reference to an Iteration object), just specifying Iteration will only display an object reference instead of a readable value. You’ll want to target the specific sub-field you want to show—usually the name:

cardConfig: { fields: ['Iteration.Name', 'ScheduleState']}

Third: Fallback to Custom Card Renderer (If Needed)

Since this is a legacy Estimation Board app, the default cardConfig.fields setting might not always pick up new fields reliably. If the above fixes still don’t work, try overriding the card renderer to explicitly inject your custom fields into the card HTML:

cardConfig: {
    fields: ['Iteration.Name', 'ScheduleState'],
    renderer: function(card) {
        // Keep the default card content first
        var defaultHtml = card.getDefaultHtml();
        
        // Pull values from the record
        var iterationName = card.getRecord().get('Iteration') ? card.getRecord().get('Iteration').Name : 'Unassigned';
        var scheduleState = card.getRecord().get('ScheduleState') || 'Not Set';
        
        // Append custom fields to the card
        return defaultHtml + `
            <div class="card-custom-field">
                <strong>Iteration:</strong> ${iterationName}
            </div>
            <div class="card-custom-field">
                <strong>Schedule State:</strong> ${scheduleState}
            </div>
        `;
    }
}

Add a bit of CSS to style these fields so they fit cleanly on the card:

.card-custom-field {
    margin: 6px 8px 0;
    font-size: 12px;
    color: #555;
}

Final Quick Checks

  • Double-check field names: Rally uses camelCase, so ScheduleState is correct (not "Schedule State").
  • Clear your browser cache after making changes—legacy Rally apps often cache old code.

Hope this gets your card fields displaying as expected!

内容的提问来源于stack exchange,提问作者Jake Friedman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 10:14:31