Forums

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

Changing the date of a custom field

Matthew Holmes March 16, 2020

We have two fields "Time of first response" and "Time to response" to track our SLA's. We recently migrated an issue to a new request type and changes the status of it.

Unfortunately, this caused the date used for "Time of first response" to update to the current time and means our reporting is way off now.

2020-03-17_15-46-11.jpg

I believe these are custom fields, as they are both named "customfield_nnnnn" when getting the data from the JIRA API. Also worth noting that the customfield doesn't appear in

https://xxxxxx.atlassian.net/rest/api/2/issue/issuenumber/editmeta

 

Is there a way I can update this field to the correct value either through the front end or JIRA API?

I've used several different variations of this request body, but I think I'm probably way off:


{
"update":{
"customfield_10131":{
"completedCycles":{
"1":{
"operation":"set",
"stopTime":{
"jira":"2020-03-06T11:59:30.530+1100"
}
}
}
}
}
}

 (That might not even be valid JSON, I've been messing about with it so much).

 

I believe this is the correct path to the data in the JSON output:

['fields']['customfield_10131']['completedCycles'][1]['stopTime']['friendly']

 There is an array inside 'completedCycles' with the original version of the data and the new incorrect version. Not sure how relevant that might be.

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 19, 2020

Hi @Matthew Holmes ,

 

I have pointed this thread to the JSD team and I have been told that, from the sounds of it, we don't really have a conventional way for you to achieve what you're trying to do. However what you've reported with 'updating to current time' sounds like it could be a bug.

Technically what you're trying to do might be possible through the public REST API, if you get the field syntax correct and have the correct permissions.


Instead of suggesting something potentially hacky here though, we would really like to dive into what the root cause of this problem was and whether it's something we should fix on our end.


So, please ask your Jira site administrator(s) to raise a support request for this issue by going to:

 

From there we can work through the problem you're experiencing in more detail.

In case you have problems doing so, let me know and I could try to create a ticket for this issue on your behalf.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events