You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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 API..one 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.
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.
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.
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