How to add a Readonly Custom Field whose value(s) can be REPEATED/MULTIPLE(like comments)

Ankit Agarwal November 18, 2014

I have an Custom Field of multiline-textArea type, which is ReadOnly and  Wiki Style Rendered. The value(s) will be filled programatically from another tool.

What i need in addition, is this particular custom-field can contain multiple values(not predefined as in MultiValueComboBox). For example, an Issue can contain multiple comments, that are added at different time.

 

So my Custom Field should also be able to contain multiple (0 - n) different values per Issue. Better if they are collapsible too.

 

5 answers

1 vote
Midori
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.
November 19, 2014

Seriously, if you already have this in place for single value, why don't you build a workaround like this?

Instead of overwriting the current value in that field at updates, why don't you append (or prepend) the new value to that? If you need some metadata (like update time), you can also include that in the string appended.

I know it is not fancy, but can be built with minimal efforts and may solve your problem.

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2014

You will need to find or write a plugin to provide a field like this.  All the standard custom fields are true fields - they contain a single value or set of values in one place, not multiple lines.

Ankit Agarwal November 18, 2014

Thanks Nic Brough,

how to write a plugin to add above field

 

 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2014

Start at https://developer.atlassian.com/display/JIRADEV/JIRA+Plugin+Development You'll need a "custom field" module. You have a couple of big design decisions to make. If you want to stick to the basic way of doing things, you'll need to consider how to store multi-line data in the database in a a way that your field can extract and convert to a comment-like structure, and when being added to, it needs to take the existing data and append rather than overwrite. Or, you can do it in a more structured way - you'll need a new table in the database, structured for multiple lines per issue, with each line having author, date, content etc, and a way to read/write it directly - this is a little more complex than a simple custom field plugin, but is the correct approach

0 votes
Ankit Agarwal November 24, 2014

Thanks FerencKiss & Nic Brough I appreciate both of your thoughts Can you please share the some links for get the data from external database in a custom field

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 21, 2014

1. No 2. I'm not aware of one for tagging comments or re-inveinting the wheel as another comment type field 3. Yes - free text is unlimited

0 votes
Ankit Agarwal November 21, 2014

@Ferenc Kiss [Midori] & @Nic Brough [Adaptavist]

I appreciate both of your thoughts. I understand that creating a new table in database would be more structured, but it will take hell lot of efforts. So i was wondering is there a way to:

  1. Tag JIRA Comments : so that Comments from external tools can be grouped in a separate TAB. And they dont appear in the regular JIRA Comments Tab.
  2. An plugin is already available in the Market Place, so that i don't have to reinvent the wheel.
  3. Can a CustomField hold large Text(much greater than 255 characters)?

 

Suggest an answer

Log in or Sign up to answer