Hi Team,
Recently we have added some values to single select custom field and when we select those newly added values while creating tickets those values are reflecting but when select any value which are newly added in between the transition it is appearing as blank instead of the value. Last 3 values are newly added and the blue color value is the one which I selected in one of the transition "change HERE Workstream" instead of value it is showing blank. Can some one help me on this. This is causing big issue in our Jira.
Regards,
Mounika
Check the workflow to see if there are any post functions for the transition that might be changing that field.
Hi @Trudy P Claspill there are no post functions related to the field which I am facing the issue.
Can you show us the Post functions for the "Change HERE Workstream" transition?
In first post function one script is running and adding that script also
import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.Issue; import com.atlassian.jira.issue.CustomFieldManager; import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.issue.IssueManager import com.atlassian.jira.event.type.EventDispatchOption import java.text.Format; import java.text.SimpleDateFormat; import java.util.Date; def issueManager = ComponentAccessor.getIssueManager() def customFieldManager = ComponentAccessor.getCustomFieldManager() Issue issue = issue def currentUserObj = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser() CustomField here_workstream = customFieldManager.getCustomFieldObject("customfield_18209") CustomField here_comment = customFieldManager.getCustomFieldObject("customfield_17910") def cur_date = new Date().format( 'dd:MM:yyyy hh:mm' ) String here_workstream_value = issue.getCustomFieldValue(here_workstream).toString() def here_comment_value = issue.getCustomFieldValue(here_comment).toString() if (( here_workstream_value == "null") || (here_workstream_value == "NA")) { //do nothing } else{ if (here_comment_value == "null"){ String new_comment = "["+ cur_date + "]" + "\t" +":: HERE Workstream has been changed to "+ "\""+ here_workstream_value+ "\""+ ". Defect will be analyzed by the new workstream" issue.setCustomFieldValue(here_comment, new_comment) issueManager.updateIssue(currentUserObj, issue, EventDispatchOption.DO_NOT_DISPATCH, false) } else { String new_comment = "["+ cur_date + "]" + "\t" +":: HERE Workstream has been changed to "+ "\""+ here_workstream_value+ "\""+ ". Defect will be analyzed by the new workstream" String updated_value = new_comment + "\n"+ here_comment_value issue.setCustomFieldValue(here_comment, updated_value) issueManager.updateIssue(currentUserObj, issue, EventDispatchOption.DO_NOT_DISPATCH, false) } }
It looks like you're new here. Sign in or register to get started.