Hello all,I want to copy the assignee to a text field custom field. I did the normal way but it is taking just ID with the JIRA userID. I want to get the name with hyperlink. Is this achievable?Thanks for the help
Hi, @Harsh
Text field must be with wiki markup, and you need to use template like [~username]
Hello @Evgenii
Thanks for the response.
Right now I'm taking the assignee from issue.currentassignee and then just substituting that to the text field(which is description, system field by jira). I think description is wiki markup by default?
Brief code
Def assignee = issue.getcurrentassignee
Def description (system field) = 'text' + assignee.
But what is happening is in description it's is taking the ID and jira assigned username, but i need the link (assignee) or just the iD of the user.
Thanks for the help.
Got it. Try next script:
String username = issue.assignee.usernameString description = "dummy text" + "[~${username}]"issue.setDescription(description)
Hi @Evgenii Unfortunately it throws error on String username
I did for the display name using -
Hi @Evgenii
Not as a link in this case.
Just want value from Single select field (whatever value is selected) to description - 'text'.
But unfortunately it is not picking the value from the single select field.
Sorry, missed that it's single select field. Mistook it with text field.
Try:
def cfVal = issue.getCustomFieldValue(CF).value.toString()
Hi,I tried it already, but it is returning 'Null' value, but I have selected some value there.Error - 'Cannot get property 'value' on null object'Can we get the field by 'getcustomfieldbyID' ? or any workaround.
If you want to select customfield by ID you can use such code:
Use your actual fieldId instead of 12345
def CF = customFieldManager.getCustomFieldObject(12345)
def desc = 'text' + cfval
It looks like you're new here. Sign in or register to get started.