Can I copy a numeric value from a custom field to the "Work Log" or "Time Spent" field?

Marvin Brand
Contributor
April 5, 2022

👋🏼 Hey Community,

in a Server Jira Service Desk (JSM) project, I created a request form where I set a numeric custom field to put in the time (hours) the requestor worked on a task. I'm currently trying to fetch the value from the custom field and copy it to the "Time Spent" or "Work Log" system field with the "Automation for Jira" Add-On (Lite).

Basically the automation should go as follows:

When issue created > Edit Issue > Field to set: "Work Log" / "Time Spen" > Copy Value From "Custom_Field"

Actually, we're using Tempo for time tracking. But it seems like neither Tempo fields nor the default fields provided by Jira regarding time tracking can be shown in a service desk request form. Also the "Work Log" and "Time Spent" fields are not listed the "Edit Issue" rule paramaters in "Automation for Jira" (see attachement)

I'd prefer looking to get it running with Jira Automation but I'm open for other ideas / workarounds. If possible, I'd avoid a solution with Script Runner or other scripting.

Thank you guys in advance! 👏🏼

 


Asking why?

We got some technical sales reps working in the field, who also give some telephone support while their onsite at the customer. They need a quick and easy way to log work with a short service desciption after the phone call. Therefor I created a JSD request form.

Bildschirmfoto 2022-04-05 um 20.13.18.png

 

2 answers

1 vote
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2022

Hi @Marvin Brand 

I´m not quite sure about the possibilities with Automation Lite but please check if there is an action that logs work (see screenshot - from cloud):

image.png

Best
Stefan

Marvin Brand
Contributor
April 6, 2022

Hi @Stefan Salzl ,

I just installed the full version of "Automation for Jira" as a trial. I'll try to get it done with the "Log work" rule.

Do you know, whether I can copy the Time Spent from a custom field?

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 6, 2022

Unfortunately as it seems this is not possible:

image.png

But as mentioned before you could use the log work action and add the value from your custom field via smart value.

Best
Stefan

0 votes
Adeel Shoukat February 11, 2023

Hi Everyone

Yes we can add the value from custom field to Time tracking field "Time Spent".

  1. Create the Numeric Custom Field
  2. Create the new Automation

             Project Setting - > Automation (from Left Side bar)

  1. Select the Trigger when automation will run.
  2. Select the Log Work from New Action.
  3. Add the smart value in Time Spent field where from you want to copy the value
    1. {{issue.customfield_<custom field ID>}} if value from custom field in hour
    2. {{#=}}{{issue.customfield_<custom field ID>}} * 60{{/}} if value from custom field in minutes
  4. Select the Date Started for date you want to log the time.

 

Screenshot 2023-02-12 at 8.13.11 AM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events