How to set nFeed customfield programatically

Hi all,

We are working in a JIRA replication project, where two remote instances should be continously synchronized.

Then, I need to set a nFeed customfield in a post-function using a Groovy code.

I am using a code like this, but does not work, raising the error below:

customerValue = "ABC CONS MET ASSES E MERC S/A - SAO PAULO - BRAZIL" //Sample value
cfCustomer = customFieldManager.getCustomFieldObject(10601) //nFeed Customer field
cfCustomer.updateValue(null, missue, new ModifiedValue(null, customerValue ), new DefaultIssueChangeHolder())

The error raised is:

2013-03-06 09:15:30,744 http-bio-9081-exec-9 ERROR 2208.1 555x25241x1 i8yokm 200.150.176.119,127.0.0.1 /secure/QuickCreateIssue.jspa [plugins.sql.customfield.SQLFeedCustomFieldType] Unexpected value 'ABC CONS MET ASSES E MERC S/A - SAO PAULO - BRAZIL'
2013-03-06 09:15:30,745 http-bio-9081-exec-9 ERROR 2208.1 555x25241x1 i8yokm 200.150.176.119,127.0.0.1 /secure/QuickCreateIssue.jspa [plugins.sql.customfield.SQLFeedCustomFieldType] Invalid data type 'ABC CONS MET ASSES E MERC S/A - SAO PAULO - BRAZIL' while creating changelog string


I think this very strange, since this value is exactly the same used where the field is showed in the issue view.

We tried use the primary key in the "customerValue" (like 1234), but the error remains.

There are some documentation or tip about this issue ?

1 answer

1 accepted

This widget could not be displayed.

Hi all, with support of Valiantys (https://jira.valiantys.com/browse/SQLFEED-521) the solution is:

customerValue = "ABC CONS MET ASSES E MERC S/A - SAO PAULO - BRAZIL" //Sample value
cfCustomer = customFieldManager.getCustomFieldObject(10601) //nFeed Customer field
nFeedContent = missue.getCustomFieldValue(cfCustomer)
nFeedContent.clear()
nFeedContent.add(customerValue)

cfCustomer.updateValue(null, missue, new ModifiedValue(null, customerValue ), new DefaultIssueChangeHolder())

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

425 views 3 17
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you