Skip to content

Commit

Permalink
Merge branch 'dev' into implementation/57816-enable-item-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Oct 11, 2024
2 parents afab498 + 90f1f23 commit c932ca6
Show file tree
Hide file tree
Showing 255 changed files with 2,222 additions and 1,397 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,20 @@ jobs:
with:
subject: "Docker build failed"
body: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
trigger_helm_release:
needs: [setup, build, merge]
permissions:
contents: none
if: github.repository == 'opf/openproject'
runs-on: ubuntu-latest
steps:
- name: Trigger Helm charts release
env:
TOKEN: ${{ secrets.OPENPROJECT_CI_TOKEN }}
REPOSITORY: opf/helm-charts
WORKFLOW_ID: core_release.yml
run: |
curl -i --fail-with-body -H"authorization: Bearer $TOKEN" \
-XPOST -H"Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/$REPOSITORY/actions/workflows/$WORKFLOW_ID/dispatches \
-d '{"ref": "main", "inputs": { "tag" : "${{ needs.setup.outputs.version }}" }}'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ source "https://rubygems.org"
# then we can use the new bundler syntax `ruby file: '.ruby-version'`.
# https://github.com/heroku/heroku-buildpack-ruby/issues/1408#issuecomment-1841596215

ruby File.read(".ruby-version").strip
ruby File.read(File.expand_path(".ruby-version", __dir__)).strip

gem "actionpack-xml_parser", "~> 2.0.0"
gem "activemodel-serializers-xml", "~> 1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ GEM
public_suffix
vcr (6.3.1)
base64
view_component (3.16.0)
view_component (3.17.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down
Binary file added GitHub-tab-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 27 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
![GitHub branch checks state](https://img.shields.io/github/checks-status/opf/openproject/dev)
[![Github Tests](https://github.com/opf/openproject/actions/workflows/test-core.yml/badge.svg?branch=dev)](https://github.com/opf/openproject/actions/workflows/test-core.yml)

OpenProject is a web-based project management software. Its key features are:
**We empower teams to achieve great things together for the good of society.**

OpenProject is a web-based project management software. Use OpenProject to manage your projects, tasks and goals. Collaborate via work packages and link them to your pull requests on Github. [Read more about the OpenProject GitHub integration](https://www.openproject.org/docs/system-admin-guide/integrations/github-integration/).

![Screenshot of OpenProject, showing the GitHub tab on a work package](GitHub-tab-new.png)

OpenProject's key features are:

* [Project planning and scheduling](https://www.openproject.org/collaboration-software-features/#project-planning)
* [Product roadmap and release planning](https://www.openproject.org/collaboration-software-features/#product-management)
Expand All @@ -18,35 +24,44 @@ OpenProject is a web-based project management software. Its key features are:

More information and screenshots can be found on our [website](https://www.openproject.org).

## Installation
## Start now with OpenProject

If you want to run an instance of OpenProject in production (or for evaluation), refer to our
in-depth [installation guides](https://www.openproject.org/download-and-installation/).
- **Free Trial**:[Start a 14-days free trial of OpenProject](https://start.openproject.com/).
- **Community Edition**, free of charge: Download OpenProject and get started with the self-hosted Community edition. If you want to run an instance of OpenProject in production (or for evaluation), refer to our in-depth [installation guides](https://www.openproject.org/download-and-installation/).
- **Enterprise Edition**: Sign up for the Enterprise version, choose between cloud or on-premises and benefit from comprehensive support and Enterprise add-ons.
- **Documentation**: Explore our [comprehensive documentation](https://www.openproject.org/docs/) to help you get up and running quickly.
- **Training**: [Book one of our training or consulting offers](https://www.openproject.org/training-and-consulting/#training-signup) to get your team on board in no time.

## Reporting bugs
## Report bugs

You found a bug? Please [report it](https://www.openproject.org/docs/development/report-a-bug/) to our [OpenProject community](https://community.openproject.org/projects/openproject). Thank you!
You found a bug? Please [report it](https://www.openproject.org/docs/development/report-a-bug/) to our [OpenProject Community](https://community.openproject.org/projects/openproject). Thank you!

## Contribute

OpenProject is supported by its community members, both companies and individuals.
OpenProject is supported by its Community members, both companies and individuals.

We are always looking for new members to our community, so if you are interested in improving OpenProject we would be glad to welcome and support you getting into the code. There are guides as well, e.g. a [Quick Start for Developers](https://www.openproject.org/development/setting-up-development-environment/), but don't hesitate to simply [contact us](https://www.openproject.org/contact) if you have questions.
We are always looking for new members to our Community, so if you are interested in improving OpenProject we would be glad to welcome and support you getting into the code. There are guides as well, e.g. a [Quick Start for Developers](https://www.openproject.org/development/setting-up-development-environment/), but don't hesitate to simply [contact us](https://www.openproject.org/contact) if you have questions.

Working on OpenProject comes with the satisfaction of working on a widely used open source application.

Also, if you do not want to be limited to working on open source in your free time, OpenProject GmbH, the company contributing to the OpenProject development, [is hiring](https://www.openproject.org/career/).


## Contact
## Stay in contact

Here you can find our [contact information](https://www.openproject.org/contact/). As we regularly update OpenProject, we recommend staying in touch – here is where you can find us:

Here you can find our [contact information](https://www.openproject.org/contact/). If you are interested in development or have general questions, feel free to also join our [community discussion forums](https://community.openproject.org/projects/openproject/forums).
- [OpenProject Community](https://www.openproject.org/blog/community-instance/) with [forum discussions](https://community.openproject.org/projects/openproject/forums): The open instance where we develop our features – transparent and open for discussions, bug reports or feature requests.
- [LinkedIn](https://www.linkedin.com/company/18706985)
- [Reddit](https://www.reddit.com/r/openproject/)
- [Fosstodon](https://fosstodon.org/@openproject)
- [Twitter/X](https://twitter.com/openproject)

## Security / responsible disclosure

We take security very seriously at OpenProject. We value any kind of feedback that
will keep our community secure. If you happen to come across a security issue we urge
you to disclose it to us privately to allow our users and community enough time to
will keep our Community secure. If you happen to come across a security issue we urge
you to disclose it to us privately to allow our users and Community enough time to
upgrade. Security issues will always take precedence over anything else in the pipeline.

For more information on how to disclose a security vulnerability, [please see this page](docs/security-and-privacy/statement-on-security/README.md).
Expand Down
Binary file added app/assets/images/lookbook/hover_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/components/_index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import "shares/invite_user_form_component"
@import "work_packages/details/tab_component"
@import "work_packages/progress/modal_body_component"
@import "work_packages/hover_card_component"
@import "work_packages/split_view_component"
@import "open_project/common/attribute_component"
@import "open_project/common/submenu_component"
Expand Down
6 changes: 3 additions & 3 deletions app/components/projects/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def current_breadcrumb_element
def current_section
return @current_section if defined?(@current_section)

projects_menu = Projects::Menu.new(controller_path:, params:, current_user:)

@current_section = projects_menu.menu_items.find { |section| section.children.any?(&:selected) }
@current_section = Projects::Menu
.new(controller_path:, params:, current_user:)
.selected_menu_group
end

def header_save_action(header:, message:, label:, href:, method: nil)
Expand Down
11 changes: 11 additions & 0 deletions app/components/work_packages/highlighted_date_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<%=
if @start_date == @due_date
render(Primer::Beta::Text.new(**text_arguments, classes: date_classes(@start_date))) { parsed_date(@start_date) }
else
component_wrapper do
concat(render(Primer::Beta::Text.new(**text_arguments)) { parsed_date(@start_date) })
concat(render(Primer::Beta::Text.new(**text_arguments)) { " - " }) if @due_date.present?
concat(render(Primer::Beta::Text.new(**text_arguments, classes: date_classes(@due_date))) { parsed_date(@due_date) })
end
end
%>
40 changes: 40 additions & 0 deletions app/components/work_packages/highlighted_date_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# frozen_string_literal: true

class WorkPackages::HighlightedDateComponent < ApplicationComponent
include OpPrimer::ComponentHelpers
include OpTurbo::Streamable

def initialize(work_package:)
super

@work_package = work_package
@start_date = work_package.start_date
@due_date = work_package.due_date
end

def parsed_date(date)
return if date.nil?

date.strftime(I18n.t("date.formats.default"))
end

def date_classes(date)
return if date.nil?

diff = (date - Time.zone.today).to_i
if diff === 0
return "__hl_date_due_today"
elsif diff <= -1
return "__hl_date_overdue"
end

"__hl_date_not_overdue"
end

def text_arguments
{
font_size: :small,
color: :muted
}
end
end
16 changes: 16 additions & 0 deletions app/components/work_packages/highlighted_type_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

class WorkPackages::HighlightedTypeComponent < ApplicationComponent
include OpPrimer::ComponentHelpers

def initialize(work_package:, **system_arguments)
super

@type = work_package.type
@system_arguments = system_arguments.merge({ classes: "__hl_inline_type_#{@type.id}" })
end

def call
render(Primer::Beta::Text.new(**@system_arguments)) { @type.name.upcase }
end
end
40 changes: 40 additions & 0 deletions app/components/work_packages/hover_card_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<%=
if @work_package.present?
grid_layout('op-wp-hover-card', tag: :div) do |grid|
grid.with_area(:status, tag: :div, color: :muted) do
render WorkPackages::StatusButtonComponent.new(work_package: @work_package,
user: helpers.current_user,
readonly: true,
button_arguments: { size: :small })
end

grid.with_area(:id, tag: :div, color: :muted) do
render(Primer::Beta::Text.new(font_size: :small)) { "##{@work_package.id}" }
end

grid.with_area(:project, tag: :div, color: :muted) do
render(Primer::Beta::Text.new(font_size: :small)) { "- #{@work_package.project.name}" }
end

grid.with_area(:middleRow, tag: :div) do
concat(render(WorkPackages::HighlightedTypeComponent.new(work_package: @work_package, mr: 1)))
concat(render(Primer::Beta::Text.new(font_weight: :semibold)) { @work_package.subject })
end

if @assignee.present?
grid.with_area(:assignee, tag: :div) do
render(Users::AvatarComponent.new(user: @assignee, show_name: false, size: :medium))
end
end

grid.with_area(:dates, tag: :div) do
render(WorkPackages::HighlightedDateComponent.new(work_package: @work_package))
end
end
else
render Primer::Beta::Blankslate.new(border: false, narrow: true) do |component|
component.with_visual_icon(icon: "x-circle")
component.with_heading(tag: :h3).with_content(I18n.t("api_v3.errors.not_found.work_package"))
end
end
%>
13 changes: 13 additions & 0 deletions app/components/work_packages/hover_card_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

class WorkPackages::HoverCardComponent < ApplicationComponent
include OpPrimer::ComponentHelpers

def initialize(id:)
super

@id = id
@work_package = WorkPackage.visible.find_by(id:)
@assignee = @work_package.present? ? @work_package.assigned_to : nil
end
end
15 changes: 15 additions & 0 deletions app/components/work_packages/hover_card_component.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.op-wp-hover-card
display: grid
align-items: center
grid-template-columns: max-content max-content max-content auto 1fr
grid-template-rows: max-content 1fr auto
grid-row-gap: 5px
grid-column-gap: 5px
grid-template-areas: "status status id project project" "middleRow middleRow middleRow middleRow middleRow" "assignee assignee dates dates dates"
overflow: hidden

&--middleRow
align-self: flex-start

&--dates
justify-self: flex-end
24 changes: 24 additions & 0 deletions app/components/work_packages/status_button_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<%=
if @readonly
render(Primer::Beta::Button.new(**button_arguments)) do |button|
button.with_leading_visual_icon(icon: "lock") if readonly?
@status.name
end
else
render(Primer::Alpha::ActionMenu.new(**@menu_arguments)) do |menu|
menu.with_show_button(**button_arguments) do |button|
button.with_trailing_action_icon(icon: "triangle-down")
button.with_leading_visual_icon(icon: "lock") if readonly?
@status.name
end

@items.each do |item|
menu.with_item(label: item.name,
content_arguments: { classes: "__hl_inline_status_#{item.id}",
align_items: :center }) do |menu_item|
menu_item.with_trailing_visual_icon(icon: :lock) if item.is_readonly?
end
end
end
end
%>
45 changes: 45 additions & 0 deletions app/components/work_packages/status_button_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# frozen_string_literal: true

class WorkPackages::StatusButtonComponent < ApplicationComponent
include OpPrimer::ComponentHelpers

def initialize(work_package:, user:, readonly: false, button_arguments: {}, menu_arguments: {})
super

@work_package = work_package
@user = user
@status = work_package.status
@project = work_package.project

@readonly = readonly
@menu_arguments = menu_arguments
@button_arguments = button_arguments.merge({ classes: "__hl_background_status_#{@status.id}" })

@items = available_statusses
end

def button_title
I18n.t("js.label_edit_status")
end

def disabled?
!@user.allowed_in_project?(:edit_work_packages, @project)
end

def readonly?
@status.is_readonly?
end

def button_arguments
{ title: button_title,
disabled: disabled?,
aria: {
label: button_title
} }.deep_merge(@button_arguments)
end

def available_statusses
WorkPackages::UpdateContract.new(@work_package, @user)
.assignable_statuses
end
end
37 changes: 37 additions & 0 deletions app/controllers/work_packages/hover_card_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
#++
module WorkPackages
class HoverCardController < ApplicationController
before_action :load_and_authorize_in_optional_project

def show
@id = params[:id]
render layout: nil
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/work_packages/menus_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MenusController < ApplicationController
before_action :load_and_authorize_in_optional_project

def show
@sidebar_menu_items = WorkPackages::Menu.new(project: @project, params:, request:).menu_items
@sidebar_menu_items = WorkPackages::Menu.new(project: @project, params:).menu_items
render layout: nil
end
end
Expand Down
Loading

0 comments on commit c932ca6

Please sign in to comment.