The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Find a field

Cosma Papouis
July 25, 2023

Hi, 

I am writing a python script and need to find the field "everBreached", but I can't see it anywhere.

The query project = TEST AND 'Time to first response' < 0 

Brings back the results I want, and 'Time to first response' brings back the tickets I need, but I cannot find the field so I can do..

 ever_breached = issue["everBreached"]
or something similar in python.

I did find a way to list the custom fields as I already use
issue_priority = issue["fields"]["customfield_10056"]["value"]
But It has vacated my mind and I cannot work out how I found it.
All help appreciated
TIA 
Regards
Cosma

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Sanjog Sigdel
Community Champion
July 25, 2023

@Cosma Papouis I find that you have referenced the custom field very well. But if it is not being identified can you check the Contexts screen and where the custom field is being used. If your Jira Service Management Project is not exposed with the newly created custom field, you may not see this in your API.

0 votes
Cosma Papouis
July 25, 2023

Update:  I have found the field I wanted, but now I am having issues referencing it.

 

I want the breached field from this

"customfield_10038": {
            "id": "66",
            "name": "Time to first response",
            "_links": {
            },
            "completedCycles": [],
            "ongoingCycle": {
                "startTime": {
                    "iso8601": "2023-07-17T11:57:25+0100",
                    "jira": "2023-07-17T11:57:25.231+0100",
                    "friendly": "17/07/23 11:57",
                    "epochMillis": 1689591445231
                },
                "breachTime": {
                    "iso8601": "2023-07-17T12:57:25+0100",
                    "jira": "2023-07-17T12:57:25.231+0100",
                    "friendly": "17/07/23 12:57",
                    "epochMillis": 1689595045231
                },
                "breached": true,
                "paused": false,
                "withinCalendarHours": true,
                "goalDuration": {
                    "millis": 3600000,
                    "friendly": "1h"
                },
                "elapsedTime": {
                    "millis": 216641120,
                    "friendly": "60h 10m"
                },
                "remainingTime": {
                    "millis": -213041120,
                    "friendly": "-59h 10m"
                }
            },
0 votes
Sanjog Sigdel
Community Champion
July 25, 2023

@Cosma Papouis 

If you are looking for how the custom field value is retrieved, you have it on your ... menu on the right where you can do Edit details, Contexts and default value and other actions. If you hover over those options then it  displays the custom field id in the url below:

Screenshot from 2023-07-25 17-23-16.png

Cosma Papouis
July 25, 2023

Hi, 

I am trying to do this in python.

 

issue["fields"]["customfield_10056"]["value"]
works for another field
But I have tried every combination of 
ever_breached = issue["fields"]["customfield_10038"]
and
ever_breached = issue["fields"]["customfield_10199"]
As I can now see the field in Postman, but cannot work out how to reference it.
Like Sanjog Sigdel likes this

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events