Hello,
I need help to copy a user picker value via post function to the summary field.
I tried several snippets from here, but cant get it working. I want something like "Onboarding" + "UserPickerField"
Best regards,
Martin
Hi @Martin
Try this.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObjectsByName("User Picker Field")
def cFieldValue = issue.getCustomFieldValue(cField[0]) as ApplicationUser
if (cFieldValue) {
issue.summary = issue.summary + ": " + cFieldValue.displayName }
I hope it helps.
Ravi
thanks for your help! I really appreciate it.
It works pretty well for my tasks which i create with post functions, but my "main task" where i put this script in a postfunction, does not rename the preset name of the summary field.
Do you have any solution for this?
As you can see in the picture, the task HR-187 didnt get a summary change.
The Post Function Order is
I tried the Script at position 2 and 4, doesnt work for the main task.
Do you have any advice for me?
Best regards
Martin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you need to do this for parent and subtask both? Do you have same workflow for both of them?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I create Tasks out of Tasks, because i need to show them on the Customer Portal. SubTask arent show on the Portal right?
I have a workflow for "Onboarding" - on creation 14 post functions get triggered to create other tasks after point 4 where we rename the summary with your script. this is working for the "tasks which are created out of the parenttask" but it doesnt rename the parenttask.
the "tasks which are created out of the parenttask" do have different workflows.
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.