SIL - retrieve information for fields from another project

Hi Guys,

I'm trying to use Kepler Custom Fields and the script below but get an error on the create screen and no options to select from on the edit screen.

Error:Script is not running in the context of an issue.Cannot get value for field customfield_13608 at com.keplerrominfo.jira.plugins.keplercf-pro:sil-options-multi-select-cf/com/keplerrominfo/jira/plugins/keplercf/pro/optionscf/selectcf-edit.vm


Project A:

Field A = Value 1,2,3

Project B :

Field A = Value 1,2,3

Field B = Value 1,2,3

What i want to achieve is , when i type in value 1 on field A on the create / edit screen of Project A, i want it to match the same value of field A on Project B and return field B's values .

The script im using is linked to an 'Info' custom field using a multiline text field (customfield_13606).

Consider field A on project A as customfield_13608


KPOption[] selectedValues = customfield_13608;
customfield_13606 = "";
string [] allIssues = selectIssues("project=SERVICE and status=production order by summary");
// string[] selectedKeys;
string headingsText = "|| Type || Summary || Key || Production Group || Platform ||";
string contentText;
for (KPOption v in selectedValues) {
for (string iss in allIssues) {
if (iss.summary == v.value) {
// selectedKeys = addElement(selectedKeys, iss.key);
string[] fields = getIssueFields(iss.key);

string[] fieldAItems = fields["customfield_10314"]; // because the Production Group field is a multiselection

string[] fieldBItems = fields["customfield_10286"]; // because the Platformp field is a multiselection

contentText += "\n| " + iss.type +" | " + iss.summary + " | " + iss.key
+ " | " + fieldAItems + " | " + fieldBItems + " |";
if (isNotNull(contentText)) {
customfield_13606 = headingsText + contentText;


1 answer

This widget could not be displayed.

I realised the error as it was my fault.

The script was matching on custom field 13608-

KPOption[] selectedValues = customfield_13608;

However, the values in that field were never going to match what i was fetching from the other project as that field was producing a different result set! Made sure that field had the same as the keys in the destination project and that resolved it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

31 views 0 0
View post

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