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

Rally自定义字段配置咨询:父子用户故事关联与日期设置

Alright, let’s break down how to set up these custom fields in Rally based on your requirements. I’ve worked through similar configurations before, so here’s a practical, step-by-step breakdown for each part:

1. Configuring the "completion %" Custom Field (Dependent on Child User Stories)

Rally doesn’t have a native out-of-the-box way to auto-calculate parent story completion from children, but we can build this with a custom app or webhook. Here’s how:

Step 1: Create the Custom Field

First, add the field itself to User Stories:

  • Navigate to Setup > Workspaces & Projects, select your target workspace/project.
  • Go to Custom Fields and click Add New Field.
  • Choose Decimal or Percent (if your Rally instance supports it) as the field type, name it completion %, and assign it to the User Story work item type.
  • Set basic permissions (e.g., who can edit/view the field) based on your team’s needs.

Step 2: Auto-Calculate Parent Completion

You have two reliable options to automate the calculation:

Option A: Custom Rally App (Scheduled or On-Demand)

Build a lightweight app using the Rally App SDK that fetches child stories, aggregates their completion rates, and updates the parent. Here’s a simplified logic snippet to illustrate:

// Initialize Rally API connection
Rally.data.ApiFactory.getApi({
    success: function(api) {
        // Query all parent user stories (those with children)
        api.query({
            type: 'UserStory',
            fetch: ['FormattedID', 'Children', 'completion %'],
            query: '(HasChildren = true)'
        }).then(function(parentResults) {
            parentResults.forEach(function(parentStory) {
                // Fetch all child stories for the parent
                api.query({
                    type: 'UserStory',
                    fetch: ['completion %', 'StoryPoints'],
                    query: '(Parent.FormattedID = "' + parentStory.FormattedID + '")'
                }).then(function(childResults) {
                    let totalCompletion = 0;
                    let totalStoryPoints = 0;
                    
                    // Calculate weighted average (adjust to simple average if needed)
                    childResults.forEach(function(child) {
                        const points = child.StoryPoints || 1; // Fallback to 1 if no points
                        totalCompletion += (child['completion %'] || 0) * points;
                        totalStoryPoints += points;
                    });

                    const parentCompletion = totalStoryPoints > 0 
                        ? (totalCompletion / totalStoryPoints).toFixed(2) 
                        : 0;

                    // Update the parent story's completion %
                    api.update({
                        type: 'UserStory',
                        objectId: parentStory.ObjectID,
                        data: { 'completion %': parentCompletion }
                    });
                });
            });
        });
    }
});
  • Deploy this app to your Rally instance (either as a private app or via the App Catalog) and schedule it to run periodically (e.g., hourly) or let users trigger it manually.

Option B: Webhook + External Script

For real-time updates (triggered when a child story’s completion % changes), use Rally webhooks:

  • In Setup > Webhooks, create a new webhook that triggers on UserStory update events, filtering for changes to the completion % field.
  • Point the webhook to an external script (Python, Node.js, etc.) that:
    1. Receives the updated child story data.
    2. Fetches its parent story.
    3. Recalculates the parent’s completion % using all its children.
    4. Pushes the new value back to the parent story via the Rally API.
2. Configuring Independent Start Date & End Date Fields

This is straightforward since we don’t need any child dependency:

  • Go back to Custom Fields in your workspace/project setup.
  • Click Add New Field, select Date as the type, name it Start Date, and assign it to User Story.
  • Repeat the process to create the End Date field.
  • Critical Note: Rally won’t link these fields to child stories by default—just make sure you don’t configure any workflow rules or calculated dependencies that would tie parent dates to children.
  • Optional: Set field permissions (e.g., restrict parent story date edits to project leads) via the Field Permissions tab when editing each field.

Quick Tips for Both Configurations

  • Test everything in a non-production project first to avoid messing with live data.
  • For the completion % field, clarify with your team whether you want a simple average, weighted average (by story points), or another aggregation method—adjust the logic accordingly.
  • If you’re not comfortable coding, check if your Rally instance has any third-party integrations or marketplace apps that handle parent-child completion tracking.

内容的提问来源于stack exchange,提问作者Learn Hadoop

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.12 04:35:50