Skip to content
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

Problem to assign user #33

Open
Veluu opened this issue Mar 23, 2021 · 5 comments
Open

Problem to assign user #33

Veluu opened this issue Mar 23, 2021 · 5 comments

Comments

@Veluu
Copy link

Veluu commented Mar 23, 2021

Hey,

I'm trying to create issue and assign user - instead of leaving it empty and relying on Jira's defaults.

The code below works until I uncomment assignee field.

resource "jira_issue" "issue" {
  # assignee   = var.jira_assignee
  issue_type = "Task"

  // Description is optional  
  description = local.ticket_body
  summary     = local.ticket_title

  project_key = var.jira_project_key
}

With uncommented assignee the above generates:

jira_issue.issue: Creating...

Error: creating jira issue failed: {"errorMessages":[],"errors":{"assignee":"Issues must be assigned."}}: request failed. Please analyze the request body for more details. Status code: 400

  on main.tf line 1, in resource "jira_issue" "issue":
   1: resource "jira_issue" "issue" {

Using version 0.1.14

@fourplusone
Copy link
Owner

Are you using JIRA Cloud?

@Veluu
Copy link
Author

Veluu commented Mar 23, 2021

Yes, I am.

@fourplusone
Copy link
Owner

The API for assigning a user has been deprecated on JIRA cloud. So this plug-in needs probably an update

@Veluu
Copy link
Author

Veluu commented Mar 24, 2021

Yeah, I've looked into go-jira already.

@Veluu
Copy link
Author

Veluu commented Mar 26, 2021

I recompiled your provider with this simple change and it works as it should with Jira cloud.

https://github.com/andygrunwald/go-jira/pull/370/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants