FieldLayoutManager getFieldLayoutManager() { if (fieldLayoutManager == null) { fieldLayoutManager = ComponentAccessor.getFieldLayoutManager(); } return fieldLayoutManager; }
private FieldLayoutManager getFieldLayoutManager() { // Circular dependancy between FieldLayoutManager and FieldManager if (fieldLayoutManager == null) // volatile read { fieldLayoutManager = ComponentAccessor.getFieldLayoutManager(); // volatile write } return fieldLayoutManager; }
public FieldLayoutManager getFieldLayoutManager() { return ComponentAccessor.getFieldLayoutManager(); }
private FieldLayoutManager getFieldLayoutManager() { return ComponentAccessor.getFieldLayoutManager(); }
@Deprecated public FieldVisibilityManagerImpl(final FieldManager fieldManager, final ProjectManager projectManager) { this(fieldManager, projectManager, ComponentAccessor.getConstantsManager(), ComponentAccessor.getFieldLayoutManager(), ComponentAccessor.getSubTaskManager()); }
public FieldLayout getTargetFieldLayoutForType(final String targetTypeId) { final FieldLayoutManager fieldLayoutManager = ComponentAccessor.getFieldLayoutManager(); return fieldLayoutManager.getFieldLayout(getTargetProject(), targetTypeId); }
/** * Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration") for the target Project and * Issue Type. */ public void setTargetFieldLayout() { final FieldLayoutManager fieldLayoutManager = ComponentAccessor.getFieldLayoutManager(); targetFieldLayout = fieldLayoutManager.getFieldLayout(getTargetProject(), getTargetIssueTypeId()); }
/** * Returns all the unique field layouts of the selected issues * * @return Collection of the FieldLayouts. */ public Collection<FieldLayout> getFieldLayouts() { if (fieldLayouts == null) { fieldLayouts = new HashSet<FieldLayout>(); final FieldLayoutManager fieldLayoutManager = ComponentAccessor.getFieldLayoutManager(); // Iterate over all the selected issues for (final Issue issue : getSelectedIssues()) { // For each issue pull out the field layout and add it to the set fieldLayouts.add(fieldLayoutManager .getFieldLayout(issue.getProjectObject(), issue.getIssueTypeId())); } } return fieldLayouts; }
@Override public void setOption(final String key, final boolean value) { applicationPropertiesStore.setOption(key, value); ComponentAccessor.getComponent(EventPublisher.class).publish(new BooleanApplicationPropertySetEvent(key, value)); if (APKeys.JIRA_OPTION_ALLOWUNASSIGNED.equals(key)) { //JRA-35359: The "required" value for Assignee is controlled by a global setting //so we need to refresh the cache whenever we modify JIRA_OPTION_ALLOWUNASSIGNED setting ComponentAccessor.getFieldLayoutManager().refresh(); } }
public void clear() { customFieldsById.removeAll(); customFieldsByName.removeAll(); allCustomFieldIds.reset(); ComponentAccessor.getFieldLayoutManager().refresh(); }
public static boolean isVisible(GenericValue issue, String fieldname) throws FieldLayoutStorageException { FieldLayout fieldLayout = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue); return !fieldLayout.getFieldLayoutItem(ComponentAccessor.getFieldManager().getOrderableField(fieldname)).isHidden(); }
@Nullable protected Comment createComment() { final MutableIssue commentedIssue = getMutableIssue(); final OrderableField commentField = getOrderableField(IssueFieldConstants.COMMENT); final FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout( commentedIssue).getFieldLayoutItem(commentField); commentField.updateIssue(fieldLayoutItem, commentedIssue, getFieldValuesHolder()); final ModifiedValue comment = commentedIssue.getModifiedFields().get(IssueFieldConstants.COMMENT); final IssueChangeHolder changeHolder = new DefaultIssueChangeHolder(); if (comment != null) { commentField.updateValue(fieldLayoutItem, commentedIssue, comment, changeHolder); } // Reset the comment field as it has been persisted to the db. commentedIssue.getModifiedFields().remove(IssueFieldConstants.COMMENT); return changeHolder.getComment(); }
FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem(field); field.updateValue(fieldLayoutItem, issue, modifiedFields.get(fieldId), changeHolder);
FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue.getGenericValue()).getFieldLayoutItem(customField); DefaultIssueChangeHolder issueChangeHolder = new DefaultIssueChangeHolder(); if (customField.getCustomFieldType() instanceof JobSwitchCFType) {
try fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue.getProjectObject(), issue.getIssueTypeId()).getFieldLayoutItem(getId());
@Override public MessagedResult needsMove(Collection originalIssues, Issue targetIssue, FieldLayoutItem targetFieldLayoutItem) { // Warn the users if we are bulk moving and the renderer types are different in one of the fieldLayoutItems if (originalIssues.size() > 1) { for (final Object originalIssue1 : originalIssues) { Issue originalIssue = (Issue) originalIssue1; // Also if the field is renderable and the render types differ prompt with an edit FieldLayoutItem fieldLayoutItem = null; try { fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(originalIssue.getProjectObject(), originalIssue.getIssueTypeId()).getFieldLayoutItem(getId()); } catch (DataAccessException e) { log.warn(getName() + " field was unable to resolve the field layout item for issue " + originalIssue.getId(), e); } String rendererType = (fieldLayoutItem != null) ? fieldLayoutItem.getRendererType() : null; String targetRendererType = (targetFieldLayoutItem != null) ? targetFieldLayoutItem.getRendererType() : null; if (!rendererTypesEqual(rendererType, targetRendererType)) { return new MessagedResult(false, getAuthenticationContext().getI18nHelper().getText("renderer.bulk.move.warning"), MessagedResult.WARNING); } } } return new MessagedResult(false); }
final FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager() .getFieldLayout(issue.getProjectObject(), issue.getIssueTypeId()) .getFieldLayoutItem(field);
public String getHtml(final Map displayParams, final Issue issue) { final FieldLayout fieldLayout = ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue); final String hiddenFieldId = getNavigableField().getHiddenFieldId(); if ((fieldLayout == null) || ((hiddenFieldId != null) && fieldLayout.isFieldHidden(hiddenFieldId))) { return ""; } else { final String timerName = !UtilTimerStack.isActive() ? "" : "Rendering navigable field '" + getNavigableField().getId() + "' for issue: " + (issue == null ? "null" : issue.getKey()); try { UtilTimerStack.push(timerName); return getNavigableField().getColumnViewHtml(fieldLayout.getFieldLayoutItem(getNavigableField().getId()), displayParams, issue); } finally { UtilTimerStack.pop(timerName); } } }
try fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(originalIssue.getProjectObject(), originalIssue.getIssueTypeId()).getFieldLayoutItem(getId());
FieldLayoutItem fieldLayoutItem = ComponentAccessor.getFieldLayoutManager().getFieldLayout(newIssue).getFieldLayoutItem(field); field.updateValue(fieldLayoutItem, newIssue, modifiedFields.get(fieldId), changeHolder);