Hide project specific select field in project when there are no values defined

Issue #24 wontfix
Michael Wenig created an issue

The company I am currently working for bought the project specific select fields plugin.

I added two fields to the jira instance and to the create issue screen.

Only some of the projects use these additional fields so many projects will leave the select fields empty without values.

Unfortunately the fields are displayed on the screens even if there is no possibility to slect anything. The fields should not display if there are no values to select.

Additionally it would be great if each project could decide for its own if a value is required or not

Comments (6)

  1. Holger Schimanski repo owner

    There are several possibilities to limit a custom field to a certain set of projects in JIRA.

    One typical thing is to use Field Configurations where you can hide fields.

    Another option is to create a Context for the custom field, which just contains the projects, which should have the custom field instead of a global context (which is created by default).

    These are the standard ways to hide custom fields for certain projects. Project Specific Select Field supports both concept. I am not planning to implement another approach (like when no option values are defined).

    Can you please check these two options?

    Cheers, Holger

  2. Michael Wenig reporter

    Thanks for these possibilities.

    We have already checked the use of Field Configuration but skipped for this UseCase as they are too global which leads to massive maintenance problems (as we would need to create a separate scheme for every possible combination and keep in sync for the other types).

    I have to check the possibility with different Contexts in detail. As far as I know the Context is defined by an admin - a project cannot define the context it wants to be in? Additionally this would mean an additional configuration step - an automatism would be more comfortable?

    Regards

    Michael

  3. Holger Schimanski repo owner

    Creation of a custom field context requires a re-index. Therefore I decided not to expose creating a context to project admins. But I could think about make creation of custom field context available via API for JIRA admins to make it scriptable.

    Would this help?

    Cheers, Holger

  4. Michael Wenig reporter

    Creation of a custom field context requires a re-index. Therefore I decided not to expose creating a context to project admins. But I could think about make creation of custom field context available via API for JIRA admins to make it scriptable.

    Would this help?

    That would at least open the door for a workaround (and move the definition of values out of Jira to our external management-app). The main problem with this approach is (and the reason why I would move the complete management to the external app) is that there would be two places to keep in sync: * the options in the field * the availability in the context (available = options.size > 0)

    Is it technically a problem to auto-Hide the field if no options are defined at all? I could also think of projects which had options in the past (which should stay displayed in old issues) but do not need them currently so they deactivate all options. Auto-Hide would be the natural choice in my eyes and wouldn't need any extra configuration (neither via API nor on manual use).

    Regards Michael

  5. Holger Schimanski repo owner

    Sorry, there is no possibility in JIRAs API / custom field concept to hide a custom field based on its content or list options.

    You need to go this custom field contexts or field configurations to do so.

    Best regards, Holger

  6. Michael Wenig reporter

    Ok - thanks for clarification.

    In this case an api access to create/modify the context would be great - then we could make a workaround via our administration-app. When could this be available?

    Thanks

    Michael

    We wil check if we are able to build a workaround.

  7. Log in to comment