private void validateExistingProjectHasValidStateForImport( final BackupProject backupProject, final BackupSystemInformation backupSystemInformation, final Project existingProject, final I18nHelper i18n, final MessageSet messageSet) { final String projectKey = backupProject.getProject().getKey(); // Verify that the project has no existing issues final long issueCount = issueManager.getIssueCountForProject(existingProject.getId()); if (issueCount != 0) { messageSet.addErrorMessage( getText( i18n, "admin.error.project.import.project.contains.issues", projectKey, String.valueOf(issueCount))); } // Verify that the project has no existing versions final long versionCount = versionManager.getVersions(existingProject.getId()).size(); if (versionCount != 0) { messageSet.addErrorMessage( getText( i18n, "admin.error.project.import.project.contains.versions", projectKey, String.valueOf(versionCount))); } // Verify that the project has no existing components final long componentCount = projectComponentManager.findAllForProject(existingProject.getId()).size(); if (componentCount != 0) { messageSet.addErrorMessage( getText( i18n, "admin.error.project.import.project.contains.components", projectKey, String.valueOf(componentCount))); } // Verify that if the project has a default assignee of Unassigned that the current instance of // JIRA supports unassigned issues if (projectHasDefaultAssigneeUnassigned(backupProject, backupSystemInformation)) { // We want this instance of JIRA to allow unassigned issues. final boolean allowUnassigned = applicationProperties.getOption(APKeys.JIRA_OPTION_ALLOWUNASSIGNED); if (!allowUnassigned) { messageSet.addErrorMessage( getText( i18n, "admin.error.project.import.project.default.assignee.not.allowed", backupProject.getProject().getName())); } } }
protected boolean isScreenshotAppletEnabledForLinux() { return applicationProperties.getOption(APKeys.JIRA_SCREENSHOTAPPLET_LINUX_ENABLED); }
@Override public boolean isScreenshotAppletEnabled() { return applicationProperties.getOption(APKeys.JIRA_SCREENSHOTAPPLET_ENABLED); }
@Override public boolean attachmentsEnabled() { boolean allowAttachments = applicationProperties.getOption(APKeys.JIRA_OPTION_ALLOWATTACHMENTS); boolean attachmentPathSet = StringUtils.isNotBlank(attachmentPathManager.getAttachmentPath()); return allowAttachments && attachmentPathSet; }
private boolean attachmentsAllowedAndDirectoryIsSet() { String attachmentDir = attachmentPathManager.getAttachmentPath(); return applicationProperties.getOption(APKeys.JIRA_OPTION_ALLOWATTACHMENTS) && StringUtils.isNotBlank(attachmentDir); }
@Override public boolean isFieldVisibleAndInScope(final Issue issue) { return applicationProperties.getOption(APKeys.JIRA_OPTION_TIMETRACKING) && !fieldVisibilityManager.isFieldHidden(IssueFieldConstants.TIMETRACKING, issue); }
/// CLOVER:OFF boolean isExternalUserManagementEnabled() { return applicationProperties.getOption(APKeys.JIRA_OPTION_USER_EXTERNALMGT); }