I have installed Scriptrunner to resolve the following issue:
In my JIRA core instance I have created a workflow. When moving an issue from "open" to the next step in the workflow I have defined a screen. In that screen, the user has to enter values to a number of custom text fields. When I close the screen I would like to run a post function that calculates the concatenation (with a space as separator) of two separate custom text fields into a third custom text field.
An example:
Custom Text Field 1 value: "abcd"
Custom Text field 2 value: "efgh"
"calculated" Customer Text field 3 value: "abcd efgh"
In this example, the user has provided values for Customer Text fields 1 and 2 in the screen but not for Customer Text field 3.
Although I have some experience with coding (mostly in the R domain, so mostly functional programming) I am a newby to JIRA and Scriptrunner. I have looked at various examples but for instance fail to understand how to concatenate the fields and update the DB.
And would such code also work if the 'calculated' field would be the summary field?
Any help, or sample scripts, would be very helpful.
I am using JIRA Core v7.2.1 and Scriptrunner 4.3.11
Many thanks!