how can i set a default value in the user picker while doing transition in workflow

we are  using the customized workflow .

we have to set a user value to the user picker while doing the transition based on the other fields .

we are using the username as same as ours employee code  . so it is like 10000 for example .

how can i set this numerical value in user picker .

if it is not possible with numerical value then is it possible with alphabets ??

please let us know .

we have to set the value based on ur suggestion 

Note :

field is combo value and setting to user picker

 

2 answers

1 accepted

Sorry, there are some aspects of your question that I don't understand. Please, tell me:

  1. In JIRA you can set the user's full names to the actual name of the employee, while the username can be a numerical code corresponding to your internal employee code. Is this your case?
  2. Does the combo custom field (Select List in JIRA terminology) you talk about in your description contain the numerical employee code?
  3. If the answer to question 2 is 'yes', then: Do you want to set the User Picker custom field with the user that corresponds to the employee code selected in the combo field?

Please, answer these 3 questions and I will be able to help you.

 

Scenario first is ours .

username :empcode:10000

Fullname :Vijaya bhaskar v

Email id :vijay@ramco,com

we are configured using JIRA internal directory only .

Select list field having the following values :

 

Present Team : DW,Technology,Delivery etc ..

 

Based on present team we need to assign the default user value to the advanced user picker

that user picker is configured based on the project role present in the project .

 Compare Field : Present Team

Target Field :Support Person

 

(DW)10000

(Technology)10001

 

Support Person is the user picker field .

Present Team is the single select list (JIRA custom field )

Do u need any other clarifications ???

 

After your description I still don't know whether the username is empcode:10000 or simply 10000. Please, tell me which is the correct one.

simply 10000 only .

Then you should use "Set a field as a function of other fields" post-function of JIRA Workflow toolbox with a configuration like this:

Captura de pantalla 2016-10-06 a las 10.56.08.png

The last setting rule (i.e., (.*)20000) is optional. This setting sets a default user for the case when the value selected in Present Team is not matched for any of the previous setting rule, i.e., is a kind of 'else' in an if-then-else sentence.

 

I have configured like this only . But it results error  while doing the transitions .

 

Which kind of error? Please, give me more details about it.

Which version of JIRA and JIRA Workflow Toolbox are you using?

Ok. Now I know the cause of the problem: the value is being treated as a number instead of a string. You can solve the problem forcing the value part of the rule to be treated as a string. To do it use the following setting rules:

a(DW)"10000"
a(Technology)"10001"
a(Delivery)"10002"
a(.*)"20000"

The 'a' prefix forces the value part to be treated as a text expression, for this reason we write the string literals between double quotes.

Hi Fidel ,

Great work ..

Its working fine now .

Thanks for the immediate support .

 

can you share the tricks like this ....

Hi Fidel ,

I have one small doubt .Can you please clarify that ..

is it possible to set a field value based on more than one fields .

Field 1:In Progress (select field ) : DW,Runtime,Tech

Field 2 : Internal Status(dw) (select field) : Open ,Allocated

Field 3 :Support Person (dw) (user picker)

Field 4 :Active Person (picker)

I have to check the two fields field 1 & 2  and then need to copy the field 3 value into field 4 . 

 

 

 

Yes, it's possible. There are more than one way to do it. For example, it can be done using "Set a field as a function of other fields" post-function with type 2 setting rules. These type of rules use the following format

[boolean_expression]value

some examples of setting rules:

a[%{12000} = "DW" AND %{12001} = "Open"]"10000"
a[%{12000} = "Runtime" AND (%{12001} = "Open" OR %{12001} = "Allocated")]"10001"
a[{12000} = "Tech" OR %{12001} != "Open"]"10002"

in the example %{12000} is the field code for Field 1 and %{12001} is the field code for Field 2.

If you have difficulties to implement your requirements, please explain in detail the behavior you want to implement and I will give you the exact setting rules to use.

Yah sure Fidel .

I will implement it and revert if any issues found in the implementation .

Thanks for the immediate support .

 

 

In this scenario i have to choose the two fields right ??

target field is the field 4 .

field to check : ???

which field i need to choose here 

shall i need to use the field 1 or leave it as default (summary ) field .

Parameter Field to be checked... is only used for Type 1 setting rules. Since you are only using Type 2 setting rules, the value selected in this parameter doesn't matter.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,296 views 14 20
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot