Forums

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

Setting Worklog Pro Account based on issue field

Yi
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!
January 17, 2022

Dear all,

 

I'm new to Jira, and I am struggling with some automation rules for the Worklog Pro. I want to set the Account for Worklog Pro automatically based on a defined custom field C7.

I could not find a way to do it using automation rules so Itried to script it.

import com.atlassian.jira.issue.Issue;

def fields = getIssueFields(issueKey);

if (worklog.account == null ) {
worklog.account = fields.C7
}

return issue

so that if there a worklog entry it check if account is not set, and if null it takes the C7 value.

could you please let me know, if you know any possible way to do it.

 

Thanks much.

 

 

1 answer

0 votes
Deniz Oğuz - The Starware
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.
January 17, 2022

Hi,

Is this field an instance of WorklogPRO's Account custom field? If it is, you don't need to do it, WorklogPRO automatically assumes that worklogs for an issue which doesn't specifies their own account, uses account field of the issue. Can you create a support request to discuss the details?

Suggest an answer

Log in or Sign up to answer