It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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.


3 answers

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

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.

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.

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?


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!

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?

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.

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:

Best regards,

Bjarni (Tempo support)

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.

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.



Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published Thursday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

72 views 0 9
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