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.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.