Show New project in empty work item views for groups with no projects

What does this MR do and why?

The empty state hid the "New project" button when a group had epics, so a group with no projects had no way to create one from there (check added in !216442 (merged)).

This MR shows "New project" instead of "New item" whenever a group has no projects and the user can create projects. It applies to the work items list and the board. The board is behind the planning_view_boards flag, the list change is not behind a flag.

"New item" is still in the page header, so epics can still be created. This MR is stacked on !257569 (merged) (MR 2 of 2).

References

Screenshots or screen recordings

List, group with no projects

Before After
List before List after

Board, group with no projects

Before After
Board before Board after

How to set up and validate locally

  1. Enable the flag in a rails console:

    Feature.enable(:planning_view_boards)
  2. Create a Premium or Ultimate group with no projects.

  3. Open the group Work items page. The empty state should show "New project", linking to the new project page for that group.

  4. Switch to Board in the List/Board toggle. The empty state should show the same "New project" button.

  5. Create a group with one project. Check that both the list and the board show "New item".

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

🤖 Generated with Claude Code

Edited by Rajan Mistry

Merge request reports

Loading
Loading