SIL Script - How to copy CHECKBOX CF Value to other Checkbox CF during the transition?

Sami Ahmed Shaik
Contributor
August 5, 2020

Hello there,

We have the following scenario

Checkbox CF1 & Checkbox CF2

Checkbox CF1 have pre-defined checkbox values and Checkbox CF2 is empty. 

 

We want to copy Checkbox CF1 values to Checkbox CF2 during the transition in the workflow. Kindly help use how to achieve this using SIL script or without SIL Script?

 

Regards,

Sami Ahmed Shaik.

2 answers

1 accepted

1 vote
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2020

Hello @Sami Ahmed Shaik ,

If you use Jira Cloud, then you can use the "Copy Value from Other Field" post function mentioned by @Andrew Morin .

If you use Jira Server than this post function is not available. You should use the SIL post function with a code like this:

#{Checkbox CF2} = #{Checkbox CF1}
Andrew Morin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

Thanks for the correction. I missed that I was on the cloud docs :-)

Sami Ahmed Shaik
Contributor
August 6, 2020

Dear @Alexey Matveev ,

 

Thanks for the quick response, I am trying to achieve it by using the following way, kindly confirm is that right or not? Because I don't see any changed after transition.

 

#{customfield_10402} = #{customfield_10400};
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

The correct way would be:

customfield_10402 = customfield_10400;

This line will copy selected values in customfield_10400 into  cusotmfield_10402

 

For example,

You have customfield_1400 with options Yes and No and Yes is selected.

Also you have customfield_10401 with options Yes, No, Maybe.

After the line above has been exectuted, customfield_10401 will have the Yes value selected.

Is it what you are tying to achieve?

Sami Ahmed Shaik
Contributor
August 6, 2020

@Alexey Matveev ,

Following screenshot is for CHECKBOX with values, where the USER select the checkbox values during the transition screen

checkbox Cf1.PNG

 

And after the transition the same selected values should be copy to other checkbox custom field "Action Items List" which is empty because of CONTEXT of the project.

Action Items List.PNG

 

Action Items is only available on VIEW ISSUE SCREEN.

 

I hope this help you to understand my question. 

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

It is not how Jira works. Please, let me know what you are trying to achieve. I will help you to solve it the Jira way.

Sami Ahmed Shaik
Contributor
August 6, 2020

@Alexey Matveev 

 

Checklist (Checkbox CF) with values on the transition screen.

Action Item List(Checkbox CF) which is empty on the View Issue screen. 

 

User during the transition selects the checkbox values of CHECKLIST field and what we are trying to achieve is "After the transition, selected values of CHECKLIST FIELD should be copy to the Action Items List field".

 

If you don't understand yet my question, let's have a quick ZOOM meeting and I will explain you the scenario.

 

Thanks & Appreciate.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

You should do it this way.

Checklist (Checkbox CF)  and Action Item List(Checkbox CF)  should have the same options.

then you create a live field with code like this:

string [] val = customfield_10400;
lfAllowSelectOptions("customfield_10402", val);
Like Sami Ahmed Shaik likes this
Sami Ahmed Shaik
Contributor
August 6, 2020

@Alexey Matveev 

 

Thank you so much it solves my question.

 

Appreciate your help.

 

Regards,

Sami Ahmed Shaik.

Like Alexey Matveev likes this
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2020

@Sami Ahmed Shaik ,

You are most welcome!

0 votes
Andrew Morin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2020

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.5
TAGS
AUG Leaders

Atlassian Community Events