I'm trying to create a groovy script that will return changes in the "Due date"
import org.apache.commons.lang.StringUtils;
import com.atlassian.jira.component.ComponentAccessor;
def dateStrings = new ArrayList();
def items = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(
issue.getIssueObject(), "duedate"
);
for (item in items) {
def from = item.getFrom();
if (from != null) {
dateStrings.add(from);
}
}
if (dateStrings.isEmpty()) return null;
StringUtils.join(dateStrings, ",");
Pls help)
Hello,
It should be :
def items = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(
issue, "duedate"
);
Try to use this one:
import org.apache.commons.lang.StringUtils;
import com.atlassian.jira.component.ComponentAccessor;
def dateStrings = new ArrayList();
for (item in ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(issue, "duedate")) {
def from = item.getFrom();
if (from != null) {
dateStrings.add(from);
}
}
if (dateStrings.isEmpty()) return null;
StringUtils.join(dateStrings, ",");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.