Menu

#223 Problems with the lag calculated in the relation

v1.0_(example)
closed-fixed
Jon Iles
5
2017-10-25
2013-07-23
No

When I import a mpp file with some lags in the relations, the model calculates a wrong lag duration always show 95.57333333333334d but if I check the ToString method in the Relation model shows the correct lag

[Relation [Task id=2 uniqueID=2 name=Tarea 2 - Lag 0d] -> [Task id=1 uniqueID=1 name=Tarea 1]]

I attach the file with a simple example.

1 Attachments

Related

Bugs: #223

Discussion

  • Jose Vilmar Estacio de Souza

                I found the same problem.
    

    I'll attach a patch that will probably fix the problem.
    Let me know if it is ok.

     
  • Dmitry Lagoda

    Dmitry Lagoda - 2014-03-04

    Hi! I think this patch should be applied to nearest update, because the problem with relations is really critical. Almost all files contain relations between tasks, and in this case import is useless. Hope we will see this patch in our favorite mpxj as soon as possible.

     
    • Jose Vilmar Estacio de Souza

      I still have not tested the patch with version 4.0.

      On 03/04/2014 08:53 AM, Dmitry Lagoda wrote:

      Hi! I think this patch should be applied to nearest update, because the problem with relations is really critical. Almost all files contain relations between tasks, and in this case import is useless. Hope we will see this patch in our favorite mpxj as soon as possible.


      ** [bugs:#223] Problems with the lag calculated in the relation**

      Status: open
      Group: v1.0_(example)
      Labels: relation mpxj lag
      Created: Tue Jul 23, 2013 08:15 PM UTC by Pablo Arturo Tirado Valencia
      Last Updated: Fri Feb 21, 2014 08:53 PM UTC
      Owner: Jon Iles

      When I import a mpp file with some lags in the relations, the model calculates a wrong lag duration always show 95.57333333333334d but if I check the ToString method in the Relation model shows the correct lag

      [Relation [Task id=2 uniqueID=2 name=Tarea 2 - Lag 0d] -> [Task id=1 uniqueID=1 name=Tarea 1]]

      I attach the file with a simple example.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/mpxj/bugs/223/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

      --
      {}S José Vilmar Estácio de Souza

       

      Related

      Bugs: #223

      • Dmitry Lagoda

        Dmitry Lagoda - 2014-03-04

        I just tried to use your patch, and it seems to work perfectly. At least, in simple cases. Any case, thank you for sharing solution!

         
        • Jose Vilmar Estacio de Souza

          Did you apply the patch in version 4.50 released recently?
          If the answer is yes, I do not need to test.
          Thanks.

          On 03/04/2014 11:16 AM, Dmitry Lagoda wrote:

          I just tried to use your patch, and it seems to work perfectly. At least, in simple cases. Any case, thank you for sharing solution!


          ** [bugs:#223] Problems with the lag calculated in the relation**

          Status: open
          Group: v1.0_(example)
          Labels: relation mpxj lag
          Created: Tue Jul 23, 2013 08:15 PM UTC by Pablo Arturo Tirado Valencia
          Last Updated: Tue Mar 04, 2014 11:53 AM UTC
          Owner: Jon Iles

          When I import a mpp file with some lags in the relations, the model calculates a wrong lag duration always show 95.57333333333334d but if I check the ToString method in the Relation model shows the correct lag

          [Relation [Task id=2 uniqueID=2 name=Tarea 2 - Lag 0d] -> [Task id=1 uniqueID=1 name=Tarea 1]]

          I attach the file with a simple example.


          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/mpxj/bugs/223/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

          --
          {}S José Vilmar Estácio de Souza

           

          Related

          Bugs: #223

          • Dmitry Lagoda

            Dmitry Lagoda - 2014-03-04

            Yes, I tried with 4.5

             
  • Laurent Poublan

    Laurent Poublan - 2014-03-31

    Thank you for the fix, it works fine with 4.5.0.

     
  • dkekel

    dkekel - 2014-04-02

    Hi guys,

    the patch work perfectly fine with MS Project 2013, but if you try to read files created with Project 2010, the lag will be incorrect.

    I guess there should be a check of the version and depending on this set offsets 14/16 or 18/14.

    I'll upload patch as soon as I'll modify it in my code

     
  • dkekel

    dkekel - 2014-04-02

    Sorry, no patch. I didn't check out the head, but simply downloaded the sources. So here's the change I've made in MPP14Reader.java at line 2006:

    Duration lag;
    if (m_file.getApplicationName().equals("Microsoft.Project 15.0"))
    {
    TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 18));
    lag = MPPUtility.getAdjustedDuration(m_file, MPPUtility.getInt(data, 14), durationUnits);
    }
    else
    {
    TimeUnit durationUnits = MPPUtility.getDurationTimeUnits(MPPUtility.getShort(data, 14));
    lag = MPPUtility.getAdjustedDuration(m_file, MPPUtility.getInt(data, 16), durationUnits);
    }

     
  • Jon Iles

    Jon Iles - 2014-11-02
    • status: open --> closed-fixed
     
  • Jon Iles

    Jon Iles - 2014-11-02

    The latest code in Git fixes this issue.

     
  • Michèl Pohle

    Michèl Pohle - 2017-10-25

    I recently had this issue for a MS Project 2016 file. I could solve it locally by changing line 60 in ConstraintFactory.java to (>= 14 instead of == 14):

             boolean project15 = NumberHelper.getInt(properties.getMppFileType()) >= 14 && NumberHelper.getInt(properties.getApplicationVersion()) > ApplicationVersion.PROJECT_2010;
    
     

Log in to post a comment.

MongoDB Logo MongoDB