---- Edited on Nov 01 2021:
A new workaround has been implemented as a Browser Userscript available in
The "lauching post" is this: https://community.atlassian.com/t5/Jira-discussions/JAUS-Jira-Admin-Userscripts/m-p/1850976
One of the Userscripts is exactly for this end and is much easier to use than JMeter.
'hope you like it!
Cheers! š»
----
Ever noticed how Statuses often aren't in the order you expect them to be in Dashboards or filter results?
That happens because Dashboards (and JQL's order by) order Statuses by their global order. That order is the same for all projects.
With admin credential, access .../secure/admin/ViewStatuses.jspa and you'll see the Statuses global order, from top (first) to bottom (last).
Having over a hundred Statuses (don't ask me :-)) and realizing their global order is all messed up can be upsetting. And new Statuses are put last in order by default.
You can proceed to reorder each status by clicking in the up/down arrows one-by-one or fallback to one of the lazy webdeveloper's favorite tool: JMeter! :-)
1) Open .../secure/admin/ViewStatuses.jspa and mouseover the "edit" link on the status you wish to reorder.
The URL will reveal the status ID, ex. .../secure/admin/EditStatus!default.jspa?id=12800
2) Decide how many positions you want to move up or down. Precision might not be critical here. Usually just keeping most of "todo" above "in progress" and above "done" is a good start.
3) Copy and paste the XML in the bottom into a new file and save it with ".jmx" extension. Comments are in pt_BR but nevermind. It was tested in JMeter 2 and 5.
4) Open JMeter and open the newly created file. Edit the settings like the prints below:
status_method: StatusUp or StatusDown (mopve up or down in the global order)
status_id: The ID you got in step 1).
loop_count: The number of positions you want to move the status up or down.
Hostnaem or IP: ex. jira.yourcompany.com
os_username: An Admin's username
os_password: The admin's password
5) Just save it and play it! It's very fast. On the first executions set the loop_count to few values just to test the config.
6) Open .../secure/admin/ViewStatuses.jspa and confirm the Status has been reordered accordingly! :-)
You might need to tweak some more configs depending on your Jira or proxy setup...
Happy housekeeping!
XML:
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.0 r1840935">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Ordem de status no Jira" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="VariƔveis Definidas Pelo UsuƔrio" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread" enabled="true">
<stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Controlador de IteraĆ§Ć£o" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">1441750292000</longProp>
<longProp name="ThreadGroup.end_time">1441750292000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="VARIAVEIS" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="status_method" elementType="Argument">
<stringProp name="Argument.name">status_method</stringProp>
<stringProp name="Argument.value">StatusUp</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">StatusUp ou StatusDown</stringProp>
</elementProp>
<elementProp name="status_id" elementType="Argument">
<stringProp name="Argument.name">status_id</stringProp>
<stringProp name="Argument.value">XYZ</stringProp> <!-- REPLACE WITH STATUS ID -->
<stringProp name="Argument.desc">ID do status</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="loop_count" elementType="Argument">
<stringProp name="Argument.name">loop_count</stringProp>
<stringProp name="Argument.value">10</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<stringProp name="Argument.desc">NĆŗmero de vezes pra subir ou descer o status</stringProp>
</elementProp>
</collectionProp>
</Arguments>
<hashTree/>
<CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="Cookie" enabled="true">
<collectionProp name="CookieManager.cookies"/>
<boolProp name="CookieManager.clearEachIteration">false</boolProp>
</CookieManager>
<hashTree/>
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="Auth" enabled="true">
<collectionProp name="AuthManager.auth_list"/>
</AuthManager>
<hashTree/>
<ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.domain">XYZ</stringProp> <!-- REPLACE WITH JIRA'S URL -->
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.concurrentPool">4</stringProp>
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
<stringProp name="HTTPSampler.connect_timeout">60000</stringProp>
<stringProp name="HTTPSampler.response_timeout">60000</stringProp>
</ConfigTestElement>
<hashTree/>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Login" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="VariƔveis Definidas Pelo UsuƔrio" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="os_username" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">XYZ</stringProp> <!-- REPLACE WITH ADMIN USERNAME -->
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">os_username</stringProp>
</elementProp>
<elementProp name="os_password" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">XYZ</stringProp> <!-- REPLACE WITH ADMIN PASSWORD -->
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">os_password</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/rest/gadget/1.0/login</stringProp>
<stringProp name="HTTPSampler.method">POST</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="TestPlan.comments">Faz login com um usuƔrio admin no Jira</stringProp>
</HTTPSamplerProxy>
<hashTree/>
<LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="RepetiĆ§Ć£o" enabled="true">
<boolProp name="LoopController.continue_forever">true</boolProp>
<stringProp name="LoopController.loops">${loop_count}</stringProp>
<stringProp name="TestPlan.comments">Repete a chamada da URL "loop_count" vezes</stringProp>
</LoopController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="MovimentaĆ§Ć£o de status" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="VariƔveis Definidas Pelo UsuƔrio" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="up" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">${status_id}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">up</stringProp>
</elementProp>
<elementProp name="down" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">${status_id}</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
<stringProp name="Argument.name">down</stringProp>
</elementProp>
</collectionProp>
</elementProp>
<stringProp name="HTTPSampler.domain"></stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol"></stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path">/secure/admin/${status_method}.jspa</stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<boolProp name="HTTPSampler.BROWSER_COMPATIBLE_MULTIPART">true</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<stringProp name="HTTPSampler.connect_timeout"></stringProp>
<stringProp name="HTTPSampler.response_timeout"></stringProp>
<stringProp name="TestPlan.comments">Chama a URL parametrizada pra mover a ordem de um Status pra cima ou pra baixo</stringProp>
</HTTPSamplerProxy>
<hashTree/>
</hashTree>
</hashTree>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
<value class="SampleSaveConfiguration">
<time>true</time>
<latency>true</latency>
<timestamp>true</timestamp>
<success>true</success>
<label>true</label>
<code>true</code>
<message>true</message>
<threadName>true</threadName>
<dataType>true</dataType>
<encoding>false</encoding>
<assertions>true</assertions>
<subresults>true</subresults>
<responseData>false</responseData>
<samplerData>false</samplerData>
<xml>false</xml>
<fieldNames>false</fieldNames>
<responseHeaders>false</responseHeaders>
<requestHeaders>false</requestHeaders>
<responseDataOnError>false</responseDataOnError>
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
<assertionsResultsToSave>0</assertionsResultsToSave>
<bytes>true</bytes>
<threadCounts>true</threadCounts>
</value>
</objProp>
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
</hashTree>
</hashTree>
</jmeterTestPlan>
Rodrigo
Atlassian Premier Support Engineer
Atlassian / e-Core
SĆ£o Paulo, Brazil
9 comments