Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Revision 161 does not work

Developers
2009-11-24
2013-05-28
  • Hoani Cross
    Hoani Cross
    2009-11-24

    The revision 161 does not work, I'll modify the project to have the minimum screens working :

          Index: pom.xml
        ===================================================================
        -- pom.xml (révision 161)
        +++ pom.xml (copie de travail)
        @@ -439,7 +439,7 @@
                     <plugin>
       
                         <artifactId>maven-resources-plugin</artifactId>
       
                         <configuration>
       
        -                    <encoding>UTF-8</encoding>
       
        +                    <encoding>ISO-8859-15</encoding>
       
                         </configuration>
       
                     </plugin>
       
                     <plugin>
       
        Index: src/spring-beans.xml
        ===================================================================
        -- src/spring-beans.xml (révision 161)
        +++ src/spring-beans.xml (copie de travail)
        @@ -381,8 +381,9 @@
        
       
         </bean>
       
            
       
        +    <!-
       
             <bean id="dataSampleDao" class="net.sf.xplanner.dao.impl.DataSampleDaoImpl">
       
                 <constructor-arg ref="session" />
       
             </bean>
       
        -   
       
        +    ->
       
         </beans>
       
        Index: src/com/technoetic/xplanner/DomainSpecificProperties.java
        ===================================================================
        -- src/com/technoetic/xplanner/DomainSpecificProperties.java (révision 161)
        +++ src/com/technoetic/xplanner/DomainSpecificProperties.java (copie de travail)
        @@ -122,7 +122,7 @@
               @Override
       
               public Object doInHibernate(Session session) throws HibernateException {
       
                  Attribute attribute = null;
       
        -         Query query = session.createQuery("select attribute from Attribute attribute where attribute.targetId = ? and attribute.name= ? ");
       
        +         Query query = session.createQuery("select attribute from Attribute attribute where attribute.id.targetId = ? and attribute.id.name= ? ");
       
                  query.setParameter(0, attributeTargetId);
       
                  query.setParameter(1, key);
       
                  List attributeList = query.list();
       
        Index: src/com/technoetic/xplanner/db/hibernate/XPlannerInterceptor.java
        ===================================================================
        -- src/com/technoetic/xplanner/db/hibernate/XPlannerInterceptor.java (révision 161)
        +++ src/com/technoetic/xplanner/db/hibernate/XPlannerInterceptor.java (copie de travail)
        @@ -127,8 +127,7 @@
        
       
         @Override
       
         public String onPrepareStatement(String sql) {
       
        - // TODO Auto-generated method stub
       
        - return null;
       
        + return sql;
       
         }
       
        
       
         }
       
        Index: src/com/technoetic/xplanner/domain/DomainMetaDataRepository.java
        ===================================================================
        -- src/com/technoetic/xplanner/domain/DomainMetaDataRepository.java (révision 161)
        +++ src/com/technoetic/xplanner/domain/DomainMetaDataRepository.java (copie de travail)
        @@ -134,7 +134,16 @@
           }
       
        
       
           public DomainClass getMetaData(Class objectClass) {
       
        -      return (DomainClass) metadataByClass.get(objectClass);
       
        +      DomainClass dom = (DomainClass) metadataByClass.get(objectClass);
       
        +      if (dom == null) {
       
        +      String className = objectClass.getName();
       
        +      for (Object clazz : metadataByClass.keySet()) {
       
        +      if (className.startsWith(((Class) clazz).getName())) {
       
        +      return (DomainClass) metadataByClass.get(clazz);
       
        +      }
       
        +      }
       
        +      }
       
        +      return dom;
       
            }
       
        
       
            public DomainClass getMetaData(String type) {
       
        Index: src/com/technoetic/xplanner/domain/repository/TaskRepositoryHibernate.java
        ===================================================================
        -- src/com/technoetic/xplanner/domain/repository/TaskRepositoryHibernate.java (révision 161)
        +++ src/com/technoetic/xplanner/domain/repository/TaskRepositoryHibernate.java (copie de travail)
        @@ -140,11 +140,11 @@
            }
       
        
       
            public Collection getTaskAcceptorsEmailNotification(Date date) {
       
        -      return getHibernateTemplate().findByNamedQuery(EMAIL_TO_ACCEPTORS_QUERY, date);
       
        +      return getHibernateTemplate().findByNamedQueryAndNamedParam(EMAIL_TO_ACCEPTORS_QUERY, "date", date);
       
            }
       
        
       
            public Collection getProjectLeadsEmailNotification(Date date) {
       
        -      return getHibernateTemplate().findByNamedQuery(EMAIL_TO_LEADS_QUERY, date);
       
        +      return getHibernateTemplate().findByNamedQueryAndNamedParam(EMAIL_TO_LEADS_QUERY, "date", date);
       
            }
       
        
       
            /*
       
        Index: src/com/technoetic/xplanner/security/auth/AuthorizerImpl.java
        ===================================================================
        -- src/com/technoetic/xplanner/security/auth/AuthorizerImpl.java (révision 161)
        +++ src/com/technoetic/xplanner/security/auth/AuthorizerImpl.java (copie de travail)
        @@ -140,7 +140,13 @@
            }
       
        
       
            public String getTypeOfResource(Object resource) {
       
        -      return (String) resourceTypes.get(resource.getClass());
       
        +   String keyClass = resource.getClass().getName();
       
        +   for (Object clazz : resourceTypes.keySet()) {
       
        +   if (keyClass.startsWith(((Class) clazz).getName())) {
       
        +   return (String) resourceTypes.get(clazz);
       
        +   }
       
        +   }
       
        +      return "-1";
       
            }
       
        
       
            public void setPrincipalSpecificPermissionHelper(PrincipalSpecificPermissionHelper principalSpecificPermissionHelper) {
       
        Index: src/com/technoetic/xplanner/tags/DomainContext.java
        ===================================================================
        -- src/com/technoetic/xplanner/tags/DomainContext.java (révision 161)
        +++ src/com/technoetic/xplanner/tags/DomainContext.java (copie de travail)
        @@ -166,10 +166,10 @@
        
       
             private void populate(Session session, UserStory story) throws Exception {
       
                 List results = session.find(
       
        -                "select p.name, p.id, i.name, i.id from " +
       
        -                "from p in class com.technoetic.xplanner.domain.Project, " +
       
        -                "i in class com.technoetic.xplanner.domain.Iteration, " +
       
        -                "s in class com.technoetic.xplanner.domain.UserStory " +
       
        +                "select p.name, p.id, i.name, i.id " +
       
        +                "from com.technoetic.xplanner.domain.Project as p, " +
       
        +                "com.technoetic.xplanner.domain.Iteration as i, " +
       
        +                "com.technoetic.xplanner.domain.UserStory as s " +
       
                         "where s.id = ? and  s.iterationId = i.id and i.projectId = p.id",
       
                         new Integer(story.getId()), Hibernate.INTEGER);
       
                 if (results.size() > 0) {
       
        @@ -186,10 +186,10 @@
             private void populate(Session session, Task task) throws Exception {
       
                 List results = session.find(
       
                         "select p.name, p.id, i.name, i.id, s.name, s.id " +
       
        -                "from p in class com.technoetic.xplanner.domain.Project, " +
       
        -                "i in class com.technoetic.xplanner.domain.Iteration, " +
       
        -                "s in class com.technoetic.xplanner.domain.UserStory, " +
       
        -                "t in class com.technoetic.xplanner.domain.Task " +
       
        +                "from com.technoetic.xplanner.domain.Project as p, " +
       
        +                "com.technoetic.xplanner.domain.Iteration as i, " +
       
        +                "com.technoetic.xplanner.domain.UserStory as s, " +
       
        +                "com.technoetic.xplanner.domain.Task as t " +
       
                         "where t.id = ? and t.story.id = s.id and s.iterationId = i.id and i.projectId = p.id",
       
                         new Integer(task.getId()), Hibernate.INTEGER);
       
                 if (results.size() > 0) {
       
        @@ -208,10 +208,10 @@
             private void populate(Session session, TimeEntry timeEntry) throws Exception {
       
                 List results = session.find(
       
                         "select p.name, p.id, i.name, i.id, s.name, s.id, t.name " +
       
        -                "from p in class com.technoetic.xplanner.domain.Project, " +
       
        -                "i in class com.technoetic.xplanner.domain.Iteration, " +
       
        -                "s in class com.technoetic.xplanner.domain.UserStory, " +
       
        -                "t in class com.technoetic.xplanner.domain.Task " +
       
        +                "from com.technoetic.xplanner.domain.Project as p, " +
       
        +                "com.technoetic.xplanner.domain.Iteration as i, " +
       
        +                "com.technoetic.xplanner.domain.UserStory as s, " +
       
        +                "com.technoetic.xplanner.domain.Task as t " +
       
                         "where t.id = ? and t.story.id = s.id and s.iterationId = i.id and i.projectId = p.id",
       
                         new Integer(timeEntry.getTaskId()), Hibernate.INTEGER);
       
                 if (results.size() > 0) {
       
        @@ -230,10 +230,10 @@
             private void populate(Session session, Feature feature) throws Exception {
       
                 List results = session.find(
       
                         "select p.name, p.id, i.name, i.id, s.name, s.id " +
       
        -                "from p in class com.technoetic.xplanner.domain.Project, " +
       
        -                "i in class com.technoetic.xplanner.domain.Iteration, " +
       
        -                "s in class com.technoetic.xplanner.domain.UserStory, " +
       
        -                "f in class com.technoetic.xplanner.domain.Feature " +
       
        +                "from com.technoetic.xplanner.domain.Project as p, " +
       
        +                "com.technoetic.xplanner.domain.Iteration as i, " +
       
        +                "com.technoetic.xplanner.domain.UserStory as s, " +
       
        +                "com.technoetic.xplanner.domain.Feature as f " +
       
                         "where f.id = ? and f.story.id = s.id and s.iterationId = i.id and i.projectId = p.id",
       
                         new Integer(feature.getId()), Hibernate.INTEGER);
       
                 if (results.size() > 0) {
       
        Index: src/com/technoetic/xplanner/tags/NavigationBarTag.java
        ===================================================================
        -- src/com/technoetic/xplanner/tags/NavigationBarTag.java (révision 161)
        +++ src/com/technoetic/xplanner/tags/NavigationBarTag.java (copie de travail)
        @@ -91,10 +91,10 @@
        
       
               }
       
               catch (JspException e) {
       
        -         throw e;
       
        +         //throw e;
       
               }
       
               catch (Exception e) {
       
        -         throw new JspException(e);
       
        +         //throw new JspException(e);
       
               }
       
        
       
               return EVAL_PAGE;
       
        Index: src/com/technoetic/xplanner/tags/PersonOptionsTag.java
        ===================================================================
        -- src/com/technoetic/xplanner/tags/PersonOptionsTag.java (révision 161)
        +++ src/com/technoetic/xplanner/tags/PersonOptionsTag.java (copie de travail)
        @@ -13,7 +13,7 @@
         public class PersonOptionsTag extends OptionsTag {
       
             private String filtered;
       
             private int projectId;
       
        -   public static final String ALL_ACTIVE_PEOPLE_QUERY = "from p in "+ Person.class+" order by p.name where p.hidden = false";
       
        +   public static final String ALL_ACTIVE_PEOPLE_QUERY = "from "+ Person.class.getName() +" as p where p.hidden = false order by p.name";
       
        
       
            @Override
       
         public void release() {
       
        Index: src/com/technoetic/xplanner/tags/db/UseBeansTag.java
        ===================================================================
        -- src/com/technoetic/xplanner/tags/db/UseBeansTag.java (révision 161)
        +++ src/com/technoetic/xplanner/tags/db/UseBeansTag.java (copie de travail)
        @@ -109,7 +109,7 @@
                         if (qname == null) {
       
                             String hql = null;
       
                             if (getBodyContent() == null) {
       
        -                        hql = "from object in class " + type;
       
        +                        hql = "from " + type + " as bean ";
       
                                 if (where != null) {
       
                                     hql += " where " + where;
       
                                 }
       
        Index: src/mappings/Task.xml
        ===================================================================
        -- src/mappings/Task.xml (révision 161)
        +++ src/mappings/Task.xml (copie de travail)
        @@ -103,37 +103,39 @@
            <query name="com.technoetic.xplanner.domain.TimeEntryEmailNotificationToProjectSpecificLeads">
       
               <![CDATA[
       
               select task, story, receiver, acceptor
       
        -      from Project as project, elements(project.iterations) as iteration,
       
        -           elements(iteration.userStories) as story,
       
        -           elements(story.tasks) as task,
       
        -           elements(task.timeEntries) as timeEntry,
       
        -           elements(project.notificationReceivers) as receiver,
       
        +      from Project as project
       
        +           left join project.iterations as iteration
       
        +           left join iteration.userStories as story
       
        +           left join story.tasks as task
       
        +           left join task.timeEntries as timeEntry
       
        +           left join project.notificationReceivers as receiver,
       
                    Person as acceptor
       
               where iteration.statusShort=0 and
       
                     task.completed!=1 and
       
                     task.acceptorId=acceptor.id and
       
                     receiver.email is not null
       
        +      group by receiver, acceptor, project, iteration, story, task
       
        +      having max(timeEntry.reportDate) < :date
       
               order by receiver.id, acceptor.name, project.name, iteration.name, story.name, task.name
       
        -      group by receiver, acceptor, project, iteration, story, task
       
        -      having max(timeEntry.reportDate) < ?
       
           ]]>
       
            </query>
       
        
       
            <query name="com.technoetic.xplanner.domain.TimeEntryEmailNotificationToAcceptors">
       
               <![CDATA[
       
               select task, story, project
       
        -      from Project as project, elements(project.iterations) as iteration,
       
        -           elements(iteration.userStories) as story,
       
        -           elements(story.tasks) as task,
       
        -           elements(task.timeEntries) as timeEntry,
       
        +      from Project as project
       
        +           left join project.iterations iteration
       
        +           left join iteration.userStories story
       
        +           left join story.tasks task
       
        +           left join task.timeEntries timeEntry,
       
                    Person as acceptor
       
               where acceptor.id = task.acceptorId and
       
                     acceptor.email is not null and
       
                     iteration.statusShort=0 and
       
                     task.completed!=1
       
        +      group by task, project, iteration, story
       
        +      having max(timeEntry.reportDate) < :date
       
               order by task.acceptorId, project.name, iteration.name, story.name, task.name
       
        -      group by task, project, iteration, story
       
        -      having max(timeEntry.reportDate) < ?
       
           ]]>
       
            </query>
       
        
       
        Index: test/com/technoetic/xplanner/db/hsqldb/TestHsqlServer.java
        ===================================================================
        -- test/com/technoetic/xplanner/db/hsqldb/TestHsqlServer.java (révision 161)
        +++ test/com/technoetic/xplanner/db/hsqldb/TestHsqlServer.java (copie de travail)
        @@ -21,7 +21,7 @@
           public static final String SLASH = File.separator;
       
        
       
           public void testStartPublicServerWithWebRootPathDefinedAndExplicitDbPathRelativeToWebAppRoot() throws Exception {
       
        -    webRoot = "C:\\Projects\\xplanner-trunk\\build\\deploy\\";
       
        +    webRoot = "/tmp/";
       
             assertEmbeddedServerStartsCorrectly(HsqlServer.WEBAPP_ROOT_TOKEN + "/mylocation", webRoot + "mylocation");
       
           }
       
        
       
        Index: webapp/index.jsp
        ===================================================================
        -- webapp/index.jsp (révision 161)
        +++ webapp/index.jsp (copie de travail)
        @@ -4,7 +4,7 @@
         <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
       
         <%@ taglib uri="http://xplanner.org/xplanner-db-taglib" prefix="db" %>
       
        
       
        -<db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="object.hidden = false" />
       
        +<db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="bean.hidden = false" />
       
         <bean:size id="projectCount" name="projects"/>
       
        
       
         <logic:equal name="projectCount" value="0" >
       
        Index: webapp/WEB-INF/jsp/edit/editPerson.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/edit/editPerson.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/edit/editPerson.jsp (copie de travail)
        @@ -101,7 +101,7 @@
                   </tr>
       
              <%}%>
       
            <db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project"
       
        -        where="object.hidden = false" order="name" />
       
        +        where="bean.hidden = false" order="name" />
       
            <xplanner:isUserAuthorizedForAny name="projects" permissions="admin.edit.role">
       
            <tr>
       
                 <td nowrap valign="top" colspan="2"><b><bean:message key="person.editor.roles"/> </b></td>
       
        Index: webapp/WEB-INF/jsp/edit/editRoles.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/edit/editRoles.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/edit/editRoles.jsp (copie de travail)
        @@ -60,7 +60,7 @@
                         <th><bean:message key="roles.tableheading.persons"/></th>
       
                         <th><bean:message key="roles.tableheading.role"/></th>
       
                     </tr>
       
        -<db:useBeans id="persons" type="com.technoetic.xplanner.domain.Person" where="object.hidden = false" order="name" />
       
        +<db:useBeans id="persons" type="com.technoetic.xplanner.domain.Person" where="bean.hidden = false" order="name" />
       
         <logic:iterate id="personne" indexId="index" name="persons" type="com.technoetic.xplanner.domain.Person">
       
                       <tr> 
       
                        <td><bean:write name="personne" property="name"/></td>
       
        Index: webapp/WEB-INF/jsp/view/integrations.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/integrations.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/integrations.jsp (copie de travail)
        @@ -20,13 +20,13 @@
         <html:errors/>
       
        
       
        
       
        -<db:useBeans id="currentIntegrations" where="object.state = ? and object.projectId = ?"
       
        +<db:useBeans id="currentIntegrations" where="bean.state = ? and bean.projectId = ?"
       
                 type="com.technoetic.xplanner.domain.Integration">
       
             <db:useBeansParameter value='<%= new Character(Integration.ACTIVE) %>' type="char"/>
       
             <db:useBeansParameter value='<%= projectId %>' type="string"/>
       
         </db:useBeans>
       
        
       
        -<db:useBeans id="pendingIntegrations" where="object.state = ? and object.projectId = ?"
       
        +<db:useBeans id="pendingIntegrations" where="bean.state = ? and bean.projectId = ?"
       
                 type="com.technoetic.xplanner.domain.Integration">
       
             <db:useBeansParameter value='<%= new Character(Integration.PENDING) %>' type="char"/>
       
             <db:useBeansParameter value='<%= projectId %>' type="string"/>
       
        @@ -154,7 +154,7 @@
        
       
         <db:useBeans id="recentIntegrations"
       
                 type="com.technoetic.xplanner.domain.Integration"
       
        -        where="object.state in (?, ?) and object.projectId = ?" order="when_complete desc" size="20">
       
        +        where="bean.state in (?, ?) and bean.projectId = ?" order="when_complete desc" size="20">
       
             <db:useBeansParameter value='<%= new Character(Integration.FINISHED) %>' type="char"/>
       
             <db:useBeansParameter value='<%= new Character(Integration.CANCELED) %>' type="char"/>
       
             <db:useBeansParameter value='<%= projectId %>' type="string"/>
       
        Index: webapp/WEB-INF/jsp/view/notes.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/notes.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/notes.jsp (copie de travail)
        @@ -12,7 +12,7 @@
        
       
         <bean:parameter id="oid" name="oid"/>
       
         <db:useBeans id="notes" type="com.technoetic.xplanner.domain.Note"
       
        -    where='<%= "object.attachedToId=" + oid %>' order='<%="object.submissionTime" %>'/>
       
        +    where='<%= "bean.attachedToId=" + oid %>' order='<%="bean.submissionTime" %>'/>
       
        
       
         <%- viewers have no need to see the notes bar if there are no notes. -%>
       
         <bean:define id="domainContext" name="domainContext" type="com.technoetic.xplanner.tags.DomainContext"/>
       
        Index: webapp/WEB-INF/jsp/view/people.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/people.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/people.jsp (copie de travail)
        @@ -24,9 +24,9 @@
         </xplanner:isUserAuthorized>
       
         <xplanner:isUserAuthorized permission="admin.hide" negate="true" resourceType="system.person">
       
             <db:useBeans id="people" type="com.technoetic.xplanner.domain.Person"
       
        -        where="object.hidden = false" order="name"/>
       
        +        where="hidden = false" order="name"/>
       
         </xplanner:isUserAuthorized>
       
        -<db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="object.hidden = false"/>
       
        +<db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="hidden = false"/>
       
        
       
         <logic:greaterThan name="projectId" value="0" >
       
             <db:useBean id="project" type="com.technoetic.xplanner.domain.Project"
       
        Index: webapp/WEB-INF/jsp/view/person.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/person.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/person.jsp (copie de travail)
        @@ -9,7 +9,7 @@
        
       
         <xplanner:content>
       
             <db:useBean id="person" type="com.technoetic.xplanner.domain.Person" />
       
        -    <db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="object.hidden = false"/>
       
        +    <db:useBeans id="projects" type="com.technoetic.xplanner.domain.Project" where="hidden = false"/>
       
             <xplanner:contentTitle title="XPlanner {0} {1}">
       
                 <xplanner:contentTitleArg><bean:message key="person.prefix"/></xplanner:contentTitleArg>
       
                 <xplanner:contentTitleArg>${person.name}</xplanner:contentTitleArg>
       
        Index: webapp/WEB-INF/jsp/view/projects.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/projects.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/projects.jsp (copie de travail)
        @@ -42,7 +42,7 @@
        
       
        
       
         <db:useBeans id="iterations" type="com.technoetic.xplanner.domain.Iteration"
       
        -    where="? between object.startDate and object.endDate">
       
        +    where="? between bean.startDate and bean.endDate">
       
             <db:useBeansParameter value='<%= new Date() %>' type="date"/>
       
         </db:useBeans>
       
        
       
        Index: webapp/WEB-INF/jsp/view/task.jsp
        ===================================================================
        -- webapp/WEB-INF/jsp/view/task.jsp (révision 161)
        +++ webapp/WEB-INF/jsp/view/task.jsp (copie de travail)
        @@ -98,8 +98,8 @@
        
       
        
       
         <db:useBeans id="entries" type="com.technoetic.xplanner.domain.TimeEntry"
       
        -             where='<%= "object.taskId = " + request.getParameter("oid") %>'
       
        -             order="object.startTime"/>
       
        +             where='<%= "bean.taskId = " + request.getParameter("oid") %>'
       
        +             order="bean.startTime"/>
       
         <bean:size id="entryCount" name="entries"/>
         

    Hope it helps but the breadcrums still doesn't work (error while getting the context for the OID when editing time).

     
  • Thank you very much for help.

    Build is broken since we moved to hibernate 3.

    I will merge patch to trunk in nearest time

     
  • Hoani Cross
    Hoani Cross
    2009-11-26

    I would like to contribute further with the new team. Would it be possible to add me as a developer on the project ? Thx in advance.

     
  • Sorry, for late answer.

    I have a lot of business trips recently.

    Right now we are working on Development and Coding standarts. We will publish them on the end of this week. And then you can participate in development.

    We are happy that you will be participating in project.