I have 2 free text custom fields called Longitude and Latitude. Users enter text info with decimal numbers. I want to convert that data to DMS numbers in a new respective text fields example “Longitude (DMS)”. Using JWME and automation for JIRA. Example if user enters “Latitude - 40.75” it would be converted to “40 45 0”.

Formula for this is :

Example: Convert decimal degrees 156.742 to degrees minutes seconds

The whole number is degrees. So 156.742 gives you 156 degrees.

Multiply the remaining decimal by 60.

0.742*60 = 44.52, so the whole number 44 equals minutes.
Multiply the remaining decimal by 60.
0.52*60 = 31.2, so the whole number 31 equals seconds.

Decimal degrees