Skip to content

TypeError: Cannot read properties of undefined (reading 'length') #56

Open
@kandrewth

Description

@kandrewth

Dear team,

I am attempting to use the atlassian/gajira-create@v3 Github action to create a jira ticket as part of a workflow after a scan results in a failure in a previous step (scan-result). I am using the following code in the workflow:

- name: Log into Jira if result found
   id: jira-login
   if: always() && steps.scan-result.outcome == 'failure'
   uses: atlassian/gajira-login@v3
   env:
      JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
      JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
      JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

# If Jira Login successful, Create Jira Ticket
- name: Create Jira ticket
   id: create
   if: always() && steps.jira-login.outcome == 'success'
   uses: atlassian/gajira-create@v3
   with:
      project: ATP
      issuetype: Task
      summary: Found result
      description: test

The login action seems to complete successfully, however the ticket creation throws the following error:

Log into Jira if result found
   Run atlassian/gajira-login@v3
   env:
      JIRA_BASE_URL: ***
      JIRA_USER_EMAIL: ***
      JIRA_API_TOKEN: ***
   Successfully logged in.

Create Jira ticket
   Run atlassian/gajira-create@v3
   TypeError: Cannot read properties of undefined (reading 'length')
      at module.exports.execute (/home/runner/work/_actions/atlassian/gajira-create/v3/webpack:/create/action.js:28:1)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at exec (/home/runner/work/_actions/atlassian/gajira-create/v3/dist/index.js:32538:20)

Can anyone help me identify what is causing this issue and if it can be resolved? I have read previous posts that people have been able to create tickets using the action and from reviewing my inputs, I do not see any issues that could cause this.

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