• 2
    • 2
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Dynamically, directly using REST API, I am not able to find all the fields which are there on the particular screen. For that I have to go to JIRA UI and using mouse over hover on the screen I have to find screen id and then I can use following REST request to find fields on that screen.

      http://example.com:8080/jira/rest/api/2/screens/

      {screenId}

      /availableFields

      But it is not feasible to get screen id in this way.

        1. jira_pic.PNG
          jira_pic.PNG
          26 kB
        2. Jira Add-on - Copy.rar
          12 kB

            [JRASERVER-40440] Screen ID is not available through any JIRA REST request

            Hari added a comment -

            Hey Guys,

            Any update on this? We are very much interested use REST API to get screenID.

             

            Hari added a comment - Hey Guys, Any update on this? We are very much interested use REST API to get screenID.  

            I've created a simple plugin that accomplishes this. You may build it from source or simple download the .obr file and install it via the Universal Plugin Manager.

            It doesn't do anything fancy – I offer it under no guarantee or warranty. Install at your own discretion. Pull Requests accepted.

            https://bitbucket.org/sfbehnke/field-screen-helper/src/master/

            Steven F Behnke added a comment - I've created a simple plugin that accomplishes this. You may build it from source or simple download the .obr file and install it via the Universal Plugin Manager. It doesn't do anything fancy – I offer it under no guarantee or warranty. Install at your own discretion. Pull Requests accepted. https://bitbucket.org/sfbehnke/field-screen-helper/src/master/

            Hey guys,

            I added this functionality into my plugin Extender for Jira

             

            Best regards
            AL

            Adam Labus added a comment - Hey guys, I added this functionality into my plugin Extender for Jira   Best regards AL

            Another request to be able to get screen id from REST API. 

            Reason is that so that we can add custom fields but this requires screen id (and tab id) values.

            mirek paszkowski added a comment - Another request to be able to get screen id from REST API.  Reason is that so that we can add custom fields but this requires screen id (and tab id) values.

            Looking for a way to compare screens/issue types across multiple Issue Type Screen Schemes. As noted, for a project we can get the issue types but cannot get the chain of:

            • Project Issue Type --> Project Issue Type Screen Scheme --> Screen Scheme (default, view, edit, create) 

            Tim Thompson added a comment - Looking for a way to compare screens/issue types across multiple Issue Type Screen Schemes. As noted, for a project we can get the issue types but cannot get the chain of: Project Issue Type --> Project Issue Type Screen Scheme --> Screen Scheme (default, view, edit, create) 

            Any update on this? This is a flaw in REST API and for JIRA cloud there is no work around.

            Volodymyr Krupach added a comment - Any update on this? This is a flaw in REST API and for JIRA cloud there is no work around.

            @Sachin: Many Thanks!

            Jens Piegsa added a comment - @Sachin: Many Thanks!

            Jira Add-on - Copy.rar
            PFA the zipped source code

            Sachin Gupta added a comment - Jira Add-on - Copy.rar PFA the zipped source code

            @Sachin: Would you consider to provide the source for the full plugin? Regards, Jens

            Jens Piegsa added a comment - @Sachin: Would you consider to provide the source for the full plugin? Regards, Jens

            Hi Sachin,

            Thanks for above code. I am sorry but could you please tell what is atlassian-plugin file? and where Can I find it?

            Thanks and regards,
            Pankaj

            Pankaj Pimple added a comment - Hi Sachin, Thanks for above code. I am sorry but could you please tell what is atlassian-plugin file? and where Can I find it? Thanks and regards, Pankaj

            Sachin Gupta added a comment - - edited

            I am also eagerly waiting for this REST API. Meanwhile I have written a custom code which works:

            package com.celigo.plugins.netsuiteJiraConnector.rest;

            import com.atlassian.plugins.rest.common.security.AnonymousAllowed;

            import javax.ws.rs.*;
            import javax.ws.rs.core.MediaType;
            import javax.ws.rs.core.Response;

            import java.util.Collection;
            import java.util.ArrayList;
            import com.google.gson.Gson;
            import java.lang.*;

            import com.atlassian.jira.component.ComponentAccessor;
            import com.atlassian.jira.issue.fields.screen.FieldScreenManager;
            import com.atlassian.jira.issue.fields.screen.FieldScreen;

            @Path("/list")
            public class jiraConnectorforNetSuite {

            @GET
            @Produces(

            {MediaType.APPLICATION_JSON}

            )

            public Response getMessage()

            { ArrayList<String> response = this.getFieldScreens(); return Response.ok(new Gson().toJson(response)).build(); }

            public static ArrayList<String> getFieldScreens() {
            FieldScreenManager customFieldScreenManager = getCustomFieldScreenManager();
            Collection<FieldScreen> screensList = customFieldScreenManager.getFieldScreens();
            ArrayList<String> ScreenIds = new ArrayList<String>();
            for (FieldScreen fieldScreen : screensList)

            { ScreenIds.add(java.lang.Long.toString(fieldScreen.getId())); }

            return ScreenIds;
            }

            private static FieldScreenManager getCustomFieldScreenManager()

            { FieldScreenManager fieldScreenManager = (new ComponentAccessor()).getFieldScreenManager(); return fieldScreenManager; }

            }

            And the configuration in atlassian-plugin file is like this:
            <rest name="Screens" i18n-name-key="rest-resource.name" key="rest-resource" path="/screens" version="1.0">
            <description key="rest-resource.description">Rest Resource Plugin to get Screens List</description>
            </rest>

            Sachin Gupta added a comment - - edited I am also eagerly waiting for this REST API. Meanwhile I have written a custom code which works: package com.celigo.plugins.netsuiteJiraConnector.rest; import com.atlassian.plugins.rest.common.security.AnonymousAllowed; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.Collection; import java.util.ArrayList; import com.google.gson.Gson; import java.lang.*; import com.atlassian.jira.component.ComponentAccessor; import com.atlassian.jira.issue.fields.screen.FieldScreenManager; import com.atlassian.jira.issue.fields.screen.FieldScreen; @Path("/list") public class jiraConnectorforNetSuite { @GET @Produces( {MediaType.APPLICATION_JSON} ) public Response getMessage() { ArrayList<String> response = this.getFieldScreens(); return Response.ok(new Gson().toJson(response)).build(); } public static ArrayList<String> getFieldScreens() { FieldScreenManager customFieldScreenManager = getCustomFieldScreenManager(); Collection<FieldScreen> screensList = customFieldScreenManager.getFieldScreens(); ArrayList<String> ScreenIds = new ArrayList<String>(); for (FieldScreen fieldScreen : screensList) { ScreenIds.add(java.lang.Long.toString(fieldScreen.getId())); } return ScreenIds; } private static FieldScreenManager getCustomFieldScreenManager() { FieldScreenManager fieldScreenManager = (new ComponentAccessor()).getFieldScreenManager(); return fieldScreenManager; } } And the configuration in atlassian-plugin file is like this: <rest name="Screens" i18n-name-key="rest-resource.name" key="rest-resource" path="/screens" version="1.0"> <description key="rest-resource.description">Rest Resource Plugin to get Screens List</description> </rest>

            L H added a comment -

            Why has this still not been resolved after a year and a half? The entire screen and field gathering part of the REST API is unusable without this.

            Please fix this ASAP as it blocks a lot of crucial functionality in the REST API.

            L H added a comment - Why has this still not been resolved after a year and a half? The entire screen and field gathering part of the REST API is unusable without this. Please fix this ASAP as it blocks a lot of crucial functionality in the REST API.

            It's impossible to assign a screen schema when creating a project.
            It's impossible to fetch a list of screens, or determine which screen schema is assigned to a project.

            This missing piece of functionality prevents me from writing the migration script I need to make the jump to Jira.

            Aaron Bauman added a comment - It's impossible to assign a screen schema when creating a project. It's impossible to fetch a list of screens, or determine which screen schema is assigned to a project. This missing piece of functionality prevents me from writing the migration script I need to make the jump to Jira.

            Trying to do integrations for JIRA and using custom fields to add metadata onto issues in JIRA is currently also impossible to do entirely via the REST API because after adding a custom field via the API, there doesn't seem to be any way to then add it to a screen that is associated with a JIRA issue as well. But how on earth is one expected to get the screen id?

            And a better question is: Why isn't this information on the actual issue itself when retrieving it from the REST API?

            Yi Liang Siew added a comment - Trying to do integrations for JIRA and using custom fields to add metadata onto issues in JIRA is currently also impossible to do entirely via the REST API because after adding a custom field via the API, there doesn't seem to be any way to then add it to a screen that is associated with a JIRA issue as well. But how on earth is one expected to get the screen id? And a better question is: Why isn't this information on the actual issue itself when retrieving it from the REST API?

            Yves YANG added a comment - - edited

            I agree. We have met this same problem with our AddOn for JIRA Cloud. Without this API, we aren't enable to check or correct if the screen/field is set correctly.

            This bug is blocking !

            Yves YANG added a comment - - edited I agree. We have met this same problem with our AddOn for JIRA Cloud. Without this API, we aren't enable to check or correct if the screen/field is set correctly. This bug is blocking !

            There should be some way to "navigate" results so we know what IDs to use for screens - tabs - fields via the JIRA REST API as it is currently laid out this is not possible.
            https://jirahost/jira/rest/api/2/screens/*10811*/tabs/*10913*/fields
            Thanks!

            Qualcomm Support added a comment - There should be some way to "navigate" results so we know what IDs to use for screens - tabs - fields via the JIRA REST API as it is currently laid out this is not possible. https://jirahost/jira/rest/api/2/screens/*10811*/tabs/*10913*/fields Thanks!

            MattS added a comment -

            It's a missing area of the REST API. Call it bug or suggestion, it's not documented and really annoying.

            MattS added a comment - It's a missing area of the REST API. Call it bug or suggestion, it's not documented and really annoying.

            Hi Jaime,

            I don't think so this is suggestion. This is a bug. You are providing us availableFields, tabs, fields of tabs etc using REST but you are not providing screenid without which we can not get all these things. It is something like you are service ice-cream with out a cup.

            Hiren Savalia added a comment - Hi Jaime, I don't think so this is suggestion. This is a bug. You are providing us availableFields, tabs, fields of tabs etc using REST but you are not providing screenid without which we can not get all these things. It is something like you are service ice-cream with out a cup.

            Hi hiren_880,

            Thank you for reporting this, I have changed the issue type to Suggestion as this is something that is something that our current REST Api (https://docs.atlassian.com/jira/REST/latest/) doesn't support, and we would need to include it.

            All the best,

            Jaime.

            Jose Jaime Sanchez (Inactive) added a comment - Hi hiren_880 , Thank you for reporting this, I have changed the issue type to Suggestion as this is something that is something that our current REST Api ( https://docs.atlassian.com/jira/REST/latest/ ) doesn't support, and we would need to include it. All the best, Jaime.

              Unassigned Unassigned
              ae8830d605c0 Hiren Savalia
              Votes:
              82 Vote for this issue
              Watchers:
              51 Start watching this issue

                Created:
                Updated: