Uninitialized "created_at" field in webhook when creating an issue #14466

Open
opened 2025-11-02 11:13:40 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @kim2048 on GitHub (May 8, 2025).

Description

Hello,
when I create an issue via web ui with a label and an assignee I get 3 webhook calls in this order: assigned, opened, label_updated. I don't know if I could expect a specific order here, but it's fine.

The assigned issue json already contains all the issue data (user, assignee, my label, state, ...) except the created_at and updated_at fields: They contain a 0 epoch ("1970-01-01T01:00:00+01:00") and have only correct values in the opened and label_updated json (all other fields are the same in all 3 calls).

My assumption was, that I would never get an "uninitialized" created_at field in any webhook issue value. Am I right?

Gitea Version

1.23.7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I don't know

Database

None

Originally created by @kim2048 on GitHub (May 8, 2025). ### Description Hello, when I create an issue via web ui with a label and an assignee I get 3 webhook calls in this order: `assigned`, `opened`, `label_updated`. I don't know if I could expect a specific order here, but it's fine. The `assigned` issue json already contains all the issue data (user, assignee, my label, state, ...) except the `created_at` and `updated_at` fields: They contain a 0 epoch (`"1970-01-01T01:00:00+01:00"`) and have only correct values in the `opened` and `label_updated` json (all other fields are the same in all 3 calls). My assumption was, that I would never get an "uninitialized" `created_at` field in any webhook issue value. Am I right? ### Gitea Version 1.23.7 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? I don't know ### Database None
GiteaMirror added the topic/webhookstype/bug labels 2025-11-02 11:13:40 -06:00
Author
Owner

@lunny commented on GitHub (May 10, 2025):

I created #34420 and could not reproduce it in main branch.

@lunny commented on GitHub (May 10, 2025): I created #34420 and could not reproduce it in main branch.
Author
Owner

@kim2048 commented on GitHub (May 12, 2025):

Here it's a 100% repro, but it's okay for me as long as the last webhook contains the correct time (I only recognized it in the changelog of my server where I order the issue changes by the updated_at field).
I will check again with the 1.24 when it is released.

@kim2048 commented on GitHub (May 12, 2025): Here it's a 100% repro, but it's okay for me as long as the last webhook contains the correct time (I only recognized it in the changelog of my server where I order the issue changes by the `updated_at` field). I will check again with the 1.24 when it is released.
Author
Owner

@kim2048 commented on GitHub (May 12, 2025):

Also when I assign n users when creating an issue, I get n assigned webhook calls and they have all no valid time set

@kim2048 commented on GitHub (May 12, 2025): Also when I assign n users when creating an issue, I get n `assigned` webhook calls and they have all no valid time set
Author
Owner

@kim2048 commented on GitHub (Sep 16, 2025):

Update: Same on 1.24.3. I create an issue with 2 assignees and get these 3 webhook actions:

assigned: assignees: [ A ], issue create/update time not set
assigned: assignees: [ A, B ], issue create/update time not set
opened: assignees: [ A, B ], issue create/update time set

So the assignees arrays isn't complete in the first hook as well

@kim2048 commented on GitHub (Sep 16, 2025): Update: Same on 1.24.3. I create an issue with 2 assignees and get these 3 webhook actions: assigned: assignees: [ A ], issue create/update time not set assigned: assignees: [ A, B ], issue create/update time not set opened: assignees: [ A, B ], issue create/update time set So the assignees arrays isn't complete in the first hook as well
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14466