-I want to create custom field module to create table grid like custom table grid .
-I have created custom field using below link -
https://developer.atlassian.com/server/jira/platform/creating-a-custom-field-in-jira/
and modify the edit.vm so now its looks like below img.
but its not creating an issue .(want to show table on view page after creating issue) . so now what should i do ?
@sgoleWelcome to the community!
Have you added custom-field to issue view screen for your project? If not please add it.
Please refer to this documentation - https://confluence.atlassian.com/jirasoftwareserver/configuring-the-issue-detail-view-938845334.html
Moreover, if this doesn't help, there might be some issue with 'view' template of your custom field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@sgole for view part you will 'view.vm'
<resource type="velocity" name="view" location="templates/plugins/fields/view/view-basictext.vm"/>
<resource type="velocity" name="edit" location="templates/edit.vm"/> <resource type="velocity" name="xml" location="templates/plugins/fields/xml/xml-basictext.vm"/>
Have you recourse type named 'view', that will be used on view screen of Jira.
I will try to create a sample to help you, but I'll need a day or two for that, running some what busy with official tasks :-)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@DPKJ PS. i think i need to change "AbstractSingleFieldType" class also .(below is .java file )
package com.example.plugins.tutorial.jira.customfields;
import com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType;
import com.atlassian.jira.issue.customfields.persistence.PersistenceFieldType;
import com.atlassian.plugin.spring.scanner.annotation.component.Scanned;
import com.atlassian.plugin.spring.scanner.annotation.imports.JiraImport;
import com.atlassian.jira.issue.customfields.manager.GenericConfigManager;
import com.atlassian.jira.issue.customfields.persistence.CustomFieldValuePersister;
import com.atlassian.jira.issue.customfields.impl.FieldValidationException;
import java.math.BigDecimal;
@Scanned
public class MoneyCustomField extends AbstractSingleFieldType<BigDecimal> {
public MoneyCustomField(
@JiraImport CustomFieldValuePersister customFieldValuePersister,
@JiraImport GenericConfigManager genericConfigManager) {
super(customFieldValuePersister, genericConfigManager);
}
@Override
public String getStringFromSingularObject(final BigDecimal singularObject) {
if (singularObject == null)
return null;
else
return singularObject.toString();
}
@Override
public BigDecimal getSingularObjectFromString(final String string) throws FieldValidationException {
if (string == null)
return null;
try {
BigDecimal decimal = new BigDecimal(string);
if (decimal.scale() > 2) {
throw new FieldValidationException(
"Maximum of 2 decimal places are allowed.");
}
return decimal.setScale(2);
} catch (NumberFormatException ex) {
throw new FieldValidationException("Not a valid number.");
}
}
@Override
protected PersistenceFieldType getDatabaseType() {
return PersistenceFieldType.TYPE_LIMITED_TEXT;
}
@Override
protected BigDecimal getObjectFromDbValue(final Object databaseValue)
throws FieldValidationException {
return getSingularObjectFromString((String) databaseValue);
}
@Override
protected Object getDbValueFromObject(final BigDecimal customFieldObject) {
return getStringFromSingularObject(customFieldObject);
}
}
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.
@DPKJ I want to create custom field of type table( same functioning like idalko table grid ).
when i click on WBS(NO 1) button pop up will open(NO 2) as below img
and when i submit the form info. shown in table like shown below
so i want to show the table on view issue page when click on create .
PS . i have created money custom field (as per requirement )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok I guess it I fully got it.
Have your solved the storage part?
In view.vm page, you will need to fetch record based on issue and custom field and then display it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no not done storage part what i have to do for that ? can u give me sample or something for view.vm file ...actually im new to jira and java as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok.
I need to work on some sample implementation to get you started, I will share it in a day or two through BitBucket or GitHub.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@sgole Found some time and have created a sample for you available here
Details,
Config screen,
View issue screen,
Edit issue screen,
Please don't use this in production without modification etc :-) it is just a sample.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is it possible to change column name instead of A,B,C,D ? if "YES" then where? ....And also need to add child
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Surely you can do that, look at Hansontable documentation for that, I have provided you with bare minimum implementation.
You have make those changes in view.vm and edit.vm files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello again , @DPKJ I have set nestedRows: true of handsontable and can create parent child structure as you can see below ,
but after click on update , i cant see same structure as above(doest show parent child structure ) on view page ,what should i do? please help me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you made same changes in `view.vm` ?
Also, check how field data is saved and how it is rendered back, it might have something to do with this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@sgole There many Data-table/grid implemetation available for JS these days, you can choose from them. Here is not so comprehensive list given in this thread - https://www.angularminds.com/blog/article/15-useful-javascript-based-data-grid-libraries-for-web-app-development.html
I have used Handsontable just because the zip was already available on my office computer :-).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.