We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

[Question] Best practices to prevent regression when multiple developers edit the same UI Page

ソフィア平
Tera Contributor

I am currently working in a multi-developer environment utilizing a build agent for automated deployments. We are facing the following issue, and I would love to hear your insights and best practices.

1. Regression (overwritten changes) when multiple developers edit the same UI Page We have a scenario where multiple developers need to modify the same UI Page (sys_ui_page). In each developer's environment, checkpoints (Update Sets) are created and then automatically applied via our build agent. However, we are experiencing an issue where the Update Set applied last completely overwrites the entire record, causing the previously applied changes from other developers to be lost (regression).

I understand that even if developers edit completely different fields within the same record (e.g., one edits the HTML field and another edits the Client script field), the entire XML payload of the record is captured in the Update Set, which leads to the overwrite.

How do you handle these collisions and prevent regression in your environments under similar setups? Any advice on workarounds or best practices would be greatly appreciated.

Thanks in advance!

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @ソフィア平 

 

It is expected behavior that If multiple developers modify the same UI Page in parallel, the last Update Set applied will typically overwrite the previous version.

 

My recommendation would be 

1) A single developer should be assign to modify a UI Page at a time. Other developers coordinate their changes through that owner. This would be the simplest and most reliable approach. 

2) Instead of each developer creating separate Update Sets for the same UI Page, merge the code first and have one Update Set contain the final version. Before the build agent pulls and applies changes, you should merge individual update sets into a single, cohesive update set. When using Merge Update Sets, ServiceNow will combine all changes and automatically evaluate conflicting updates to retain the latest changes per object.

Refer: https://www.servicenow.com/docs/r/application-development/system-update-sets/t_MergeUpdateSets.html

3) You can group multiple related update sets together using the Update Set Batching feature. Have the build agent promote the parent update set, which will process the changes in the exact chronological order they were batched.

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

ソフィア平
Tera Contributor

Thank you for the reply. I realize I need to clarify our specific workflow, as the issue is caused by the behavior of our prompt-based "Build Agent" (AI generation tool), rather than standard manual Update Set development.

For example, our UI Page was initially built using 20 prompts via this agent. If User 1 sends 3 additional prompts to update the page, and shortly after, User 2 sends 1 prompt, User 1's updates are completely lost.

It appears that the agent generates the XML payload based on individual user sessions or older checkpoints, without reading the latest state of the sys_ui_page updated by User 1.

Given this context, is there any way to make such an agent share the context between users, or force it to re-read the absolute latest record state before processing a new prompt from a different user? Or is strictly limiting prompt-based generation to a single user the only practical workaround?