When the user creates a JIRA issue manually and then commits manually which references the JIRA issue, and all works as it is supposed to (the commit causes comments to be added to the JIRA issue and the state to be changed, as I specified).
However, when the user creates the JIRA issues using the Rest API then create the commits with the necessary smart commit cookies in the commit message, and pushing these to BitBucket there are issues with creating comments and with updating the state of the issue. However, it doesn’t look like JIRA is completely out of the loop, because it is providing a link back to the commit in BitBucket.
Thanks