It's quite simple to check if the current value of a field is blank. However, I'm trying to run automation only if the value was previously not empty. In this case the Due Date. Am I missing something obvious?
In the Issues Field Condition, you can only select the field as it currently is after the change. I tried using JQL with `{{fieldChange.from}} != ""` and `{{fieldChange.fromString}} != ""` which both resulted in errors.
Hi Randy,
The components field is an array so to set the value you require, you should use syntax similar to the example show below where you specify the component by its name using a name, value pair.
issueInput.fields.components = [[name: '<ComponentNameHere>']]
If this answer has solved your issue can you please accept it in order to mark this answer as correct for users who are searching for a similar issue.
Regards,
Kristian
That did it. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea how you do this so that you can add a new component without overwriting any components that are already there? I have a use case where I want to be able to add multiple components either through scripts or by the users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@E01807 you can read from the components field, add to the array, then set the array to the issueInput component field as Kristian showed above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This might work. Note that it's untested. Assumes Issue and issueInput are available in the script context as bindings
def newComponentList = issue.fields.components.clone()
newComponentList.add([name: 'New Component'])
issueInput.fields.components = newComponentList
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.