Hi,
We are using Jira in our company and we do really have customized a lot of it.
I have created a C# application in which I can do some controlling for my team and their tickets. Now I want to extend this to be able to resort tickets based on their due date.
Last step of this process is to write the due date back into the database. This is done by writing a new date in dbo.jiraissue.DUEDATE (and of course the change log).
So far, I do see my updated date when I look in the ticket but unfortunately I still see the old date in every filter.
I had a look in the database scheme and I couldn't find related places.
How can I make this work? Where do I need to write to as well to make filters work correctly?
Or do you have an easy to use API which I can use from a client application to update the due date?
Thx
Michael
The problem is that Jira does not take data from the database. It takes data from indexes and indexes are built on the database data. The process of putting data into indexes from the database is called Reindexing.
To update data in the database is an akward way. Better user Jira REST API to update issue fields:
Thx for the answer. Do you have a quick example how to access the due date?
I found https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/?_ga=2.167621816.767163120.1525327900-1751293415.1511335262#api/2/issue/{issueIdOrKey}/properties but is this the correct way?
I could also use curl if you have examples there :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be
PUT rest/api/2/issue/{issueIdOrKey}
with JSON
{
"fields": {
"duedate": "2011-03-11",
}
}
Or you can install the REST API Browser plugin. There will examples of the correct jsons
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a strange behavior: The response returns ok, but the data is not overwritten.
I am sending a PUT to url {ourjira}/issue/{ticketId}/properties/duedate with json "{\"fields\": {\"duedate\": \"" + dueDate.ToString("yyyy-MM-dd") + "\",}}
Response status is OK. What am I doing wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kindly check the json, which is returned by the REST call. Did you try it in the REST API Browser?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found the issue - my JSON had a small issue.
Thx, it is working now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.