- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 04:26 AM
My team develops applications on the ServiceNow platform, and we're struggling with peer code review. We've been trying to use a Git repository in Azure like this:
- Copy code from the Now Platform into Azure Git.
- Create a pull request when code is ready for review.
- Review and add comments in Azure Git whenever questionable code is found.
- Approve code when all questions have been resolved.
This process is particularly important junior developers who often write sub-optimal or breaking code that senior developers need to review and flag before it gets deployed into production.
Copy-pasting code from the Platform into Azure Git is tedious and error-prone, so I'd like to perform code review inside the Now Platform itself. Update sets automatically list all updates, and the "Compare" action on the "Versions" related list enables users to compare code versions side-by-side with all changes highlighted by the platform.
The only thing missing is any mechanism for commenting and discussing code in the Platform, so I thought it would be beneficial to add some Journal fields to the Update Versions [sys_update_version] form. This would allow our team to review code in the platform, provide feedback, and approve new versions very much like we do in Azure Git.
The built-in Approvals system might be another good option. We might integrate this with the Update Versions table to enable a more rigorous process of code review that takes advantage of Approval rules, states, and user authorization. Perhaps users could click a UI Action on update sets or Versions to trigger an Approval which would guide the team through the review and approval process.
I'd like to know from the Community how other people solve this problem of peer review. I feel sure somebody else in the Community does this kind of peer review, and I'd like to know how they tackle the sorts of problems my team is facing with this process. Thanks!
Solved! Go to Solution.
- Labels:
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 05:10 AM
Hi
This is a hard question to answer as review of code in ServiceNow requires good documentation process to be followed by the developers. Looking at update set entries tells you what changes have been made but does not give you the full picture or the context. ServiceNow provides some framework to help in this endeavor but it boils down to how disciplined and detailed your developers are:
There is also a very useful blog on development best practices.
1st of all you need to decide for whole your team what would be the rules that you all will follow. And only after that code review makes sense.
- Take your time and compose naming and codding conventions
- In case of ServiceNow is it also good to follow ServiceNow advice (for example, try to use less client scripts if possible because they affect performance and so on.)
- Let everybody know that they need to follow these rules
- If you have you company's tips&trick of using some approach - make it aware to everybod
- etc.
After these steps are done - you are "eligible" to think about code review and all the time you've spend for preparation will pay you back with good quality code and same language among developers.
You can read this article which gives a quiet an overview of everything which you need :https://community.servicenow.com/community?id=community_article&sys_id=83b3375fdbae8494d82ffb2439961...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 05:10 AM
Hi
This is a hard question to answer as review of code in ServiceNow requires good documentation process to be followed by the developers. Looking at update set entries tells you what changes have been made but does not give you the full picture or the context. ServiceNow provides some framework to help in this endeavor but it boils down to how disciplined and detailed your developers are:
There is also a very useful blog on development best practices.
1st of all you need to decide for whole your team what would be the rules that you all will follow. And only after that code review makes sense.
- Take your time and compose naming and codding conventions
- In case of ServiceNow is it also good to follow ServiceNow advice (for example, try to use less client scripts if possible because they affect performance and so on.)
- Let everybody know that they need to follow these rules
- If you have you company's tips&trick of using some approach - make it aware to everybod
- etc.
After these steps are done - you are "eligible" to think about code review and all the time you've spend for preparation will pay you back with good quality code and same language among developers.
You can read this article which gives a quiet an overview of everything which you need :https://community.servicenow.com/community?id=community_article&sys_id=83b3375fdbae8494d82ffb2439961...
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 09:02 AM
The links you posted were helpful, thank you. We already have a documented process for code review and we are following it, but it's nice to see what other people are doing nonetheless. The Team Development tool looks like exactly what I'm looking for, however.
Team Development transfers versions from a child instance to a parent instance with "pulls" or "pushes". Pulls move all versions without allowing the developer to pick and choose, while pushes enable the developer to choose which changes to push to the parent and creates a local Update Set on the parent that is marked as complete (c_PullsAndPushes.html).
We currently use two development instances with one QA instance, one UAT/staging instance, and production. I think we would benefit greatly from incorporating the Team Development tool into our development process. I am shocked that this tool was not mentioned anywhere in the Application Developer Fundamentals training course which I recently took! How was this tool omitted?
Update: why do the Team Development app diagrams use update sets to move versions into production with update sets instead of using the Application Repository? The Professional Developer Guide for the Now Platform (among others) states this is preferred: "If the application repository cannot be used to deploy applications, use Update Sets instead."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 10:38 AM
Create a custom field for your own approvals with the same choices as the OOB one.
Before the first Ask For Approval, set the Approval field yourself to Requested.
Supply your custom field for the Approval field on each Ask For Approval action.
When all are done, update the Approval field with the value from your custom approval field.
Voila,
Aoife