I think we need to agree on these related topics first:
What's the expected order between the macro parameters?
Either rely only on the order in which the macro parameters are listed / defined in the macro descriptor (assuming that the macro descriptor respects the order in which the macro developer has defined the macro parameters in their code)
Or group macro parameters by importance / priority (e.g. mandatory, optional, advanced, deprecated, etc.). Inside each group the macro descriptor order would be used.
Should the macro priority change (within its group) when its value is set?
Should we display all the macro parameters all the time?
Yes: then we use whatever order we get from the macro descriptor; problem fixed
No: Some macros have lots of parameters, most of them optional, some advanced, some deprecated, etc. we display only a limited number of parameters first, with a More button / link
Is it important for the user to see right away which macro parameters have a value set?
No: then we keep hidden macro parameters with a value set hidden; problem solved
Yes: Then we need to:
either show those parameters with a value set that are hidden initially under More => the order between the macro parameters changes
we could restore the macro descriptor order once the More button / link is clicked, i.e. when all parameters are shown
or indicate somehow to the user that there are some hidden parameters with a value set
The current state is:
Group macro parameters by importance (so from the start, the order from the macro descriptor is only partially respected).
Not all parameters are shown by default (when there are many parameters, not all mandatory).
Show macro parameters with a value set (that otherwise would have been hidden under More) => this further changes the order compared to the macro descriptor
Note that the order currently changes only for the macro parameters that are hidden initially under More. This means:
mandatory parameters are not affected (they are always displayed at the top, using the order from the macro descriptor)
macros with a few parameters are not affected because all their parameters are shown from the start, so there's no order change (beyond the grouping by importance)
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.