Forums

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

Validate work log event if no work description is provided

Sadeesh Narendran
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 Champions.
June 19, 2021

Hi All,

I want user not to succeed creating a worklog if no Work log description is provided. I want to prompt user "Please add Work Log Description when he tries same.

 

I have Jira automation enabled, I am able to check trigger when work log event is created, compare if worklog.comment is empty or not, if empty I don't see any option for prompt or stop the event or prompt user to enter description. 

 

Is there a way to validate this? I am stuck here.

 

Note: This has nothing to do with validators in Workflow transition

Work log Valdation.JPG

 

Thanks

Sadeesh N

2 answers

1 accepted

1 vote
Answer accepted
TimT
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 Champions.
September 6, 2012

Jobin's suggestion is good, but you could also try this:

project = "X" AND issuetype = "Y" AND (voter != currentUser() OR voter is EMPTY)

The example you gave will only find issues where someone has voted, but the current user hasn't, but will leave out any issues with no voters at all. The reason this works and the original doesn't is a peculiarity of how JQL treats empty fields and equality. When there are no voters, both "voter = currentUser()" and "voter != currentUser()" evaluate to false, but "voter is EMPTY" or "voter is NULL" will evaluate to true.

This may seem non-intuitive, but it's consistent with the way SQL treats null values, and since JQL is modelled after SQL, the architects decided that it would be important to keep the SQL semantics in JQL.

Jill Pate
Contributor
September 6, 2012

So glad you responded - works great!!

Thank you

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

Try this:

key not in votedIssues() and project = X and issuetype = Y

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events