Forums

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

Unable to Add custom TextField Read only to Create Screen

Vyshnavi Reddy April 6, 2018

I am able to add Custom TextField to Create screen but when Iam adding the Custom TextField Read Only and Custom Scripted Field it was not adding to the Create Screen. I followed the same approach for adding Custom TextField and Custom Text Field Read Only, but one is working and another not working. Could any one help out with this issue.

1 answer

0 votes
Aswin Achuthan
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.
April 6, 2018

Hi Vyshnavi,

TextField (Read-only) : This field type can only be set by code or during system import.

It can be used during import or by any plugin (custom development). So it won't appear on create issue screen. That being said what are you trying to use the field ? I can help with some other solution or workaround

Vyshnavi Reddy April 10, 2018

Hi Aswin, 

  I am trying to add a TextField(Read-only) with options yes or no. My requirement is to check the due date, if it is past give the field value as 'yes' and if the duedate is in future then the text field value should be 'no'. I also tried to get this using behaviour plugin but I am not able to get the field on the screen. Could you please help me to sort this out...

 

 

Thanks in advance.

Nic Brough -Adaptavist-
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.
April 11, 2018

As Aswin points out, the field you are trying to use is not for that purpose.

  • A text field does not have "options"
  • A read-only field cannot be set or changed by the user
  • A read-only field does not appear on create, edit or transition because it cannot be set by the user

What you really want here is totally different.  You should probably be using either

  • a select list or radio button field,
    • with a behaviour to set it from other data
    • with a behaviour to stop the users changing it

or

  • a select list or radio button field,
    • not even shown to the user on create/edit
    • with a scripted listener that sets it when you need it changed

or

  • a scripted field
    • with a script that works out the current value
Vyshnavi Reddy April 11, 2018

Hey thanks Nic, got some idea about this now so if I want to use a scripted field then can you please explain  the correct process to do that??

Nic Brough -Adaptavist-
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.
April 11, 2018

Create a new scripted field as per normal custom field, then go to admin -> scripted fields.

You'll then need to write a bit of code that does your calculation and returns Yes or No.

Have a look at the script runner docs for some guidance on the coding.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events