Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


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
Community Members
Community Events
Community Groups

Fields listed in sub-task but not task

I have several projects that use issue collectors through the API. Everything is working on all but one project. This project has a sub-task issue type...when getting all the fields everything is listed; however; the task issue type doesn't list 2 of them through the of them is the system environment field. All fields are showing on the screen and field list for each issue type and all other projects are using the Task issue type without a problem, all data is coming over. It's just the one project that has a sub-task type. I can't force issue creation through the sub-task only the task type and will not let me set those two fields in the system.

They all show up on the screen and I can do a manual input through the JIRA software portal but the API will not let me set it with this one project.

The defualt type is set to Task but 2 of the fields just won't come over or let me set them. Is there something about sub-tasks that is causing the problem or a setting i'm missing? All the other projects that use those fields and the Task issue type work fine without a problem it's just the one project. These projects were set up before I started so not sure if it's just a setting i'm not seeing.

1 answer

0 votes

It sounds like your fields are not configured to appear on screen for the sub-task, or they are hidden in the field configuration for the sub-task type.

I thought that too but they are appearing on screen for both the sub-task and task types and they aren't showing as hidden in the fields list.

If they are appearing on screen, then that's the problem solved.

This is through the API though, the problem isn't solved. The fields aren't coming over or being set but exist and showing in the Task type. It works for every other project just not the one with the Sub-task type.

Ok, so when you create a sub-task in the UI, are you asked for these fields?

Is it possible to create a test one, make sure the fields are filled in, and then look at it again "over the API"?

Sorry...yes in the UI in JIRA I can manually create both a Task and Sub-Task and everything is there; however, in the API there are 2 fields in the Sub-Task that aren't there in Task. One of them is the sytem field Envirnoment. There is a GET and POST (set) through the API. GET retreives all the fields in a project's type so I can generate the HTML form. The POST takes that data and sends it back through the API to set it in the project. Every other project we have works like a charm. Most have the Task type which retrieves and sets the data without a problem. All using the same API. For some resaon this one project which is the only one that has Task and Sub-task doesn't want to retreive all the fields associated with the Task type but works fine with the Sub-task. I've also rebuilt all of JIRA thinking maybe it's just not indexed but that didn't solve the problem. Not sure if there is something special with Sub-task type that block or prevent all the fields from being read/written in the Task type. I've looked at all the projects, tasks, fields and there is no difference I'm seeing that would cause this problem but I could be missing some subtle or hidden setting.

Could you do a simple test for us?  Create two issues, a Task and a sub-task, in the project you're having a problem with.  In both of them, put something into the fields that you've got the problem with.

When you view these issues over the API, do you see the content of the fields you entered?

No I don't see it, the 2 fields for Task type don't come over; system field Environment and a Notes field. Which doesn't let me create the HTML input fields. However, adding them in manually and sending data back to JIRA those fields do not get set even though the data is being sent.

The sub-task doesn't work because it needs the parent attribute but no matter how i try to format it, doesn't want to work through an AJAX call.

Again, the Task type itself works with those 2 fields in every other project we use and if I manually create an issue in JIRA it works fine; it's just this one project that has a sub-task i'm having problems with. It has to be some kind of a setting or something in JIRA that i'm just not seeing.

A workaround for the time being is I'm taking the data from those 2 fields and putting it in the description (which isn't ideal), so there isn't anything wrong with the data or API.

Ok, so the fields do not exist on the "issue view" screen.  You'll need to add them to it.

They do exist in the issue view screen, everything is set up correctly and like all the other projects. I'm just not sure why they refuse to get or set through the AJAX call.

Even though the fields are there, this uses an AJAX call to the JIRA API and doesn't use any screen or the issue collectors. All other projects and fields work as expected just not in this one project. It is possibly something in JIRA not set up correctly for this project that has sub-task type too; however, i can't seem to find the setting.

The Jira REST API respects the configuration, so it must be something you have configured.  So my question remains - do you see those fields on the issue view when you try the two tests I suggested?

the answer remains the same. There is some kind of problem between AJAX and JIRA but can't seem to find the answer

I am with you here.  The Jira UI and REST interface will be telling you about the fields, so it has to be what the AJAX is doing somewhere.  

I've never tried to use AJAX to do this, I'm quite a low-level coder - I kick Jira with a call like "show me the whole issue" and it does, then I have to think about what I asked for, but I'm talking simple curl, wget, or other raw "ask a question" code that I've usually nicked from someone else.

The short story here for me is that I do not know what your AJAX is a) doing or b) dropping from the response

I think you are right in that we need to try to find someone who understands the AJAX calls better than we do.  I'll ask our developers

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events