YouTrack workflow for automatically calculating the remaining effort as the sum of the corresponding values for each subissue.
- Simple YouTrack workflow for automatically calculating custom field “Remaining effort” (having type
period
) as the sum of the corresponding values for each subtask. - Written in TypeScript. None of the YouTrack workflow examples that I am aware of are, so the project might serve as template for other YouTrack workflows.
- Full code coverage. Some might find the test infrastructure overkill for just a simple YouTrack workflow, but the simplicity helps for serving as example.
- Just like YouTrack does for the Estimation field (if time tracking is enabled), the synchronization between an issue and its subissues is turned off if you manually override the remaining effort for the parent. To restore the synchronization, simply delete the remaining effort for the parent – it will then be recalculated immediately.
- The source code is exclusively written in TypeScript. The TypeScript compiler compiles the source code into a CommonJS module, with a target of ECMAScript 3 (aka ES3).
- At the time of this writing, YouTrack used the Rhino JavaScript Engine. ES3 is therefore the latest fully supported language edition.
- Deployment works as described in the YouTrack manual.
- Add your YouTrack instance and your token to your npm per-user config file:
where
npm config set youtrack_host https://${name}.myjetbrains.com/youtrack npm config set youtrack_token ${token}
${name}
and${token}
need to be replaced, of course. - Deploy to your YouTrack instance with
npm run upload
.