Clarity

  • 1.  Read only fields behavior in Sub-object of a project

    Posted Jul 19, 2018 06:19 PM

    Hi All,

     

    We are running an issue in our environment 14.2 SP11 and CA PPM 15.2 SP7.

     

    We have sub object A under project object and super sub object B under Sub Object A. Sub Object A has couple of read only fields of type “Numeric” type with default value “0”. The sequence of our testing are:

     

    • End User X open a CA PPM Project and create a sub object A
    • All the read only fields appears with default value “0” in edit page of Sub Object A
    • Later end user create a new instance in sup sub object B inside sub object A
    • We have a process on create in super sub object B which populates the Super Sub Object B data into sub object A read only fields.
    • End user A comes back on Sub Object A and did not yet see the value in read only fields because process is under completion to update the read only fields
    • At the same time End User Y opens the same CA PPM project and same sub object A and can see all the super sub object B data in Sub Object A read only fields
    1. Then End User X hit save on Sub Object Screen where read only was not visible just after creation of super sub object B. This overrides the value on End User Y screen as well and now bot user are seing the read only fields with “0” however at some point process has updated them but Ends User X never saw them on his/her screen and did not do F5 on their screen to see the value and they just hit save again that override the value.

     

     

    Bases on our understanding read only field should not save the data back to “0” on save command from end user X.

     

    Any suggestion much appreciate!

     

    Thanks,

     



  • 2.  Re: Read only fields behavior in Sub-object of a project

    Broadcom Employee
    Posted Jul 20, 2018 01:02 AM

    Hi,

     

    I have similar behavior when update instance data concurrently.

    The sequence of my testing are:

     

    1. User A open custom object instance C1. The field F1 of C1 has value "A".

    2. User B also open the same custom object instance C1. The field F1 shows the same value "A".

    3. User A update  F1 from "A" to "B" and save it.

    4. In this timing, the database column of F1 is updated to "B".

    5. The old value of F1 ("A") is remaining on browser of User B.

        --- If User B refresh browser by F5, F1 value will be changed to "B".

    6. If User B saves C1, F1 will be updated to "A". F1 value seems to be old value.

     

     

    I have 2 ideas to avoid the problem.

    1. Refresh browser. If anyone already updated instance, refresh will clarify such differences.

    2. Keep last_updated_date (use it as timestamp) of instance when instance is opened.

        And when save instance, compare held last_updated_date with database.  If anyone updated same instance, held last_updated_date < database.

     

    Regards,

    Shoichi

     

     



  • 3.  Re: Read only fields behavior in Sub-object of a project

    Posted Jul 20, 2018 10:49 AM

    Thanks for the response Shoichi.

     

    Yes, that option can help for technical team to troubleshoot the issue however Project manager does all the time save. They do not know if the value of Sub Object A are not then they have to hit F5 first and later save . In normal behavior, They juts go create an instance of Super Sub Object B from Sub Object A and then do some data entry in sub object A and use Save command.

     

    This seems like bug which is allowing read only fields to get updated based on data on browser session however in database it has been update and later based on the first user browser session data data "Save" command is overriding the read only fields.

     

    Thanks,

    Shalinee



  • 4.  Re: Read only fields behavior in Sub-object of a project

    Posted Jul 20, 2018 11:25 AM

    Its not a bug really, its just contention - two "users" updating the data at the same time (the user and the process).

     

    The application doesn't do soft-locking anywhere I think (apart from exports to OWB) so there will always be cases where "enter-once" fields (or in your case "read-only" fields) can get confused under a specific sequence of events.

     

    I have a similar scenario - I put a message on my screen saying "If you can see this message refresh the screen" (and my process clears the message). 

    I also run a regular job to "look for" cases that the user has ignored the message and updated data I don't want them to (thus overwriting data set by my process) and the job corrects the data.

     

    You could (perhaps) use this technique on the master object ( TIP : How To Put Any Dynamically Generated Value On A Clarity Object ) instead of the copied "read-only" fields?



  • 5.  Re: Read only fields behavior in Sub-object of a project

    Posted Jul 20, 2018 12:32 PM

    Thanks Dave for sharing the another reference.

    However there are not 2 users updating the same record. It is just one project manager who is first creating an instance in Super sub object B and that has a process to update the read only fields in sub object A. User enters the data in super sub object B and come back on sub object A and start entering the data in sub object A screen . The catch is here when user returned on sub object A by that time the process in Super Sub object B was not done so user sub object A screen was never refreshed with the data updated by process . Also user stays on the same page which is sub object A and later he perform save command for the data he enters on sub page A, it overrides the back-end data values which were updated using the process. 

     

    Thanks,

    Shalinee



  • 6.  Re: Read only fields behavior in Sub-object of a project

    Posted Jul 22, 2018 10:53 AM

    I know it is not 2 users, that is why I said "users" meaning the user and the process.

     

    It is the same scenario as 2 users though; two different sessions looking at the same data, one session updates the data but the other session does not "see" that updated data and can then also update (overwrite) the data and so on.

     

    There is no solution to this ; only "workarounds".



  • 7.  Re: Read only fields behavior in Sub-object of a project
    Best Answer

    Posted Sep 25, 2018 01:35 PM

    Thank you all. The issue has been resolved by creating Calculated type field and display them on Edit page rather than the original numeric read only type fields.