Hello I have a lot of automatic issue creation and commenting in JIRA. And wanted to add to the issue a customField named "Number of automatic updates" that increments everytime an issues is commented. The tipical solution for this is using the number of comments but that is not possible in because the comments are limited programatically to 20. So in this case I would always have at max 20.
Is there any straightforward method that makes it possible to do so?
I'm trying this approach but it keeps giving me exception and errors related to the CustomField Object:
MutableIssue issue = IM.getIssueObject(alreadyReportedIssueId);
private static final String COMMENTNUMBER_CUSTOMFIELD_ID = "commentnumber-customfield-id";
private static final CustomField customFieldObject = CustomFieldManager.getCustomFieldObjectByName(COMMENTNUMBER_CUSTOMFIELD_ID);
issue.setCustomFieldValue(COMMENTNUMBER_CUSTOMFIELD_ID, (Integer.parseInt(customFieldObject.getValue(issue))++));
PS: The version of JIRA I'm using is: version 3.13.5