Hello dear gurus
Is there a way to set value of a custom field based on other field? I know it's possible but i need to add value, not to replace it with new one. For example - a field that stores all usernames who become assignees of the issue.
What code are you proposing to use to do this?
It will need to read the current multi-user picker contents and add the new one to the list.
I was trying to use something like scripted field from Groovy Runner (there is an example in comments of https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+Fields#ScriptedFields-Aninformationmessagebut it refers to select list from linked issues and i was not able to change the code for my case).
Ok, so what have you got in your code so far? Just the bit that tries to read the current values, build the new set and post it back?
This is the code I got:
import com.atlassian.jira.ComponentManagerimport com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.issue.CustomFieldManagerCustomFieldManager customFieldManager = componentManager.getCustomFieldManager()def componentManager = ComponentManager.getInstance()def executioners = "" def cf = issue.assigneeUser executioners += getCustomFieldValue(cf) + " "
But it returns [null]. I see that my code is wrong but I don't get how to add value to the field. I tried to change field type from "Text Searcher" to "User Picker" - of course it shows [Anonymous]
It looks like you're new here. Sign in or register to get started.