User format module not working

Radek Indra April 4, 2017

When I create user format plugin module I get exception in look and feel section. This can by fixxed by calling 

 

UserFormatTypeConfiguration userFormatTypeConfiguration = ComponentAccessor.getComponent(UserFormatTypeConfiguration.class);
userFormatTypeConfiguration.setUserFormatKeyForType("fullName", "jira.user.format:full-name-user-format");


however this doesnt realy fix the problem beacous when i chose my user format nothing change. Also there are now calls to my format functions. 

My question is how can I change usserFormatter or where is it stored. Also is there some specific requirments for user format module? 

Ultimetly I want to add second icon to user and make this icon a link to some JavaScript fuction.

EDIT 

I made my plugin work and rendered user in isuee listview in the way I wanted. However that was not really what I needed. I now know that i must edit .vm templateis in core jira but I have no Idea where to find ones reposible for rendering assignee and reporter in an issue.   

 

1 answer

1 vote
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.
April 4, 2017

Not sure where you added this code. And it is not needed. When you write a User Format Plugin module, you need to implement the UserFormat interface, implement the required methods and write the velocity templates. 

Once that is done, using the new profile depends on where you want to use them. For example, the assignee column in the issue navigator uses the assignee-columnview.vm file. You can also call the new profile from other plugins.

There is a recipe in the JIRA Development Cookbook discusing about the same in Chapter 11.

Radek Indra April 5, 2017

Thanks this helped a lot epecialy JIRA Development Cookbook was very usefull just one more question. Do I have to edit the vm fiels in jira by hand? Or is there some way for the plugin to do this for me. As I said I need to change rendering of all user mentions. Does this mean I have to edit all vm user files?

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.
April 5, 2017

I am afraid you will have to modify the system templates if you want to change the behavior of the existing user fields. 

John Misty December 4, 2017

Are there any open source UserFormat implementations that work?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events