Forums

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

Automation with REST API to set conditions on issues?

Michael Farid
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 14, 2025

Hello,

I need to set the following conditions:

1. Any user assigned to an issue cannot insert any worklog if the "time spent" on issue exceeds the "original estimate".

2. For certain issues with specific component, a user cannot log work in the past, and for other issues with another components. for example, there are issues of planned vacation where a user can only log and take from his allowance prior the vacation itself, and another case for the unplanned vacation allowance (where he cannot log (or take from the allowance) before the date itself.

I'm using JIRA cloud and willing to combine automation and REST API to set those conditions.

Thank you ..

1 answer

0 votes
Bill Sheboy
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 14, 2025

Hi @Michael Farid -- Welcome to the Atlassian Community!

I do not believe restricting work logging as you describe is possible with built-in features, including the use of the REST API and automation rules.  Please note automation rules trigger after an event has occurred, and so could only undo rather than prevent actions.

I recall other posts suggesting use of marketplace addons for validators to do this, so please check there for options: https://marketplace.atlassian.com/

Kind regards,
Bill

Michael Farid
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 16, 2025

Thank you for your reply,

In fact that is what I think should work, the automation got triggered by this invalid entry by the user and the action will be deleting the last worklog made by him (the log that violates). Am I understanding correct?

Bill Sheboy
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 16, 2025

If that is what you want to do, there is no automation action to "delete worklog entry".  Instead the rule could call the REST API endpoint with the Send Web Request action to do so.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events