I created a Custom Field Plugin and installed it successfully.
But the custome field does not appear in the JIRA [Administration] -> [Issues] -> [Fields] -> [Custom Fileds].
How can I do it programmtically?
To be clear here, have you developed a "Custom field", or a "custom field type"?
Most custom field plugins provide a field type, not a field, as you usually want to let the administrators add the actual field (they decide on name, screens, context and so-on), and often you want more than one.
To clarify, do you see your field type when you go to
JIRA [Administration] -> [Issues] -> [Fields] -> [Custom Fileds] -> add new field ?
Or did you really write a new hardcoded field?
Probably I created a 'Custom Field Type' without knowing it.
I created the plugin module referencing to the page below.
https://developer.atlassian.com/display/JIRADEV/Custom+Field+Plugin+Module
I described the tag belowin the atlassian-plugin.xml.
<customfield-type/>
There is no entry in the [Administration]'s [Custom Fields].
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I thought that might be the case - plugin *types* are quite common and are what is listed in the example codes, even if the target system only needs a single instance of them. Because they're more common, we're more familiar with the debugging of them.
The things to check are:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. The Plugin is successfully installed.
2. The Plugin is successfully enabled.
3. There is no error in the log.
4. But JIRA Administration does not detect the Custom Field.
So I suspect that there is something missing in the source code.
I list the full source below.
Please tell me where I misunderstand.
1. Java Class
public class LuminousTextArea extends TextAreaCFType {
public LuminousTextArea(
CustomFieldValuePersister customFieldValuePersister,
GenericConfigManager genericConfigManager) {
super(customFieldValuePersister, genericConfigManager);
}
}
2. atlassian-plugin.xml
<customfield-type key="customFieldTest"
name="Custom Field Test"
class="***.LuminousTextArea">
<resource type="velocity" name="view"
location="templates/view.vm"/>
<resource type="velocity" name="edit"
location="templates/edit.vm"/>
</customfield-type>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, that all looks correct to me. I think point 3 is worth chasing further though - there should be references in the log file to the attempts to load the plugin and the classes it tries to load. Even if they are not throwing specific errors, it is well worth checking that they are being spotted and loaded ok...
For example, this one:
JIRA Misc Workflow Extensions : com.innovalog.jmwe.jira-misc-workflow-extensions Version : 2.5.7.1 Status : enabled Vendor : Innovalog Description : Several JIRA workflow extensions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I must clarify this issue again.
I created a Custom Field Type, I guess.
In the JIRA5.x [Administration] -> [Issues] -> [Fields] -> [Custom Fileds] -> [Add Custom Field],
the just created Custom Field Type is successfully listed.
But I want to do the second step programatically so that the Custom Field is listed
in the JIRA5.x [Administration] -> [Issues] -> [Fields] -> [Custom Fileds].
I want to know how to assign applicable Issue Types, Projects, and Screens to the just
created Custom Field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you managed to fix the problems with the plugin not making the new type available?
Now the question has moved on to adding a new field of that type automatically?
I'd suggest you think very carefully about that - do you really want a plugin to add a field type without the administrators being involved in the selections of where it lands? Of course, you can do it, but the only plugins I know of that do it are all bug-ridden with the process (even Atlassian's own Greenhopper creates problems when it tries to do it - the latest version can duplicate the field "Story Points" when you upgrade), and that makes me think it's a lot of complex work, possibly with little reward. I'm inclined to tell you to trust your administrators instead of coding for complex situations.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.