Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

2021 Holiday Calendar

Nick_anderson
April 8, 2021

Hello there,  

We have a global team and I would like to get a better sense of the statutory holidays in each of our teams' countries via confluence calendar.

Anything out there that would allow me to select and import a particular counties holiday calendar for 2021 ?

Thanks,

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
July 8, 2022

Hi @Joel Batac

For your requirement, you should try something like this:-

import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript

@BaseScript FieldBehaviours behaviours
def sampleMultiSelect = getFieldById(fieldChanged)
def sampleMultiSelectValue = sampleMultiSelect.value.toString()

def sampleNumber1 = getFieldByName('Sample Number 1')
def sampleNumber2 = getFieldByName('Sample Number 2')
def sampleNumber3 = getFieldByName('Sample Number 3')

sampleNumber1.hidden = true
sampleNumber2.hidden = true
sampleNumber3.hidden = true

if (sampleMultiSelectValue == '[Behaviour, Listener, Fragment]') {
sampleNumber1.hidden = false
sampleNumber2.hidden = false
sampleNumber3.hidden = false
} else if (sampleMultiSelectValue == '[Behaviour, Listener]') {
sampleNumber1.hidden = false
sampleNumber2.hidden = false
} else if (sampleMultiSelectValue == '[Behaviour, Fragment]') {
sampleNumber1.hidden = false
sampleNumber3.hidden = false
} else if (sampleMultiSelectValue == '[Listener, Fragment]') {
sampleNumber2.hidden = false
sampleNumber3.hidden = false
} else if (sampleMultiSelectValue == '[Behaviour]') {
sampleNumber1.hidden = false
} else if (sampleMultiSelectValue == '[Listener]') {
sampleNumber2.hidden = false
} else if (sampleMultiSelectValue == '[Fragment]') {
sampleNumber3.hidden = false
}

Please note that the sample code provided above is not 100% exact to your environment. Hence, you will need to make the required modifications.

Below are a few screenshots for your reference:-

1) When only the Behaviour option is selected from the Multi-Select List, only the Sample Number 1 field is displayed.

image1.png

2) When only the Listener option is selected from the Multi-Select List, only the Sample Number 2 field is displayed.image2.png

3) When only the Fragment option is selected from the Multi-Select List, only the Sample Number 3 field is displayed.

image3.png

4) When both the Behaviour and Listener options are selected from the Multi-Select List, both the  Sample Number 1 and Sample Number 2 fields are displayed.

image4.png

5) When both the Behaviour and Fragment options are selected from the Multi-Select List, both the  Sample Number 1 and Sample Number 3 fields are displayed.

image5.png

6) When both the Listener and Fragment options are selected from the Multi-Select List, both the  Sample Number 2 and Sample Number 3 fields are displayed.

 

image6.png

7) When all options are selected from the Multi-Select List, all the Number fields are displayed.

image7.png

I hope this helps to answer your question. :)

Thank you and Kind regards,

Ram

Joel Batac
Contributor
July 8, 2022

Thanks Ram. Is it possible to do a  loop? In reality the multi select field contains 27 options ( i just gave a 3 for simplicity)

Ram Kumar Aravindakshan _Adaptavist_
Community Champion
July 14, 2022

Hi @Joel Batac

There is no simple way for this.

Making a loop will not work as expected and will cause errors.

Thank you and Kind regards,

Ram

TAGS
AUG Leaders

Atlassian Community Events