Forums

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

Scriptrunner Make Log Work Description mandatory

Thomas Stegen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 6, 2025

Hi,

 

I want to make the Work Description field under Log Work mandatory.

I tried to solve this via a Scriptrunner behaviour.

I have a very simple Script which does the job but unfortunately also makes the normal commment field mandatory since this seems to have the same ID "comment"

import com.atlassian.jira.issue.worklog.Worklog
def commentField = getFieldById("comment")
commentField.setRequired(true)
I tried to get the correct field with the name "Work Description" which seems to be the label of the field but although I am able to change this I cannot find a way to get the value it already has.
commentField.setLabel("Test") changes the name that is displayed.
But commentField.getLabel() or commentField.label does not get me anything back.
Anyone has an idea how to solve this?
Perhaps there is also a way without Scriptrunner to do it?
Best Regards,
Thomas

2 answers

1 vote
Maja Vallin
Contributor
August 6, 2025

Hi Thomas,

 

There's another community post about this with a possible solution using automations (still not making it mandatory but giving the user a friendly reminder) https://community.atlassian.com/forums/Jira-questions/Is-there-a-way-to-make-Work-Description-field-mandatory-when/qaq-p/2586322

 

0 votes
Thomas Stegen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2025

Hi Maja,

 

this works, thank you for the link.

Would still be nice if there would be a possibility to make the field mandatory without making the comment field also mandator. Unfortunaltey I cannot find a way to distinguish between those two.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events