I create a custom field called “Bug Description” in create issue screen. I can create set the default value for bug template. And I add a post function to copy the text of “Bug Description” to “Description”. It works fine to create a bug manually.
But I try to create issue by rest api. I can create the issue successfully, but the value of Description is empty. The value of Bug Description is correct. So guess the post function does not work.
This my payload:
{
“update”: {
},
"fields": {
"summary": "autotest3",
"issuetype": {
"name": "Bug"
},
"project": {
"id": "11107"
},
"customfield_11278": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "auto111",
"type": "text"
}
]
}
]
},
"reporter": {
"accountId": "60c0e116a01e11006ae66369"
},
"priority": {
"name": "Medium"
},
"customfield_11261": {
"id": "10260"
},
"customfield_11249": {
"id": "10240"
}
}
}
Hi @梁峰 Jeff Liang (Engineering - QA) do you get any error in the server response?
No, It created the bug successfully. But did not trigger the post function. I used rest/api/3/issue. Yesterday I tried rest/api/2/issue, it works. Is my payload wrong ? Or is it a bug of rest api3.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @梁峰 Jeff Liang (Engineering - QA) ok, I just tested it and it really looks like a bug. I will raise a ticket for it. But I also found a workaround.
If you use Automation, it works. I prepared automation like this:
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.
Hi Jeff just for your information. Atlassian created bug for not-working Copy field data postfunction: https://jira.atlassian.com/browse/JSWCLOUD-21782?error=login_required&error_description=Login+required&state=6e713adf-5385-49bb-9838-8843a01303da
What about automation workaround? Did it work for you?
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.
Ok, cool, would you be so nice and accept the answer? It might help other people who will need to copy field value on Create transition.
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.