• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IssueType类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.atlassian.jira.issue.issuetype.IssueType的典型用法代码示例。如果您正苦于以下问题:Java IssueType类的具体用法?Java IssueType怎么用?Java IssueType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

IssueType类属于com.atlassian.jira.issue.issuetype包,在下文中一共展示了IssueType类的39个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createCommonFields

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private List<OrderableField> createCommonFields(final List<IssueType> issueTypeList) {
    final List<OrderableField> customFields = new ArrayList<>();
    customFields.add(getOrderedFieldFromCustomField(issueTypeList, PluginField.HUB_CUSTOM_FIELD_PROJECT));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_PROJECT_VERSION));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_COMPONENT));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_COMPONENT_VERSION));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_LICENSE_NAMES));

    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_COMPONENT_USAGE));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_COMPONENT_ORIGIN));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_COMPONENT_ORIGIN_ID));
    customFields.add(getOrderedFieldFromCustomField(issueTypeList,
            PluginField.HUB_CUSTOM_FIELD_PROJECT_VERSION_NICKNAME));

    return customFields;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:24,
代码来源:HubFieldScreenSchemeSetup.java

示例2: HubIssueTypeSetup

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public HubIssueTypeSetup(final JiraServices jiraServices, final JiraSettingsService settingService,
        final Collection<IssueType> issueTypes, final String jiraUserName) throws ConfigurationException {
    this.jiraServices = jiraServices;
    this.settingService = settingService;
    this.issueTypes = issueTypes;

    if (jiraUserName != null) {
        logger.debug("Looking up user from config info: " + jiraUserName);
        jiraUser = jiraServices.getUserManager().getUserByName(jiraUserName);
    } else {
        logger.debug("Getting user from AuthContext");
        jiraUser = jiraServices.getAuthContext().getLoggedInUser();
    }
    if (jiraUser == null) {
        logger.error("User is null");
        throw new ConfigurationException("User is null");
    }
    logger.debug("User name: " + jiraUser.getName() + "; ID: " + jiraUser.getKey());

    hubAvatars = new HubAvatars(jiraServices, jiraUser);
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:22,
代码来源:HubIssueTypeSetup.java

示例3: getExistingIssueTypes

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private List<IssueType> getExistingIssueTypes(final IssueTypeScreenScheme issueTypeScreenScheme) {
    final List<IssueType> origIssueTypes = new ArrayList<>();
    final Collection<IssueTypeScreenSchemeEntity> origIssueTypeScreenSchemeEntities = issueTypeScreenScheme
            .getEntities();
    if (origIssueTypeScreenSchemeEntities == null) {
        return origIssueTypes;
    }
    for (final IssueTypeScreenSchemeEntity origIssueTypeScreenSchemeEntity : origIssueTypeScreenSchemeEntities) {
        final IssueType origIssueType = origIssueTypeScreenSchemeEntity.getIssueTypeObject();
        if (origIssueType == null) {
            logger.debug("Issue Type <null> found on Issue Type Screen Scheme " + issueTypeScreenScheme.getName());
        } else {
            logger.debug("Issue Type " + origIssueType.getName() + " found on Issue Type Screen Scheme "
                    + issueTypeScreenScheme.getName());
            origIssueTypes.add(origIssueType);
        }
    }
    return origIssueTypes;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:20,
代码来源:HubIssueTypeSetup.java

示例4: associateIssueTypesWithFieldConfigurationsOnProjectFieldConfigurationScheme

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
/**
 * Returns true if this setup had already been done.
 */
public boolean associateIssueTypesWithFieldConfigurationsOnProjectFieldConfigurationScheme(final Project project,
        final FieldLayoutScheme bdsFieldConfigurationScheme, final List<IssueType> issueTypes,
        final FieldLayout fieldConfiguration) {
    boolean wasAlreadySetUp = true;
    final FieldConfigurationScheme projectFieldConfigurationScheme = getProjectFieldConfigScheme(project);
    if (projectFieldConfigurationScheme == null) {
        logger.debug("Project " + project.getName() + ": Field Configuration Scheme: <null> (Default)");
        logger.debug("\tReplacing the project's Field Configuration Scheme with "
                + bdsFieldConfigurationScheme.getName());
        jiraServices.getFieldLayoutManager().addSchemeAssociation(project, bdsFieldConfigurationScheme.getId());
        wasAlreadySetUp = false;
    } else {
        logger.debug("Project " + project.getName() + ": Field Configuration Scheme: "
                + projectFieldConfigurationScheme.getName());
        wasAlreadySetUp = modifyProjectFieldConfigurationScheme(issueTypes, fieldConfiguration, projectFieldConfigurationScheme);
    }
    return wasAlreadySetUp;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:22,
代码来源:HubIssueTypeSetup.java

示例5: getIssueTypes

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private Collection<IssueType> getIssueTypes(final boolean bdIssueTypesAlreadyAdded) {
    final Collection<IssueType> issueTypes = new ArrayList<>();
    final IssueTypeMock issueType = new IssueTypeMock();
    issueType.setName("Task");
    issueType.setId("Task");
    issueType.setValue(Mockito.mock(GenericValue.class));
    issueTypes.add(issueType);
    if (bdIssueTypesAlreadyAdded) {
        final IssueTypeMock policyViolationIssue = new IssueTypeMock();
        policyViolationIssue.setName(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
        policyViolationIssue.setId(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
        policyViolationIssue.setValue(Mockito.mock(GenericValue.class));
        issueTypes.add(policyViolationIssue);
        final IssueTypeMock securityIssue = new IssueTypeMock();
        securityIssue.setName(HubJiraConstants.HUB_VULNERABILITY_ISSUE);
        securityIssue.setId(HubJiraConstants.HUB_VULNERABILITY_ISSUE);
        securityIssue.setValue(Mockito.mock(GenericValue.class));
        issueTypes.add(securityIssue);
    }
    return issueTypes;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:22,
代码来源:JiraTaskSetupTest.java

示例6: createRiskField

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
/**
 * Configures {@link #RISK_CONSEQUENCE_TEXT_CF} or {@link #RISK_PROBABILITY_TEXT_CF}, by adding their default values.
 * @param riskField - risk customfield name.
 * @param issueTypes - List of IssueTypes to be associated with. {@link #RISK_ISSUE_TYPE} by default.
 * @param contexts - JIRA Context
 * @param defaultScreen - default screen name. It is screen that CustomFields will be configured for.
 * @throws GenericEntityException
 */
private void createRiskField(final String riskField, List<IssueType> issueTypes, List<JiraContextNode> contexts, FieldScreen defaultScreen) throws GenericEntityException {
    final CustomField riskCustomField;
    if(customFieldManager.getCustomFieldObjectByName(riskField) == null) {
        riskCustomField = customFieldManager.createCustomField(riskField, riskField,
                customFieldManager.getCustomFieldType(CUSTOMFIELDTYPES_FLOAT),
                customFieldManager.getCustomFieldSearcher(CUSTOMFIELDTYPES_EXACTNUMBER),
                contexts, convertToGenericValue(issueTypes));
        if (!defaultScreen.containsField(riskCustomField.getId())) {
            FieldScreenTab firstTab = defaultScreen.getTab(0);
            firstTab.addFieldScreenLayoutItem(riskCustomField.getId());
        }
        for(int i = 1; i <= RiskIssues.MATRIX_SIZE; i++) {
            addOptionToCustomField(riskCustomField,String.valueOf(i));
        }
    }
}
 

开发者ID:adamkrol93,
项目名称:JRMP,
代码行数:25,
代码来源:PluginStartupListener.java

示例7: hasValidIssueType

点赞 3

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
protected boolean hasValidIssueType() {
    // if there is no project then the issue cannot be created
    if (issueType == null) {
        log.debug("Issue Type NOT set. Cannot find Issue type.");
        return false;
    }

    IssueType issueTypeObject = ManagerFactory.getConstantsManager().getIssueTypeObject(issueType);
    if (issueTypeObject == null) {
        log.debug("Issue Type does not exist with id of " + issueType);
        return false;
    }

    log.debug("Issue Type Object = " + issueTypeObject.getName());
    return true;
}
 

开发者ID:bcopy,
项目名称:JMH,
代码行数:17,
代码来源:AdvancedCreateIssueHandler.java

示例8: createCustomField

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private CustomField createCustomField(final List<IssueType> issueTypeList, final String fieldName)
        throws GenericEntityException {
    logger.debug("createCustomField(): " + fieldName);
    final CustomFieldType fieldType = jiraServices.getCustomFieldManager()
            .getCustomFieldType(CreateCustomField.FIELD_TYPE_PREFIX + "textarea");
    final CustomFieldSearcher fieldSearcher = jiraServices.getCustomFieldManager()
            .getCustomFieldSearcher(CreateCustomField.FIELD_TYPE_PREFIX + "textsearcher");

    final List<JiraContextNode> contexts = new ArrayList<>();
    contexts.add(GlobalIssueContext.getInstance());

    return jiraServices.getCustomFieldManager().createCustomField(fieldName, "", fieldType, fieldSearcher, contexts,
            issueTypeList);
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:15,
代码来源:HubFieldScreenSchemeSetup.java

示例9: createPolicyViolationFields

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private List<OrderableField> createPolicyViolationFields(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final List<OrderableField> customFields = new ArrayList<>();
    final List<IssueType> policyViolationIssueTypeObjectList = new ArrayList<>();
    policyViolationIssueTypeObjectList.add(getIssueTypeObject(issueType));
    customFields.add(getOrderedFieldFromCustomField(policyViolationIssueTypeObjectList,
            PluginField.HUB_CUSTOM_FIELD_POLICY_RULE));
    customFields.addAll(createCommonFields(issueTypeList));
    return customFields;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:11,
代码来源:HubFieldScreenSchemeSetup.java

示例10: createPolicyViolationScreen

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private FieldScreen createPolicyViolationScreen(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final List<OrderableField> hubCustomFields = createPolicyViolationFields(issueType,
            issueTypeList);
    final FieldScreen screen = createScreen(HubJiraConstants.HUB_POLICY_SCREEN_NAME, hubCustomFields);
    return screen;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:8,
代码来源:HubFieldScreenSchemeSetup.java

示例11: createPolicyViolationScreenScheme

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private FieldScreenScheme createPolicyViolationScreenScheme(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final FieldScreen screen = createPolicyViolationScreen(issueType, issueTypeList);
    final FieldScreenScheme fieldScreenScheme = createScreenScheme(HubJiraConstants.HUB_POLICY_SCREEN_SCHEME_NAME,
            screen);
    return fieldScreenScheme;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:8,
代码来源:HubFieldScreenSchemeSetup.java

示例12: createSecurityScreenScheme

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private FieldScreenScheme createSecurityScreenScheme(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final FieldScreen screen = createSecurityScreen(issueType, issueTypeList);
    final FieldScreenScheme fieldScreenScheme = createScreenScheme(
            HubJiraConstants.HUB_SECURITY_SCREEN_SCHEME_NAME, screen);
    return fieldScreenScheme;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:8,
代码来源:HubFieldScreenSchemeSetup.java

示例13: addIssueTypesToJira

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public List<IssueType> addIssueTypesToJira() throws JiraException {
    final List<IssueType> bdIssueTypes = new ArrayList<>();
    try {
        final List<String> existingBdIssueTypeNames = collectExistingBdsIssueTypeNames(bdIssueTypes);
        addBdsIssueType(bdIssueTypes, existingBdIssueTypeNames, HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
        addBdsIssueType(bdIssueTypes, existingBdIssueTypeNames, HubJiraConstants.HUB_VULNERABILITY_ISSUE);
    } catch (final Exception e) {
        logger.error(e);
        settingService.addHubError(e, "addIssueTypesToJira()");
    }
    return bdIssueTypes;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:13,
代码来源:HubIssueTypeSetup.java

示例14: collectExistingBdsIssueTypeNames

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private List<String> collectExistingBdsIssueTypeNames(final List<IssueType> bdIssueTypes) {
    final List<String> existingBdIssueTypeNames = new ArrayList<>();
    for (final IssueType issueType : issueTypes) {
        if (issueType.getName().equals(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE)
                || issueType.getName().equals(HubJiraConstants.HUB_VULNERABILITY_ISSUE)) {
            bdIssueTypes.add(issueType);
            existingBdIssueTypeNames.add(issueType.getName());
        }
    }
    return existingBdIssueTypeNames;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:12,
代码来源:HubIssueTypeSetup.java

示例15: addBdsIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private void addBdsIssueType(final List<IssueType> bdIssueTypes, final List<String> existingBdIssueTypeNames, final String issueTypeName)
        throws JiraException {
    Long avatarId;
    if (!existingBdIssueTypeNames.contains(issueTypeName)) {
        avatarId = hubAvatars.getAvatarId(issueTypeName);
        logger.debug("Creating issue type " + issueTypeName + " with avatar ID " + avatarId);
        final IssueType issueType = createIssueType(issueTypeName,
                issueTypeName, avatarId);
        bdIssueTypes.add(issueType);
    }
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:12,
代码来源:HubIssueTypeSetup.java

示例16: addIssueTypesToProjectIssueTypeScreenSchemes

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public void addIssueTypesToProjectIssueTypeScreenSchemes(final Project project,
        final Map<IssueType, FieldScreenScheme> screenSchemesByIssueType) {
    final IssueTypeScreenScheme issueTypeScreenScheme = jiraServices.getIssueTypeScreenSchemeManager()
            .getIssueTypeScreenScheme(project);
    logger.debug("addIssueTypesToProjectIssueTypeScreenSchemes(): Project " + project.getName()
            + ": Issue Type Screen Scheme: " + issueTypeScreenScheme.getName());
    final List<IssueType> origIssueTypes = getExistingIssueTypes(issueTypeScreenScheme);
    final List<IssueTypeScreenSchemeEntity> entitiesToRemove = new ArrayList<>();
    final List<IssueTypeScreenSchemeEntity> entitiesToAdd = new ArrayList<>();
    for (final IssueType issueType : screenSchemesByIssueType.keySet()) {
        if (origIssueTypes.contains(issueType)) {
            logger.debug("Issue Type " + issueType.getName() + " is already on Issue Type Screen Scheme "
                    + issueTypeScreenScheme.getName() + "; Will check its accuracy");
        }
        final FieldScreenScheme fieldScreenScheme = screenSchemesByIssueType.get(issueType);
        logger.debug("Associating issue type " + issueType.getName() + " with screen scheme "
                + fieldScreenScheme.getName() + " on issue type screen scheme " + issueTypeScreenScheme.getName());
        final boolean entityExists = checkForExistingEntity(fieldScreenScheme, issueTypeScreenScheme.getEntities(),
                issueType,
                entitiesToRemove);

        if (!entityExists) {
            logger.debug("Associating issueType " + issueType.getName() + " with FieldScreenScheme "
                    + fieldScreenScheme.getName());
            final IssueTypeScreenSchemeEntity issueTypeScreenSchemeEntity = buildIssueTypeScreenSchemeEntity(
                    issueType, fieldScreenScheme);
            entitiesToAdd.add(issueTypeScreenSchemeEntity);
        }
    }
    final boolean changesMade = adjustEntities(issueTypeScreenScheme, entitiesToRemove, entitiesToAdd);
    if (changesMade) {
        logger.debug("Performing store() on " + issueTypeScreenScheme.getName());
        issueTypeScreenScheme.store();
    } else {
        logger.debug("Issue Type Screen Scheme " + issueTypeScreenScheme.getName()
                + " already had the correct Black Duck IssueType associations");
    }
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:39,
代码来源:HubIssueTypeSetup.java

示例17: checkForExistingEntity

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
/**
 * See if entity exists. If it does, returns true. If it exists but is
 * wrong, returns false but adds it to entitiesToRemove.
 */
private boolean checkForExistingEntity(final FieldScreenScheme fieldScreenScheme,
        final Collection<IssueTypeScreenSchemeEntity> existingEntities, final IssueType issueType,
        final List<IssueTypeScreenSchemeEntity> entitiesToRemove) {
    boolean entityExists = false;
    if (existingEntities != null) {
        for (final IssueTypeScreenSchemeEntity existingEntity : existingEntities) {
            final FieldScreenScheme existingFieldScreenScheme = existingEntity.getFieldScreenScheme();
            final IssueType existingIssueType = existingEntity.getIssueType();
            final IssueTypeScreenScheme existingIssueTypeScreenScheme = existingEntity.getIssueTypeScreenScheme();
            String existingIssueTypeName;
            String existingIssueTypeId;
            if (existingIssueType == null) {
                existingIssueTypeName = null;
                existingIssueTypeId = null;
            } else {
                existingIssueTypeName = existingIssueType.getName();
                existingIssueTypeId = existingIssueType.getId();
            }
            logger.debug("existingFieldScreenScheme: " + existingFieldScreenScheme.getName()
                    + "; existingIssueType: " + existingIssueTypeName + "; existingIssueTypeScreenScheme: "
                    + existingIssueTypeScreenScheme.getName());

            if ((existingIssueTypeId == issueType.getId())
                    && (existingFieldScreenScheme.getId().equals(fieldScreenScheme.getId()))) {
                logger.debug("The fieldScreenScheme -- issueTypeScreenScheme already exists");
                entityExists = true;
                break;
            } else if (existingIssueTypeId == issueType.getId()) {
                logger.debug("issueType " + issueType.getName() + " is associated with FieldScreenScheme "
                        + existingFieldScreenScheme.getName() + " which is wrong. Will remove this association");
                entitiesToRemove.add(existingEntity);
            }
        }
    }
    return entityExists;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:41,
代码来源:HubIssueTypeSetup.java

示例18: buildIssueTypeScreenSchemeEntity

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private IssueTypeScreenSchemeEntity buildIssueTypeScreenSchemeEntity(
        final IssueType issueType, final FieldScreenScheme fieldScreenScheme) {
    final FieldScreenSchemeManager fieldScreenSchemeManager = jiraServices.getFieldScreenSchemeManager();
    final IssueTypeScreenSchemeEntity issueTypeScreenSchemeEntity = new IssueTypeScreenSchemeEntityImpl(
            jiraServices.getIssueTypeScreenSchemeManager(), (GenericValue) null, fieldScreenSchemeManager,
            jiraServices.getConstantsManager());
    issueTypeScreenSchemeEntity.setIssueTypeId(issueType.getId());
    issueTypeScreenSchemeEntity
            .setFieldScreenScheme(fieldScreenSchemeManager
                    .getFieldScreenScheme(fieldScreenScheme.getId()));
    return issueTypeScreenSchemeEntity;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:13,
代码来源:HubIssueTypeSetup.java

示例19: createIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private IssueType createIssueType(final String name, final String description, final Long avatarId)
        throws JiraException {
    logger.debug("Creating new issue type: " + name);

    IssueType newIssueType = null;
    try {
        newIssueType = jiraServices.getConstantsManager().insertIssueType(name, 0L, null, description, avatarId);
    } catch (final CreateException e) {
        throw new JiraException("Error creating Issue Type " + name + ": " + e.getMessage(), e);
    }
    logger.info("Created new issue type: " + newIssueType.getName() + " (id: " + newIssueType.getId());

    return newIssueType;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:15,
代码来源:HubIssueTypeSetup.java

示例20: addWorkflowToProjectsWorkflowScheme

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public void addWorkflowToProjectsWorkflowScheme(final JiraWorkflow hubWorkflow, final Project project,
        final List<IssueType> issueTypes) {

    try {
        final AssignableWorkflowScheme projectWorkflowScheme = jiraServices.getWorkflowSchemeManager()
                .getWorkflowSchemeObj(project);
        if (projectWorkflowScheme != null) {
            final AssignableWorkflowScheme.Builder projectWorkflowSchemeBuilder = projectWorkflowScheme.builder();
            boolean needsToBeUpdated = false;
            if (issueTypes != null && !issueTypes.isEmpty()) {
                for (final IssueType issueType : issueTypes) {
                    needsToBeUpdated = mapIssueTypeToBdsWorkflow(project, hubWorkflow, projectWorkflowScheme, projectWorkflowSchemeBuilder,
                            issueType, needsToBeUpdated);
                }
            }
            if (needsToBeUpdated) {
                jiraServices.getWorkflowSchemeManager().updateWorkflowScheme(projectWorkflowSchemeBuilder.build());
            }
        } else {
            final String errorMessage = "Could not find the workflow scheme for the JIRA project : "
                    + project.getName();
            logger.error(errorMessage);
            settingService.addHubError(errorMessage, null, null, project.getName(), null, null,
                    "addWorkflowToProjectsWorkflowScheme");
        }
    } catch (final Exception e) {
        logger.error("Failed to add the Hub JIRA worflow to the Hub scheme.", e);
        settingService.addHubError(e, null, null, project.getName(), null, null, "addWorkflowToProjectsWorkflowScheme");
    }
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:31,
代码来源:HubWorkflowSetup.java

示例21: mapIssueTypeToBdsWorkflow

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private boolean mapIssueTypeToBdsWorkflow(final Project project, final JiraWorkflow hubWorkflow,
        final AssignableWorkflowScheme projectWorkflowScheme, final AssignableWorkflowScheme.Builder projectWorkflowSchemeBuilder,
        final IssueType issueType, boolean needsToBeUpdated) {
    final String configuredWorkflowName = projectWorkflowScheme.getConfiguredWorkflow(issueType.getId());
    final String actualWorkflowName = projectWorkflowScheme.getActualWorkflow(issueType.getId());
    logger.debug("Configured workflow: " + configuredWorkflowName);
    logger.debug("Actual workflow: " + actualWorkflowName);
    if ((StringUtils.isBlank(actualWorkflowName)) || (!actualWorkflowName.equals(hubWorkflow.getName()))) {
        projectWorkflowSchemeBuilder.setMapping(issueType.getId(), hubWorkflow.getName());
        logger.debug("Updating JIRA Project : " + project.getName() + ", Issue Type : "
                + issueType.getName() + ", to the Hub workflow '" + hubWorkflow.getName() + "'");
        needsToBeUpdated = true;
    }
    return needsToBeUpdated;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:16,
代码来源:HubWorkflowSetup.java

示例22: lookUpIssueTypeId

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private String lookUpIssueTypeId(final String targetIssueTypeName) throws ConfigurationException {
    final Collection<IssueType> issueTypes = jiraServices.getConstantsManager().getAllIssueTypeObjects();
    for (final IssueType issueType : issueTypes) {
        if (issueType == null) {
            continue;
        }
        if (issueType.getName().equals(targetIssueTypeName)) {
            return issueType.getId();
        }
    }
    throw new ConfigurationException("IssueType " + targetIssueTypeName + " not found");
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:13,
代码来源:NotificationToEventConverter.java

示例23: adjustProjectsConfig

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private void adjustProjectsConfig(final JiraServices jiraServices, final String projectMappingJson, final HubIssueTypeSetup issueTypeSetup,
        final List<IssueType> issueTypes, final Map<IssueType, FieldScreenScheme> screenSchemesByIssueType, final EditableFieldLayout fieldConfiguration,
        final FieldLayoutScheme fieldConfigurationScheme, final HubWorkflowSetup workflowSetup, final JiraWorkflow workflow) {
    if (projectMappingJson != null && issueTypes != null && !issueTypes.isEmpty()) {
        final HubJiraConfigSerializable config = new HubJiraConfigSerializable();
        // Converts Json to list of mappings
        config.setHubProjectMappingsJson(projectMappingJson);
        if (!config.getHubProjectMappings().isEmpty()) {
            for (final HubProjectMapping projectMapping : config.getHubProjectMappings()) {
                if (projectMapping.getJiraProject() != null
                        && projectMapping.getJiraProject().getProjectId() != null) {
                    // Get jira Project object by Id
                    // from the JiraProject in the mapping
                    final Project jiraProject = jiraServices.getJiraProjectManager()
                            .getProjectObj(projectMapping.getJiraProject().getProjectId());
                    if (jiraProject != null) {
                        // add issuetypes to this project
                        issueTypeSetup.addIssueTypesToProjectIssueTypeScheme(jiraProject, issueTypes);
                        issueTypeSetup.addIssueTypesToProjectIssueTypeScreenSchemes(jiraProject,
                                screenSchemesByIssueType);
                        final boolean wasAlreadySetUp = issueTypeSetup.associateIssueTypesWithFieldConfigurationsOnProjectFieldConfigurationScheme(
                                jiraProject, fieldConfigurationScheme, issueTypes, fieldConfiguration);
                        if (wasAlreadySetUp) {
                            logger.debug("It appears the project's WorkflowScheme has already been configured; leaving it unchanged");
                        } else {
                            workflowSetup.addWorkflowToProjectsWorkflowScheme(workflow, jiraProject, issueTypes);
                        }
                    }
                }
            }
        }
    }
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:34,
代码来源:JiraTaskTimed.java

示例24: getIssueTypesForProject

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
@Override
public Collection<IssueType> getIssueTypesForProject(final Project arg0) {
    final List<IssueType> issues = new ArrayList<>();
    issues.addAll(issueTypes);
    issues.addAll(constantsManagerMock.getAllIssueTypeObjects());

    return issueTypes;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:9,
代码来源:IssueTypeSchemeManagerMock.java

示例25: insertIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
@Override
public IssueType insertIssueType(final String name, final Long arg1, final String arg2, final String description,
        final String arg4) throws CreateException {
    final IssueType issueType = generateMockIssueType(name, description);
    issueTypes.add(issueType);

    return issueType;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:9,
代码来源:ConstantsManagerMock.java

示例26: generateMockIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private IssueType generateMockIssueType(final String name, final String description) {
    final IssueTypeMock newIssueType = new IssueTypeMock();
    newIssueType.setName(name);
    newIssueType.setDescription(description);
    newIssueType.setId("mockIssueTypeId" + issueTypeIndex);
    newIssueType.setValue(Mockito.mock(GenericValue.class));
    issueTypeIndex++;
    return newIssueType;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:10,
代码来源:ConstantsManagerMock.java

示例27: testAddHubFieldConfigurationToJiraFirstTimeCreateNoIssueTypes

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
@Test
public void testAddHubFieldConfigurationToJiraFirstTimeCreateNoIssueTypes() {
    final PluginSettingsMock settingsMock = new PluginSettingsMock();
    final JiraSettingsService settingService = new JiraSettingsService(settingsMock);

    final JiraServicesMock jiraServices = new JiraServicesMock();

    final HubFieldScreenSchemeSetup fieldConfigSetup = new HubFieldScreenSchemeSetup(settingService,
            jiraServices);
    fieldConfigSetup.addHubFieldConfigurationToJira(new ArrayList<IssueType>());

    assertNull(settingsMock.get(HubJiraConstants.HUB_JIRA_ERROR));
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:14,
代码来源:HubFieldScreenSchemeSetupTest.java

示例28: addVulnIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private void addVulnIssueType(final List<IssueType> issueTypes) {
    final IssueTypeMock securityIssueType = new IssueTypeMock();
    securityIssueType.setName(HubJiraConstants.HUB_VULNERABILITY_ISSUE);
    securityIssueType.setId(HubJiraConstants.HUB_VULNERABILITY_ISSUE);
    securityIssueType.setValue(Mockito.mock(GenericValue.class));
    issueTypes.add(securityIssueType);
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:8,
代码来源:HubFieldScreenSchemeSetupTest.java

示例29: addPolicyIssueType

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private void addPolicyIssueType(final List<IssueType> issueTypes) {
    final IssueTypeMock policyIssueType = new IssueTypeMock();
    policyIssueType.setName(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
    policyIssueType.setId(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
    policyIssueType.setValue(Mockito.mock(GenericValue.class));
    issueTypes.add(policyIssueType);
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:8,
代码来源:HubFieldScreenSchemeSetupTest.java

示例30: getJiraServices

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private JiraServices getJiraServices(final WorkflowManager workflowManager,
        final WorkflowSchemeManager workflowSchemeManager, final UserManager userManager,
        final ProjectManager projectManager, final AvatarManager avatarManager,
        final ConstantsManager constantsManager, final IssueTypeSchemeManager issueTypeSchemeManager,
        final FieldLayoutManager fieldLayoutManager,
        final IssueTypeScreenSchemeManager issueTypeScreenSchemeManager, final Collection<IssueType> issueTypes,
        final UserUtil userUtil, final CustomFieldManagerMock customFieldManager,
        final FieldManagerMock fieldManager, final FieldScreenManagerMock fieldScreenManager,
        final FieldScreenSchemeManagerMock fieldScreenSchemeManager) {

    JiraServicesMock jiraServices = new JiraServicesMock();
    jiraServices.setWorkflowManager(workflowManager);
    jiraServices.setWorkflowSchemeManager(workflowSchemeManager);
    jiraServices.setUserManager(userManager);
    jiraServices.setProjectManager(projectManager);
    jiraServices.setAvatarManager(avatarManager);
    jiraServices.setConstantsManager(constantsManager);
    jiraServices.setIssueTypeSchemeManager(issueTypeSchemeManager);
    jiraServices.setFieldLayoutManager(fieldLayoutManager);
    jiraServices.setIssueTypes(issueTypes);
    jiraServices.setUserUtil(userUtil);
    jiraServices.setIssueTypeScreenSchemeManager(issueTypeScreenSchemeManager);
    jiraServices.setCustomFieldManager(customFieldManager);
    jiraServices.setFieldManager(fieldManager);
    jiraServices.setFieldScreenManager(fieldScreenManager);
    jiraServices.setFieldScreenSchemeManager(fieldScreenSchemeManager);

    jiraServices = Mockito.spy(jiraServices);

    Mockito.when(jiraServices.getResourceAsStream(Mockito.anyString())).then(new Answer<InputStream>() {
        @Override
        public InputStream answer(final InvocationOnMock invocation) throws Throwable {
            final Object[] arguments = invocation.getArguments();

            return getClass().getResourceAsStream((String) arguments[0]);
        }
    });

    return jiraServices;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:41,
代码来源:JiraTaskSetupTest.java

示例31: mockJiraServices

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
static JiraServices mockJiraServices() throws HubIntegrationException {

        final ConstantsManager constantsManager = Mockito.mock(ConstantsManager.class);
        final Collection<IssueType> issueTypes = new ArrayList<>();
        final IssueType policyIssueType = Mockito.mock(IssueType.class);
        Mockito.when(policyIssueType.getName()).thenReturn(HubJiraConstants.HUB_POLICY_VIOLATION_ISSUE);
        Mockito.when(policyIssueType.getId()).thenReturn("policyIssueTypeId");
        issueTypes.add(policyIssueType);
        final IssueType vulnerabilityIssueType = Mockito.mock(IssueType.class);
        Mockito.when(vulnerabilityIssueType.getName()).thenReturn(HubJiraConstants.HUB_VULNERABILITY_ISSUE);
        Mockito.when(vulnerabilityIssueType.getId()).thenReturn("vulnerabilityIssueTypeId");
        issueTypes.add(vulnerabilityIssueType);

        Mockito.when(constantsManager.getAllIssueTypeObjects()).thenReturn(issueTypes);

        final JiraServices jiraServices = Mockito.mock(JiraServices.class);
        Mockito.when(jiraServices.getConstantsManager()).thenReturn(constantsManager);
        final ProjectManager jiraProjectManager = createJiraProjectManager();
        Mockito.when(jiraServices.getJiraProjectManager()).thenReturn(jiraProjectManager);

        final List<JiraProject> mockJiraProjects = ConverterTestUtils.getTestJiraProjectObjects("assigneeUserId");
        for (final JiraProject mockJiraProject : mockJiraProjects) {
            Mockito.when(jiraServices.getJiraProject(mockJiraProject.getProjectId())).thenReturn(mockJiraProject);
        }

        return jiraServices;
    }
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:28,
代码来源:ConverterTestUtils.java

示例32: getColorCodesByIssueTypes

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public Map<String, String> getColorCodesByIssueTypes() {
	
	Map<String, String> colorCodesByIssueTypes = new HashMap<String, String>();
	List<IssueType> allIssueTypes = new ArrayList<IssueType>(constantsManager.getAllIssueTypeObjects());
	
	for (IssueType currentIssueType : allIssueTypes) {
		String currentIssueTypeName = currentIssueType.getName();
		colorCodesByIssueTypes.put(currentIssueTypeName, 
				JiraDefaultIssueTypes.fromJiraName(currentIssueTypeName).getColorCode());
	}
	
	return colorCodesByIssueTypes;
}
 

开发者ID:jeanarcand,
项目名称:foresight,
代码行数:14,
代码来源:ForesightSettings.java

示例33: createFieldConfigurationScheme

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public FieldLayoutScheme createFieldConfigurationScheme(final List<IssueType> issueTypes,
        final FieldLayout fieldConfiguration) {

    boolean changesToStore = false;
    FieldLayoutScheme fieldConfigurationScheme = null;

    // Check to see if it already exists
    final List<FieldLayoutScheme> fieldLayoutSchemes = jiraServices.getFieldLayoutManager().getFieldLayoutSchemes();
    if (fieldLayoutSchemes != null) {
        for (final FieldLayoutScheme existingFieldConfigurationScheme : fieldLayoutSchemes) {
            if (HubJiraConstants.HUB_FIELD_CONFIGURATION_SCHEME_NAME.equals(existingFieldConfigurationScheme
                    .getName())) {
                logger.debug(
                        "Field Configuration Scheme " + HubJiraConstants.HUB_FIELD_CONFIGURATION_SCHEME_NAME
                                + " already exists");
                fieldConfigurationScheme = existingFieldConfigurationScheme;
                break;
            }
        }
    }

    if (fieldConfigurationScheme == null) {
        fieldConfigurationScheme = jiraServices.getFieldLayoutManager()
                .createFieldLayoutScheme(
                        HubJiraConstants.HUB_FIELD_CONFIGURATION_SCHEME_NAME,
                        HubJiraConstants.HUB_FIELD_CONFIGURATION_SCHEME_NAME);
        changesToStore = true;
    }

    for (final IssueType issueType : issueTypes) {

        boolean issueTypeAlreadyAssociated = false;
        final Collection<FieldLayoutSchemeEntity> entities = fieldConfigurationScheme.getEntities();
        for (final FieldLayoutSchemeEntity entity : entities) {
            if (entity.getIssueTypeObject() == null) {
                continue;
            }
            if (entity.getIssueTypeObject().getName().equals(issueType.getName())) {
                logger.debug("IssueType " + issueType.getName()
                        + " is already associated with Field Configuration ID: " + entity.getFieldLayoutId());
                logger.debug("\tTarget field configuration ID is: " + fieldConfiguration.getId());
                if ((entity.getFieldLayoutId() != null)
                        && (entity.getFieldLayoutId().equals(fieldConfiguration.getId()))) {
                    issueTypeAlreadyAssociated = true;
                    break;
                } else {
                    logger.info("\tRemoving incorrect association for IssueType " + issueType.getName());
                    fieldConfigurationScheme.removeEntity(issueType.getId());
                }
            }
        }

        if (!issueTypeAlreadyAssociated) {
            logger.debug("Associating issue type " + issueType.getName() + " with Field Configuration "
                    + fieldConfiguration.getName());
            final FieldLayoutSchemeEntity issueTypeToFieldConfiguration = new FieldLayoutSchemeEntityImpl(
                    jiraServices.getFieldLayoutManager(), null, jiraServices.getConstantsManager());
            issueTypeToFieldConfiguration.setFieldLayoutScheme(fieldConfigurationScheme);
            issueTypeToFieldConfiguration.setFieldLayoutId(fieldConfiguration.getId());
            issueTypeToFieldConfiguration.setIssueTypeId(issueType.getId());
            fieldConfigurationScheme.addEntity(issueTypeToFieldConfiguration);
            changesToStore = true;
        }
    }

    if (changesToStore) {
        fieldConfigurationScheme.store();
    }

    return fieldConfigurationScheme;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:72,
代码来源:HubFieldConfigurationSetup.java

示例34: getIssueTypeObject

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private IssueType getIssueTypeObject(final IssueType hubIssueType) {
    return hubIssueType;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:4,
代码来源:HubFieldScreenSchemeSetup.java

示例35: createSecurityFields

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private List<OrderableField> createSecurityFields(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final List<OrderableField> customFields = new ArrayList<>();
    customFields.addAll(createCommonFields(issueTypeList));
    return customFields;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:7,
代码来源:HubFieldScreenSchemeSetup.java

示例36: createSecurityScreen

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
private FieldScreen createSecurityScreen(final IssueType issueType,
        final List<IssueType> issueTypeList) {
    final List<OrderableField> hubCustomFields = createSecurityFields(issueType, issueTypeList);
    final FieldScreen screen = createScreen(HubJiraConstants.HUB_SECURITY_SCREEN_NAME, hubCustomFields);
    return screen;
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:7,
代码来源:HubFieldScreenSchemeSetup.java

示例37: addIssueTypesToProjectIssueTypeScheme

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public void addIssueTypesToProjectIssueTypeScheme(final Project jiraProject, final List<IssueType> hubIssueTypes) {
    // Get Project's Issue Type Scheme
    try {
        final FieldConfigScheme issueTypeScheme = jiraServices.getIssueTypeSchemeManager()
                .getConfigScheme(jiraProject);

        final Collection<IssueType> origIssueTypeObjects = jiraServices.getIssueTypeSchemeManager()
                .getIssueTypesForProject(jiraProject);
        final Collection<String> issueTypeIds = new ArrayList<>();
        for (final IssueType origIssueTypeObject : origIssueTypeObjects) {
            issueTypeIds.add(origIssueTypeObject.getId());
        }

        // Add BDS Issue Types to it
        boolean changesMadeToIssueTypeScheme = false;
        for (final IssueType bdIssueType : hubIssueTypes) {
            if (!origIssueTypeObjects.contains(bdIssueType)) {
                logger.debug("Adding issue type " + bdIssueType.getName() + " to issue type scheme "
                        + issueTypeScheme.getName());
                issueTypeIds.add(bdIssueType.getId());
                changesMadeToIssueTypeScheme = true;

            } else {
                logger.debug("Issue type " + bdIssueType.getName() + " is already on issue type scheme "
                        + issueTypeScheme.getName());
            }
        }
        if (changesMadeToIssueTypeScheme) {
            logger.debug("Updating Issue Type Scheme " + issueTypeScheme.getName());
            jiraServices.getIssueTypeSchemeManager().update(issueTypeScheme, issueTypeIds);
        } else {
            logger.debug(
                    "Issue Type Scheme " + issueTypeScheme.getName() + " already included Black Duck Issue Types");
        }
    } catch (final Exception e) {
        logger.error(e);
        String jiraProjectName = null;
        if (jiraProject != null) {
            jiraProjectName = jiraProject.getName();
        }
        settingService.addHubError(e, null, null, jiraProjectName, null, null, "addIssueTypesToProjectIssueTypeScheme()");
    }
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:44,
代码来源:HubIssueTypeSetup.java

示例38: getIssueTypes

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public Collection<IssueType> getIssueTypes() {
    return getConstantsManager().getAllIssueTypeObjects();
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:4,
代码来源:JiraServices.java

示例39: jiraSetup

点赞 2

import com.atlassian.jira.issue.issuetype.IssueType; //导入依赖的package包/类
public void jiraSetup(final JiraServices jiraServices, final JiraSettingsService jiraSettingsService,
        final String projectMappingJson, final TicketInfoFromSetup ticketInfoFromSetup,
        final JiraContext jiraContext)
        throws ConfigurationException, JiraException {

    // Make sure current JIRA version is supported
    getJiraVersionCheck(); // throws exception if not

    // Create Issue Types, workflow, etc.
    HubIssueTypeSetup issueTypeSetup;
    try {
        issueTypeSetup = getHubIssueTypeSetup(jiraSettingsService, jiraServices, jiraContext.getJiraAdminUser().getName());
    } catch (final ConfigurationException e) {
        logger.error("Unable to create IssueTypes; Perhaps configuration is not ready; Will try again next time");
        return;
    }
    final List<IssueType> issueTypes = issueTypeSetup.addIssueTypesToJira();
    if (issueTypes == null || issueTypes.isEmpty()) {
        logger.error("No Black Duck Issue Types found or created");
        return;
    }
    logger.debug("Number of Black Duck issue types found or created: " + issueTypes.size());

    final HubFieldScreenSchemeSetup fieldConfigurationSetup = getHubFieldScreenSchemeSetup(
            jiraSettingsService,
            jiraServices);

    final Map<IssueType, FieldScreenScheme> screenSchemesByIssueType = fieldConfigurationSetup
            .addHubFieldConfigurationToJira(issueTypes);
    if (screenSchemesByIssueType == null || screenSchemesByIssueType.isEmpty()) {
        logger.error("No Black Duck Screen Schemes found or created");
    }
    ticketInfoFromSetup.setCustomFields(fieldConfigurationSetup.getCustomFields());

    logger.debug("Number of Black Duck Screen Schemes found or created: " + screenSchemesByIssueType.size());

    final HubFieldConfigurationSetup hubFieldConfigurationSetup = getHubFieldConfigurationSetup(jiraSettingsService,
            jiraServices);
    final EditableFieldLayout fieldConfiguration = hubFieldConfigurationSetup.addHubFieldConfigurationToJira();
    final FieldLayoutScheme fieldConfigurationScheme = hubFieldConfigurationSetup
            .createFieldConfigurationScheme(issueTypes, fieldConfiguration);

    final HubWorkflowSetup workflowSetup = getHubWorkflowSetup(jiraSettingsService, jiraServices);
    final JiraWorkflow workflow = workflowSetup.addHubWorkflowToJira();
    logger.debug("Black Duck workflow Name: " + workflow.getName());

    // Associate these config objects with mapped projects
    adjustProjectsConfig(jiraServices, projectMappingJson, issueTypeSetup, issueTypes, screenSchemesByIssueType, fieldConfiguration,
            fieldConfigurationScheme, workflowSetup, workflow);
}
 

开发者ID:blackducksoftware,
项目名称:hub-jira,
代码行数:51,
代码来源:JiraTaskTimed.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)