Forums

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

Create JIRA REST endpoint to retrieve the issue with min value on a custom datetime field

Chow King Tak February 7, 2018

Hi,

I am using ScriptRunner and want to create a JIRA REST endpoint so that it returns the issue of a specific project with the minimum datetime of a custom datetime field and other matching field values (let's say 'processed' == 'N'). How to do that?

Please enlighten and thanks.

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
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.
February 7, 2018

Hello,

You would pass a project id to your REST endpoint and then iterate over all issues in the project, find the issue with the minimum custom field value and return it.

You can find the answer how to iterate over project issues here:

https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-get-all-Issues-fixed-from-all-Jira-Projects-with-goovy/qaq-p/568504

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events