I think you've answered your own question. The documentation you've linked to is the best place to start, and there is no more "portable" way available, unless you write some extra code to work off the name of the field (which is risky because you can change the name of a field very easily)
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot