Salesforce Case Text Custom Field to JIRA Text Custom Field

I have a Field in SFDC that pulls the Account Name on a Case and converts to plain text, I want to take this field and send it to a JIRA text field so that we don’t have to always update our customer lists / mapping.

Here is SFDC Outgoing
replica.customFields.“Client Impacted” = entity.Jira_Account__c

Here is JIRA Incoming
issue.customFields.“Client Impacted”.value = replica.customFields.“Client Impacted”.value

Jira remote replica shows this
“hubIssue”: {
“Client Impacted”: “Sales Ops Test Account”,
“voters”: ,
“fixVersions”: ,
“internalMap”: {
“Client Impacted”: “Sales Ops Test Account”

But I get the following error in SFDC Exalate connection
Unexpected error occurred. The customfield Client Impacted was assigned to value=EverAfter Test Account - Customer class=java.lang.String, but it should have been set to a custom field object

Hello @Jacob_Kalaj

Can you please share the part of the “remote replica” that has the “Client Impacted” part?

Thank you in advance.
Mathieu

Hey Mathieu, hope all is good long time no talk!

The Remote replica I included above is from JIRA when I click Show Remote Replica

its gives that Hub Issue then you can See Client Impacted so the JIRA side shows no Error only the Salesforce side gives the error

1 Like

Hey Jacob,
Long time no talk indeed. All is well, hope you are great too :).
Lets get your issue sorted!

So the Error is on the SF side?
The use-case is sending the information from SF to Jira?

Can you try this please?

SFDC Outgoing
replica.Jira_Account__c = entity.Jira_Account__c

JIRA Incoming
issue.customFields.“Client Impacted”.value = replica.Jira_Account__c

Please let me know how it goes.
Thanks

So far looking great @mathieu ! appreciate you as always and thank you for the quick reply.

Awesome! Glad everything’s is working. I appreciate you too and always happy to help. Have a fantastic day, Mat

Hi Jacob,

Assuming that you are on Jira Cloud, the createOption() helper method should do the trick here. Can you give this a shot please:
https://docs.exalate.com/docs/createoption-49153352

Thanks
Majid

I wonder if I should start a new topic, for this piece @Majid @mathieu
might help someone in the future better so the two statements are meshed

Apologies, I am not getting time to test this out, but I think this should work indeed:
issue.customFields.“Jira Field Name ”?.value = nodeHelper.createOption(issue, Jira Field Name , replica.customFields.“Jira_Account__c”?.value?.value)

The only part I am not sure about is the double dereference i.e. the .value.value in the end. I believe it should only be one .value.

Can you please give it a shot?

Thanks
Majid

p.s.: yes, lets start a new topic please.

sounds good I have tested with value value and single value and get the same error we can delete these responses on this ticket though and just communicate on the next to not confuse people in future

Continued here:

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