Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Profields field from scriptrunner / jjupin

Labatt March 26, 2013

Hi -

Is it possible to:

  1. Modify the copy project built-in script from scriptrunner to also copy the profields scheme to new projects?
  2. Access the profields fields from SILscript in JJUPIN? Let me give you an example of this... We're looking to store a NUMBER in a profield field, and then use JJUPIN to automatically create a primary task with a number of subtasks equal to this NUMBER.

3 answers

1 accepted

0 votes
Answer accepted
Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2013

Hi,

Currently we have no official support for Profields. The problem is that for sure some of the fields will work (because we're trying to guess other CF's capabilities). However, the normal thing would be for us to write custom fields descriptors (JJupin uses some descriptors to translate the values from jira to the script and the other way around http://confluence.kepler-rominfo.com/display/JJUPIN/SIL+Custom+Field+Descriptors )

If the number has a simple representation ( java.lang.String or a java.lang.Number subclass) JJupin should be able to guess it. If the value is wrapped in some profield class, it will not guess it.

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2013

You should see it there (last time I checked, there were all the CFs descriptors listed there), but it should be mapped on "default" which really means "guess" :))

Edit: I was talking nonsense! I just downloaded it and I really do not see any customField in this plugin. Mea culpa. Most probably, you will need some custom development for this to work.

Labatt March 26, 2013

Thanks Radu! So if we don't see it in the "Custom Fields" area of the Kepler Plugins configuration, you probably won't see it?

Jamie Echlin March 26, 2013

The thing is, it's not a custom field module, so it wouldn't show in any list of custom fields. (AFAIK, I haven't used it).

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2013

Yeap, that's true :)

Labatt March 26, 2013

This is what I was afraid of. Seems like a great opportunity to form a relationship between two plugin developers! How charitable do you feel? :)

Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2013
Labatt March 27, 2013

The fields are located within tables in the primary JIRA database. On my instance of JIRA, the field names are in a FIELD table (table name is prefixed with what looks like a unique prefix). A field scheme name is in a SCHEME table. A SCHEME_FIELD table maps which fields from the FIELD table belong to a defined scheme. A PROJECT_SCHEME table defines what projects have what scheme. A PROJECT_VALUE table then defines the values for each of the fields. Ultimately, what I'd like to do is get the value of a project field based upon the project an issue belongs to. This can probably be done with a SQL query. For example, if I had a Profield named "Account Name" and wanted the value of this field for a project with project ID 11801... I could use the following SQL query...

SELECT value FROM `AO_00B950_PROJECT_VALUE` WHERE `field_id` IN (SELECT `id` FROM `AO_00B950_FIELD` WHERE `name` = 'Account Name') and `projectid` = '11801' ORDER BY `projectId`

Is there any way to do this in JJUPIN?

0 votes
Guillermo _DEISER_
Contributor
March 27, 2013

Hi all;

We are evaluating a bunch of improvements of Profields for the next releases. If you don't mind, you can submit your request at http://www.madeira20.com and we'll explain more carefully the Profields roadmap for the next sis months.

At this time our short term priority is making Profields JIRA 6 compliance, but the next release period (May-August) should include several improvements (one of the user stories to evaluate is the ability to copy Profields Schemes, but we have to prioritize the user requests).

Thank you very much for your feedback.

Cheers

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2013

Regarding script runner... ideally they would publish a component and have a documented API. I don't use that plugin so I don't know.

If they don't, then it's a case of grabbing their classes using the plugin classloader and trying to work things out from the method names.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events