OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[50070]Make the seed data in the teaser sections "Welcome to OpenProejct" more robust for user that do not have the correct permissions (#14011)
Behrokh Satarnejadead0d3efaff6
diff --git a/app/seeders/standard.yml b/app/seeders/standard.ymlindex 3213631dd84..5de2a12788b 100644--- a/app/seeders/standard.yml+++ b/app/seeders/standard.yml@@ -238,16 +238,21 @@ workflows:welcome:t_title: "Welcome to OpenProject!"t_text: |- Select one of the demo projects to get started with some demo data we have prepared for you.+ OpenProject is the leading open source project management software. It supports classic, agile as well as hybrid project management and gives you full control over your data.- * [Demo project]({{opSetting:base_url}}/projects/demo-project): to get an overview about classical project management.- * [Scrum project]({{opSetting:base_url}}/projects/your-scrum-project): to learn about Agile and Scrum project management.+ Core features and use cases:- Also, you can create a blank [new project]({{opSetting:base_url}}/projects/new).+ * [Project Portfolio Management](https://www.openproject.org/collaboration-software-features/project-portfolio-management/)+ * [Project Planning and Scheduling](https://www.openproject.org/collaboration-software-features/project-planning-scheduling/)+ * [Task Management and Issue Tracking](https://www.openproject.org/collaboration-software-features/task-management/)+ * [Agile Boards (Scrum and Kanban)](https://www.openproject.org/collaboration-software-features/agile-project-management/)+ * [Requirements Management and Release Planning](https://www.openproject.org/collaboration-software-features/product-development/)+ * [Time and Cost Tracking, Budgets](https://www.openproject.org/collaboration-software-features/time-tracking/)+ * [Team Collaboration and Documentation](https://www.openproject.org/collaboration-software-features/team-collaboration/)- Never stop collaborating. With open source and open mind.+ Welcome to the future of project management.- You can change this welcome text [here]({{opSetting:base_url}}/admin/settings/general).+ For Admins: You can change this welcome text [here]({{opSetting:base_url}}/admin/settings/general).projects:demo-project:t_name: Demo projectdiff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex bc7bfeff0f5..2b0a43f37f5 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -601,7 +601,6 @@ en:steps:help_menu: 'The Help (?) menu provides <b>additional help resources</b>. Here you can find a user guide, helpful how-to videos and more. <br> Enjoy your work with OpenProject!'members: 'Invite new <b>members</b> to join your project.'- project_selection: 'Please click on one of the demo projects that we have prepared. Demo data is currently only available in English. <br> The general <b>demo project</b> suits best for classical project management, while the <b>Scrum project</b> is better for agile project management.'quick_add_button: 'Click on the plus (+) icon in the header navigation to <b>create a new project</b> or to <b>invite coworkers</b>.'sidebar_arrow: "Use the return arrow in the top left corner to return to the project’s <b>main menu</b>."welcome: 'Take a three minutes introduction tour to learn the most <b>important features</b>. <br> We recommend completing the steps until the end. You can restart the tour any time.'diff --git a/frontend/src/app/core/setup/globals/onboarding/helpers.ts b/frontend/src/app/core/setup/globals/onboarding/helpers.tsindex 2ee499c4dd2..c5fc9bb24bd 100644--- a/frontend/src/app/core/setup/globals/onboarding/helpers.ts+++ b/frontend/src/app/core/setup/globals/onboarding/helpers.ts@@ -1,5 +1,3 @@-export const demoProjectName = 'Demo project';-export const scrumDemoProjectName = 'Scrum project';export const onboardingTourStorageKey = 'openProject-onboardingTour';export type OnboardingTourNames = 'prepareBacklogs'|'backlogs'|'taskboard'|'homescreen'|'main';@@ -47,21 +45,6 @@ export function waitForElement(});}-export function demoProjectsLinks() {- const demoProjects = [];- const demoProjectsLink = jQuery(`.widget-box.welcome a:contains(${demoProjectName})`);- const scrumDemoProjectsLink = jQuery(`.widget-box.welcome a:contains(${scrumDemoProjectName})`);-- if (demoProjectsLink.length) {- demoProjects.push(demoProjectsLink);- }- if (scrumDemoProjectsLink.length) {- demoProjects.push(scrumDemoProjectsLink);- }-- return demoProjects;-}-export function preventClickHandler(e:any) {e.preventDefault();e.stopPropagation();diff --git a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.tsindex 6fbe5f0fa19..fea77d928a1 100644--- a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts+++ b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour.ts@@ -1,9 +1,7 @@import { wpOnboardingTourSteps } from 'core-app/core/setup/globals/onboarding/tours/work_package_tour';import {- demoProjectsLinks,OnboardingTourNames,onboardingTourStorageKey,- preventClickHandler,ProjectName,waitForElement,} from 'core-app/core/setup/globals/onboarding/helpers';@@ -41,7 +39,7 @@ export type OnboardingStep = {onBeforeStart?:() => void,};-function initializeTour(storageValue:string, disabledElements?:string, projectSelection?:boolean) {+function initializeTour(storageValue:string) {window.onboardingTourInstance = new window.EnjoyHint({onStart() {jQuery('#content-wrapper, #menu-sidebar').addClass('-hidden-overflow');@@ -52,14 +50,6 @@ function initializeTour(storageValue:string, disabledElements?:string, projectSe},onSkip() {sessionStorage.setItem(onboardingTourStorageKey, 'skipped');- if (disabledElements) {- jQuery(disabledElements).removeClass('-disabled').unbind('click', preventClickHandler);- }- if (projectSelection) {- jQuery.each(demoProjectsLinks(), (i, e) => {- jQuery(e).off('click');- });- }jQuery('#content-wrapper, #menu-sidebar').removeClass('-hidden-overflow');},});@@ -121,7 +111,7 @@ export function start(name:OnboardingTourNames, project?:ProjectName):void {startTour(scrumTaskBoardTourSteps());break;case 'homescreen':- initializeTour('startProjectTour', '.widget-box--blocks--buttons a', true);+ initializeTour('startProjectTour');startTour(homescreenOnboardingTourSteps());break;case 'main':diff --git a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.tsindex 6036ec9285b..0219115967e 100644--- a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts+++ b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts@@ -1,7 +1,6 @@// Dynamically loads and triggers the onboarding tour// when on the correct spotsimport {- demoProjectsLinks,OnboardingTourNames,onboardingTourStorageKey,ProjectName,@@ -29,7 +28,7 @@ export function detectOnboardingTour():void {if (!isMobile && demoProjectsAvailable) {// Start after the intro modal (language selection)// This has to be changed once the project selection is implemented- if (url.searchParams.get('first_time_user') && demoProjectsLinks().length === 2) {+ if (url.searchParams.get('first_time_user')) {currentTourPart = '';sessionStorage.setItem(onboardingTourStorageKey, 'readyToStart');diff --git a/frontend/src/app/core/setup/globals/onboarding/tours/homescreen_tour.ts b/frontend/src/app/core/setup/globals/onboarding/tours/homescreen_tour.tsindex 3adbc4a2337..7ae498add14 100644--- a/frontend/src/app/core/setup/globals/onboarding/tours/homescreen_tour.ts+++ b/frontend/src/app/core/setup/globals/onboarding/tours/homescreen_tour.ts@@ -1,8 +1,3 @@-import {- demoProjectName,- preventClickHandler,- scrumDemoProjectName,-} from 'core-app/core/setup/globals/onboarding/helpers';import { OnboardingStep } from 'core-app/core/setup/globals/onboarding/onboarding_tour';export function homescreenOnboardingTourSteps():OnboardingStep[] {@@ -15,25 +10,9 @@ export function homescreenOnboardingTourSteps():OnboardingStep[] {bottom: 7,},{- description: I18n.t('js.onboarding.steps.project_selection'),- selector: '.widget-box.welcome',- event: 'custom',- showSkip: false,containerClass: '-dark -hidden-arrow',- clickable: true,onBeforeStart() {- // Handle the correct project selection and redirection- // This will be removed once the project selection is implemented- jQuery(`.widget-box.welcome a:contains(${scrumDemoProjectName})`).click(function (this:HTMLAnchorElement) {- window.onboardingTourInstance.trigger('next');- window.location.href = `${this.href}/?start_scrum_onboarding_tour=true`;- });- jQuery(`.widget-box.welcome a:contains(${demoProjectName})`).click(function (this:HTMLAnchorElement) {- window.onboardingTourInstance.trigger('next');- window.location.href = `${this.href}/work_packages/?start_onboarding_tour=true`;- });- // Disable clicks on other links- jQuery('.widget-box.welcome a').addClass('-disabled').bind('click', preventClickHandler);+ window.location.href = `${window.location.origin}/projects/demo-project/work_packages/?start_onboarding_tour=true`;},},];diff --git a/spec/features/onboarding/onboarding_tour_spec.rb b/spec/features/onboarding/onboarding_tour_spec.rbindex 02ff22f2835..db19c2e0693 100644--- a/spec/features/onboarding/onboarding_tour_spec.rb+++ b/spec/features/onboarding/onboarding_tour_spec.rb@@ -78,11 +78,6 @@ RSpec.describe 'onboarding tour for new users', js: true doselect 'English', from: 'user_language'click_button 'Save'end-- it 'when the welcome block does not include the demo projects' do- expect(page).not_to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: true- expect(page).not_to have_selector '.enjoyhint_next_btn'- endendcontext 'when I skip the language selection' do@@ -151,10 +146,7 @@ RSpec.describe 'onboarding tour for new users', js: true doit 'and I continue the tutorial' donext_button.click- expect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.project_selection')), normalize_ws: true-- # SeleniumHubWaiter.wait- find('.welcome').click_link 'Demo project'+ # Continue on WP pageexpect(page).to have_current_path "/projects/#{project.identifier}/work_packages?start_onboarding_tour=true"step_through_onboarding_wp_tour project, wp1