You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by bi...@apache.org on 2011/06/04 22:33:22 UTC
svn commit: r1131489 - in /maven/plugins/trunk/maven-changes-plugin: ./
src/main/java/org/apache/maven/plugin/changes/
src/main/java/org/apache/maven/plugin/jira/
src/test/java/org/apache/maven/plugin/jira/
src/test/resources/org/apache/maven/plugin/ji...
Author: bimargulies
Date: Sat Jun 4 20:33:22 2011
New Revision: 1131489
URL: http://svn.apache.org/viewvc?rev=1131489&view=rev
Log:
[MCHANGES-168]: Fix non-Latin-script character handling.
The actual repair here was the change to maven-reporting-impl version 2.1. However, I then went off and set up a
way to test JIRA functionality without actually talking to JIRA. That involved a bit of refactoring and mocking.
Added:
maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java (with props)
maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java (with props)
maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java (with props)
maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/
maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml (with props)
maven/plugins/trunk/maven-changes-plugin/src/test/unit/jira-plugin-config.xml
- copied, changed from r1131454, maven/plugins/trunk/maven-changes-plugin/src/test/unit/plugin-config.xml
Modified:
maven/plugins/trunk/maven-changes-plugin/pom.xml
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
Modified: maven/plugins/trunk/maven-changes-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/pom.xml?rev=1131489&r1=1131488&r2=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/pom.xml Sat Jun 4 20:33:22 2011
@@ -122,7 +122,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>2.0.5</version>
+ <version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java?rev=1131489&r1=1131488&r2=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesReport.java Sat Jun 4 20:33:22 2011
@@ -174,7 +174,7 @@ public abstract class AbstractChangesRep
{
DecorationModel model = new DecorationModel();
model.setBody( new Body() );
- Map attributes = new HashMap();
+ Map<String, String> attributes = new HashMap<String, String>();
attributes.put( "outputEncoding", getOutputEncoding() );
Locale locale = Locale.getDefault();
SiteRenderingContext siteContext = siteRenderer.createContextForSkin( getSkinArtifactFile(), attributes,
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java?rev=1131489&r1=1131488&r2=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/AbstractJiraDownloader.java Sat Jun 4 20:33:22 2011
@@ -69,7 +69,7 @@ public abstract class AbstractJiraDownlo
private static final String UTF_8 = "UTF-8";
/** Log for debug output. */
- private Log log;
+ protected Log log;
/** Output file for xml document. */
private File output;
/** The maximum number of entries to show. */
@@ -111,7 +111,7 @@ public abstract class AbstractJiraDownlo
/** Mapping containing all allowed JIRA type values. */
protected final Map<String,String> typeMap = new HashMap<String,String>( 8 );
/** The pattern used to parse dates from the JIRA xml file. */
- private String jiraDatePattern;
+ protected String jiraDatePattern;
/**
* Creates a filter given the parameters and some defaults.
@@ -421,7 +421,12 @@ public abstract class AbstractJiraDownlo
}
catch ( Exception e )
{
- getLog().error( "Error accessing " + project.getIssueManagement().getUrl(), e );
+ if ( project.getIssueManagement() != null)
+ {
+ getLog().error( "Error accessing " + project.getIssueManagement().getUrl(), e );
+ } else {
+ getLog().error( "Error accessing mock project issues", e );
+ }
}
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java?rev=1131489&r1=1131488&r2=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraMojo.java Sat Jun 4 20:33:22 2011
@@ -295,6 +295,11 @@ public class JiraMojo
* @parameter default-value=""
*/
private String webUser;
+
+ /*
+ * Used for tests.
+ */
+ private AbstractJiraDownloader mockDownloader;
/* --------------------------------------------------------------------- */
/* Public methods */
@@ -305,6 +310,10 @@ public class JiraMojo
*/
public boolean canGenerateReport()
{
+ if ( mockDownloader != null)
+ {
+ return true;
+ }
return ProjectUtils.validateIfIssueManagementComplete( project, "JIRA", "JIRA Report", getLog() );
}
@@ -323,7 +332,13 @@ public class JiraMojo
try
{
// Download issues
- JiraDownloader issueDownloader = new JiraDownloader();
+ AbstractJiraDownloader issueDownloader;
+ if ( mockDownloader != null)
+ {
+ issueDownloader = mockDownloader;
+ } else {
+ issueDownloader = new JiraDownloader();
+ }
configureIssueDownloader( issueDownloader );
issueDownloader.doExecute();
@@ -386,7 +401,7 @@ public class JiraMojo
return ResourceBundle.getBundle( "jira-report", locale, this.getClass().getClassLoader() );
}
- private void configureIssueDownloader( JiraDownloader issueDownloader )
+ private void configureIssueDownloader( AbstractJiraDownloader issueDownloader )
{
issueDownloader.setLog( getLog() );
@@ -424,4 +439,14 @@ public class JiraMojo
issueDownloader.setSettings( settings );
}
+
+ public void setMockDownloader( AbstractJiraDownloader mockDownloader )
+ {
+ this.mockDownloader = mockDownloader;
+ }
+
+ public AbstractJiraDownloader getMockDownloader()
+ {
+ return mockDownloader;
+ }
}
Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java?rev=1131489&r1=1131488&r2=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java Sat Jun 4 20:33:22 2011
@@ -20,6 +20,8 @@ package org.apache.maven.plugin.jira;
*/
import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -34,14 +36,14 @@ import org.apache.maven.plugin.MojoExecu
import org.apache.maven.plugin.issues.Issue;
import org.apache.maven.plugin.logging.Log;
import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
- * XML parser that extracts <code>Issue</code>s from JIRA. This works on an XML
- * file downloaded from JIRA and creates a <code>List</code> of issues that is
- * exposed to the user of the class.
- *
+ * XML parser that extracts <code>Issue</code>s from JIRA. This works on an XML file downloaded from JIRA and creates a
+ * <code>List</code> of issues that is exposed to the user of the class.
+ *
* @version $Id$
*/
public class JiraXML
@@ -64,7 +66,6 @@ public class JiraXML
private SimpleDateFormat sdf = null;
/**
- *
* @param log not null.
* @param datePattern may be null.
* @since 2.4
@@ -89,29 +90,49 @@ public class JiraXML
/**
* Parse the given xml file. The list of issues can then be retrieved with {@link #getIssueList()}.
- *
+ *
* @param xmlPath the file to pares.
- * @throws MojoExecutionException
- *
+ * @throws MojoExecutionException
* @since 2.4
*/
- public void parseXML( File xmlPath ) throws MojoExecutionException
+ public void parseXML( File xmlPath )
+ throws MojoExecutionException
{
- parse( xmlPath );
+ FileInputStream xmlStream = null;
+ try
+ {
+ InputSource inputSource = new InputSource( xmlStream );
+ parse( inputSource );
+ }
+ finally
+ {
+ if ( xmlStream != null )
+ {
+ try
+ {
+ xmlStream.close();
+ }
+ catch ( IOException e )
+ {
+ //
+ }
+ }
+ }
}
- private void parse( File xmlPath ) throws MojoExecutionException
+ void parse( InputSource xmlSource )
+ throws MojoExecutionException
{
try
{
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
- saxParser.parse( xmlPath, this );
+ saxParser.parse( xmlSource, this );
}
catch ( Throwable t )
{
- throw new MojoExecutionException ( "Failed to parse JIRA XML.", t );
+ throw new MojoExecutionException( "Failed to parse JIRA XML.", t );
}
}
Added: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java?rev=1131489&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java Sat Jun 4 20:33:22 2011
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.maven.plugin.jira;
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+
+/**
+ *
+ */
+public class JiraUnicodeTestCase extends AbstractMojoTestCase
+{
+ /*
+ * Something in Doxia escapes all non-Ascii even when the charset is UTF-8.
+ * This test will fail if that ever changes.
+ */
+ private final static String TEST_TURTLES = "海龟一路下跌。";
+ public void testUnicodeReport() throws Exception {
+
+ File pom = new File( getBasedir(), "/src/test/unit/jira-plugin-config.xml" );
+ assertNotNull( pom );
+ assertTrue( pom.exists() );
+
+ JiraMojo mojo = (JiraMojo) lookupMojo( "jira-report", pom );
+ InputStream testJiraXmlStream = JiraUnicodeTestCase.class.getResourceAsStream( "unicode-jira-results.xml" );
+ String jiraXml = IOUtils.toString( testJiraXmlStream, "utf-8" );
+ MockJiraDownloader mockDownloader = new MockJiraDownloader();
+ mockDownloader.setJiraXml( jiraXml );
+ mojo.setMockDownloader( mockDownloader );
+ File outputDir = new File ( "target/jira-test-output" );
+ outputDir.mkdirs();
+ mojo.setReportOutputDirectory( outputDir );
+ mojo.execute();
+ String reportHtml = FileUtils.readFileToString( new File( outputDir, "jira-report.html" ),
+ "utf-8" );
+ int turtleIndex = reportHtml.indexOf( TEST_TURTLES );
+ assertTrue ( turtleIndex >= 0 );
+ }
+
+}
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestCase.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java?rev=1131489&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java Sat Jun 4 20:33:22 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.plugin.jira;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
+import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
+
+/**
+ */
+public class JiraUnicodeTestProjectStub
+ extends MavenProjectStub
+{
+
+ /** {@inheritDoc} */
+ @Override
+ public List<ArtifactRepository> getRemoteArtifactRepositories()
+ {
+ ArtifactRepository repository = new DefaultArtifactRepository( "central", "http://repo1.maven.org/maven2",
+ new DefaultRepositoryLayout() );
+
+ return Collections.singletonList( repository );
+ }
+
+}
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraUnicodeTestProjectStub.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java?rev=1131489&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java Sat Jun 4 20:33:22 2011
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.maven.plugin.jira;
+
+import java.io.StringReader;
+import java.util.List;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.issues.Issue;
+import org.xml.sax.InputSource;
+
+/**
+ * Allow test cases in the jira mojo without actually talking to jira.
+ *
+ */
+public class MockJiraDownloader extends AbstractJiraDownloader
+{
+ @Override
+ public void doExecute()
+ throws Exception
+ {
+ // do nothing
+ }
+
+ private String jiraXml;
+ @Override
+ public List<Issue> getIssueList()
+ throws MojoExecutionException
+ {
+ JiraXML jira = new JiraXML( log, jiraDatePattern );
+ InputSource inputSource = new InputSource ( new StringReader( jiraXml ));
+ jira.parse( inputSource );
+ log.info( "The JIRA version is '" + jira.getJiraVersion() + "'" );
+ return jira.getIssueList();
+ }
+
+ public void setJiraXml( String jiraXml )
+ {
+ this.jiraXml = jiraXml;
+ }
+
+ public String getJiraXml()
+ {
+ return jiraXml;
+ }
+
+}
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/MockJiraDownloader.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml?rev=1131489&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml (added)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml Sat Jun 4 20:33:22 2011
@@ -0,0 +1,309 @@
+<!-- RSS generated by JIRA (Enterprise Edition, Version: 3.13.2-#335) at Wed Aug 05 14:43:20 EEST 2009 -->
+<!-- If you wish to do custom client-side styling of RSS, uncomment this:
+<?xml-stylesheet href="http://pcsjira.slg.gr/styles/jiraxml2html.xsl" type="text/xsl"?>
+-->
+<rss version="0.92" >
+<channel>
+ <title>Professional Computer Services S.A. JIRA</title>
+ <link>http://pcsjira.slg.gr/secure/IssueNavigator.jspa?reset=true&pid=10101&status=6&resolution=1&sorter/field=created&sorter/order=DESC&sorter/field=priority&sorter/order=DESC</link>
+ <description>An XML representation of a search request</description>
+ <language>en-us</language> <issue start="0" end="2" total="2" /> <build-info>
+ <version>3.13.2</version>
+ <build-number>335</build-number>
+ <build-date>26-11-2008</build-date>
+ <edition>Enterprise</edition>
+ </build-info>
+
+<item>
+<title>[PCSUNIT-2] æµ·é¾ä¸è·¯ä¸è·ã Απεικόνιση σε EXCEL των data των φορμών. Περίπτωση με πολλά blocks</title>
+<link>http://pcsjira.slg.gr/browse/PCSUNIT-2</link>
+
+ <description></description>
+ <environment></environment>
+ <key id="11137">PCSUNIT-2</key>
+ <summary>æµ·é¾ä¸è·¯ä¸è·ã Απεικόνιση σε EXCEL των data των φορμών. Περίπτωση με πολλά blocks</summary>
+
+ <type id="4" iconUrl="http://pcsjira.slg.gr/images/icons/improvement.gif">Improvement</type>
+
+
+ <priority id="6" iconUrl="http://pcsjira.slg.gr/images/icons/priority_minor.gif">Normal</priority>
+ <status id="6" iconUrl="http://pcsjira.slg.gr/images/icons/status_closed.gif">Closed</status>
+ <resolution id="1">Fixed</resolution>
+
+ <security id="10000">Internal Issue</security>
+
+ <assignee username="nikoss">Nikolaos Stais</assignee>
+
+ <reporter username="nikoss">Nikolaos Stais</reporter>
+
+ <created>Wed, 18 Mar 2009 11:04:28 +0200 (EET)</created>
+ <updated>Thu, 23 Apr 2009 13:22:19 +0300 (EEST)</updated>
+
+
+
+
+ <due></due>
+
+ <votes>0</votes>
+
+
+
+ <comments>
+ <comment id="11583" author="nikoss" created="Thu, 19 Mar 2009 16:25:17 +0200 (EET)" rolelevel="PCS Internal" >Εχει πραγματοποιηθεί μια πρώτη προσέγγιση κ υλοποίηση, χρειάζεται ΤΕΣΤ</comment>
+ </comments>
+
+ <attachments>
+ </attachments>
+
+ <subtasks>
+ </subtasks>
+
+ <customfields>
+ <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
+ <customfieldname>Α/Η</customfieldname>
+ <customfieldvalues>
+ <customfieldvalue>2.0</customfieldvalue>
+ </customfieldvalues>
+ </customfield>
+ </customfields>
+
+</item>
+
+<item>
+<title>[PCSUNIT-1] ΔΗΜΙΟΥΡΓΙΑ ΔΙΑΔΙΚΑΣΙΑΣ ΓΙΑ UNDO CHANGES</title>
+<link>http://pcsjira.slg.gr/browse/PCSUNIT-1</link>
+
+ <description></description>
+ <environment></environment>
+ <key id="10051">PCSUNIT-1</key>
+ <summary>ΔΗΜΙΟΥΡΓΙΑ ΔΙΑΔΙΚΑΣΙΑΣ ΓΙΑ UNDO CHANGES</summary>
+
+ <type id="2" iconUrl="http://pcsjira.slg.gr/images/icons/newfeature.gif">New Feature</type>
+
+
+ <priority id="4" iconUrl="http://pcsjira.slg.gr/images/icons/priority_minor.gif">Minor</priority>
+ <status id="6" iconUrl="http://pcsjira.slg.gr/images/icons/status_closed.gif">Closed</status>
+ <resolution id="1">Fixed</resolution>
+
+ <security id="10000">Internal Issue</security>
+
+ <assignee username="nikoss">Nikolaos Stais</assignee>
+
+ <reporter username="nikoss">Nikolaos Stais</reporter>
+
+ <created>Wed, 4 Feb 2009 13:47:25 +0200 (EET)</created>
+ <updated>Wed, 13 May 2009 13:32:49 +0300 (EEST)</updated>
+
+
+
+
+ <due></due>
+
+ <votes>0</votes>
+
+
+
+ <comments>
+ <comment id="10039" author="nikoss" created="Thu, 5 Feb 2009 10:07:35 +0200 (EET)" >Έγινε μια πρώτη προσέγγιση και ενημέρωση συναδέλφων. Σε αναμονή δοκιμής από τους ενδιαφερόμενους.</comment>
+ <comment id="13509" author="nikoss" created="Wed, 13 May 2009 13:32:34 +0300 (EEST)" >&nbsp;
+<br/>
+
+<br/>
+Έχοντας λάβει κάποια requests από πελάτες οι οποίοι επιθυμούν να κάνουν undo σε batch ροές,
+<br/>
+
+<br/>
+θεωρώ ότι υπάρχει ένας εύκολος τρόπος να το πετύχουμε, προκειμένου να αποφύγουμε να κρατάμε ιστορικότητα στις αλλαγές (που έως τώρα θα κάναμε commit).
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Το συγκεκριμένο θέμα δεν έχει εφαρμοστεί (από όσο ξέρω) με τρόπο που να εισάγουμε δεδομένα και να τα δείχνουμε χωρίς να έχουν γίνει commit.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Τολμώ να κάνω μια πρόταση προς διερεύνηση ... J
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Θεωρητικά θα μπορούμε π.χ. να κάνουμε ενημέρωση με τιμή να βλέπουμε τι μερίδια έχουν κοπεί (καλώντας την inv3) και μετά αν δε πατάμε το οριστικό commit button, βγαίνοντας από την
+<br/>
+
+<br/>
+οθόνη θα είναι σαν να μην έχουμε κάνει τίποτα.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Η όλη δουλεία γίνεται με αλλαγές στα εξής σημεία.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Στον ON-COMMIT trigger (form-level).
+<br/>
+
+<br/>
+Στον ΚΕΥ-COMMIT trigger (form-level)
+<br/>
+
+<br/>
+Στον KEY-EXIT trigger (form-level)
+<br/>
+
+<br/>
+Στον KEY-ENTQRY trigger (form-level)
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Οπωσδήποτε αν υπάρχουν αντίστοιχοι triggers σε block-level, τότε πρέπει να επεξεργαστούν κατάλληλα.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Στην ουσία, δεν κάνουμε ποτέ commit (αλλά POST;?στέλνει τα records στη βάση), παρά μόνο πατώντας το κουμπί REAL COMMIT.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Μπορείτε να δείτε τα form1.fmb , form2.fmb που υπάρχουν στο Y:\MFHELLAS_10G\Exedir
+<br/>
+
+<br/>
+ή και να τεστάρετε το εξής σενάριο(<a href="http://dioskouros:7778/forms90/f90servlet?config=test_undo">http://dioskouros:7778/forms90/f90servlet?config=test_undo</a>)
+<br/>
+
+<br/>
+στην πράξη:
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Η form1 βλέπει ένα απλό πίνακα με 2 στήλες. Κάθε φορά που εισάγω μια εγγραφή και πατάω F10 βλέπω μήνυμα
+<br/>
+
+<br/>
+&quot;1 record applied&quot; (η διαφορά φαίνεται κ εδώ, δηλ. δεν λέει: &quot;1 record applied and saved&quot;, λείπει το &quot;saved&quot;=δεν έχει κάνει commit στη βάση αλλά έχει στείλει τα record στη βάση για να μπορούν άλλες οθόνες να τα κάνουν query.)
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Αν καλέσουμε τη δεύτερη οθόνη form2, μπορούμε να κάνουμε query τις αλλαγές(insert,delete,update + F10) που πραγματοποιήσαμε στην οθόνη form1.
+<br/>
+
+<br/>
+Αν στην ίδια οθόνη (form1) κάνουμε F7 χωρίς να κάνουμε F10 (μετά την αλλαγή) η οθόνη χάνει τις αλλαγές (προγραμματιστικά επίτηδες, προς αποφυγή της ερώτησης save changes?)
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Βγαίνοντας από τις δύο οθόνες χωρίς να πατήσουμε το button REAL COMMIT, όλες οι αλλαγές που κάναμε στην form1 και τις είδαμε στη 2η οθόνη form2 δεν έχουν σωθεί.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Τα insert, update, delete μπορούν να γίνουν και προγραμματιστικά. Στην οθόνη form1 στον ON-INSERT trigger του block, υπάρχει για λόγους τεστ ένα insert, το οποίο λειτουργεί με κάθε νέα εγγραφή.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Παρακαλώ για τα σχόλια σας και ιδιαίτερα για τους ενδεχόμενους κινδύνους, αν σας το επιτρέπει ο χρόνος σας.
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+&nbsp;
+<br/>
+
+<br/>
+Ευχαριστώ πολύ,
+<br/>
+
+<br/>
+</comment>
+ </comments>
+
+ <attachments>
+ </attachments>
+
+ <subtasks>
+ </subtasks>
+
+ <customfields>
+ <customfield id="customfield_10001" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
+ <customfieldname>Screen Code</customfieldname>
+ <customfieldvalues>
+ <customfieldvalue>ΘΕΩΡΙΤΙΚ Α ΕΦΑΡΜΟΓΗ ΣΕ ΟΛΕΣ ΤΙΣ ΟΘΟΝΕΣ</customfieldvalue>
+
+ </customfieldvalues>
+ </customfield>
+ </customfields>
+
+</item>
+</channel>
+</rss>
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/resources/org/apache/maven/plugin/jira/unicode-jira-results.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Copied: maven/plugins/trunk/maven-changes-plugin/src/test/unit/jira-plugin-config.xml (from r1131454, maven/plugins/trunk/maven-changes-plugin/src/test/unit/plugin-config.xml)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/unit/jira-plugin-config.xml?p2=maven/plugins/trunk/maven-changes-plugin/src/test/unit/jira-plugin-config.xml&p1=maven/plugins/trunk/maven-changes-plugin/src/test/unit/plugin-config.xml&r1=1131454&r2=1131489&rev=1131489&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/unit/plugin-config.xml (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/unit/jira-plugin-config.xml Sat Jun 4 20:33:22 2011
@@ -25,6 +25,10 @@ under the License.
<plugin>
<artifactId>maven-changes-plugin</artifactId>
<configuration>
+ <localRepository>${localRepository}</localRepository>
+ <project implementation="org.apache.maven.plugin.jira.JiraUnicodeTestProjectStub"/>
+ <outputDirectory>target/jira-test-output</outputDirectory>
+ <columnNames>Key,Summary,Status,Resolution,Assignee,Description</columnNames>
</configuration>
</plugin>
</plugins>