Open SuaYoo opened 1 year ago
I Just encountered a similar issue. But it only happens for certain issues which were created in a different way from projects.
So, what i did when this started happening was:
Now, when my github action is triggered on [closed] to update the "finished date" field
name: "Update Finished Date"
on:
issues:
types: [closed]
jobs:
update_finished_date:
name: Update Finished Date
runs-on: ubuntu-latest
with the current date of completion
steps:
- name: Get current time
uses: josStorer/get-current-time@v2
id: current_time
with:
format: YYYY-MM-DD
- name: Use current time
env:
TIME: ${{ steps.current_time.outputs.time }}
R_TIME: ${{ steps.current_time.outputs.readableTime }}
F_TIME: ${{ steps.current_time.outputs.formattedTime }}
YEAR: ${{ steps.current_time.outputs.year }}
DAY: ${{ steps.current_time.outputs.day }}
run: echo $TIME $R_TIME $F_TIME $YEAR $DAY
then when I try to add this date value i retrieved
- name: Checkout code
uses: actions/checkout@v2
- name: Update Finished Date Value
uses: github/update-project-action@v2
with:
organization: ${{ github.repository_owner }}
project_number: 7
github_token: "${{ secrets.PROJECT_MANAGEMENT }}"
content_id: ${{ github.event.issue.node_id }}
field: "Finish Date"
value: ${{ steps.current_time.outputs.time }}
It works fine for the main issue that contains the task list. But for any issue that is closed that was created through the task list, it fails to work with the node_ids.
examples of output:
Here is the action run view
and then going into the run that succeeded
compared to one of those that failed
So, I think there might be some wierd glitch with how certain issues are created possibly? Seeing how the only issue that fail, at least for me, are those that have been created through the new beta task list. At least that is what it seems like when I am comparing it to tracked issues in tasks lists where the issue was added afterwards and created as a draft issue in the project. And when looking at the output in the log, where the format of the node_id's also look different?
When using the issue
assigned
trigger, neither settingcontent_id
togithub.event.issue.node_id
orgithub.event.issue.id
works. Both results in aItem not found with ID
error.Workflow config:
Also tried setting
content_id: ${{ github.event.issue.id }}