Is it possible to put a validation IF a field WAS populated with a certain date?
The field are cleared down at a point - Hence the "was populated with"
Thanks
@Rob B ,
This can be done by scripted validator.
Script will be - To check the issue history for the custom field object there you can check the that field had a specific value or not.
In the script you need use getChangeItemsForField function which will give you the change history for that custom field which you need to iterate and in the for look you can compare the history values.
Accept the Answer if it helps
Hi Guys,
Sorry that doesnt really help me. Im a beginner.
Rob
Hi @Rob B
Do you mean put a workflow validator based on the previous value in your customfield ?
I think you can do it you'il need to get the history of your issue
https://docs.atlassian.com/software/jira/docs/api/7.0.5/com/atlassian/jira/issue/changehistory/ChangeHistoryManager.html#getChangeItemsForField-com.atlassian.jira.issue.Issue-java.lang.String-
@Rob B
Refer this Video which explain how you can get the history
import com.atlassian.jira.component.ComponentAccessordef issueManager = ComponentAccessor.issueManagerdef changeHistoryManager = ComponentAccessor.changeHistoryManagerdef projectManager = ComponentAccessor.projectManagerdef project = projectManager.getProjectByCurrentKey("MOCK")def issues = issueManager.getIssueObjects(issueManager.getIssueIdsForProject(project.id))issues.each { issue -> log.warn "${changeHistoryManager.getAllChangeItems(issue)}"}
Thanks Sachin
It looks like you're new here. Sign in or register to get started.