Forums

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

REST API for issue fields maximum character length

Victor Cheung
Contributor
August 27, 2020

Hello,

How can I determine the maximum characters length for all (text based) fields on my issue type using REST API?  (How can I determine the maximum character length for a text field programmatically?)

Use case:  I want to preempt the JIRA issue update/creation errors due to exceeding the maximum character length.

I am using JIRA 8.5.0 and I have looked at the JIRA 8.5.0 REST API but didn't see anything.


Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Radek Dostál
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.
August 31, 2020

Hi Victor,

 

I don't think there is public API for this, but if you open the advanced properties page you can find that it fetches the configuration via REST at {{ baseurl }}/rest/api/latest/application-properties/advanced-settings

 

This returns json with configuration including the text character limit:

{
"defaultValue": "32767",
"desc": "The maximum number of characters to be entered for a single field. Affects Description, Environment, Comments and Text custom fields. 0 means unlimited.",
"id": "jira.text.field.character.limit",
"key": "jira.text.field.character.limit",
"name": "jira.text.field.character.limit",
"type": "uint",
"value": "2393740"
},

 

If there is not a better method, I would go down this road and grep the value from that json.

 

Fingers crossed for a more "programmatic" way though, just an idea.

Victor Cheung
Contributor
August 31, 2020

Thank you, Radek!  This is what I was looking for!  

Cheers!

0 votes
Joshua Sneed Contegix
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.
August 27, 2020

Hi Victor,
This is an advanced setting in the Jira UI. Check out the jira.text.field.character.limit per Atlassian's Configuring advanced settings page. Cheers!

Victor Cheung
Contributor
August 28, 2020

Hi Joshua, not sure how else to say it, but please read the title of my post.  Please re-read my entire post content carefully.  Your reply is something I already know and it is not the answer I am seeking.  But as they say -- thanks for coming out! 

Like 2 people like this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events