Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

If you came here through a direct link, you may want to check the main https://jaus.atlassian.net/wiki/spaces/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 Reorder Status looks in Violentmonkey once installed.

Download/installation URL:

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

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.

Status Is showing up after positioning the Pointer over the respective edit link.

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. (smile)

After submitting the data by pressing REORDER, the Script will fire the N requests to Jira in the background and wait for 5 seconds. It then reloads the page 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.

After some 5 seconds after you pressed REORDER, the page will reload automatically. Your Browser may prompt you if you want to reload the page and you must select “yes” - or else the page will keep showing the status as it was before the Userscript’s execution.

Mechanics

JAUS Reorder Status is a request automation script that performs many parallel requests to Jira at once, as if the Admin had performed them through the browser - only very quickly and simultaneously.

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 to Jira, waits 5 seconds and reloads the page.

<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

JAUS Reorder Status may be improved to make the light box more pleasant to the eyes. It may also be improved to better handle the background requests and delay to the page reload (maybe not even requiring the User’s confirmation).

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

Known issues

Please submit them through JAUS Help Portal!

Jira feature request

Please vote, watch and comment on this feature request!

  • No labels