#3642 Drop the roadmap_on_issues_page project setting
Merged 2 years ago by pingou. Opened 2 years ago by pingou.

file modified
+4 -1
@@ -626,7 +626,6 @@ 

              "fedmsg_notifications": True,

              "stomp_notifications": True,

              "pull_request_access_only": False,

-             "roadmap_on_issues_page": False,

              "notify_on_pull-request_flag": False,

              "notify_on_commit_flag": False,

              "issue_tracker_read_only": False,
@@ -642,6 +641,10 @@ 

                      current[key] = int(current[key])

                  elif is_true(current[key]):

                      current[key] = True

+             # Update the current dict, removing the old keys

+             for key in sorted(current):

+                 if key not in default:

+                     del current[key]

              return current

          else:

              return default

@@ -160,7 +160,7 @@ 

            </div>

          {% endif %}

          <div class="btn-group">

-         <a href="#" 

+         <a href="#"

              class="btn btn-sm dropdown-toggle btn-outline-primary"

              data-toggle="dropdown" id="watch-button">

            <i class="fa fa-clone fa-fw"></i>
@@ -260,16 +260,11 @@ 

              <a {%

                if select == 'issues' %}class="active nav-link" {%

                else %}class="nav-link" {%

-               endif %}href={% if not repo.settings.get(

-                   'roadmap_on_issues_page', False) %}"{{ url_for(

+               endif %}href="{{ url_for(

                    'ui_ns.view_issues',

                    repo=repo.name,

                    username=username,

-                   namespace=repo.namespace) }}"{% else %}"{{ url_for(

-                   'ui_ns.view_roadmap',

-                   repo=repo.name,

-                   username=username,

-                   namespace=repo.namespace) }}"{% endif %}>

+                   namespace=repo.namespace) }}">

                  <i class="fa fa-fw text-muted fa-exclamation-circle"></i>

                  <span class="d-none d-md-inline">Issues&nbsp;</span>

                  <span class="badge badge-secondary py-0 d-none d-md-inline">

@@ -625,43 +625,6 @@ 

  

      @patch('pagure.lib.git.update_git')

      @patch('pagure.lib.notify.send_email')

-     def test_view_issues_roadmap_view(self, p_send_email, p_ugt):

-         """ Test the view_issues endpoint when view is set as roadmap view """

-         p_send_email.return_value = True

-         p_ugt.return_value = True

- 

-         tests.create_projects(self.session)

-         tests.create_projects_git(

-             os.path.join(self.path, 'repos'), bare=True)

- 

-         # Change settings to show roadmap on issue page

-         repo = pagure.lib.get_authorized_project(self.session, 'test')

-         old_settings = repo.settings

-         old_settings['roadmap_on_issues_page'] = True

-         repo.settings = old_settings

- 

-         self.session.add(repo)

-         self.session.commit()

- 

-         # check on landing page of project for the URL that on the Issues tab

-         output = self.app.get('/test/')

-         self.assertEqual(output.status_code, 200)

-         self.assertIn('<a class="nav-link" href="/test/roadmap"', output.get_data(as_text=True))

- 

-         # Revert and check

-         old_settings = repo.settings

-         old_settings['roadmap_on_issues_page'] = False

-         repo.settings = old_settings

- 

-         self.session.add(repo)

-         self.session.commit()

- 

-         output = self.app.get('/test/')

-         self.assertEqual(output.status_code, 200)

-         self.assertIn('<a class="nav-link" href="/test/issues"', output.get_data(as_text=True))

- 

-     @patch('pagure.lib.git.update_git')

-     @patch('pagure.lib.notify.send_email')

      def test_view_issues(self, p_send_email, p_ugt):

          """ Test the view_issues endpoint. """

          p_send_email.return_value = True

file modified
+1 -3
@@ -1697,7 +1697,7 @@ 

  index 0000000..60f7480

  --- /dev/null

  +++ b/456

- @@ -0,0 +1,141 @@

+ @@ -0,0 +1,139 @@

  +{

  +    "assignee": null,

  +    "branch": "master",
@@ -1753,7 +1753,6 @@ 

  +            "project_documentation": false,

  +            "pull_request_access_only": false,

  +            "pull_requests": true,

- +            "roadmap_on_issues_page": false,

  +            "stomp_notifications": true

  +        },

  +        "tags": [],
@@ -1810,7 +1809,6 @@ 

  +            "project_documentation": false,

  +            "pull_request_access_only": false,

  +            "pull_requests": true,

- +            "roadmap_on_issues_page": false,

  +            "stomp_notifications": true

  +        },

  +        "tags": [],

With the new UI introduced in 5.0, this setting is no longer needed
nor interesting, so we are just removing it.

Fixes https://pagure.io/pagure/issue/3595

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Two tests are failing:

11:51:37 ERROR: test_view_issues_roadmap_view (tests.test_pagure_flask_ui_issues.PagureFlaskIssuestests): Test the view_issues endpoint when view is set as roadmap view

This test probably needs to be removed.

11:51:37 FAIL: test_update_git_requests (tests.test_pagure_lib_git.PagureLibGittests): Test the update_git of pagure.lib.git for pull-requests.

This test looks like an unrelated failure? But it's still failing...

Hm, odd, I ran them locally before opening the PR, I'll dig further, thanks for the heads up

rebased onto 9d6445e31c15fa08db5e5d653fd0e004a3e99cf1

2 years ago

rebased onto 1d1e23cee5b9479cb8ec134ce9e1562cc8a5fac1

2 years ago

Pretty please pagure-ci rebuild

rebased onto 31f858f9dae430a05e9f9d3b3857afba936576db

2 years ago

LGTM, feel free to merge once the CI is :green_apple:

rebased onto 926596b4035a8c3c2ef97c11b908b75cb8bcc14b

2 years ago

rebased onto 4d55f35

2 years ago

Pull-Request has been merged by pingou

2 years ago