Tickets Raised via API/Jira

Originally asked by Jacob Pines on 22 February 2022 (original question)


Hi,

Summary of issue we are having:

The staff in the remote location we are connected to via Exalate are opening calls that sync to us in the same way all the time.

However, when these are created on our end some show they “raised this request via API” and others “raised this request via Jira”.

We have no idea why these are created differently.

More detailed scenario:

There are 4 types of Calls that exist on Jira. We can see all 4 when searching using the “Request-Channel-Type” field: api, portal, jira, email.

When the remote Exalate location logs call that sync to us, they do this in the same way all the time (we confirmed with them).

However, we noticed that sometimes calls that sync to us show that they were logged via API and other times via jira.

The ones that are via API are created with a value in “Request Type” field, which is a field used for Portal only. The value is always the same one, meaning it gets a default value from some place.

The field does not exist in the Exalate Incoming Sync script

Also, on these same calls, one of the field is moved from the right side (Details frame) to below the Description field.

We want to know how we can make all calls that are created via Exalate be “jira” instead of “api”.

If this is not possible, then what can be done to not have a value in “Request Type” field, and make fields show in Details and not below Description.

Any ideas?
Let me know if you need anything else.

Thanks


Comments:

Serhiy Onyshchenko commented on 10 March 2022

Hello, Jacob Pines
Indeed, the channel is inferred by Atlassian API. I believe, there was a property in place to control for that.
Please expect an update shortly (within the following 2h) with a confirmation.

Regards, Serhiy.

Serhiy Onyshchenko commented on 11 March 2022

My apologies for the delay.
Here’s what I’d found in our internal docs (to be published if this confirms to work)
Please add the following to the if(firstSync) block:

serviceDeskHelper.setRequestChannelType(issue, "jira")

Let me know if this helps
Regards, Serhiy.

Answer by Jacob Pines on 21 March 2022

Ok, I made the change suggested, and so far looks like it’s working - no calls logged “via api”.

I’ll update again in a few days to confirm no issues.


Answer by Jacob Pines on 28 March 2022

Ok, looks like that code fixed the “opened by API” issue.

So only outstanding thing I have is the “Request Type” which is not sent in Sync data, but uses by default the 1st entry in the field (list). Field should remain empty unless logged via Portal, where you need to select the Request Type (form).

Any ideas? Perhaps hard-code the field to an empty value?

If so, please help with the code to use.

Thanks


Answer by Jacob Pines on 17 March 2022

Waiting for your feedback on what I asked.

Also, I need to know what I can do regarding the Custom Field that sometimes changes position, even when call shows it was logged via Jira.

The field normally shows on the right side, under “Details”, but sometimes it moves and placed below the “Description” text.


Answer by Jacob Pines on 13 March 2022

Thanks for getting back to me.

Ok so first, can you just explain what this code does exactly? Does it simply “force” the Synced call to be “Jira” and not “API”??

I just don’t want to block any call from Syncing.

Second, I want to make sure I understood correctly where to add this.

This is the first Block in “Incoming” script:

if(firstSync){
   issue.projectKey   = "XXX"
   // Set type name from source issue, if not found set a default
   issue.typeName     = nodeHelper.getIssueType(replica.typeName)?.name ?: "XXX"
}

So I need to change that to:

if(firstSync){
   issue.projectKey   = "XXX"
   // Set type name from source issue, if not found set a default
   issue.typeName     = nodeHelper.getIssueType(replica.typeName)?.name ?: "XXX"
   serviceDeskHelper.setRequestChannelType(issue, "jira")
}

Comments:

Serhiy Onyshchenko commented on 23 March 2022

Correct

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.