Package com.atlassian.jira.issue

Examples of com.atlassian.jira.issue.Issue


  }
 
  public void workflowEvent(IssueEvent event) {
    if (!isEventMonitored(event))
      return;
    Issue issue = event.getIssue();
    StringBuilder sb = new StringBuilder();
    sb.append("JIRA issue ");
    sb.append(ManagerFactory.getApplicationProperties().getString(APKeys.JIRA_BASEURL));
    sb.append("/browse/");
    sb.append(issue.getKey());
    sb.append(" ");
    sb.append(ComponentManager.getInstance().getEventTypeManager().getEventType(event.getEventTypeId()).getName().toLowerCase());
    sb.append(" by ");
    sb.append(event.getUser().getName());
    if (event.getComment() != null && event.getComment().getBody().length() > 0) {
View Full Code Here


          List issues = searchResults.getIssues();
          //**
//          log.debug("Found " + issues.size());

          for (int i = 0; i < issues.size(); i++) {
            Issue issue = (Issue) issues.get(i);
            //**
//            log.debug("Updating SLA fields for issue " + issue.getKey());
            updateIssueSLAFields(clientSLAConfig, dateResolved, dateResponded, slaLastCalculated, responseSlaState, fixSlaState, timeElapsed,
                onHold, issue, user);

View Full Code Here

        params.put("setVals", setVals);
       
        ArrayList<Issue> selectedIssues = new ArrayList<Issue>(setVals.size());
        for (String issueKey : setVals.keySet())
        {
            Issue anIssue = issueMgr.getIssueObject(issueKey);
            if (anIssue != null)
            {
                selectedIssues.add(anIssue);
            }
        }
View Full Code Here

        Map transientVars,
        Map args,
        PropertySet ps)
    throws InvalidInputException, WorkflowException
    {
        Issue issue = (Issue) transientVars.get("issue");

        String cfId = (String) args.get("cfId");
        String invalid_statuses = (String) args.get("invalid_statuses");

        if (cfId != null && cfId.length() > 0)
        {
            CustomField cfObj = ComponentManager.getInstance().getCustomFieldManager().getCustomFieldObject(cfId);
            if (cfObj != null)
            {
                Object cfValObj = issue.getCustomFieldValue(cfObj);
                if (cfValObj != null)
                {
                    String linkedIssueKey = cfValObj.toString();
                    Issue linkedIssue = ComponentManager.getInstance().getIssueManager().getIssueObject(linkedIssueKey);
                    if (linkedIssue != null)
                    {
                        Set<String> params = new TreeSet<String>();
                        if (invalid_statuses != null)
                        {
                            StringTokenizer st = new StringTokenizer(invalid_statuses, "&");
                            while (st.hasMoreTokens())
                            {
                                String token = st.nextToken();
                                if (token.length() > 0)
                                {
                                    params.add(token.trim());
                                }
                            }
                        }
                        if (params.contains(linkedIssue.getStatusObject().getId()))
                        {
                            String issueUrl = Utils.getBaseUrl(JiraWebUtils.getHttpRequest()) + "/browse/" + linkedIssue.getKey();
                            throw new InvalidInputException(
                                ComponentAccessor.getJiraAuthenticationContext().getI18nHelper().getText("queryfields.linkervalidator.error", issueUrl, linkedIssue.getStatusObject().getName()));
                        }
                    }
                }
            }
        }
View Full Code Here

        Map transientVars,
        Map args,
        PropertySet ps)
    throws InvalidInputException, WorkflowException
    {
        Issue issue = (Issue) transientVars.get("issue");
        String jql = (String) args.get("jql");
        String invalid_statuses = (String) args.get("invalid_statuses");

        if (jql != null && jql.length() > 0)
        {
            if (jql.contains(Consts.ISSUE_RLINK))
            {
                if (issue.getKey() == null)
                {
                    return;
                }
                jql = jql.replace(Consts.ISSUE_RLINK, issue.getKey());
            }

            User user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
            SearchService.ParseResult parseResult = ComponentManager.getInstance().getSearchService().parseQuery(user, jql);
            if (parseResult.isValid())
View Full Code Here

                    }
                }

                if (isAutocompleteView)
                {
                    Issue selectedIssue = issueMgr.getIssueObject(selected);
                    if (selectedIssue != null)
                    {
                        params.put("selIssue", selectedIssue);
                    }
                }
View Full Code Here

                }
                else
                {
                    for (String param : params)
                    {
                        Issue issue = issueMgr.getIssueObject(param);
                        if (issue == null)
                        {
                            errorCollection.addError(fieldConfig.getFieldId(),
                                i18n.getText("queryfields.error.notissue", param));
                        }
View Full Code Here

        }

        AutocompleteUniversalData entity = new AutocompleteUniversalData();
        if (Utils.isOfQueryMultiSelectType(cf.getCustomFieldType().getKey()))
        {
            Issue issue = ComponentManager.getInstance().getIssueManager()
                .getIssueObject(cfValue);
            if (issue == null)
            {
                // nothing to do. Sending object with empty key
            }
            else
            {
                String icon;
                entity.setName(issue.getKey());
                if (issue.getIssueTypeObject() != null)
                {
                    entity.setType(issue.getIssueTypeObject().getName());
                    icon = issue.getIssueTypeObject().getIconUrl();
                    if (Utils.isValidStr(icon))
                    {
                        entity.setTypeimage(icon);
                    }
                }
                entity.setDescription(issue.getSummary());

                if (issue.getStatusObject() != null)
                {
                    entity.setState(issue.getStatusObject().getName());
                    icon = issue.getStatusObject().getIconUrl();
                    if (Utils.isValidStr(icon))
                    {
                        entity.setStateimage(icon);
                    }
                }

                if (issue.getPriorityObject() != null)
                {
                    entity.setPreference(issue.getPriorityObject().getName());
                    icon = issue.getPriorityObject().getIconUrl();
                    if (Utils.isValidStr(icon))
                    {
                        entity.setPreferenceimage(icon);
                    }
                }
View Full Code Here

  public IssueChangeEvent(@NotNull JiraChangeType changeType, @NotNull IssueEvent jiraEvent) {
    super(changeType);
    myJiraEvent = jiraEvent;
    long id = 0;
    if (jiraEvent != null) {
      Issue issue = jiraEvent.getIssue();
      if (issue != null) {
        Long issueId = issue.getId();
        if (issueId != null) {
          id = issueId;
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.atlassian.jira.issue.Issue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.