Forums

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

Update timespent on issue that isn't the active issue with automation

Petersen, Thomas January 5, 2024

In short, using smart values in automation is it possible to update an issue other than the issue that triggered the automation?

Reason i ask:  I create one issue at the beginning of the week e.g. AZ-123 and I manually update the timespent by 5 minutes everytime I assign an issue.

Thanks.

1 answer

1 vote
Laurie Sciutti
Community Champion
January 5, 2024

Hi @Petersen, Thomas ~ you should be able to do this using the Branch Rule component in your automation rule.   If you provide a bit more info about your current rule and what other issues you need to update, I may be able to provide more detailed guidance.  

Petersen, Thomas January 8, 2024

There really isn't more to tell. :-S

When I assign an issue, I need to track time that I assigned the issue. Currently I create an issue specific to the assigned task a the beginning of the week and add 5 minutes using time tracking. I want to update a specific issue based on something unrelated.

Wojciech Wardaszko
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 9, 2024

Hi, @Petersen, Thomas 

If the issue is unrelated, but it's always the same issue, you could run something like this:

Trigger: Issue assigned

Condition: User
Initiator is You

Action: Send web request to Add worklog endpoint with the issue key of where you want time tracked hardcoded in the request URL.

In the request body you would have something like:

{
  "comment": {
    "content": [
      {
        "content": [
          {
            "text": "Time tracked automatically upon assigning an issue",
            "type": "text"
          }
        ],
        "type": "paragraph"
      }
    ],
    "type": "doc",
    "version": 1
  },
  "started": "{{now}}",
  "timeSpentSeconds": 300
}

To send API calls you need to provide Authentication header with value

Basic (with a space but no quotes, just a email@domain:API_token string encoded in base64)

The details of authentication in REST API are described here.

I hope this helps.

Cheers!

Petersen, Thomas January 9, 2024

Thank you! This looks promising but I won't get a chance to try it until later this week. I'll definitely let you know,

Petersen, Thomas January 12, 2024

@Wojciech Wardaszko I suspect your solution would will solve my issue, however I'm getting the "The IP address has been rejected because it is not on the allowedlist" message. Sometimes ya' gotta' choose your battles. ;-)

 

Thank you for the insight about the API though, looks pretty powerful.

Wojciech Wardaszko
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 15, 2024

Hi @Petersen, Thomas ,

I'm glad that I was able to share some useful knowledge. As for whitelisting, you may want to work with your org admin and Atlassian Support Team to get this sorted out. I have never seen anyone report similar issue before.

Fingers crossed you get to automate it after all!

Cheers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events