@ -0,0 +1,3 @@ |
||||
class ApplicationVersion < ApplicationRecord |
||||
include PaperTrail::VersionConcern |
||||
end |
@ -0,0 +1,4 @@ |
||||
class PaperTrailAudit < ::ApplicationVersion |
||||
self.table_name = :paper_trail_audits |
||||
self.sequence_name = :paper_trail_audits_id_seq |
||||
end |
@ -0,0 +1,41 @@ |
||||
#-- copyright |
||||
# OpenProject is an open source project management software. |
||||
# Copyright (C) 2012-2022 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 PaperTrailAudits |
||||
class CleanupJob < ::Cron::CronJob |
||||
# runs at 4:03 on Saturday |
||||
self.cron_expression = '3 4 * * 6' |
||||
|
||||
# Clean any paper trails older than 60 days |
||||
def perform |
||||
::PaperTrailAudit |
||||
.where('created_at < ?', 60.days.ago) |
||||
.delete_all |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,16 @@ |
||||
PaperTrail.config.enabled = true # PT will be disabled by rspec |
||||
PaperTrail.config.has_paper_trail_defaults = { |
||||
versions: { |
||||
class_name: '::PaperTrailAudit', |
||||
name: :paper_trail_audits |
||||
}, |
||||
version: :paper_trail_audit, |
||||
meta: { |
||||
whodunnit: ->(*) { User.current.id }, |
||||
stack: ->(*) { |
||||
backtrace = Rails.backtrace_cleaner.clean caller |
||||
backtrace.join("\n") |
||||
} |
||||
}, |
||||
on: %i[destroy] |
||||
} |
@ -0,0 +1,16 @@ |
||||
class AddPaperTrail < ActiveRecord::Migration[7.0] |
||||
def change |
||||
create_table :paper_trail_audits do |t| |
||||
t.string :item_type, null: false |
||||
t.bigint :item_id, null: false |
||||
t.string :event, null: false |
||||
t.string :whodunnit |
||||
t.text :stack |
||||
t.jsonb :object |
||||
t.jsonb :object_changes |
||||
|
||||
t.datetime :created_at |
||||
end |
||||
add_index :paper_trail_audits, %i(item_type item_id) |
||||
end |
||||
end |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 310 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 435 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 312 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 486 KiB After Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 610 KiB After Width: | Height: | Size: 200 KiB |
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 349 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 810 KiB |
Before Width: | Height: | Size: 370 KiB |
Before Width: | Height: | Size: 3.2 MiB |
Before Width: | Height: | Size: 351 KiB After Width: | Height: | Size: 107 KiB |
Before Width: | Height: | Size: 449 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 350 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 259 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 383 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 358 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 457 KiB After Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 432 KiB After Width: | Height: | Size: 119 KiB |
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 418 KiB After Width: | Height: | Size: 128 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 775 KiB After Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 453 KiB After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 425 KiB After Width: | Height: | Size: 143 KiB |
Before Width: | Height: | Size: 420 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 439 KiB After Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 360 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 447 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 332 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 16 KiB |
@ -0,0 +1,106 @@ |
||||
--- |
||||
sidebar_navigation: |
||||
title: Internal docs contributor |
||||
priority: 800 |
||||
description: Quick guide for internal team members that have write permissions |
||||
keywords: contribution, documentation, documentation process |
||||
--- |
||||
|
||||
# Documentation process for internal team members |
||||
|
||||
This guide describes how internal team members with write permissions can contribute to the OpenProject documentation. |
||||
|
||||
|
||||
## Prerequisites |
||||
|
||||
1. [The contributor has a user account on GitHub.com](https://www.openproject.org/docs/development/contribution-documentation/documentation-process/#step-1-create-user-account-on-githubcom) |
||||
2. The contributor has write permissions on the [OpenProject repository](https://github.com/opf/openproject) |
||||
3. [Software Typora editor installed](https://www.openproject.org/docs/development/contribution-documentation/documentation-process/#step-2-install-typora) |
||||
4. [Software GitHub Desktop installed](https://www.openproject.org/docs/development/contribution-documentation/documentation-process/#step-3-install-github-desktop) |
||||
|
||||
## Step 1: Clone the OpenProject repository in GitHub Desktop |
||||
|
||||
Before you can make changes you need to create a local clone of the OpenProject repository on your local computer. Open GitHub Desktop and navigate to **File -> Clone repository**. |
||||
|
||||
![clone repository](clone-repository.png) |
||||
|
||||
In the modal window select the repository ""*opf/openproject*"". Also select a folder on your computer for the cloned repository. Click **Clone**. |
||||
|
||||
![select cloned repository](select-cloned-repository.png) |
||||
|
||||
## Step 2: Update local repository (fetch origin) |
||||
|
||||
|
||||
> **Important**: Before you make changes always update your local repository. |
||||
|
||||
1. Select the branch you want to work on, e.g.`release/12.1` in the main toolbar. |
||||
2. Click on the button **Fetch origin** in the main toolbar. |
||||
|
||||
![fetch origin in github desktop](fetch-origin-in-github-desktop.png) |
||||
|
||||
## Step 3: Create a new Git branch for your change |
||||
|
||||
1. Select the latest release branch e.g.`release/12.1` as the current branch. |
||||
![create new branch - step 1](create-new-branch-step-1.png) |
||||
|
||||
2. In the same drop down click on **New branch**. |
||||
|
||||
3. In the next modal window insert a branch name that describes your changes. Also select the branch you want to work on, e.g. `release/12.1`. The click the button **Create branch**. |
||||
|
||||
![create a new branch step 2](create-new-branch-step-2.png) |
||||
|
||||
## Step 4: Open the files you want to change in Typora |
||||
|
||||
In Typora open the files you want to change (File -> Open). In the file picker navigate to the local folder you selected in the step 1. |
||||
|
||||
## Step 5: Make the changes in Typora and save the file |
||||
|
||||
The Typora editor makes it quite easy to make changes to the file. After you made your changes do not forgot to save. |
||||
|
||||
## Step 6: Commit the change to your local repository in GitHub Desktop |
||||
|
||||
Open GitHub Desktop. Here you can see all the changes you made in your local repository. |
||||
|
||||
![commit history in github desktop](commit-history-in-github-desktop.png) |
||||
|
||||
Add a commit message that best describes your change. This description should allow other users to easily understand the change you made. |
||||
|
||||
## Step 7: Push your changes to GitHub.com |
||||
|
||||
At the moment your change is only available in your local repository. To make it available on GitHub.com you need upload (push) by pressing the button **Push origin**. |
||||
|
||||
![push origin in github desktop](push-origin-in-github-desktop.png) |
||||
|
||||
## Step 8: Create a pull request |
||||
|
||||
A pull request is a workflow to ask for a review from the OpenProject team. With a pull request you basically ask a team member to check your changes and to merge it to the branch you want your change to merged to, e.g. `release/12.1` . After you pushed your local changes to your own repository click the button **Create Pull Request**. |
||||
|
||||
![](create-pull-request-github-desktop.png) |
||||
|
||||
|
||||
|
||||
In the first dropdown select the base branch you want your work to be merged in e.g. `release/12.1`. In the second dropdown select the branch you created in step 3 which contains your changes. |
||||
|
||||
![comparing-changes.png](comparing-changes.png) |
||||
|
||||
In the description field of the pull request enter a summary for the changes you made. If there is already a work package on https://community.openproject.org you can also add this to the description. This adds a relation between your pull request and the work package. |
||||
|
||||
## Step 9: Request review |
||||
|
||||
Select the label "*documentation*". |
||||
|
||||
![add documentation label for pull request](add-documentation-label-pull-requests.png) |
||||
|
||||
In the field "*Reviewers*" select "*opf/doc-writers".* |
||||
|
||||
![select reviewer for documentation](select-reviewer-for-documentation.png) |
||||
|
||||
## Step 10: Wait for feedback from the reviewers |
||||
|
||||
... and hopefully it is all LGTM which means "Looks good to me(rge). Congrats to your first contribution to the OpenProject documentation. We appreciate your effort :-) |
||||
|
||||
## Additional notes for working on the legal docs |
||||
|
||||
* We always deploy the [main branch](https://github.com/opf/legal/tree/main) on our [website](https://www.openproject.org/legal/). This deployment needs to be manually triggered by the marketing team. |
||||
* If you want to make minor changes you don't need a review do this directly in the main branch without creating a new branch and new pull request. |
||||
* If you need a review you need to create a new branch from the main branch. The branch `release/12.1` only exists in the repository opf/openproject (OpenProject software). |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |