I need to perform EXACT search. I am using below query:
issueFunction in issueFieldExactMatch("project = ABC and issuetype=DE", "summary", "FGH")
and it is returning correctly the issues with summary "FGH", but I want to list issues with summary "fgh" also.
I cannot use issueFieldMatch() because that would give results with nearby values as well like "fghij" or "ABCFGH".
I need to perform exact search but it should be case-INsensitive.
Also, any search with regular expression in issueFieldExactMatch() is not working, I do not uderstand why is that. As per documentation
below JQL should work:
issueFunction in issueFieldExactMatch("project = ABC and issuetype = DE", "Summary", "^T.st$")
I have issue with Summary "Test" but it is not giving any results.
Kindly help
Regards,
Swapnil Srivastav
Hello @Dan27
You can get it via changeHistoryManager like this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.MutableIssue
// Uncomment this to test is script console and place correct issue key
//MutableIssue issue = ComponentAccessor.getIssueManager().getIssueObject("TEST-1")
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def history = changeHistoryManager.getChangeItemsForField(issue, "Epic Link")
if (history.size()>1){
def prevousEpicLink = history.last().fromString
log.error("prevous epic: ${prevousEpicLink}")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.issue.MutableIssue
// Uncomment this to test is script console and place correct issue key
//MutableIssue issue = ComponentAccessor.getIssueManager().getIssueObject("TEST-1")
def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def history = changeHistoryManager.getChangeItemsForField(issue, "Epic Link")
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Epic Link")
def issueManager = ComponentAccessor.getIssueManager()
if (history.size()>1){
def prevousEpicLink = history.last().fromString
log.error("prevous epic: ${prevousEpicLink}")
def epicIssue = issueManager.getIssueObject(prevousEpicLink)
issue.setCustomFieldValue(customField, epicIssue)
issueManager.updateIssue(null, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.