Forums

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

My customfield's getVelocityParameters is not working for view

chintu Parameshwar
Contributor
August 17, 2012

Hi,

My customfield's(extends TextCFType) getVelocityParameters is not working for view. It is working while creating the issue, editing the issue, but viewing/refreshing the issue not executing getVelocityParameters(I tried printing something in this method, but did not prints anything if I refresh the issue).

Could you please let me know where I am missing?

Thanks a million!

2 answers

2 votes
sdfg sdew
Contributor
August 18, 2012

Removed spam

0 votes
Jobin Kuruvilla [Adaptavist]
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.
August 18, 2012

Do you have a "view" template? Is there any condition in getVelocityParameters which prevents it from executing?

chintu Parameshwar
Contributor
August 18, 2012

Yes, I have view template. my first statement in getVelocityParameters is print. Control is not entering into this method and so not printing.

Jobin Kuruvilla [Adaptavist]
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.
August 18, 2012

Do you have any value getting stored for that field? The method will be executed only if the field has any value.

MattS
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.
August 19, 2012

Sounds like the getVelocityParameters might have a different signature than expected. Try using @override. If the signature don't match the parent's method will be called.

chintu Parameshwar
Contributor
August 20, 2012

Thank you Jobin and Matt!

Actually I'm cooking up some value to send back to view template if the customfield has no value. Does it go to view template at least even if it is not executing the method (I can manage something in the view template)?

Matt, yes I'm overriding it. And I'm using latest signature(without convertion parameter).

Jobin Kuruvilla [Adaptavist]
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.
August 20, 2012

Should be possible. Btw, dumb question - You have it on View screen, right?

chintu Parameshwar
Contributor
August 28, 2012

Sorry for the delayed discussion!

My plugin has 10 modules, so I couldn't test it and confirm from where I am getting the problem. So I created a brand new plugin with customfield module with atlas sdk 3.10.4(for Jira 4.4), customfield extending TextCF, added view template with code "Hi hello". After atlas-package and atlas-run, I created a custom field of this type added global projects and added to default screen. When I go to configuration, the default value it shows is "Hi hello". I created a task issue, but did not find this "Hi hello" on issue browse page. I tried setting required flag of this field in Custom field configurations, still not asking for value in edit/create of the issue. Even I looked at the configurations of schemes, everything seems the default schemes.

I think I'm missing something, could you please help me?

MattS
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.
August 29, 2012

Check the log file for errors related to the field not getting displayed?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events