none
Custom Fields Not Updating in Timesheet View - Project server 2013 RRS feed

  • Question

  • Hi,

    We have Project server 2013 with March CU 2015 installed.
    The MS Project clients are automatically updated to the April version with the Windows updates.

    In our PWA, we have several custom fields.

    Problem:

    If a project manager change a value in a custom field and publish his project to the server. Then the changes are visible in Project Server (PWA).

    The fields are visible in the Timesheet view, but their values are not changing in the Timesheet view after publishing the project. This has worked before because I can see the old values.

    It is not user related and not project related.

    We have this on all our projects.

    Someone any idea how to fix this?

    Regards,

    Johan

    Wednesday, April 29, 2015 3:42 PM

Answers

  • Hi,

    that is not related to your patch level, it is just how the system works (I ran into the same and had a support call open in that). This is what happens:

    • Initially, PM is entering value on task level
    • This value is rolled down to assignment level
    • User reports progress on this task. Even with not changing the value, Project Server interpretes this value as "unless manually specified". So roll-down is deactivated from this time on.
    • So whatever PM is now changinng on this field, it will not be rolled down to assignment level automatically.

    I solved that by running a macro in client BeforeProjectSave to set value from task level to assignment level. So in fact, to replace to auto roll down, since it is not working any longer.

    Does that make sense?
    Barbara


    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!

    Thursday, April 30, 2015 11:47 AM
    Moderator
  • Hi Johan,

    here is the macro:

    Private Sub Project_BeforeSave(ByVal pj As Project)
    Dim T As Task
    Dim A As Assignment
        'Ensure there is an open project
        If Not pj Is Nothing Then
            'Macro only useful for checked-out Enterpries Projects
            If pj.Type = pjProjectTypeEnterpriseCheckedOut Then
                For Each T In pj.Tasks
                    'Update only valid task
                    If Not T Is Nothing Then
                        'if task has assignments
                        If T.Assignments.Count > 0 Then
                            For Each A In T.Assignments
                                A.MyField = T.MyField
                            Next
                        End If
                    End If
                Next T
            End If
        End If
    End Sub
    

    Please keep two things in mind:

    1. This will only work for fields without any spaces in field name (fields on task and resource level may contain spaces and you can access them using function e.g. T.GetField(FieldNameToFieldConstant("MyField", pjTask)). Unfortunatly, this is not working on assignment level)
    2. Ensure that your PMs are changing value of this field in client. When the do this in browser, macro will not run :).
    3. Put it into "ThisProject, see screenshot below. Only from there, a BeforeSave will be started.

    I suggest to put it into one dedicated project for testing and just move it to EGlobal, if it was successfully tested.

    Does it work?
    Barbara


    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!


    Thursday, April 30, 2015 1:29 PM
    Moderator

All replies

  • Hi,

    that is not related to your patch level, it is just how the system works (I ran into the same and had a support call open in that). This is what happens:

    • Initially, PM is entering value on task level
    • This value is rolled down to assignment level
    • User reports progress on this task. Even with not changing the value, Project Server interpretes this value as "unless manually specified". So roll-down is deactivated from this time on.
    • So whatever PM is now changinng on this field, it will not be rolled down to assignment level automatically.

    I solved that by running a macro in client BeforeProjectSave to set value from task level to assignment level. So in fact, to replace to auto roll down, since it is not working any longer.

    Does that make sense?
    Barbara


    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!

    Thursday, April 30, 2015 11:47 AM
    Moderator
  • Hi Barbara,

    That makes sense is to me but not to my project members J
    Can you share this Macro with us?

    Thank you!

    Johan

    Thursday, April 30, 2015 12:30 PM
  • Hi Johan,

    here is the macro:

    Private Sub Project_BeforeSave(ByVal pj As Project)
    Dim T As Task
    Dim A As Assignment
        'Ensure there is an open project
        If Not pj Is Nothing Then
            'Macro only useful for checked-out Enterpries Projects
            If pj.Type = pjProjectTypeEnterpriseCheckedOut Then
                For Each T In pj.Tasks
                    'Update only valid task
                    If Not T Is Nothing Then
                        'if task has assignments
                        If T.Assignments.Count > 0 Then
                            For Each A In T.Assignments
                                A.MyField = T.MyField
                            Next
                        End If
                    End If
                Next T
            End If
        End If
    End Sub
    

    Please keep two things in mind:

    1. This will only work for fields without any spaces in field name (fields on task and resource level may contain spaces and you can access them using function e.g. T.GetField(FieldNameToFieldConstant("MyField", pjTask)). Unfortunatly, this is not working on assignment level)
    2. Ensure that your PMs are changing value of this field in client. When the do this in browser, macro will not run :).
    3. Put it into "ThisProject, see screenshot below. Only from there, a BeforeSave will be started.

    I suggest to put it into one dedicated project for testing and just move it to EGlobal, if it was successfully tested.

    Does it work?
    Barbara


    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!


    Thursday, April 30, 2015 1:29 PM
    Moderator
  • Hi Barbara,

    Strange...

    When I create a new PWA with a copy of our production db, then the new custom fields changed are set in the timesheets.

    I want to try your Macro but we using enterprise custom fields and I cannot see enterprise fields in ‘A’ and ‘T’. I can get only local fields and my knowledge of MS project and Macro’s is not so good to change the code so I can get the enterprise fields.

    Thanks for your support!

    Johan

    Thursday, April 30, 2015 9:03 PM
  • Hi Johan,

    funny, I ran into the same issue, when I tried to reproduce this issue on a Project Server 2010 and on Project Online. Initially, I was not able to see this behaviour. Dring conversation with Microsoft, I was able to repro. I think that I just missed a step while testing. I can't rememer, if it was approval or publish. Anyway, just after a "completed" status update, this behaviour was there in all three systems. Perhaps you also just missed a step from daily behaviour?

    For the fields: ECFs are not recognized by VBA automatically. Just Replace "MyField" by your field name, which does hopefully not contain any spaces.

    Please feel free to contact me by mail, if you need some more direct support - seems that you are on the same time zone as me. On my Profile, there is a link to my homepage with contact data at "Kontakt".

    Regards
    Barbara


    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!

    Friday, May 1, 2015 6:51 AM
    Moderator