Using Jira 5.2.2 and ScriptRunner 2.1.3
Problem: I have two fields, each containing multiple Jira versions. The standard field: 'Fix Version/s' and a custom field: 'Planned For'. The 'Fix Version/s' field can only contain versions or a subset of the 'Planned For' versions. I'm trying to created my first custom, scripted field: toPort (an unlimited text field) using ScriptRunner. This field will contain a string of the version names that is the difference/delta between the 'Planned For' and 'Fix Version/s' field.
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import org.apache.commons.lang.StringUtils;
def pfNames = new ArrayList();
CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager();
def pfObj = customFieldManager.getCustomFieldObjectByName('Planned For');
def pfList = issue.getCustomFieldValue(pfObj);
def fixedList = issue.getFixVersions();
if (pfList != null) {
pfNames = pfList.name;
log.warn("<<BW>>-01 " + StringUtils.join(pfNames, ", "));
if (fixedList != null) {
flNames = fixedList.name;
log.warn("<<BW>>-02: " + StringUtils.join(flNames, ", "));
pfNames.removeAll(flNames);
}
log.warn("<<BW>>-03: " + StringUtils.join(pfNames, ", "));
}
return( StringUtils.join(pfNames, ", ") );
While editing this scripted field, I previewed each of the issues individually and the appropriate version names appeared in the preview pane. In the Issue Navigator, the columns were configured to show this new toPort field.
Then entered jql query#1:
The issues, I expected to be displayed, were displayed but the "toPort" column was not displayed. Then "toPort" was added to the jql query(known as query#2):
The issues, I expected to be displayed, were displayed but the "toPort" column was not displayed. Then "toPort" was added to the jql query(known as query#2):
The "toPort" column was now displayed in the Issue Navigator but only issues where "Fix Version/s" value were not null(empty), are displayed. Then I reversed the toPort portion of the query to check for empty. i.e. (known as query#3)

The remaining issues (query#1 - query#2) are not display along with null and non-null toPort values. Have I built in some dependency with the 'Fix Version/s' field or something that is preventing the displaying of the toPort field all the time in the Issue Navigator?
Any assistance would be greatly appreciated.