• Community
  • Products
  • Jira
  • Questions
  • For Issue type = Bug, when we perfume close action I would like to populate two additional text fields so that root cause and preventive action are filled before closure of any live bugs. Can someone help me with steps? Thank You!

For Issue type = Bug, when we perfume close action I would like to populate two additional text fields so that root cause and preventive action are filled before closure of any live bugs. Can someone help me with steps? Thank You!

For Issue type = Bug, when we perfume close action I would like to populate two additional text  fields so that root cause and preventive action are filled before closure of any live bugs.

Can someone help me with steps? Thank You!

9 answers

1 accepted

This widget could not be displayed.

You are not on "edit mode". You will need to click "Create draft" (see the yellow band from the top of the picture 2). At the end, after saving the postfunction, you will need to publish the draft. Sorry I've missed it smile

This widget could not be displayed.

Hello,

This is a thing you can do very easy using JJUPIN plugin. All you need to do is to add a postfunction on the desired transition in which you populate the fields like this: 

customfield_x = "value1";
customfield_y = "value2";

The documentation of JJUPIN can be found here and more examples of post functions are here.

Hope this helps,
Alexandra 

This widget could not be displayed.

@Alexandra Topoloaga 

Thanks a lot for your reply, I just bought JJUPIN, could you please help me with step by step procedure to do it.

I need to populate 3 text fields (mandatory) when Type is “Bug” and action selected for transition = close.

Please help me with the steps.

This widget could not be displayed.

Hi Anizkhan,

I am glad you found my answer helpful. 
First, you have to create a postfunction on the "Close issue" transition. You can do this by editing the workflow. You will have to choose "(k) SIL Post-function" and put the script you need there. The script should look like this: 

if (issueType == "Bug") {
	customfield_a = "value1";	
	customfield_b = "value2";
	customfield_c = "value3";
}

Click add, publish the workflow and that's all. smile

This widget could not be displayed.

I am trying to configure JJUPIN plug in, however it is asking for following info, where i can find it?

Kepler parameters for the JJUPIN plugin
Configuration values for plugin : jjupin

Default Program Name
Default comment
Default filename
Default directory
SIL Web Service enabled?
SIL Web Service Run As

Also i couldnt see "(k) SIL Post-function"; i see only emails, sil.aliases, sil.properties like below screen.

Sorry for such basic questions, this is the first time i am trying to install a Plugin.

 

image2015-8-14 15:49:59.png

This widget could not be displayed.

You are on the wrong screen. At the moment, for your request, you do not need to configure JJUPIN (anyway, the default configuration is all right). All you have to do is to upload JJUPIN into your add-ons and add the postfunction from the workflow screen on the transition wanted. Please notice that you can close an issue from many states (you can go directly from open to closed, from in progress to closed etc).
All you should do is explained, step by step, in the pictures below: 

1.image2015-8-14 10:54:30.png

2. image2015-8-14 10:56:20.png

 

3.image2015-8-14 10:56:42.png

4.image2015-8-14 10:57:33.png

Now, when the transition is triggered, the fields will get populated.

I hope it is clear now smile
Alexandra 

This widget could not be displayed.

Awesome!

Thank you for the clear steps, I am trying the steps, however on the step 2 my "Add post function" is disabled, do you know how to enable it?

1)

image2015-8-14 18:36:57.png

 

 

2) 

image2015-8-14 18:38:30.png

 

This widget could not be displayed.

Thank you @Alexandra Topoloaga, i can edit now, this is very helpful,

However after pasting your code, and clicking check "It throws following error", is it still fine to publish the below code?

if (issueType == "Bug") {
customfield_10001 = "value1";
customfield_10002 = "value1";
customfield_10003 = "value1";
}

 

image2015-8-21 17:38:17.png

This widget could not be displayed.

Well, you will need to use the ids of the custom fields you want to set. I used 10001, 10002 and 10003 as an example. In order to get the ids of your custom fields, go to "Custom fields" page, find the custom field you want and click "Edit". The id will appear on the address bar: 
image2015-8-21 14:4:14.png image2015-8-21 14:6:13.png

 

In the example above, 10500 is the id of the custom field, so I would need to use customfield_10500.

Also, I guess that the value you want to set is not "value1", please update this as well. smile

Alexandra

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

106 views 1 2
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