Skip to content

Invoke-JiraMethod: Cannot bind argument to parameter 'Reference' because it is null. #531

@sholland-bamboohealth

Description

@sholland-bamboohealth

I've very recently been running into an issue where most of my jiraps scripts are failing with

Invoke-JiraMethod: Cannot bind argument to parameter 'Reference' because it is null. I decided to start testing with this

$password = $API | ConvertTo-SecureString -AsPlainText -Force
$reporter = $h.Get_Item("Reporter")
$cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Reporter, $password
New-JiraSession -Credential $cred -Verbose -debug

This error message Invoke-JiraMethod: The 'permissions' query parameter is required. led me to this page from 2 days ago

Change notice - Get my permissions resource will require a permissions query parameter

How do I apply the permissions part to this code?

$parameters = @{
    Project = "ABCD"
    IssueType = "Task"
    Summary = "What Title do you want to give the Issue"
    Description = "The Description of the issue goes here"
        
}

$fields = @{
        reporter = @{id = "$accountid"}
        assignee = @{id = "$accountid"}
        }


New-JiraIssue @parameters -Fields $fields

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions