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

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

1 vote

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.

Thanks Nic, I'll give this a shot.

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

1 vote
Mahesh S Community Champion Oct 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 Community Champion Oct 25, 2016

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

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.

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 Community Champion Oct 26, 2016

cool!

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.

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).

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,239 views 14 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot