I have found the following code but I require some assistance to modify the code.
I wish to show the time that an issue is in the "Open" status but with the code, it is somehow adding the "Open" status and "In Progress" time together and not accurately showing the information.
How do I modify this to just show the "Open" time?
It should calculate the duration in Open status. Because statusName = "Open" is given as a parameter in the code. To be sure, can you please go to one sample issue and look at the history and verify the duration in open status?
Also check "Total time this issue has been In Progress" section in this doc.
If you prefer to use a plugin, you can try Status Time Reports app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.
If you are looking for a free solution, you can try the limited version Status Time Free.
Hope it helps.