Skip to content

Broken issue edit history #34515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
didim99 opened this issue May 21, 2025 · 2 comments
Open

Broken issue edit history #34515

didim99 opened this issue May 21, 2025 · 2 comments
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea topic/issues

Comments

@didim99
Copy link

didim99 commented May 21, 2025

Description

If you have an issue that edited many times by multiple users (including setting/removing checkboxes) in some situations different edits in edit history becomes merged in one single edit, even if that made by different users. It seems to be a critical issue in case of audit, because you can't properly determine authorship of that changes.

At the moment I can't describe a full chain of steps to reproduce this behaviour, but in our instance (about 200 repos and 20 active users) I encountered this several time over the last year (for issues that has been edited more than 10 times by multiple users). There is approximate event sequence:

  • User A creates issue with the list of 4 checkboxes
  • User A edits issue content (1), e.g. adds a new item to the end of list
  • User B edits issue content (2), e.g. sets a checkbox number 2
  • User C edits issue content (3), e.g. sets a checkbox number 3

    At this moment issue edit history correct

  • User A edits issue content (4) e.g. edits a first list item
  • User B edits issue content (5), e.g. removes a checkbox number 2

    At this moment issue edit history shows (3) and (4) as single edit posted by user A.
    In fact, user A did not touch checkbox number 3

I checked the DB table issue_comment_history and see that the content of table same as shown in UI. Thus it is not a visualization bug but actually corrupted data.

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

Not matters

Operating System

Ubuntu Server 20.04

How are you running Gitea?

Bare metal (official install script)

Database

MySQL/MariaDB

@wxiaoguang
Copy link
Contributor

It was not designed to be used for "audit" purpose.

Image

@wxiaoguang wxiaoguang added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea and removed type/bug labels May 22, 2025
@didim99
Copy link
Author

didim99 commented May 22, 2025

It was not designed to be used for "audit" purpose.

This behaviour should be documented to avoid confusing users.

Maybe you can mark edits as "merged"/"multi-user" in KeepLimitedContentHistory? We can query a poster ID and check here if a previous edit poster differ from current, mark next edit as multi-user. It seems to be not wery hard to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea topic/issues
Projects
None yet
Development

No branches or pull requests

3 participants