Forums

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

Populate summary field with project key field

GRF66 October 8, 2018

Using JIRA, I want to assign to the Summary field a value containing the project key.

Is it possible?

hanks in advance

1 answer

1 accepted

2 votes
Answer accepted
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.
October 8, 2018

You'll need some code to set it as a post-function, or some javascript hack or behaviour if you want to pre-populate it in the create screen.

However, it is utterly pointless.  The project key is in the issue's key already, and duplicating it in the summary just wastes space.

GRF66 October 8, 2018

Thanks for your reply Nic.

It's true that the project key is in the issue's key already, vut I have to group in the Summary value, different fields, including isproject sue key or even better the project key.

The following script,stored  in the Summary field description, works but it stores a fixed value in the summary field.

<script type="text/javascript">
if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = "your default";
}
</script>

Is there a place where I can store a more complex script?

Thanks.

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.
October 8, 2018

Seems like a poor requirement "group by summary value" - why aren't you using something that can sort by key?

No, there's no other place to put scripts (and I'd strongly recommend you don't do this with js hacks either).  You'll need something like ScriptRunner to inject something more stable.

Suggest an answer

Log in or Sign up to answer