mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-19 14:42:41 -05:00
Moving issues across repositories #146
Open
opened 2025-11-02 03:10:38 -06:00 by GiteaMirror
·
32 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0
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.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#146
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lefta on GitHub (Dec 22, 2016).
copy issue; close orig; move comments on orig(they are moved); setup a redirect to new location
Gitea is great for small projects, but some features are missing for (very?) big projects, Atom being the perfect example of what I am meaning. With this kind of huge project, some issues arise. I'm dividing those issues in multiple bug reports for easy tracking.
One of those issues is that it is sometimes hard to guess the exact origin of a bug. One may report a bug in the wrong component, or not know where the bug exactly comes from. In the prototyping stage, it may even happen that features move from one repository to another, requiring to move associated bugs with them (I got the case). This currently require closing and copy-pasting bugs, which is counter productive and makes bug tracking harder.
Being able to move bugs across repositories would greatly ease the development of such big project.
Note: on move create a redirect ... so kinda add issue type redirect and let rest stay as is. create new issue in new repo and Copy issue. second change direct referenced content (comments...)
@bkcsoft commented on GitHub (Dec 25, 2016):
Would cloning the issue over to the new repo and then closing the new one suffice? (given that it's just a button-click away)
@lefta commented on GitHub (Dec 25, 2016):
I'm not sure to see what you mean, but I see multiple ways to implement it:
Note that I did not dig in the implementation details of Gitea, my solutions are mostly based on assumptions so I may not see all implications of their implementation. My personal favorite is the third, but the first one would be sufficient for me.
EDIT: I just though, sometimes we also need to "cherry pick" issues from another repository without deleting the original. For example, when forking a project, we sometimes need to get issues from the parent. This is well demonstrated with gogs and gitea, where gitea ends up with issues containing only a link to the gogs one. It would be nice if we could also "copy" an issue from another repository (related or not). I still have to think a little more on how to make all of this work together though, I will report back my ideas once it gets clearer in my mind.
@lefta commented on GitHub (Dec 27, 2016):
Finally, here is how I would see it:
In the UI part, I would replace the
closebutton with a dropdown called something likeactions(I don't really like this wording but I could not find better). This dropdown would containclose issue,move issue to...andcopy issue to.... The two new entries would redirect to a page asking to which repository the issue have to be copied/moved (called "the target repository" later in my description), with a listing of all repositories on which the current user have write access (or at least all its repositories and its organization repositories, if any). Of course,move issue to...would only be displayed if the user have write access to the current repo.About copying in the backend part, it would create a new issue in the target repository and copy everything associated to the issue (comments, labels...). After this, both issues would be independent, something like an "issue fork".
About moving in the backend part, it could copy the issue to the target repository and close the original one in a first time (maybe with a comment like
Moved to <repository>). This would reuse the copying code and would be sufficient for most users (including me).To make moving cleaner in a second time, I would change the issue repository to the target repository id and the issue number to the next available one (if this is acceptable and possible for you). I would then create a new issue in the source repository with the same number, giving it a
movedstatus. This new issue status would be displayed in the closed issues category and would redirect to the target repository issue when open.Later, we could create a new issue type:
mirrored. This issue type would redirect to the original issue and should be overcomplicated based on the work done before. But that is another story...Of course, this is only a draft to expose my ideas and is widely open to discussion
@tboerger commented on GitHub (Dec 27, 2016):
Sounds like a useful feature, but I would put only the additional actions into a drop down, close should stay as it is
@lefta commented on GitHub (Dec 27, 2016):
I do not have any problem with it, let's let the close button as it is. Otherwise, does it look good to you? Is the third point technically possible? I guessed some implementation details when thinking about it...
@bkcsoft commented on GitHub (Dec 27, 2016):
Could use this as a reference :) https://about.gitlab.com/2016/04/20/feature-highlight-move-issues/
@maxgaurav commented on GitHub (Jan 18, 2019):
Any update on this feature?
@lunny commented on GitHub (Jan 19, 2019):
Nobody are working on this.
@stale[bot] commented on GitHub (Mar 20, 2019):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@jrhoffa commented on GitHub (Aug 1, 2020):
This would be a great feature. I just created a pile of issues under the wrong project and don't relish copy-pasting them one by one.
@rnwgnr commented on GitHub (May 27, 2021):
This seems to be closely related (a duplicate?) of #2991
@n3storm commented on GitHub (Jun 15, 2021):
We have a triage project where we work on misc issues.
When issue grows to own project, it would be great to be able to move issues.
@6543 commented on GitHub (Jun 15, 2021):
Idear: copy issue; close orig; move comments on orig(they are moved); setup a redirect to new location
This schould prevent links from breaking and you have a nice redirect. eafen links to issuecomment schould be aave if we move them rather than copy-them
@besworks commented on GitHub (Sep 27, 2021):
I ran into a situation where I needed to merge two repos into a new unified one, including transferring all issues/projects. I ended up doing this with a few SQL queries. First I forked one of the original repos and got the
idof this new repo. Then...The first query changes the
repo_idof all issues from both original repos to match the newidfound above and generates a newindexfor them starting at1.The next two queries update the issue counts in the new repo. I'm sure you could inject another query in here to count the number of total/closed issues but I just read the numbers from the web interface and entered them manually.
The last query changes the
repo_idfor any projects to match the new repo.Keep in mind that this process will remove these issues and projects from their original repo. This might not be a perfect solution but hopefully somebody finds it useful.
Edit: Turns out that I also needed to update the
actiontable as well to fix the dashboard entries. I imagine this query might have bigger consequences... I wouldn't suggest doing this if you need to keep the history of the original repos intact. USE AT YOUR OWN RISK@jhaand commented on GitHub (Nov 11, 2021):
Our organisation would really benefit if it was possible to copy or move issues to other repository.
Issues found on system level can then be copied to the appropriate repository to fix them. Also being able to cross link them would make it easier to forward the status upstream when they're fixed.
@faengl commented on GitHub (Dec 21, 2021):
This feature would be very much appreciated!
In our case we started off working on an R-Shiny app and later decided to put all the processing logic into a separate R-package. The Package is now developed in a repository of it's own. Some of the older issues concerning the Package were not closed and still lived in the old shiny repository. We also continued to create new issues in the old repository. This is because we only wanted to have one point to access issues for the R-Package.
Now it would be really nice to be able to move all issues to the correct repository. Also closed issues should live in the correct repository for the sake of consistency.
@derpmacos commented on GitHub (Aug 22, 2022):
Likewise would be appreciated as we find issues are generally logged in an adhoc manner by users at the organisation level, and then later identified by devs as belonging with a particular component in its own repo.
@lunny commented on GitHub (Aug 23, 2022):
When moving an issue, the index will be changed and old index will be dropped.
@derpmacos commented on GitHub (Aug 23, 2022):
Current approach is manually create, copy-paste, and then close old issue - so any improvement on that workflow would be useful to us.
@OhSoGood commented on GitHub (Jan 26, 2023):
If one uses @besworks' SQL queries above (thank you @besworks !), please note there are a few others to run to keep your gitea stable. Pitifully, I have not written all here. From what I remember:
issue_index: that one contains the issues' max_id per repopull_request.As gitea database may evolve between the date of this post and the date where you will try this manual migration, I recommend that you export from your current database all tables' definitions (i.e. without data) and that you look for the keyword
repo_idto determine which tables may be impacted. That way, you'll minimize the risk to break something. In my case, everything seemed to run fine but, a day after migration, we realizes some functionalities were broken (ex: to add a new ticket) and managed to fix it.@hoffmannlin commented on GitHub (Feb 10, 2023):
this function is very useful
why always been cancel ?
@Area128 commented on GitHub (Feb 25, 2023):
For lack of a vote button, this is another comment supporting this idea. It would indeed be very useful to be able to move issues across repositories.
@KlavsKlavsen commented on GitHub (Aug 18, 2023):
Wow.. amazing this isn't there yet.. it would REALLY be helpful when trying to split things up.. so another vote up :)
@timmwille commented on GitHub (Sep 18, 2023):
Is this still pending?
@alanmels commented on GitHub (Nov 20, 2023):
Would be really nice to have this feature around.
@lunny commented on GitHub (Nov 20, 2023):
This is a to-do list to implement it.
@JGKle commented on GitHub (Feb 19, 2024):
Really need this. Manual copy-pasting is pretty agonizing (and also loses the original creation date, which can be useful context to have).
@PierreLouisPAUGAM commented on GitHub (Feb 27, 2024):
This feature would also help a lot when synchronising gitea issues with tickets from another source (like GLPI for example) as user's often make errors when assigning tickets to projects or applications.
@timmwille commented on GitHub (Mar 11, 2024):
there is a constructive discussion on this ongoing here too:
https://codeberg.org/forgejo/forgejo/issues/1280
(in best case collaboration instead of double work) 🙏
@lunny commented on GitHub (Mar 12, 2024):
I have given the todo list in https://github.com/go-gitea/gitea/issues/453#issuecomment-1819106228 maybe we can improve it together.
@deavmi commented on GitHub (Jun 17, 2025):
Is there a way to migrate a repo (all issues) and then also set it as a mirror? I need this to migrate off an old gitea instance with lots of important issues on it but need it to remain a git mirror? @lunny
I am willing to pay :)
@lunny commented on GitHub (Jun 17, 2025):
A pull request already exists: #20311.