Package org.apache.maven.plugin.issues

Examples of org.apache.maven.plugin.issues.Issue


    /** The username for authentication into a private Trac installation. */
    private String tracUser;

    private Issue createIssue( Object[] ticketObj )
    {
        Issue issue = new Issue();

        issue.setId( String.valueOf( ticketObj[0] ) );

        issue.setLink( getUrl() + "/ticket/" + String.valueOf( ticketObj[0] ) );

        issue.setCreated( parseDate( String.valueOf( ticketObj[1] ) ) );

        issue.setUpdated( parseDate( String.valueOf( ticketObj[2] ) ) );

        Map attributes = (Map) ticketObj[3];

        issue.setType( (String) attributes.get( "type" ) );

        issue.setSummary( (String) attributes.get( "summary" ) );

        issue.setStatus( (String) attributes.get( "status" ) );

        issue.setResolution( (String) attributes.get( "resolution" ) );

        issue.setAssignee( (String) attributes.get( "owner" ) );

        issue.addFixVersion( (String) attributes.get( "milestone" ) );

        issue.setPriority( (String) attributes.get( "priority" ) );

        issue.setReporter( (String) attributes.get( "reporter" ) );

        issue.addComponent( (String) attributes.get( "component" ) );

        return issue;
    }
View Full Code Here


    public void startElement( String namespaceURI, String sName, String qName, Attributes attrs )
        throws SAXException
    {
        if ( qName.equals( "item" ) )
        {
            issue = new Issue();

            currentParent = "item";
        }
        else if ( qName.equals( "key" ) )
        {
View Full Code Here

    public void testDefaultIssueTypeMapping()
    {
        IssueAdapter adapter = new IssueAdapter( new JIRAIssueManagmentSystem() );

        Issue issue = createIssue( "TST-1", "New Feature" );
        Action action = adapter.createAction( issue );
        assertEquals( "add", action.getType() );

        issue = createIssue( "TST-2", "Bug" );
        action = adapter.createAction( issue );
View Full Code Here

        IssueManagementSystem ims = new JIRAIssueManagmentSystem();
       
        ims.getIssueTypeMap().clear();
        IssueAdapter adapter = new IssueAdapter( ims );

        Issue issue = createIssue( "TST-1", "New Feature" );
        Action action = adapter.createAction( issue );
        assertEquals( "", action.getType() );

        issue = createIssue( "TST-2", "Bug" );
        action = adapter.createAction( issue );
View Full Code Here

        ims.getIssueTypeMap().put( "Epic", IssueType.ADD);
        ims.getIssueTypeMap().put( "Defect", IssueType.FIX);
        ims.getIssueTypeMap().put( "Error", IssueType.FIX);
        IssueAdapter adapter = new IssueAdapter( ims );

        Issue issue = createIssue( "TST-1", "Story" );
        Action action = adapter.createAction( issue );
        assertEquals( "add", action.getType() );

        issue = createIssue( "TST-2", "Epic" );
        action = adapter.createAction( issue );
View Full Code Here

        assertEquals( "update", action.getType() );
    }

    private Issue createIssue( String key, String type )
    {
        Issue issue = new Issue();
        issue.setKey( key );
        issue.setType( type );
        issue.setAssignee( "A User" );
        issue.setSummary( "The title of this issue" );
        return issue;
    }
View Full Code Here

    public void startElement( String namespaceURI, String sName, String qName, Attributes attrs )
        throws SAXException
    {
        if ( qName.equals( "item" ) )
        {
            issue = new Issue();

            currentParent = "item";
        }
        else if ( qName.equals( "key" ) )
        {
View Full Code Here

    /** The username for authentication into a private Trac installation. */
    private String tracUser;

    private Issue createIssue( Object[] ticketObj )
    {
        Issue issue = new Issue();

        issue.setId( String.valueOf( ticketObj[0] ) );

        issue.setKey( String.valueOf( ticketObj[0] ) );

        issue.setLink( getUrl() + "/ticket/" + String.valueOf( ticketObj[0] ) );

        issue.setCreated( parseDate( String.valueOf( ticketObj[1] ) ) );

        issue.setUpdated( parseDate( String.valueOf( ticketObj[2] ) ) );

        Map attributes = (Map) ticketObj[3];

        issue.setType( (String) attributes.get( "type" ) );

        issue.setSummary( (String) attributes.get( "summary" ) );

        issue.setStatus( (String) attributes.get( "status" ) );

        issue.setResolution( (String) attributes.get( "resolution" ) );

        issue.setAssignee( (String) attributes.get( "owner" ) );

        issue.addFixVersion( (String) attributes.get( "milestone" ) );

        issue.setPriority( (String) attributes.get( "priority" ) );

        issue.setReporter( (String) attributes.get( "reporter" ) );

        issue.addComponent( (String) attributes.get( "component" ) );

        return issue;
    }
View Full Code Here

    public void testDefaultIssueTypeMapping()
    {
        IssueAdapter adapter = new IssueAdapter( new JIRAIssueManagmentSystem() );

        Issue issue = createIssue( "TST-1", "New Feature" );
        Action action = adapter.createAction( issue );
        assertEquals( "add", action.getType() );

        issue = createIssue( "TST-2", "Bug" );
        action = adapter.createAction( issue );
View Full Code Here

        IssueManagementSystem ims = new JIRAIssueManagmentSystem();
       
        ims.getIssueTypeMap().clear();
        IssueAdapter adapter = new IssueAdapter( ims );

        Issue issue = createIssue( "TST-1", "New Feature" );
        Action action = adapter.createAction( issue );
        assertEquals( "", action.getType() );

        issue = createIssue( "TST-2", "Bug" );
        action = adapter.createAction( issue );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.issues.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.