gajira-create icon indicating copy to clipboard operation
gajira-create copied to clipboard

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

Open kandrewth opened this issue 1 year ago • 0 comments

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.

kandrewth avatar Oct 04 '23 15:10 kandrewth