If you came here through a direct link, you may want to check the main https://jaus.atlassian.net/wiki/spaces/JAUS page first!
Clear Field Configuration is a Userscript that allow Admins to hide all fields from a Field Configuration thatâs currently not in use. It can also show all fields instead (like a panic rollback :)).
Download/installation URL:
Use cases
Keeping Field Configurations with as minimum fields as possible is a known best-practice to prevent performance degradation (specially during re-index). See https://confluence.atlassian.com/clean/clean-up-your-jira-instance-1018788592.html (and the Advanced cleanup).
Whenever a custom fieldâs created itâs automatically added to all Field Configurations â and thereâs no easy or quick way to âclearâ a Field Configuration to the bare minimum fields.
This Userscriptâs meant to help Admins create a new âEmptyâ Field Configuration that they may further copy, add the required fields for each Project and assign to each respectively.
New Custom Fields will continue to be automatically included into every existing Field Configuration. Admins will need to keep up with this continuous house-keeping, but the kick-off (ie. hiding all already created custom fields) is something this Userscript helps with.
Scope
The Userscript works on the âConfigureFieldLayoutâ admin screen on both Cloud and Server/DC:
The Userscript tries to prevent itâs execution on Field Configurations currently in use. It does that by looking for certain UI elements in the screen that shows âused by ⊠projectsâ.
If it finds such elements, itâll print a message in the console log saying it detected the Field Configâs in use and thus not injected the JAUS button and feature.
In case this checks fails or returns a false-negative, thereâs a hard-coded warning to make sure the Field Configâs not currently in use. If đ© happens nonetheless, you can quickly run it again and choose the âShow all fieldsâ option.
Usage
On the Configuration screen for a Field Configuration, if itâs not currently in use by a Project, the JAUS button should show up.
Press the JAUS button on the top or the access key âuâ to bring up the Clear Field Configuration screen.
Simple choose if you want to âHide all fieldsâ or âShow all fieldsâ and press the Commit! button.
The Userscript will hide the button to prevent multiple clicks and fire all necessary requests in the background. As soon as all requests finish, the page will automatically reload and youâll see all fields have either been hidden or brought back.
The script doesnât mess with Locked or System fields â it literally scans for only the available links in the page (the same ones youâre seeing as âHideâ and âShowâ) and simulates a click on each.
Mechanics
This Userscript doesnât use the REST API. It fires requests to links present ion the screen.
The script looks for the header elements to inject the JAUS button and also if thereâs any text in the page that suggests the Field Configâs in use
If thereâs any
<em>
tag with contents either like "shared" or "used"If thereâs any element with style class âshared-byâ
If thereâs any element with style class âused-byâ
It then scans the page itself for every HTML link element
<a>
with theid
attribute starting with "hide_" or "show_".It sequentially fires one request to each links fetched.
When the last request finishes, the page automatically reloads.
Repository
JAUS Clear Field Configurationâs source code is hosted in BitBucket:
Notice that to download/install we advise the /raw/
URL.
Authorship
JAUS Bulk Edit Request Participant 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-clear-field-configuration
.
Roadmap
âŠ
Known issues
Please submit them through JAUS Help Portal!
Jira feature request
Please vote, watch and comment on these feature requests (for both DC and Cloud)!