Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,417
Community Members
 
Community Events
168
Community Groups

Only use existing Jira ids in the custom field.

Hello,

We use a Text type Single line custom field called 'Enter ID' in my Jira instance. So, users enter the jira ticket id here, which will be converted to a hyperlink after the ticket is created. So, if a user enters a non-existing jira id, the field accepts the value entered with no hyper link. Is it possible for the field to only accept existing Jira ids from the same project?

Note:  That we are using the scriptrunner plugin, which may be of assistance.

Please advise me on how to resolve this problem.

 

Thanks,

Siva.

4 answers

1 vote

@siva Could you please share your business case to support your implementation. I agreed with @Clark Everson that is some "strange Use Case" in some way. 

0 votes

I'd replace your field with issue links - they validate the issue exists at the other end and show information about it in the current issue. 

You don't need your issue picker type field, you're just making life complicated for yourself by (poorly) duplicating functionality that already exists.

I would say the advisability of using links vs. an issue picker depends on the purpose of the information and how it needs to be used.

The OP did mention wanting to restrict the Jira keys to issues in the same project which is not possible with out of the box generic Issue Linking functionality.

Yes, and I think you're absolutely right about the "issue picker" being limited to the same project. 

But, is is a limitation.  Issue links are the best option in every case, except when your project owners want to limit you to link to certain things like the current project.

I do not think we can opine without knowing all the details of the process or needs.  My instinct is that most people who think they need an "issue picker" just have not understood that issue links do it better.

0 votes

Is there a reason you are using a text field instead of a Issue Picker field?

@Trudy Claspill 

Thanks for your response; we've been using this text field for the past four years, so instead of creating a new field, we made changes to an existing one.

However, using an Issue Picker field is a good idea. Could you please show me how to configure this Issue Picker field in script runner? Please assist me with this because I am new to scripting.

 

Thanks,

Siva.

Hello Siva,

It is simply another type of custom field. Your Jira Administrator can make a custom field of type Issue Picker and add it to the Field Configuration and Screens for the project.

This page provides information on creating custom fields.

https://confluence.atlassian.com/adminjiraserver/adding-custom-fields-1047552713.html

If Issue Picker is not an available field type, you would need to add a third party app to get it. Here are two such apps, there may be others.

https://marketplace.atlassian.com/apps/1214561/issue-picker-custom-field-type-for-jira?tab=overview&hosting=datacenter

https://marketplace.atlassian.com/apps/6820/scriptrunner-for-jira?hosting=datacenter&tab=overview

0 votes
Clark Everson Community Leader Sep 21, 2022

Hi Siva,

 

While it maybe possible and hopefully someone with more experience answers in that regard, depending how quickly your instance is growing this would add a lot of system performance impact. If everytime a field needs to query for existing issues, then everytime that field has new data being input it's also querying the whole database. As a jira instance grows the negative side affects of this will be more visible. Users will see slower boards, slower load times or creating issues, more timeouts etc. So even if it is possible you would need to do a  lot of performance impact to find when that speed hits Jira and would impact your users. It maybe sooner than you think from experience!

 

Best,
Clark

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events