Bug: Assigning projects in issues page not working, and the project field gets unset

How to reproduce

  1. Create a new organisation
  2. Create a new project
  3. To any issues (new or existing), try assigning the project to the issue and it immediately gets unset.

I have tested this across 2 different users in 2 different organisations and I can confirm the same. I tested the same in codeberg.org, and it works perfectly alright. I am assuming this is a codefloe specific issue and not a forgejo specific one.

@voidspacexyz Thanks for reporting.

We’ve just tried to reproduce this but couldn’t. Both for repo and org projects (note the difference). There are no changes to the way projects function in CF compared to upstream Forgejo.

Could you by chance do a quick screencast showcasing the behaviour?

I have attached a video and a screenshot of the request. For some weird reason the post request is giving a 404.

Video: Download recording.webm | LimeWire

Thanks!

We assume it’s likely permission related. Please check:

  • Is the “projects” unit enabled in the repository settings containing the issue?
  • Does the user have write permissions for the repository?

Repo projects are disabled by default but must be enabled for org-level projects to work. If this works for you, this should be considered a bug and reported upstream to Forgejo.

Hi @codefloe ,

I assume this is not a permission issue nor an upstream issue. Here is what I have validated.

  1. The projects are created in an organisation, and I am an org admin.
  2. I have created a dummy repo, and created a single project (at the org level) where I have been testing (This is the org and issue if this helps : https://codefloe.com/PersonalTest/Tasks/issues/1)
  3. I tried to test the same in codeberg.org, where it seems to work (the exactly same setup). In codeberg the 404 page (from codefloe from the above image) returns a 200. Attached a screenshot below.
  4. I tried to find an API from swagger (in both codefloe and codeberg), and I couldnt find it. If there is an API (even if you could point me to it) I am happy to test it in and confirm if it is both in the API and Frontend.

Also since it is a dummy project and org, if you folks want me to add any user to the org or give yourself admin rights, you are welcome to, if that will help replicate.

This is puzzling. There have been no changes to the Forgejo source code for projects in CF.

There isn’t a public API endpoint for it, it’s just an internal route.

Also since it is a dummy project and org, if you folks want me to add any user to the org or give yourself admin rights, you are welcome to, if that will help replicate.

We’ve just checked your org/repos and you have repo projects disabled in all of them. This is what we referred to in the previous comment. Does it work after enabling projects in the repo units on the repository level?

Hi @codefloe

Thanks for the note. I feel really stupid to have overlooked that note. It is working as expected. Thanks a million for the patient response.

Good to hear!

From a broader perspective this should still behave better overall, i.e. the UX is really bad and this should probably be considered as bug. If you have time, please report this upstream in Forgejo (if not already done).

1 Like

Looks like there is active bug that is being worked on : #5666 - bug: cannot assign issue to organisation project when repository has projects disable - forgejo/forgejo - Codeberg.org

But I am creating a separate issue to introduce the add projects to an issue as an API, which apparently has not been reported.