Question on adding fixVersions #265
-
Hello, Thank you for your project. It is very useful! I've a question; I would like to update the fixVersions field of an issue. I thought I could use the same approach as described in the cookbook 'edit jira issue (implicit)'. So using a AddStringOperation like in:
However I get an error that I need to "Specify a valid version 'id' or 'name' for fixVersions"". In examples from other languages I see people explicitly including 'name'. However this is not possible with an arrayOperation as it expects a map[string]string. Do you know how to set the fixVersions field? thanks Stephan PS in the cookbook code it says "atlassian", but it should say "client" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @stephanwesten, I appreciate your contribution to this open-source project! However, I apologies for the delayed response due I'm in the middle of a job change and my time's a bit tight. Regarding your question, you're right, the I just created a new method called var operations = &models.UpdateOperations{}
operations.AddMultiRawOperation("fixVersions", []map[string]interface{}{
{
"remove": map[string]interface{}{
"name": "Version 00",
},
},
{
"remove": map[string]interface{}{
"name": "Version 101",
},
},
{
"add": map[string]interface{}{
"name": "Version 301",
},
},
}
) Before the executionAfter the executionFinally, can you please test the new method from your side and confirm the correct behavior?, just
Pura vida 🏄 |
Beta Was this translation helpful? Give feedback.
-
Thanks for your support. Honestly, I do not know if i’ve the time to test it. I implemented a solution with just a plain http call that works fine and moved on. It is not nice, but i rather be open about it. Hopefully other people will benefit from your work. Thank you. |
Beta Was this translation helpful? Give feedback.
Hi @stephanwesten,
I appreciate your contribution to this open-source project! However, I apologies for the delayed response due I'm in the middle of a job change and my time's a bit tight.
Regarding your question, you're right, the
AddArrayOperation()
can't handle the multi-picker customfields like the versions, multi-groups, multi-users, etc.I just created a new method called
AddMultiRawOperation()
that can handle the fixVersions and any multipicker customfield, the format is the following: