I want to pass the below code as a description parameter when creating the custom field.
CustomField cField = CustomFieldManager.createCustomField(customfieldName, "FIELD DESCRIPTION: JAVA SCRIPT CODE HERE", customFieldManager.getCustomFieldType(customFieldTypeKey) , customFieldSearcher, contexts, issueTypes);
So I can only get the ID using cField.getID() after the field is created.
Hey Boris. Strangely enough I am able to set the Description of the field when I send some text in to cField.setDescription(someTextStringHere), however when the string holds some java script code (with proper formatted escape characters ofcourse) it does not show up in the acutal field description, while the text does show.
Any ideas if Jira even allows us to set java script as description via plugins or am I missing something?
Jira allows setting js code in the description. I think you do not need to escape it. The script will not show up in the description but it's there. You can do a simple test by putting <script>console.log('test message')</script> and check if it will show up in the browser console.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Back in 2010 I hadn't been using the Atlassian tools (JIRA, Confluence, Bamboo) that long and I started searching online to see if I could chat to other users primarily about how they used the produc...
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!
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