J tricks - Little JIRA Tricks
  • Home
  • Plugins ↓
    • JQL Tricks Plugin
      • JQL Tricks Plugin - Cloud
        • JQLT Cloud Installation
        • JQLT Cloud Configuration
        • JQLT Cloud Usage
        • JQLT Cloud License
        • JQLT Cloud FAQ
      • JQL Tricks Plugin - DC
        • JQLT DC Installation
        • JQLT DC Configuration
        • JQLT DC Usage
          • JQLT Issue Functions
          • JQLT Subtask Functions
          • JQLT Links Functions
          • JQLT Development Functions
          • JQLT Worklog Functions
          • JQLT Project Functions
          • JQLT Component Functions
          • JQLT Version Functions
          • JQLT Group Functions
          • JQLT User Functions
          • JQLT Date Functions
        • JQLT DC License
        • JQLT DC FAQ
        • JQLT DC Known Issues
        • JQLT DC Performance
      • JQL Tricks Cloud Migration
    • Simplified Planner
      • J-Planner Installation
      • J-Planner Configuration
      • J-Planner Usage
        • Creating a plan
        • Editing a plan
        • Deleting a plan
        • Viewing a plan
        • Modifying a plan
      • J-Planner FAQ
    • Atla-Search Plugin
      • Atla-Search Installation
      • Atla-Search Configuration
      • Atla-Search Usage
      • Atla-Search License
      • Atla-Search FAQ
    • Heroku for Compass App
      • Heroku for Compass Installation
      • Heroku for Compass Configuration
      • Heroku for Compass Usage
    • Copy to subtask Plugin
    • All Plugins
  • Tutorials
  • The Book
  • Contact Us
  • Home
  • Plugins ↓
    • JQL Tricks Plugin
      • JQL Tricks Plugin - Cloud
        • JQLT Cloud Installation
        • JQLT Cloud Configuration
        • JQLT Cloud Usage
        • JQLT Cloud License
        • JQLT Cloud FAQ
      • JQL Tricks Plugin - DC
        • JQLT DC Installation
        • JQLT DC Configuration
        • JQLT DC Usage
          • JQLT Issue Functions
          • JQLT Subtask Functions
          • JQLT Links Functions
          • JQLT Development Functions
          • JQLT Worklog Functions
          • JQLT Project Functions
          • JQLT Component Functions
          • JQLT Version Functions
          • JQLT Group Functions
          • JQLT User Functions
          • JQLT Date Functions
        • JQLT DC License
        • JQLT DC FAQ
        • JQLT DC Known Issues
        • JQLT DC Performance
      • JQL Tricks Cloud Migration
    • Simplified Planner
      • J-Planner Installation
      • J-Planner Configuration
      • J-Planner Usage
        • Creating a plan
        • Editing a plan
        • Deleting a plan
        • Viewing a plan
        • Modifying a plan
      • J-Planner FAQ
    • Atla-Search Plugin
      • Atla-Search Installation
      • Atla-Search Configuration
      • Atla-Search Usage
      • Atla-Search License
      • Atla-Search FAQ
    • Heroku for Compass App
      • Heroku for Compass Installation
      • Heroku for Compass Configuration
      • Heroku for Compass Usage
    • Copy to subtask Plugin
    • All Plugins
  • Tutorials
  • The Book
  • Contact Us

How to write a simple Custom Field?

8/12/2010

46 Comments

 
Well, I have chosen this as the first topic because of the most obvious reason. This is what most of the people will start with. That is one reason why there are lot of customfield plug-ins around! No matter how many are there, you will need a new type. You always do!

Given the context, let me make a huge assumption - You know how to create a skeleton plugin! If not, go to here and do it before you continue!
So we are ready with the Skeleton. And I hope you already know what is atlassian-plugin.xml . Even if you don't, you already have a skeleton and I will tell you what you need for a custom field, I mean for my sample custom field!

For the example, I chose to create a Read Only customfield that stores the last edited user name! It is simple in functionality and enough to explain the basic concepts.

So here we go:

Modify the atlassin-plugin.xml to inclue the customfield module as follows. You will define the custom field class and the related velocity templates here!
<customfield-type key="readonly-user" name="Read Only User CF" class="com.jtricks.ReadOnlyUserCF">      
  <description>Read Only User CF Description</description>      
  <resource type="velocity" name="view" location="templates/com/jtricks/view-readonly-user.vm" />      
  <resource type="velocity" name="column-view" location="templates/com/jtricks/view-readonly-user.vm" />     
  <resource type="velocity" name="xml" location="templates/com/jtricks/view-readonly-user.vm" />     
  <resource type="velocity" name="edit" location="templates/com/jtricks/edit-readonly-user.vm" />
</customfield-type>

The structure is the same for all custom fields. You must have a unique key which is 'readonly-user' in this case.  Class is the most important thing which could be one of the JIRA custom field types. In this case I have chosen to write a class of my own just to explain the concepts. The class 'ReadOnlyUserCF' extends JIRA's TextCFType and will be explained later.

The next important thing is the velocity templates. You can define different or same templates for each functionalities. In this case, I have chosen to use the same for view, column-view and xml. view template is used in the 'View Issue' page, column-view template in 'Issue Navigator' & reports and xml in XML exports. For edit, I have chosen a different template as you can see there.

Let's have a look at the class!

public class ReadOnlyUserCF extends TextCFType{       
    private final JiraAuthenticationContext authContext;  
 
    public ReadOnlyUserCF(CustomFieldValuePersister customFieldValuePersister,  
         StringConverter stringConverter,  GenericConfigManager genericConfigManager,
         JiraAuthenticationContext authContext) {       
     super(customFieldValuePersister, stringConverter, genericConfigManager);     
     this.authContext = authContext;   
    }   
   
    @Override   
    public Map getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem){       
    Map params = super.getVelocityParameters(issue, field, fieldLayoutItem);       
    params.put("currentUser", authContext.getUser().getName());       
    return params;   
    }
}

The class extends TextCFType as our custom field in essence is a text field. You can extend SelectCFType if you are creating a custom select list and so on! The IDE will automatically prompt you to create a constuctor as the super class needs to be injected with the relevant parameters. I have injected an additional parameter 'JiraAuthenticationContext' in the constuctor here as it is required in our plug-in.

Now, you need to populate the velocity context with the variables you need. For that, all you need to do is to override the 'getVelocityParameters' method. This returns you a Map with lots of populated params and you can add additional key-value pairs into it as I have added 'currentUser'

params.put("currentUser", authContext.getUser().getName());

We have now the class ready with an additional parameter added into the velocity context! A list of parameters already in there can be found here.

Note: As you can see, 'authcontext' is already in there and I don't need an extra variable to be put in there as I can retieve the current user in the vm from this variable. I have done this just for the sake of the tutorial!

Now let's move no to the templates. The variables in the context is shared across all the templates. Let us have a look at the edit template.

<input type="text" name="$customField.id" value="$currentUser" id="$customField.id"   class="textfield" readonly="readonly" />

Here the highlighted currentUser is the variable we defined in the context in our class. the text field is marked as readonly as well! $customfield automatically comes from the context and we should kepp it as JIRA uses it to update the value back when you press UPDATE!

Note: $authContext.user.name will give you the same result as $currentUser

That is it for edit template. View templates looks like this:

#if ($value)  $value  #end

That's it! Simply displays the current value of the custom field. More complex things can be added if you want beautification, data conversions etc.

And now, we have our custom field ready!! Package it and deploy it into jira-home/plugins/installed-plugins (WEB-INF/lib if you created plugin-1 version). And see if it works 

If you need searching enabled, you need to tie it up with a JIRA's built in Searcher or one you have written! More of that and more about custom fields plugins be found here. And more on CustomFields here. Njoy!

Finf the full source code below. And feel free to post your comments/feedback!

readonly-cf.zip
File Size: 4 kb
File Type: zip
Download File

46 Comments
Anonymous
9/30/2010 07:43:19 pm

This is useful.

Reply
csytsma
10/19/2010 04:10:44 am

Very helpful, thanks for posting these. Looking forward to reading the rest of your tutorials.

Reply
J-Tricks
10/19/2010 04:17:58 am

Thank you! Keep watching this space :)

Reply
Jamie
1/24/2011 10:04:11 pm

thank you for a lot of great tutorials, they've helped me a lot. The one thing I havn't been able to figure out is how to set the value of the custom text field. Can you give me any pointers?

Reply
J-Tricks
1/24/2011 11:19:38 pm

Thanks Jamie.

For setting value on a Text Field, you need to retrieve the custom field object first using the name or id and then use the updateValue method on the custom field.

Have a look at http://confluence.atlassian.com/pages/viewpage.action?pageId=160835 for details.

Let me know if it worked!

Regards,
Jobin

Reply
Ajay Singh
1/27/2011 07:38:14 am

Thanks Jobin.. I found one very good pointer in your tutorial!

Reply
J-Tricks
1/27/2011 07:54:44 am

Thanks Ajay. Glad to know it helped!

Reply
sri
4/3/2011 08:18:18 pm

Hi J-tricks,
Your example is very good to understand the basics. I tried to implement it with a bit of change. What I want is to implemennt TextCFType Textfield. Now, I have everything but on creating an issue and trying to save it. The value in the textfield (i.e. the plugom) i created doesn't get saved. When i edit it it still hasn't saved the value. What should be done for that?? Your advise is hight appreciated. Thanks.

Reply
J-Tricks
4/13/2011 07:50:20 am

Hello Sri,

Can you paste your edit-template here?

Reply
konsta
8/23/2011 06:07:07 pm

Hi,

I have created as static plugin to display a list of values. When I select a value populated and try to save it, nothing happens i.e. the select value does not get saved. Am I missing something. I am new to velocity templates so I am not sure If I am missing something.

package com.konsta.jira.plugin;

import com.atlassian.jira.issue.customfields.impl.SelectCFType;
import com.atlassian.jira.issue.customfields.persistence.CustomFieldValuePersister;
import com.atlassian.jira.issue.customfields.converters.StringConverter;
import com.atlassian.jira.issue.customfields.converters.SelectConverter;
import com.atlassian.jira.issue.customfields.manager.OptionsManager;
import com.atlassian.jira.issue.customfields.manager.GenericConfigManager;
import com.atlassian.jira.issue.customfields.view.CustomFieldParams;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.fields.config.FieldConfig;
import com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem;
import com.atlassian.jira.util.ErrorCollection;

import java.util.Map;
import java.util.HashMap;

/**
*/
public class CustomDBPlugin extends SelectCFType{

public CustomDBPlugin(CustomFieldValuePersister customFieldValuePersister, StringConverter stringConverter, SelectConverter selectConverter, OptionsManager optionsManager, GenericConfigManager genericConfigManager) {
super(customFieldValuePersister, stringConverter, selectConverter, optionsManager, genericConfigManager);
}

/**
* Override and do nothing for validating the selection
*
* @see com.atlassian.jira.issue.customfields.impl.SelectCFType#validateFromParams(com.atlassian.jira.issue.customfields
* .view.CustomFieldParams, com.atlassian.jira.util.ErrorCollection,
* com.atlassian.jira.issue.fields.config.FieldConfig)
*/
@Override
public void validateFromParams(CustomFieldParams relevantParams,
ErrorCollection errorCollectionToAddTo, FieldConfig config) {
// do nothing, no validation required yet.
}

/**
* Builds a map of parameters, later used in a velocity template.
*
* @param issue
* the issue
* @param field
* the field
* @param fieldLayoutItem
* the field layout item
*
* @return the velocity parameters
*
* @see com.atlassian.jira.issue.customfields.impl.AbstractCustomFieldType#getVelocityParameters(com.atlassian.jira.issue
* .Issue, com.atlassian.jira.issue.fields.CustomField,
* com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem)
*/
@Override
@SuppressWarnings("unchecked")
public Map getVelocityParameters(Issue issue, CustomField field,
FieldLayoutItem fieldLayoutItem) {

Map map = new HashMap();
Map<String, String> results = new HashMap<String, String>();
results.put("1", "The Ponds");
results.put("2", "Stanhope Gardens");
map.put("results", results);
return map;
}


}

----------------------------------------
the custom-db-field-edit.vm

#* @vtlvariable name="results" type="java.util.Map" *#
#controlHeader ($action $customField.id $customField.name $fieldLayoutItem.required $displayParameters.noHeader)


#if($value && !$value.equals(""))
#set ($displayValue = ${value})
#else
#set ($displayValue = 'Not selected')
#end

<select name="$customField.id" id="$customField.id" >
<option value="">Not selected</option>
#foreach ($mapEntry in $results.entrySet())
#if ( $displayValue == $mapEntry.key )
<option selected="selected" value="$mapEntry.key">$mapEntry.value</option>
#else
<option value="$mapEntry.key">$mapEntry.value</option>
#end
#end
</select>

#controlFooter ($action $fieldLayoutItem.fieldDescription $displayParameters.noHeader)
----------------------------------------


<customfield-type key="customdb-field" name="CustomDB Field" class="com.konsta.jira.plugin.CustomDBPlugin">
<description>Custom DB Plugin</description>
<label>Custom DB Field</label>
<resource type="velocity" name="view" location="templates/plugins/custom-db/custom-db-field-edit.vm"/>
<resource type="velocity" name="edit" location="templates/plugins/custom-db/custom-db-field-edit.vm"/>
<resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-basictext.vm"/>

</customfield-type>

----------------------------------------

Reply
J-Tricks
8/25/2011 03:02:18 pm

@Konsta Same template for view and edit? Also, which version of JIRA is it? The control header is different for the latest versions.

Reply
Rambanam
10/16/2011 05:31:23 pm

Hi,
your examples are very good to understand easily.
can you give some tips to develop MultiSelectCFType customfield

Thanks in advance

Reply
J-Tricks
10/17/2011 04:50:11 am

@Rambanam Its is difficult to write tutorials for individual field types because there are a lot. We are hoping just to cover the basics. However couple with this tutorial, have a look at the MultiSelectCF type in JIRA and you should be able to work it out.

Reply
Oliver
11/5/2011 03:16:45 am

Great Example. However does anybody know how to SQL query from a Custom field ?

Thanks. Oliver

Reply
J-Tricks
11/5/2011 11:10:45 am

Hello Oliver,

What SQL are you trying to execute from the custom field? Did you have a look at OfBizDelegator?

Reply
mizan
12/26/2011 09:40:30 pm

Hi,
I am creating a plugin which will count the number of
occurences of a transition and display it in a customfield.
This is my java class
public class MyPlugin extends TextCFType
{
ResultSet rs=null;
private org.ofbiz.core.entity.jdbc.SQLProcessor sqlProcessor = null;
private final JiraAuthenticationContext authContext;
public MyPlugin(CustomFieldValuePersister customFieldValuePersister,
GenericConfigManager genericConfigManager,JiraAuthenticationContext authContext,SQLProcessor sqlProcessor)
{
super(customFieldValuePersister, genericConfigManager);
this.authContext = authContext;
this.sqlProcessor = sqlProcessor;


try{
ComponentManager componentManager = ComponentManager.getInstance();
IssueManager issueManager = componentManager.getIssueManager();
IssueFactory issueFactory = componentManager.getIssueFactory();
MutableIssue mutableIssue = issueFactory.getIssue();
String key=mutableIssue.getKey();
sqlProcessor = new org.ofbiz.core.entity.jdbc.SQLProcessor("defaultDS");
try {
sqlProcessor.prepareStatement("select count (ji.pkey) as my_count FROM changegroup cg, changeitem ci, jiraissue ji" +
"WHERE cg.id = ci.groupid" +
"AND ci.newString = 'In Progress'" +
"AND ji.id = cg.issueid" +
"AND ji.pkey = '"+key+"'");

sqlProcessor.executeQuery();
rs = sqlProcessor.getResultSet();
sqlProcessor.close();
rs.close();
} catch (GenericEntityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
catch (SQLException ex)
{

ex.printStackTrace();
}
}


@Override
public Map getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem)
{
Map params = super.getVelocityParameters(issue, field, fieldLayoutItem);
try
{
params.put("counter",rs.getInt("my_count"));
}
catch (SQLException e)
{
e.printStackTrace();
}
return params;
}

.I get a exception and jira fails to startup. Can you help me with this ?

thanx :)

Reply
Sathish
1/3/2012 09:26:45 pm

I've used the sample code given. Added & Enabled this plugin in my Jira. But i'm not able to see Read Only User CF custom field in Custom field page. is there any other configuration needs to be done.

Reply
J-Tricks
1/4/2012 12:51:05 am

Are you looking at Administration > Custom fields? You need to create a custom field of the type 'Read Only CF' as mentioned at http://confluence.atlassian.com/display/JIRA/Adding+a+Custom+Field.

If you can't find the field while adding, there is some issue. There should be some error in the logs.

Reply
Sathish
1/4/2012 08:40:45 pm

CLass
public class TextArea extends ReadOnlyCFType {

public TextArea(CustomFieldValuePersister customFieldValuePersister,
StringConverter stringConverter,
GenericConfigManager genericConfigManager) {
super(customFieldValuePersister, stringConverter, genericConfigManager);
}
@Override
public Map getVelocityParameters(Issue issue, CustomField field, FieldLayoutItem fieldLayoutItem){
Map params = super.getVelocityParameters(issue, field, fieldLayoutItem);
params.put("value", "Testing");
return params;
}

}

atlassion plugin xml

<atlassian-plugin key="com.atlassian.jira.plugin.customfield.SourceChange" name="JIRA Customfields Examples Plugin">
<plugin-info>
<description>Read only Text Area Testing</description>
<version>1.0</version>
<application-version min="3.3" max="3.3"/>
<vendor name="" url="http://www.atlassian.com"/>
</plugin-info>

<!-- Read Only Custom Field to store user details -->
<customfield-type key="ReadOnlyTextArea" name="ReadOnlyTextArea"
class="com.atlassian.jira.issue.customfields.impl.ReadOnlyTextArea">
<description>Read Only User CF Description</description>
<resource type="velocity" name="view" location="templates/com/jtricks/view-readonly-user.vm" />
<resource type="velocity" name="column-view" location="templates/com/jtricks/view-readonly-user.vm" />
</customfield-type>

</atlassian-plugin>

Velocity
#if ($value)
$value
#end

i've installed the plugin, enabled successfully.
But I'm not able to see this field in CustomField page.

I'm using jira 4.4 trail version

Could you please help me what wrong I'm doing?

J-Tricks
1/5/2012 01:21:27 am

Can you answer the above question please? What is the error on logs? And what do you mean by custom fields page? Viewing the list of fields or adding a new one?

The code looks fine to me.

Reply
Sathish
1/5/2012 01:53:28 am

I didn't get any Error.
yes i mean to say, Viewing the list of fields.
I'm not able see ReadOnlyTextArea field in the custom field list.

what should i do to add this field in the issueNavigator?

Reply
J-Tricks
1/5/2012 01:58:00 am

Sathish, You wouldn't see the field in the list of custom fields unless it is added. See http://confluence.atlassian.com/display/JIRA/Adding+a+Custom+Field for adding a custom field.

What you created is not a custom field but a field type. You need to add fields of the new type you created. Makes sense?

Sathish
1/6/2012 12:27:35 am

Thanks It Worked.
Previously field wasn't listed in the CustomFieldType page.
The problem was with my class wasn't loaded properly.
Thanks once again for your Help.

Joe Caputo
1/30/2012 06:53:36 am

Hi there,

We are trying to extend a mail handler. What we have experienced is that the handler text box (the input field where you specify the project, the issue type etc, is limited to 255 characters. What we want to do to get around this limitation is read from an xml file for one of the parameters. How do you read from an xml file that's located on the file system that is not part of the jira installation dir or data dir? For example, I want to place the file in d:\config\xml. Is this possible?

Reply
J-Tricks
2/5/2012 02:53:05 pm

Maybe I am missing the obvious here but can't you read the file by giving the absolute path as long as it is on the file system?

Reply
Sathish
2/8/2012 05:02:49 pm

Hi I Need A Help In Jira Data Base Schema.
I've created a Project TEST. Now i want my issue id start from 100(TEST-100) instead of 1 (TEST-1), is there any way i can do it. I've tried to change value directly in Project table(Pcounter) value. still i'm not able to achive it.
Could you please help me in How to achive this?

Thanks & regards
Sathish.

Reply
J-Tricks
2/9/2012 12:38:44 am

It is indeed the counter value that you need to change. Make sure you restart JIRA after you do that.

Reply
Sathish`
2/9/2012 05:34:19 pm

Thanks Jobin, It Worked.

Sridhar
7/13/2012 08:12:10 am

1. How can I add a text on the form . I mean just a Field name without field type and I am not looking for label. Is there anyway I could add HTML Label on project basis, not as a global field.

2. How do we customize the width of the field names & field types on individual project basis.

3. How do I customize so that the check box is right aligned and checkbox name to the left.

Reply
RamblingAP link
2/6/2013 07:52:05 am

Great tutorial! Thank you for taking the time and explaining basic concepts of custom field creation!

That said, I have a customized question of my own.

The custom field I am trying to create has the following requirements:
- Read-Only (explained above)
- Searchable (explained above)
- Type: Number Field

I am not a coder by any means, hence your input would be greatly appreciated!
Thanks in advance!

Reply
J-Tricks
2/7/2013 11:15:33 am

Glad to know you like the tutorials!

Try to extend NumberCFType instead of TextCFType. You can then use the Number Range Searcher as well.

Reply
RamplingAP
2/11/2013 01:04:57 pm

Thanks for pointing me in the right direction... I think this might just do the trick!

pokemon link
9/29/2013 04:57:10 am

How do I edit a wordpress page to display only the posts, so minus the menubars?

Reply
Lincy
3/11/2014 03:00:09 am

Hi Jobin,

I am new to jira plugins, following your tutorial I created a custom field by extending SelectCFType. I want to put a validation for the values entered in the options field(not validateFromParams) . Is there a way to validate when the user is entering the value in a select list's option field, may be when the 'Add' button is clicked ?

Reply
J-Tricks
3/11/2014 04:31:35 pm

Interesting requirement. Haven't tried that though. Maybe in another post ;)

Reply
Lincy
3/13/2014 11:06:21 pm

Thank you, that would be helpful. Meanwhile could you please help me with some pointers on how to achive this?

Thank you in advance.

Regards,
Lincy.

Michal
8/11/2014 09:30:09 pm

I created new Custom Field and in the implementation of any methods

validateFromParams() or getSingularObjectFromString()

I would like to get the values of the other custom fields,

but the values which are just typed in the forms and not taken directly from the database

like example below:

1
2
3
4
5
IssueManager issueManager = ComponentManager.getInstance().getIssueManager();

CustomFieldManager customFieldManager = ComponentManager.getInstance().getCustomFieldManager();

Issue issue = issueManager.getIssueObject("JIRA-123");
So I have a list of all the custom fields:

1
2
3
4
5
6
7
8
List<CustomField> customFields = customFieldManager.getCustomFieldObjects();
for (CustomField element : customFields) {
System.out.println(
element.getFieldName() + "\n" + element.getId() + "\n"
+ "VALUE: " + element.getGenericValue() + "\n"
+ "============================="
);
}
but I cannot see the method for getting value (getGenericValue() doesn't return it).

Does anyone know how to solve it?

Michal

Reply
Ankit
5/23/2015 12:01:34 am

Hi,
Extremely helpful tutorial! Loved the way you explained it step by step and even the way you explained in Comments..
Thanks a lot!

I just have question.. I surely hope you can guide me..
Q. I need to add 2 Date fields inside the Versions panel in Project Administration. Also I need those fields to appear for every new Project created. In other words I need those 2 Date fields to come just like other 4 fields provided by JIRA by default.

Can you please suggest how can we do it? Would be extremely helpful!!

Thanks a ton!

Reply
J-Tricks
5/23/2015 01:54:43 am

Glad to know you liked the tutorial.

For the versions panel, it is not custom fields. You will have to implement custom screens with date pickers and capture the data. The data has to be persisted using Active Objects.

You can probably override the version screen using a servlet filter but having separate screens under project admin might be better!

Reply
Ankit
5/26/2015 11:51:44 pm

Thanks a lot!

I will try and come back if I face any issues.

Thanks Again.

Kiran Jonnada
2/6/2019 04:47:42 pm

Is it possible for us to construct view page similar to the edit page functionality?
For Ex: Change display color of the custom field name, display field description, change size of the custom field name

Reply
J-Tricks
2/7/2019 04:08:11 pm

Yes. Once you decide to write your own custom field, you have full control on all the views. Having said that, it is better to follow the overall JIRA UI norms for better user experience.

Reply
sewa mobil jakarta link
7/14/2019 05:49:54 am

Nice article, thanks for the information.

Reply
Nisarg
7/25/2019 02:09:23 am

Hello J-Tricks,

This is actually very useful article for beginners and I liked it.

I just have one question that if we want to use a Custom Field Type for checkbox development then which class needs to be extended?

Thanks,


Reply
J-Tricks
7/25/2019 10:17:28 pm

Checkboxes are using MultiSelectCFType class. Only the templates are different. So, you can extend MultiSelectCFType.

Reply
Jan
12/1/2020 03:56:55 pm

Hey J-Tricks
First I want to thank you for your great tutorials, you already helped me many times!
I currently try to develop a plugin where a select custom field does a GET REST API call, such that the user can select a fetched value when he creates an issue. Can you maybe give me a hint how to do that with the SDK? E.g. how to add the fetched results from the REST APi call as options to the customfield, such that they will be refetched every time the user wants to create an issue again?
Thank you very much for your help!

Reply

Your comment will be posted after it is approved.


Leave a Reply.

    Enter your email address:

    Author

    Jobin Kuruvilla - Works in Adaptavist as Head of DevOps Professional Services. 

    Author of JIRA Development Cookbook and JIRA 5.x Development Cookbook.


    RSS Feed

    Categories

    All
    Acive Objects
    Ajs
    Book
    Components
    Condition
    Custom Fields
    Customization
    Events
    Gadgets
    Javascript
    Jql
    Listener
    Mail
    Permissions
    Plugin Framework
    Post Function
    Properties
    Remote Invocation
    Reporting
    Rest
    Scheduled Tasks
    Search
    Services
    Soap
    Summit
    User Interface
    Validator
    Webwork Actions
    Workflow

    Archives

    October 2016
    August 2016
    March 2016
    January 2016
    December 2015
    May 2014
    December 2013
    November 2013
    July 2013
    June 2013
    April 2013
    October 2012
    September 2012
    August 2012
    July 2012
    May 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011
    June 2011
    May 2011
    April 2011
    March 2011
    February 2011
    January 2011
    November 2010
    October 2010
    September 2010
    August 2010

SUPPORT
APPS
TUTORIALS
THE BOOK
© J-Tricks