Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47214

Give ability to opt out of autofavoriting

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.4 - beta 3

      Description

      I am maintaining a global library for our Jenkins which gets used by a few hundred projects. Due to that the autofavorite plugin favorites pretty much every job on our Jenkins for me. This causes issues, such as JENKINS-44995.

      I assumed that JENKINS-41497 would solve the issue, since I will no longer be in the SCM changes, however it does not.

      Regardless of if library changes should trigger autofavoriting, an option for a user to opt out of autofavoriting would be beneficial.

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            Hans Schulz this is a good feature request. Thanks.

            Show
            jamesdumay James Dumay added a comment - Hans Schulz this is a good feature request. Thanks.
            Hide
            jredl Jesse Redl added a comment -

            While, this definitely is a minor feature request I would like to case about a 60 votes on behalf of me and teams.  We have had team members who have gone back to the legacy ui just because when you open blue ocean you have a wall of favorited stuff you don't care about and it takes dozens and dozens of clicks to remove them. 

            Allow us to opt out or un favorite all or something. 

            Show
            jredl Jesse Redl added a comment - While, this definitely is a minor feature request I would like to case about a 60 votes on behalf of me and teams.  We have had team members who have gone back to the legacy ui just because when you open blue ocean you have a wall of favorited stuff you don't care about and it takes dozens and dozens of clicks to remove them.  Allow us to opt out or un favorite all or something. 
            Hide
            spencermalone Spencer Malone added a comment -

            I also am having this issue, and while this isn't a good long term solution, the following brought my blue ocean load times from 20s to less than a second. Go to your main dashboard where it shows your favorites and run the following JS in your browser's console:

            arr = $$('div[title="Remove Favourite"]')
            for (var i = 0, len = arr.length; i < len; i++) {
            arr[i].click()
            }

            Then refresh and enter it again! Note that I had to do this ~15 times before I got through my backlog of favorites, as it was displaying a max of 100 favorites per refresh.

            Show
            spencermalone Spencer Malone added a comment - I also am having this issue, and while this isn't a good long term solution, the following brought my blue ocean load times from 20s to less than a second. Go to your main dashboard where it shows your favorites and run the following JS in your browser's console: arr = $$( 'div[title= "Remove Favourite" ]' ) for ( var i = 0, len = arr.length; i < len; i++) { arr[i].click() } Then refresh and enter it again! Note that I had to do this ~15 times before I got through my backlog of favorites, as it was displaying a max of 100 favorites per refresh.
            Hide
            schulzha Hans Schulz added a comment - - edited

            Here is a script for the script console to remove all favorites:

            def user = User.get("<your user id>")
            user.getProperty(hudson.plugins.favorite.user.FavoriteUserProperty.class).data.clear()
            user.save()
            
            Show
            schulzha Hans Schulz added a comment - - edited Here is a script for the script console to remove all favorites: def user = User.get( "<your user id>" ) user.getProperty(hudson.plugins.favorite.user.FavoriteUserProperty.class).data.clear() user.save()
            Hide
            michaelneale Michael Neale added a comment -

            so James Dumay can they just remove autofav plugin - or will that upset the apple cart? 

            This seems like a great feature request (another option if paginate the fav data - but I don't think we have the means to do that now), so disabling autofav would make sense (can be a setting of the autofav plugin?)

            Show
            michaelneale Michael Neale added a comment - so James Dumay can they just remove autofav plugin - or will that upset the apple cart?  This seems like a great feature request (another option if paginate the fav data - but I don't think we have the means to do that now), so disabling autofav would make sense (can be a setting of the autofav plugin?)
            Hide
            jamesdumay James Dumay added a comment -

            Heres a PR that allows users to opt out of autofavorite. Need to fix up the i18n and write a test.

            Show
            jamesdumay James Dumay added a comment - Heres a PR that allows users to opt out of autofavorite. Need to fix up the i18n and write a test.
            Hide
            jamesdumay James Dumay added a comment -

            Code is ready for review

            Show
            jamesdumay James Dumay added a comment - Code is ready for review
            Hide
            michaelneale Michael Neale added a comment -

            PR looks good - this is worth a try - may help a bunch of folks

            Show
            michaelneale Michael Neale added a comment - PR looks good - this is worth a try - may help a bunch of folks
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James William Dumay
            Path:
            src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java
            src/main/java/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty.java
            src/main/resources/io/jenkins/blueocean/autofavorite/Messages.properties
            src/main/resources/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty/config.jelly
            src/main/resources/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty/config.properties
            src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java
            http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/45f6a79e76632e9a785c392662785a8c1c42d933
            Log:
            JENKINS-47214 Give ability to opt out of autofavoriting (#12)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James William Dumay Path: src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java src/main/java/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty.java src/main/resources/io/jenkins/blueocean/autofavorite/Messages.properties src/main/resources/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty/config.jelly src/main/resources/io/jenkins/blueocean/autofavorite/user/FavoritingUserProperty/config.properties src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/45f6a79e76632e9a785c392662785a8c1c42d933 Log: JENKINS-47214 Give ability to opt out of autofavoriting (#12)
            Hide
            jamesdumay James Dumay added a comment - - edited

            Released as 1.2.0

            Should take a few hours to get into the update center.

            Show
            jamesdumay James Dumay added a comment - - edited Released as 1.2.0 Should take a few hours to get into the update center.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James Dumay
            Path:
            src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java
            src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java
            http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/0bf368e9d9b757e7c15efccaf2eb71c472a7cb44
            Log:
            JENKINS-47214 globally disable autofavorite using system property

            -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Dumay Path: src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/0bf368e9d9b757e7c15efccaf2eb71c472a7cb44 Log: JENKINS-47214 globally disable autofavorite using system property -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false
            Hide
            jamesdumay James Dumay added a comment -

            Hans Schulz I've also added another PR that provides this function as a global system property https://github.com/jenkinsci/blueocean-autofavorite-plugin/pull/13

            Show
            jamesdumay James Dumay added a comment - Hans Schulz I've also added another PR that provides this function as a global system property https://github.com/jenkinsci/blueocean-autofavorite-plugin/pull/13
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: James William Dumay
            Path:
            src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java
            src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java
            http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/80930fe881c6b738a452e3f018c81b53b18f0fb6
            Log:
            JENKINS-47214 globally disable autofavorite using system property (#13)

            -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James William Dumay Path: src/main/java/io/jenkins/blueocean/autofavorite/FavoritingScmListener.java src/test/java/io/jenkins/blueocean/autofavorite/FavoritingScmListenerTest.java http://jenkins-ci.org/commit/blueocean-autofavorite-plugin/80930fe881c6b738a452e3f018c81b53b18f0fb6 Log: JENKINS-47214 globally disable autofavorite using system property (#13) -DBLUEOCEAN_FEATURE_AUTOFAVORITE_ENABLED=false
            Hide
            schulzha Hans Schulz added a comment -

            James Dumay I've installed the update yesterday and no autofavorites so far! Great fix, thanks!

            The system oproperty seems useful and I will try it out once its in the next release.

            Show
            schulzha Hans Schulz added a comment - James Dumay I've installed the update yesterday and no autofavorites so far! Great fix, thanks! The system oproperty seems useful and I will try it out once its in the next release.
            Hide
            jamesdumay James Dumay added a comment -

            Hans Schulz system property was added in 1.2.1 which was released to the update center

            Show
            jamesdumay James Dumay added a comment - Hans Schulz system property was added in 1.2.1 which was released to the update center
            Hide
            kshultz Karl Shultz added a comment -

            Testing Notes:
            A test for this is already part of the PR.

            Show
            kshultz Karl Shultz added a comment - Testing Notes: A test for this is already part of the PR .

              People

              • Assignee:
                jamesdumay James Dumay
                Reporter:
                schulzha Hans Schulz
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: