My customfield's getVelocityParameters is not working for view

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

Removed spam

0 vote

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

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

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

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.

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).

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

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?

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

176 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you