When creating a customfield-type module I can set the velocity template for column-view to an empty template, but is there any way to prevent the field from being selected?
~~Only fields implementing NavigableField
are able to be selected in the Issue Navigator:
https://docs.atlassian.com/software/jira/docs/api/8.5.5/com/atlassian/jira/issue/fields/NavigableField.html~~
com.atlassian.jira.issue.fields.CustomField
implements NavigableField
so I can’t really un-implement it. I don’t even know if there is a way to override the CustomField implementation. The module implements com.atlassian.jira.issue.customfields.CustomFieldType
Yep, sorry, naive answer. Adding a customfield implementation that did not include navigable would be difficult and a much larger job.
I don’t believe it’s possible to prevent a field from being selected in the navigator if it is in context.
In com.atlassian.jira.gadgets.system.AvailableColumnsResource
in getFields()
I see
if (field instanceof CustomField) {
final CustomField customField = (CustomField) field;
if (!customField.getCustomFieldType().getDescriptor().isViewTemplateExists() &&
!customField.getCustomFieldType().getDescriptor().isColumnViewTemplateExists()) {
iterator.remove();
}
}
now I’ve got a view template, so my fields are still being selected but I wonder if I can implement a custom descriptor which return false for isViewTemplateExists()
but still returns html for getViewHtml