Forums

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

Set description of a custom field based on selected option and empty the system field description

Eya BEN OTHMEN September 22, 2021 edited

Hello community,

Could you help me please to:

  1. set description of a custom field "Motifs" based on selected option of this custom field
  2. Empty the system field "Description" based on the selected option of the custom field "Motifs"

2021-09-22_15h07_49.png

 

I have the below inline script:

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.issue.priority.Priority
import groovy.transform.BaseScript


if (getFieldById(fieldChanged).value == "LCBFT - A", "LCBT B", "LCBT C")
{ getFieldById("customfield_30100")
.setDescription("""<div class="aui-message aui-message-info" style="font-size: 14.4px;">
<p style="text-align: center;">CONSIGNES</p>
<p>&nbsp;</p>
<p>Lorsque vous cr&eacute;ez une demande de soumission en lien avec un motif LCB-FT, voici quelques consignes&nbsp;&agrave; respecter :</p>
<ul>
<li>Dans la zone Responsable, vous devez indiquer le mail de votre r&eacute;f&...................</li>
<li>Consulter la fiche pratique Souscripteur LCB-FT sous Kiwi.</li>
<li><img src="http://st3.myideasoft.com/idea/be/12/myassets/products/060/a1-217.jpg?revision=1491038095" alt="" width="22" height="22" />&nbsp;S'il s'agit du motif &laquo; Pays &agrave; risque LCBFT- Corruption - Sanctions internationales &raquo;, vous devez pr&eacute;ciser le mail&nbsp; <span style="color: #3366ff;">service.dapeconformite@axa.fr</span><span style="color: #0000ff;">&nbsp;</span>dans la zone Responsable, les mails de votre manager et de votre r&eacute;f&eacute;rent LCB-FT dans la zone Observateur et joindre le formulaire <span style="color: #3366ff;">Questionnaire conformit&eacute;</a></span>.</li>
</ul>
<p style="text-align: center;">************************</p>
<p>&nbsp;</p>
<p>Pour faciliter le traitement de votre demande, d&eacute;tailler son objet, penser &agrave; fournir toutes pr&eacute;cisions et&nbsp;joindre toutes pi&egrave;ces justificatives utiles &agrave; sa bonne instruction.</p>
</div>""")

def desc=getFieldById("description")
desc.setFormValue("")

}
else{}

 

Best regards,

Eya

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events