Log Work: How to add a custom field to Log Work screen?

Nahn Yanootz
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 23, 2012

I need to add a custom field to the "Log Work" screen.

Any ideas how I can do that? Is it even possible?

The custom field is a dropdown list that needs to be populated somehow from Java code before loading the "Log Work" dialog.

Thanks

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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

Best to create your own "Log Work" issue operation. You can add anything you want on the screen.

Nahn Yanootz
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 23, 2012

Maybe I misunderstood, but do you mean add a new "screen" and configure what fields it will contain?

I did that, but it seems that Jira only lets me associate screens to issue operations, not worklog operations.

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 23, 2012

Not a new screen. Work logging is a different operation and its screen cannot be configured. You will need a plugin to create a similar operation with additional fields on screen instead of the default one.

Nahn Yanootz
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

I don't understand what you mean by "create a similar operation".

I am currently writing a plugin in which I have already extended the "CreateWorklog", "UpdateWorklog", and "DeleteWorklog" actions, adding some extra functionalities to their doValidation() and doExecute() methods.

Is this where I could add new fields?

How exactly would I do that?

Thanks

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 29, 2012

new web-item that will place a new operation on the issue and a webwork action to work with it.

Extending the actions work in some cases but I have come across scenarios where it won't! (Example: CreateIssue in JIRA5.x). Is it working for you? If so, it is easier because you will have to define new fields there, add them to the customized jsp file and store the values in doExecute!

Nahn Yanootz
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.
September 4, 2012

I have extended the "Create Worklog" action and added a new field (with public getters and setters) to the class that extends the action.

I have modified the action's jsp file by adding a new "select" html control that has the same name as the new field mentioned above, and when the form gets submitted, its value becomes accessible from the doExecute method.

It works, but I would rather find a solution that doesn't involve a modified jsp file.

Is there another, more dynamic way of doing this without adding a new web-item and a new, separate operation? I want to keep the same workflow, so the user doesn't have to click elsewhere. Plus, if I do my own operation I would have to handle many validations that previously were done by JIRA automatically, wouldn't I?

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.
September 4, 2012

Well, if you use your own operation, you can still use extend the JIRA worklog action but use your own vms instead of modifying JIRA templates.

0 votes
Henning Tietgens
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.
June 1, 2016

Hi Nahn,

what's your solution for this? We have the same problem, only a worklog attribute is needed and Tempo is to much for this.

Thanks,

Henning

0 votes
Bjarni Thorbjornsson
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 23, 2012

Please note that custom field values are on the issue. Do you want your values to belong to the issue or the worklog (one value pr. issue or one value pr. worklog)?

The Tempo plugin provides something called worklog attributes which are stored on the worklog level. See here for details: http://wiki.tempoplugin.com/display/TEMPO/Configuring+Worklog+Attributes

Best regards,

Bjarni (Tempo support)

Nahn Yanootz
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

Hey, thanks for your answer.

I want my values to belong to an individual worklog.

The tempo plugin looks interesting, but it's a little overkill for my needs.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events