Can I change status when I update actual end date by rest API?

Hi, I am going to update the actual end date by rest api.
at the same time, can I change status? like from “ToDo” to “Done”?

In my point of view, this change should be done by automation rule, not API, right?

Hi @yoshioka.ryosuke. Welcome to the developer community!

You can use the Edit Issue method to update fields on an issue. That being said, can you clarify what you mean by end date? Do you mean duedate or resolutiondate ? The latter is set by Jira when a transition takes place that closes the issue, and I don’t believe is something you can manually set via the API.

As for updating the status of an issue using the API, you’d use the Transition Issue method. You can get a list of all transitions available for an issue with the Get Transitions method.

Hi @nmansilla.
I know JIRA have duedate originally but the date whta I mean is “actulal end date” as a custom field.
My goal is to change status by rest API.
To achieve this goal, which options can I choose?

  1. Directory edit status
  2. input “actual end date” and edit status
  3. input “duedate” and edit status

To update the status, I still recommend using the Transition Issue method. As for updating the value of a custom field, you’d use the Edit Issue method and in your PUT body request, you’d use something like:

{
    "fields": {
        "customfield_10555": "2024-07-31"
    }
}

Replacing 10555 with your actual custom field number.

Got it. Let me try.