How set assignee using SIL script with kepler pro?

I've a KCF Single Autocomplet customfield whith this Select script:

 

KPOption[] kpOpt = #{Seleccionar técnico soporte};

string seleccion = kpOpt[0].value;

customfield_11904=seleccion;
assignee="admin";

 

The customfield_11904 has the rigth value but the field assignee remains empty. What am I doing wrong?

 

2 answers

This widget could not be displayed.

Hi Begoña,

Try this: assignee=getUser("admin");

 

It doesn't work for me :-(

Is the script above the select script or the datasource? If it is the select script, how does the datasource looks like? Is customfield_11904 your KCF Pro? You want to set the assignee to an user which has admin as username? Please be more specific. Thank you, Alexandra

My KCF Pro is customfield_20901. It's datasource script is: string grupo_soporte = argv["customfield_20900"]; //Seleccionar grupo soporte string query = "SELECT "; query += " display_name||' ['||user_name||']' nombre"; query += " from cwd_user u"; query += " LEFT JOIN cwd_membership g ON u.ID = g.child_id"; query += " WHERE parent_name='"+grupo_soporte+"'"; query += " order by u.user_name"; string[] resultado = sql("JiraDB",query); return resultado; The customfield_11904 is a customfield that I've to fill depending on the value of the KCF. Thus, the select script of my KCF (customfield_20901) is: KPOption[] kpOpt = customfield_20901; string seleccion = kpOpt[0].value; customfield_11904=seleccion; assignee=getUser("admin"); I'm testing with this simple values (seleccion and "admin")

"admin" is a username

I have just tried what I suggested you and it works. Could you please set the LOG level to debug and check if there's anything relevant? :)

Actually, it also works with assignee = "admin". Waiting for the LOG. :)

In the log I can see: In the log I can found: 2015-12-21 15:03:59,998 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Field customfield_20901 was not modified. Current value: [KPOption[]] {[Inmaculada Sanchez [sanchez_inm], Inmaculada Sanchez [sanchez_inm]]}. Issue value : [KPOption[]] {[Inmaculada Sanchez [sanchez_inm], Inmaculada Sanchez [sanchez_inm]]} 2015-12-21 15:03:59,998 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Retrieving field assignee from issue AXIS-39262 2015-12-21 15:03:59,998 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Value of assignee on issue AXIS-39262 is [STRING] 2015-12-21 15:03:59,998 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Saving to issue AXIS-39262 field assignee with value [STRING] admin|admin|admin|dgti@excentia.es 2015-12-21 15:03:59,999 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Retrieving field key from issue AXIS-39262 2015-12-21 15:03:59,999 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Value of key on issue AXIS-39262 is [STRING] AXIS-39262 2015-12-21 15:03:59,999 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Field key was not modified. Current value: [STRING] AXIS-39262. Issue value : [STRING] AXIS-39262 2015-12-21 15:04:00,000 atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread DEBUG [quartz.impl.jdbcjobstore.SimpleSemaphore] Lock 'TRIGGER_ACCESS' is desired by: atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread 2015-12-21 15:04:00,000 atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread DEBUG [quartz.impl.jdbcjobstore.SimpleSemaphore] Lock 'TRIGGER_ACCESS' is being obtained: atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread 2015-12-21 15:04:00,000 atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread DEBUG [quartz.impl.jdbcjobstore.SimpleSemaphore] Lock 'TRIGGER_ACCESS' given to: atlassian-scheduler-quartz1.clustered_QuartzSchedulerThread 2015-12-21 15:04:00,007 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [plugins.databasecf.config.ConfigurationCache] Loaded configuration >>databasecf.View Type_11904<< (1) 2015-12-21 15:04:00,017 http-bio-8080-exec-3 DEBUG bonet_beg 903x21201x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [commons.jira.utils.IssueUtils] Updated issue >>AXIS-39262<< The most relevant thing for me is: 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Saving to issue AXIS-39262 field assignee with value [STRING] admin|admin|admin|dgti@excentia.es I think I need to get only the username. Doesn't it?

Using: assignee="admin"; I can see in the log: 2015-12-21 15:11:26,785 http-bio-8080-exec-21 DEBUG bonet_beg 911x21502x1 i1xbn2 10.178.169.107,10.178.169.107,172.27.146.22 /secure/CommentAssignIssue.jspa [jira.commons.ivm.SILIssue] Saving to issue AXIS-39262 field assignee with value [STRING] admin The problem is that my issue remains without value for "assignee" :-(

It all looks all right to me, I don't get why the value isn't set. It's ok to use the username, yes.

The new value doesn't appear neither after you refresh the page?

no, and if I launch a JQL like "project=AXIS and assignee=admin" no issue is found.....very strange

Hmm... indeed, I don't get why the assignee isn't set.

This widget could not be displayed.

I have resolved same issue using those two lines:

KPOption [] assigned = customfield_10501; //This is KCF Pro single autocomplete field

assignee = assigned[0].value;

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

124 views 2 0
Join discussion

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