I am new to script runner, please help me on below requirement.
I have two fields, Field1 (worked hours) and Field2 (total hours). Field2 is noneditable and I want to display the calculation result on it.
If I create an issue without specifying the number in the field1, then field2 will have the value "0"
After I update the hours' value in field1, the value of field2 should be "the current value of field2" + "the changed value of field1". It should work both in addition and subtraction (if I enter a negative value in the field1).
The result should be like this;
Field2 = Field2 (previous value) + Field1