Code Monkey home page Code Monkey logo

jira-sort-comments-tampermonkey's Introduction

What is this?

This Tampermonkey script will auto-click the comment sort link in JIRA if it detects comments are not sorted in the order you prefer. By default the script will sort comments in ascending order (oldest first), but you can easily change this by editing the script.

Why?

This script is necessary because JIRA only has a single, site-wide comment sort option, and if you prefer comments sorted in the opposite direction as your site administrator, you will have to constantly fix the sort order manually, after some number of hours or days when your session resets, and likely only after you've realized you've been reading comments in the wrong order. This script relieves this constant source of frustration. It's only a workaround until Atlassian can implement Store comment sort order in user profile (JRA-5443). However this ticket has been open since December of 2004, so I wouldn't count on it anytime soon.

How well does it work?

It seems to work well. It's possible different versions of JIRA will change the HTML element names, so it may need to be adjusted over time. Another thing I did was intercept the scroll down that happens when you click the sort order link. I tested it on my own JIRA server (v7.1.8#71012-sha1:d834917) and Atlassian's current version (at jira.atlassian.com). Improvements/assistance and Pull Requests would be greatly appreciated.

How to use

  1. If you don't have it already, follow the directions at the Tampermonkey home page to install Tampermonkey in your browser. Tampermonkey is supported in Google Chrome, Opera, Chromium, a lot of their derivatives like CoolNovo and Rockmelt and also Firefox and some Android browsers.

  2. Go to this script's page on Greasy Fork. Click the green Install this script button.

  3. Tampermonkey will now show you the script so you can review what it does. Click Install.

  4. At this time, you must edit the script to add the appropriate @match tag(s) so it runs on your JIRA servers. Click the Tampermonkey icon in your browser, go to Dashboard, click the script, add the @match tag(s). If you also wish to force comments to be sorted in descending order, change that now. Finally, click the Save button.

  5. That's it! You can test it by going to your JIRA server, reversing the comments, and reloading the page.

Copyright

Copyright (c) 2016 Steven Kehlet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jira-sort-comments-tampermonkey's People

Contributors

catholicon avatar skehlet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

jira-sort-comments-tampermonkey's Issues

Doesn't work with issues.apache.org/jira

There are 2 issues with issues.apache.org/jira:

  • it exposes jquery as jQuery instead of $
  • .issue-activity-sort-link doesn't fit the bill. Depending on context, it has .icon-sort-down.ajax-activity-content or .icon-sort-up.ajax-activity-content

Sort order is reverted after submitting comment

I am using this extension with good results, thanks a lot for creating and maintaining it.

One issue that slips through is that when adding a comment the comments are reloaded and they don't obey the previously defined order. It would be great if the extension could account for that as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.