Attaches all registered {@link IssueCategory}s to the graph. This allows them to be more easily used
from rules.
513642
public void attachToGraph(GraphContext graphContext)
    {
        for (IssueCategory issueCategory : this.issueCategories.values())
        {
            IssueCategoryModel model = graphContext.create(IssueCategoryModel.class);
            model.setCategoryID(issueCategory.getCategoryID());
            model.setName(issueCategory.getName());
            model.setDescription(issueCategory.getDescription());
            model.setOrigin(issueCategory.getOrigin());
            model.setPriority(issueCategory.getPriority());
        }
    }
313083
def _format_issue(issue):
    '''
    
    '''
    ret = {'id': issue.get('id'),
           'issue_number': issue.get('number'),
           'state': issue.get('state'),
           'title': issue.get('title'),
           'user': issue.get('user').get('login'),
           'html_url': issue.get('html_url')}

    assignee = issue.get('assignee')
    if assignee:
        assignee = assignee.get('login')

    labels = issue.get('labels')
    label_names = []
    for label in labels:
        label_names.append(label.get('name'))

    milestone = issue.get('milestone')
    if milestone:
        milestone = milestone.get('title')

    ret['assignee'] = assignee
    ret['labels'] = label_names
    ret['milestone'] = milestone

    return ret
681344
void addManagementGraph(final JobID jobID, final ManagementGraph managementGraph) {

		synchronized (this.recentManagementGraphs) {
			this.recentManagementGraphs.put(jobID, managementGraph);
		}
	}
836712
def category(self, categories):
        
        if isinstance(categories, list):
            for c in categories:
                self.add_category(c)
        else:
            self.add_category(categories)
240059
protected function submitAddCategory()
    {
        $this->setSubmitted(null, $this->getParam());
        $this->validateComponent('category');
        $this->addCategory();
    }
58226
private void addDefaults()
    {
        this.issueCategories.putIfAbsent(MANDATORY, new IssueCategory(MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Mandatory", MANDATORY, 1000, true));
        this.issueCategories.putIfAbsent(OPTIONAL, new IssueCategory(OPTIONAL, IssueCategoryRegistry.class.getCanonicalName(), "Optional", OPTIONAL, 1000, true));
        this.issueCategories.putIfAbsent(POTENTIAL, new IssueCategory(POTENTIAL, IssueCategoryRegistry.class.getCanonicalName(), "Potential Issues", POTENTIAL, 1000, true));
        this.issueCategories.putIfAbsent(CLOUD_MANDATORY, new IssueCategory(CLOUD_MANDATORY, IssueCategoryRegistry.class.getCanonicalName(), "Cloud Mandatory", CLOUD_MANDATORY, 1000, true));
        this.issueCategories.putIfAbsent(INFORMATION, new IssueCategory(INFORMATION, IssueCategoryRegistry.class.getCanonicalName(), "Information", INFORMATION, 1000, true));
    }
420073
public void setupSFields()
    {
        this.getRecord(IssueHistory.ISSUE_HISTORY_FILE).getField(IssueHistory.COMMENT).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY);
    }
609759
public void setAttachedManagedPolicies(java.util.Collection<AttachedPolicy> attachedManagedPolicies) {
        if (attachedManagedPolicies == null) {
            this.attachedManagedPolicies = null;
            return;
        }

        this.attachedManagedPolicies = new com.amazonaws.internal.SdkInternalList<AttachedPolicy>(attachedManagedPolicies);
    }
604679
def issuetypes(accountable, project_key):
    
    projects = accountable.issue_types(project_key)
    headers = sorted(['id', 'name', 'description'])
    rows = []
    for key, issue_types in sorted(projects.items()):
        for issue_type in issue_types:
            rows.append(
                [key] + [v for k, v in sorted(issue_type.items())
                         if k in headers]
            )
    rows.insert(0, ['project_key'] + headers)
    print_table(SingleTable(rows))
596159
@Fix(io.sarl.lang.validation.IssueCodes.INVALID_IMPLEMENTED_TYPE)
	public void fixInvalidImplementedType(final Issue issue, IssueResolutionAcceptor acceptor) {
		ImplementedTypeRemoveModification.accept(this, issue, acceptor, RemovalType.OTHER);
	}
473062
public static <V> void addAllVertices(DirectedGraph<V, DefaultEdge> graph, Set<V> vertices) {
        // add all of the new vertices to prep for linking
        for (V vertex : vertices) {
            graph.addVertex(vertex);
        }
    }
1225932
protected function addCategory()
    {
        $this->controlAccess('category_add');

        if ($this->category->add($this->getSubmitted())) {
            $url = "admin/content/category/{$this->data_category_group['category_group_id']}";
            $this->redirect($url, $this->text('Category has been added'), 'success');
        }

        $this->redirect('', $this->text('Category has not been added'), 'warning');
    }
134647
def attach_issue(resource_id, table, user_id):
    """"""
    data = schemas.issue.post(flask.request.json)
    issue = _get_or_create_issue(data)

    # Second, insert a join record in the JOIN_JOBS_ISSUES or
    # JOIN_COMPONENTS_ISSUES database.
    if table.name == 'jobs':
        join_table = models.JOIN_JOBS_ISSUES
    else:
        join_table = models.JOIN_COMPONENTS_ISSUES

    key = '%s_id' % table.name[0:-1]
    query = join_table.insert().values({
        'user_id': user_id,
        'issue_id': issue['id'],
        key: resource_id
    })

    try:
        flask.g.db_conn.execute(query)
    except sa_exc.IntegrityError:
        raise dci_exc.DCICreationConflict(join_table.name,
                                          '%s, issue_id' % key)

    result = json.dumps({'issue': dict(issue)})
    return flask.Response(result, 201, content_type='application/json')
589540
public static void disableCategories(Category... categories) {
        final VoltTrace tracer = s_tracer;

        if (tracer == null) {
            return;
        }

        final List<Category> toDisable = Arrays.asList(categories);
        final ImmutableSet.Builder<Category> builder = ImmutableSet.builder();
        for (Category enabledCategory : tracer.m_enabledCategories) {
            if (!toDisable.contains(enabledCategory)) {
                builder.add(enabledCategory);
            }
        }
        final ImmutableSet<Category> enabledCategories = builder.build();

        if (enabledCategories.isEmpty()) {
            // All categories disabled, shutdown tracer
            try {
                closeAllAndShutdown(null, 0);
            } catch (IOException e) {}
        } else {
            tracer.m_enabledCategories = enabledCategories;
        }
    }
156028
public Graph categories(Category... values) {
        if (values == null || values.length == 0) {
            return this;
        }
        this.categories().addAll(Arrays.asList(values));
        return this;
    }
307173
@Override
    protected void initializeGraph() {
        super.initializeGraph();
        mData = new ArrayList<>();

        mValuePaint = new Paint(mLegendPaint);
        mValuePaint.setTextAlign(Paint.Align.CENTER);

        if(this.isInEditMode()) {
            addBar(new BarModel(2.3f));
            addBar(new BarModel(2.f));
            addBar(new BarModel(3.3f));
            addBar(new BarModel(1.1f));
            addBar(new BarModel(2.7f));
            addBar(new BarModel(2.3f));
            addBar(new BarModel(2.f));
            addBar(new BarModel(3.3f));
            addBar(new BarModel(1.1f));
            addBar(new BarModel(2.7f));
        }
    }
212103
def add_issue(self, data):
        

        issue = self.dispatcher(
            'add_issue',
            data,
            self._admintoken
        )

        return json.loads(issue)