Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Assume this script runs on a Epic Workflow.

Requirement:
Search for the “Story Points” custom field on your instance.

sum = 0
for issue in api.search_issues(f'parent = {issue.key}'):
  sum += issue.fields.<your_story_points_customfield_id>
issue.set('<your_story_points_customfield_id>', sum)

To test it, get an Epic from the target project, this Epic should have child issues that contain story points != null.

# For testing purposes in the Console, do:
issue = Issue('Your Epic - Issue Key')

sum = 0
for issue in api.search_issues(f'parent = {issue.key}'):
  sum += issue.fields.<your_story_points_customfield_id>
issue.set('<your_story_points_customfield_id>', sum)

After your testing is done, remove or comment the issue = Issue('Your Epic - Issue Key') part and plug it into a listener/postfunction.

  • No labels