I need to realize the calculation of the following fields through scriptrunner
issues has 5 fields
Single choice field A (2023, 2024...).
Single choice field B (office a, office b...).
Numeric field C (total amount for office a, total amount for office b...).
Numeric field D (Amount).
Numeric field E (office a remaining amount, office b remaining amount).
i need to choose
Single choice field A (2023) + Single choice field B (office a, office b...)
The value of field B is automatically obtained (the total amount of office a, the total amount of office b...).
Fill in field C (amount) every time you create a new issue
Total amount of office a - amount (all issues associated with office a) = remaining amount of office a.
Restrictions: remaining amount <0, no issues are allowed
I don't know if the description is clear, please help me solve this problem.Thanks!
I need to run in 2 projects