-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting components on an issue #99
Comments
I do have the same problem. There was an FR to include components, but out of the doc I don't know, how to include them |
I couldn't find it in the code or elsewhere. Can you point me to something
or show me an example? I did try a few obvious things.
…On Thu, 10 Oct 2024, 14:32 Benedikt, ***@***.***> wrote:
I do have the same problem. There was an FR to include components, but out
of the doc I don't know, how to include them
—
Reply to this email directly, view it on GitHub
<#99 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA5PCCFB2QPOUTMS6H3MMMLZ2Z6WZAVCNFSM6AAAAABO2ZBJI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBVGEYDMNRYG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you want to add a component, it would go here - https://github.com/fourplusone/terraform-provider-jira/blob/master/jira/resource_issue.go#L109-L120 |
Thanks for letting me know where to start. I've setup my local development envrionment (this will be my first time using go in anger). Any insight into why the code is written this way? I've looked at a lot of go and it never looks DRY and the interfaces are hardcoded for brittleness. For example, why do I even need to do this? Why lines like |
Ok so copying the label patterns doesn't work because go-jira defines So I need to find an example of the same or figure it out from how the other objects that are 1:1 (or M:1) with Issues. |
Ok so. This may be naive, but what I am going to try is treating components in th same way as labels, but modify the schema elem to be of type jira.Component, then instead of formating each component to a string as labels does, I'll make a jira.Component assuming the input is the ID in the same way project to set on an issue from the input So you'd set them like: |
PR submitted. |
Matbe i'll try tackling the underlying of not being able to do: |
Happy to review next week. Thanks for your patience |
How do I set components on an issue? In the rest interface it would be
"fields": { "components": [{"name": "Xampl"}],
, but when I try this, I get toldInappropriate value for attribute "fields": element "components": string required.
. The value is appropriate.The text was updated successfully, but these errors were encountered: