- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 07:05 AM
Hi, on my instance the free Azure Pipeline app was installed.
Recently, we start making scoped application via studio within the Global Scope. With this new development strategy we created a new scoped app for change, we then imported the change_request table. Ever since this happened when my DevOps team try to use the ServiceNow Azure Pipeline application in Azure they get the following error:
Error returned: "import_set": "ISET0087847", "staging_table": "x_mioms_azpipeline_change_request_import", "result": [ { "transform_map": "change_request_imports", "status": "error", "error_message": "Unable to resolve target record, coalesce values not present: [Script]; Invalid table ", "status_message": "Unable to resolve target record, coalesce values not present: [Script]" } ]
Might anyone know why this would cause the following error to appear in Azure? From the looks of it the installation of the plugin creates the transform map/web service/etc. These then link from the Azure pipeline table to the change table. The table is still the same, its just in its own scope now under global.
I am going to start looking to manually re-create the transform map and a new import set.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 04:50 AM
Just an update on the issue which is now resolved. It is just as you mentioned in your message. All of the files were not copied over correctly. There was one table that we missed with our importing which was required for allowing communication
So to summarise for anyone else who does the same, be sure to get all of the application records if you do an import via studio. If you do get stuck than I would suggest check with the application support team to confirm all of the tables you imported and if there are any missing. Microsoft did not know what the issue was either but I was only dealing with 1st line. Either way, this will put you on the right path for troubleshooting.
Table name: sys_scope_privilege
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 07:09 AM
I am now looking into this and can see there is no import set. I am going to create this and see if this resolves the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2023 12:44 AM
Hi @Jacob23 ,
It's possible that the scoped app you created for change has caused a conflict or misconfiguration with the ServiceNow Azure Pipeline application.
Manually creating the transform map and import set could help resolve the issue, but I would suggest checking the configuration of the Azure Pipeline application and the scoped app for change to ensure that they are properly integrated and there are no conflicts.
You may also want to review any custom scripts or business rules that may be impacting the import process. Additionally, make sure that the user account being used in Azure Pipeline has the necessary permissions to access and update the change_request table.
Thanks,
Ratnakar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 06:45 AM - edited 05-03-2023 06:47 AM
Thanks Ratnakar,
I took a look at permissions but nothing really stood out. After messing around and taking a look I did find where the issue is coming through. One of the fields does have a coalesce setup on it.
This runs the following script, and I believe this is all OOTB when the extension is installed.
answer = (function transformEntry(source) {
var gr = new GlideRecord('change_request');
var queryRecords = false;
var correlation_id = source.u_correlation_id;
var number = source.u_number;
var queryByNumber = false;
// 1. Lookup by correlation_id
if (correlation_id && !correlation_id.nil() && correlation_id != "" ){
log.info("["+correlation_id+"]coalesce script : Querying by correlation id : "+correlation_id);
queryRecords = true;
gr.addQuery('correlation_id',correlation_id);
} else if (number && !number.nil() && number != "" ){
// 2. Lookup by number
log.info("["+number+"]coalesce script : Querying by change request number :"+number);
queryRecords = true;
queryByNumber = true;
gr.addQuery('number',number);
}
var logId = correlation_id;
if (queryByNumber) {
logId = number;
}
if (queryRecords){
gr.query();
if (gr.next()) {
// Update existing record
var sys_id = gr.sys_id;
log.info("["+logId+"]coalesce script : Record found with sys_id :"+sys_id);
return sys_id;
} else {
// Insert new record
log.info("["+logId+"]coalesce script : Record not found. Will be creating new record.");
return "-2";
}
} else {
// insert new record
log.info("coalesce script : Will be creating new record.");
return "-2";
}
})(source);
I found when I disable the Coalesce this allows for the pipeline to run and create the Change. However, the problem comes when our pipeline tries to update the states. How our process works is, pipelines initiate (creates a change in new state) > Flow asks for approval and moves to implement (if approved) > then in the pipeline once the stage has ran, this will update the change request to review/Closed.
The issue I get now since disabling the Coalesce is a new Change with the same number will be created in the review state.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 04:50 AM
Just an update on the issue which is now resolved. It is just as you mentioned in your message. All of the files were not copied over correctly. There was one table that we missed with our importing which was required for allowing communication
So to summarise for anyone else who does the same, be sure to get all of the application records if you do an import via studio. If you do get stuck than I would suggest check with the application support team to confirm all of the tables you imported and if there are any missing. Microsoft did not know what the issue was either but I was only dealing with 1st line. Either way, this will put you on the right path for troubleshooting.
Table name: sys_scope_privilege