Reorder Status

If you came here through a direct link, you may want to check the main

JAUS page first!

JAUS Reorder Status is a Userscript that allow Admins to move a Status up or down the order many number of times, without the need to click many times the “move up” or “move down” buttons.

How the Userscript looks like after installed in Violentmonkey.

Download/installation URL:

https://bitbucket.org/jira-admin-userscripts/jaus/raw/master/src/jaus-reorder-status.user.js

Jira Cloud

Jira DC 7.x

Jira DC 8.x

Jira Cloud

Jira DC 7.x

Jira DC 8.x

Use cases

This Userscript was meant for Admins to (less difficultly) manage the Statuses orders to they appear in the right order on Gadgets. If you didn’t know this, Gadgets order Statuses by the global order — Statuses on the top of the list appear on to the left and Statuses on the bottom appear to the right side.

Jira Admins may find out — with some Exceptions — that “To Do” Statuses should concentrate on the top; “In Progress” Statuses should spread along the middle; and “Done” Statuses should group on the bottom.

Scope

The Userscript works on the “ViewStatuses” admin screen:

ViewStatuses page with the JAUS Context Button and Reorder Status light box.

Usage

Press the JAUS button on the top or the access key “u” so the Reorder Status box shows up.

Provide the Status Id, the direction you want to move it and the number of positions (“N”) that the Status should go up or down.

If unsure of how many positions you want to move, you may repeat the process several times, moving, for example, 20 positions each time until the Status gets closer to where you want it and it’s easier to count exactly from then.

After submitting the data by pressing Reorder, the Script will fire the N requests to Jira in the background sequentially. Once the last request finishes, the page’s automatically reloaded and the Status should be in the desired position.

If the status is asked to be moved beyond the top or the bottom of the list (before the 1st or in a position beyond the list length), the requests will be performed anyway but ignored by Jira. No message is returned to the Admin as this doesn’t impact the Userscript’s usage.

Version 1.0 would reload the page after 5 seconds and it might not’ve been enough for all positions to be shifted — also a browser reload prompt would show up.

Version 1.1 fires the requests sequentially so it knows when the last finishes and only then reloads the page. It also clears the form so no browser reload prompt is triggered.

Mechanics

JAUS Reorder Status is a request automation script that performs sequential HTTP requests to Jira, as if the Admin had performed them through the browser - only very quickly and simultaneously (it’s a request to a web page, not a REST API endpoint).

In general terms, the Userscript:

  1. Tries to find the Jira create button on top (when in the ViewStatuses page). If it finds it, it injects the JAUS Context Button.

  2. When the JAUS button’s pressed, it injects a light box on top of the screen that can be closed anytime.

  3. The Admin is requested to inform the Status Id, the direction (up or down) and the number of positions (“N”) the Status should be moved.

  4. If the Admin presses the Reorder button in the light box, JAUS fires N requests like the example below and reloads the page after the last one’s returned:

<BASE-JIRA-URL>/secure/admin/StatusUp.jspa?up=<Status Id> or <BASE-JIRA-URL>/secure/admin/StatusDown.jspa?down=<Status Id>

The URLs above are requested N times, passing the atl_token provided by Jira and hidden in the page.

As with all JAUS scripts, the requests are performed through the Browser, so the Admin credentials and session will be user. There’s no manipulation of the Admin username or password anywhere in JAUS.

Repository

JAUS Reorder Status’s source code is hosted in BitBucket:

https://bitbucket.org/jira-admin-userscripts/jaus/src/master/src/jaus-reorder-status.user.js

Notice that to download/install we advise the /raw/ URL.

Authorship

JAUS Reorder Status was designed and implemented by Rodrigo Martinez (Linkedin profile).

It's licensed under Creative Commons Attribution-ShareAlike 4.0 International License.

Support

If you have questions, any problem or need instructions on this Userscript’s usage, please open a request in the JAUS Help Portal.

Please select the Component jaus-reorder-status.

Roadmap & known issues

If you’d like to open a bug or suggest an improvement or new feature to JAUS Reorder Status, please do so through the JAUS Help Portal, selecting the component jaus-reorder-status.

key summary type status fixversions
Loading...
Refresh

Jira feature request

Please vote, watch and comment on these feature requests!