whenever I created the custom field and assigned some default values it is working properly.
But that custom field is not showing in the issue screen. what is the problem.
thanks in advance.
The reason you are not seeing the custom field column in your Issue Navigator is that since it is constrained either by Issue Type or Context you will only ever see it if all the issues in the view are of the same issue type and that issue type is the one your custom field is configured against.
i think you cannont edit any template in an OnDemand Installation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I have configured my custom field for all the screens and also for all issue types.But the problem i hope is that velocity templates .But I am new to Jira and I want to know which velocity template will be responsible for showing the custom field on screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Faysal.
But is there any other issue other than what you have mentioned which makes the customfield not to appear on issue screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i don't know of any issue.
usually i create a custom field and select the screen(s) i want it to appear.
you may have to check your project configuration summary what fields/screen scheme is assigned to it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. If the field can be seen on creating an issue, then you've got the field configuration and the field context correct, which narrows it down to three possibilities:
You also mention velocity templates - does that mean you are NOT using OnDemand? (Please get your tags right if that's the case!) And you are writing a custom field plugin? We really do need to know this sort of thing when you're asking questions. If that's the case, then what does your plugin's velocity say?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
I did not used any java script in my code. My plugin implements SelectCFtype custom field.And I have copied the same velocity templates as SelectCFtype has i;e view-select,edit-select,xml-select.
Thanks .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did not used any java script in my code
jscript code can be placed in field discription or as default value....
hmm you have your own plugin in an Ondemand environment?
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.
private Object getDefaultStatuses(CustomField field) { try { FieldConfigSchemeManager sm = (FieldConfigSchemeManager) ComponentManager .getComponentInstanceOfType(FieldConfigSchemeManager.class); long fieldConfigId = ((FieldConfigSchemeImpl) ((List) sm .getConfigSchemesForField(field)).get(0)).getId(); Object list = genericConfigManager.retrieve( CustomFieldType.DEFAULT_VALUE_TYPE, Long.toString(fieldConfigId)); return list; } catch (NullPointerException npe) { return new ArrayList<String>(); }}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so you're writing a plugin.
Are there any errors in the log when you view an issue that should have your field set?
Are you sure data is going into the field and being stored on create? (Because if it's not being stored, then the field won't show up on view because Jira hides empty fields)
What does your view template say? Can you insert some really simple hard-coded text in it and try again and see if your text appears?
Could you show us the segment of atlassian-plugin.xml that points to all the templates? And then check that the templates all match inside your code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Faysal,
This is my code which worked in jira 4.1.2 but it is not worked in jira 4.4.5.
public class DaysInStatusX extends SelectCFType { private static Logger LOG = Logger.getLogger(DaysInStatusX.class); public DaysInStatusX(CustomFieldValuePersister valuePersister, StringConverter stringConverter, SelectConverter selectConverter, OptionsManager optionsManager, GenericConfigManager genericConfigManager) { super(valuePersister, stringConverter, selectConverter, optionsManager, genericConfigManager); } @Override public Map getVelocityParameters(Issue issue, CustomField field,FieldLayoutItem fieldLayoutItem) { Map params = super.getVelocityParameters(issue, field, fieldLayoutItem); // This method is also called to get the default value if (fieldLayoutItem == null) { LOG.debug(">> Appfire Custom Field Ext Plugin: In Custom field configuration screen. Show the default statuses"); params.put("confscreen", true); // return params; } else params.put("confscreen", false); params.put("statusList", getAllStatuses()); Object retList = getDefaultStatuses(field); params.put("defaultStatusList", retList); params.put("numDays", getIssueCustomFieldValueFromIssue(field, issue)); return params; } private Collection getAllStatuses() { return getConstantsManager().getStatusObjects(); } public Object getIssueCustomFieldValueFromIssue(CustomField field,Issue issue) { if (issue == null || (issue.isCreated() == false)) return null; String fieldValue = (String) issue.getCustomFieldValue(field); String status = (String) getDefaultStatuses(field); if (fieldValue == null || fieldValue.equals(status)) return null; else return fieldValue; }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you PLEASE stop reposting the same question over and over.
This code is being discussed in more detail over at https://answers.atlassian.com/questions/117052/what-is-the-problem-with-this-code-in-jira-4-4-5-for-select-list-why-the-list-is-always-returning-null-value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please see the thread you keep duplicating. I've given you an answer that works for me, and should work for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry Nic,
But I did not got any answer for my question.what are the modifications I need to be done to the above code so that it will work in 4.4.5.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please, stop commenting in the closed thread. It's no good saying "it doesn't work", especially in the wrong place where there's less information.
Comment in the original question, with the detail available for people to read, and tell us what you've done, how you've approached it and explain what you mean by "it doesn't work".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your patience Nic. But that is also not working for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
did you check the assigned screen scheme for appearance of that field?
cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.