Hi ,
I want to know whether it is possible to add a new column in the existing database table using active objects ?
can someone provide a simple example ? i want to add an additional field while creating a version and store this value somewhere so that i can retrive it in a customfield(version picker) .
thanx :)
? the way thats done is through the owning plugin, just add a new getter/setter pair in the AO interface that is mapped to the Table. Trying to do that _outside_ the plugin is a non starter, as AO (may?) notice the redundant column and update it away again.
I also think you need to rephrase the question, 'add a new column in the existing database' is somewhat vague, what TABLE are you trying to update, core JIRA tables? not advisable.
np, been there. Yes, AO gives you the ability to generate plugin 'resource' tables that are independant of core JIRA tables. When you deploy a new version of your plugin, the AO layer reflects that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am new to AO , i want to know how i can add a new field while creating a new version . Can AO store this new value without modifying the core JIRA tables ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thats good, so how i can use AO to store values of the new field which will appear while creating a new version. i actually want this new field to be a select list which will contain all the versions of that project. I am trying to get a parent child relationship between versions. later i want a single select version picker customfield to display all the versions which have values in this new field. this new field will actually store the parent version.
any ideas how i can achieve this ? is there a similar example of AO ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, you need to create a custom field, which is backed by an AO table, I dont think there any real challenges. Create a AO service, providing crud to your 'values' to enable maintain it, possibly at plugin deployment time. After that, core JIRA will store the 'textual' equivalent of the CF in its tables, you dont need to worry about that.
AO tutorial for hello world: https://developer.atlassian.com/display/AO/Getting+Started+with+Active+Objects
There's a CF tutorial https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+Custom+Field+in+JIRA
There is always the sourcecode, JIRA code is invaluable for this kind of stuff.
If you didn't know already, AO is bundled in JIRA 5 (eap http://www.atlassian.com/software/jira/download-eap), its not available in JIRA 4.x unless you start packaging AO up. There have been a lot of changes in AO so unless you like refactoring, Id start coding for JIRA5...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx Andy for this valuable information, how can i create a customfield which is backed by an AO table ? and my customfield will be a version picker
For now i want this plugin to work for Jira 4.3 , soon we will upgrade to Jira 5. I have downloaded latest activeobjects-plugin jar and SPI jar which i will install in my Jira 4.3.
I tried the To-do example which is in the document however i get error while creating a refapp plugin ,unable to download a jar.
What should be my first step in creating a AO backed customfield ? how to introduce a new field while creating a version using AO ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to read this to understand what can be installed where:
https://developer.atlassian.com/display/AO/Installing+Active+Objects
Perhaps you will get further mileage looking at the Database driven custom field, which is almost what you want to achieve, sourcecode etc at:
https://studio.plugins.atlassian.com/wiki/display/JDVP/JIRA+Database+Values+Plugin
Im afraid its homework time. Ive given you the direction, and there is always the JIRA source code. Your need to follow the CF and AO tutorials each, and chase problems there. I can't go through every step to a final solution here,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand , il start with the tutorials , thanx :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need a field exactly similar to "Parent" field provided by greenhopper plugin while creating a version.
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.