What is the best way to add a hardcoded read-only text message to a create screen?

Ovidiu Vasilescu October 25, 2016

Hello,

 

On certain issue types, on Issue Create only, I want to have a specific description for "Linked Issues" field. I cannot edit the general description of the field because that would propagate to all issue types and that's not desirable.

I was thinking of simply adding a read-only text box to the Create Screen and setting a default value for this box but this doesn't work. Any thoughts / ideas?

 

Thanks,

-Ovidiu.

3 answers

1 accepted

3 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 25, 2016

Install the JIRA Toolkit, and add a "message" field to the screen.  As it's the "create" screen, you'll want to add a message for edit field, rather than message for view

For info, your read-only text field is a field which would need to be set by code on every issue - the name is slightly misleading I think.

Ovidiu Vasilescu October 25, 2016

Thanks Nic, I'll give this a shot.

Ovidiu Vasilescu October 25, 2016

This is the most straightforward solution, thanks a lot. Good thing that plugin is free.

Recurly Operations April 30, 2020

Doesn't seem to work for Data Center editions so still stuck ...

2 votes
Mahesh S
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.
October 25, 2016

Use this javascript in the description of the Linked Issues field. This description text "Explanation for linked issues" will work only if the issue type is Bug and it will work only in the create screen.

<p style="display: none;" id="demo">Explanation for linked issues</p>
<script>
if ((window.location.href.indexOf("secure/Dashboard") != -1) || (window.location.href.indexOf("issues") != -1)) {
myFunction();
document.getElementById("issuetype-field").onchange = function() {myFunction()};
function myFunction() {
if (document.getElementById("issuetype-field").value == "Bug") {
    document.getElementById("demo").style = "display: block;";
}
else{
    document.getElementById("demo").style = "display: none;";
}
}
}
</script>

Have a great day! smile

Mahesh S
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.
October 25, 2016

Have you tried this? Or is my understanding wrong? o.O 

Ovidiu Vasilescu October 25, 2016

Sorry, I got your message just as I was going home yesterday. I'll try it today after I finish some things and get back to you. Thanks a lot, it seems very useful.

Ovidiu Vasilescu October 25, 2016

I've tried it (changing Bug to Task for the test) and it doesn't add anything for me. The ticket is pretty much resolved though since Nic's solution works for us. However, I can imagine this would be very useful for us in other scenarios though so I'll give this to one of our techies so he can remember it for potential future requests.

Mahesh S
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.
October 26, 2016

cool!

0 votes
Deleted user October 25, 2016

Ovidiu,

Not sure why you need this, so a solution is hard to recommend - you know you can create your own "Linked Issues" label/type yes?

But if you just want some static text, Nic's suggestion is spot on.

Ovidiu Vasilescu October 25, 2016

To be honest, no, I don't know that. Can I actually create multiple custom fields with the Linked Issues functionality and name them differently? Because I can't find this.

 

My client asked for a "Linked Issues" type for each (such as: "Linked Props" / "Linked Characters" etc.). As far as I know, this isn't possible but maybe I'm just completely blind.

 

So the workaround I thought about was just to add a warning on top of HIS create screen saying "Please remember to link all Characters / Props / etc." preferably in red color (yellow background, comic sans etc, just to burn people's retinas).

Deleted user October 25, 2016

Suggest an answer

Log in or Sign up to answer