You may create a table with wiki notation:
||column 1||column 2||column 3||
|cell value 1|cell value 2|cell value 3|
If you would like to get a more sophisticated table, you may want to have a look at the Table Grid Editor plugin, which lets you create a table as a custom field.
I went through your first response and tried using a behaviour. I was successfully able to display text in Description field using a behaviour. But, I need to know the function to be used to populate a table in the description field. I have googled and all that I see is to how to CREATE TABLE in a database but I don't need that. All I need is to create a simple table with rows and columns having column headers so that users can input their details into the table.
I've also checked the Table Grid Editor plugin but I need this for the system field (Description) but not for custom fields in my case.
I would need some info to help you further:
Yes, I did follow the steps in the link and it worked for description
Below is my script for a new custom field called ServiceRequestDetails
def srd = getFieldById("ServiceRequestDetails")
def defaultValue = """Please enter the values for""".replaceAll(/ /, '')
I mapped the behavior to the correct project and issue type. The ServiceRequestDetails field is seen on the screen but it is empty. This is a multi-line text field.
Reviewing the docs for Description:
There's no need to select the fields, as they are implicit in the code.
Perform the following actions, and try again after each of them:
Yes, I have tried this earlier but with getFieldById instead of getFieldByName. So it didn't work earlier and it works now!
But looks like I have a problem displaying a table in the field. It must be a wiki renderer issue but am not able to fix that. The same script works for Description field and it shows a table but it doesn't display the table for the Service Request Details field. So issue is not with the script but with the field.
I've actually tried to put in a default value by configuring the custom field 'Service Request Details' itself. It worked it displayed table with content but it works intermittently - it doesn't display table and within few mins if I hit create issue button it again does display. The behavior script didn't even show the table once. Basically the Visual and Text tabs are not seen on the Service Request Details field unlike Description. Do you know how to turn that on?
Then I'd open a help request with ScriptRunner Support:
Should you find out how to fix it, please, post the solution here so that other community members with the same problem can obtain the correct answer here.
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...
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