Hello, @eazyBI-Staff
I need your help, please.
I calculate a javascript custom field that adds a text classifier (let’s call it “Classifier”) for all tasks at all levels of the hierarchy (Epics, Issues and Sub-tasks). Based on this classifier, I need to add a new field (lets call it “New data”) that can calculate the Time spent on this task multiplied by а factor associated with this classifier. Thus, I’ll have such data:
- Epic 1: “New Data” = Time Spent * 2 + “New Data” from all Tasks in it
1.1 Task 1: “New Data” = Time Spent * 3 + “New Data” from all Sub-tasks in it
1.1.2 Sub-task 1: "New Data" = Time Spent * 4
- Epic 2
…
Could you, please, help me how can I write this correctly? Maybe I need to create a new calculated javascript custom field (right now the “Classifier” has 260 lines of code, and I really don’t want to copy those 260 lines into a new calculated javascript custom field just to multiply Time spent by the classifier’s factor)? Maybe I can use the previously calculated javascript custom field “Classifier” in calculating this new calculated javascript custom field or can I calculate both “Classifier” and “New Data” in one piece of code in javascript altogether? Or would it be easier to just create a new dimension?
P.S. I need it to work quickly