Labels not showing in the Issues API

joe's Avatar


08 Mar, 2016 07:10 PM

I have tested in the bugify demo and in my own installation and both have the same results. If an issue is assigned labels and you look at the info via the API in xml format it doesn't show the labels for that issue even if the issue has labels, they are not showing.

  1. 1 Posted by Robert Kern on 09 Mar, 2016 08:00 AM

    Robert Kern's Avatar

    Hi Joe,

    Thanks for getting in touch.
    I'll take a look and will aim to fix the issue in the next release.



  2. 2 Posted by f.montanana on 14 Apr, 2016 09:43 AM

    f.montanana's Avatar

    I confirm the issue...
    Waiting for te next release :)

  3. 3 Posted by joe on 29 May, 2018 05:07 PM

    joe's Avatar

    This was an issue before Bugify was sold and bought by the new owners. Can someone from the new team say if this is an issue that will be fixed? Thanks.

  4. 4 Posted by richr on 04 Jun, 2018 02:00 PM

    richr's Avatar

    Hey Joe,
    curious - what version did you see this bug in ?

  5. 5 Posted by joe on 04 Jun, 2018 02:29 PM

    joe's Avatar

    Version 1.8.5.

    I have been unable to authenticate on the current bugify demo to test the API there to see if it is an issue in the current version but if this bug was never addressed then I would assume it is still present. In the XML format, which is what I use, the labels tag is there, but it is empty, regardless of the label values.

  6. 6 Posted by richr on 04 Jun, 2018 03:12 PM

    richr's Avatar

    HI Joe,
    understood. i see the "demo" website is running version 1.9.1 - so its prolly the new api.

    your right - you cant login to it.

    I did a diff between 1.8.5 and 1.9.1 some time ago changes basically removed all the license checking stuff and the new email pull feature. I think I saw some api changes but cant be sure - ill check my instance code and verify...

  7. 7 Posted by richr on 05 Jun, 2018 11:25 PM

    richr's Avatar

    Hi Joe,

    haven't been able to find label thing in the 1.9.1 code -- its "probably" not there..

    but I don't know - have never done any of the API stuff at all and (sorry to say) don't really know how to make the calls (haven't needed to - my users strictly use the web interface, no CRM)

    anyway - I have deployed an operational 1.9.1 instance on Azure you could do your API test with - if you wish.
    I already created a user with "owner" authority for you.

    if you like to test against it contact me at "richr" at "softhome" dot "net"

  8. 8 Posted by richr on 06 Jun, 2018 01:48 AM

    richr's Avatar

    Hi Joe,

    guess im not as stupid as I thought - figured how to do an api call to one specific issue in the test system (I setup), that I can see I have 2 labels flagged on.

    I pulled the data out as "txt" - and yep - the label array is blank.

    Now that I know how to replicate - I could fix that in my code base.
    PS. Looks like "categories" also comes back as "blank"

  9. 9 Posted by joe on 06 Jun, 2018 12:28 PM

    joe's Avatar

    Thanks for looking into this.

  10. 10 Posted by richr on 06 Jun, 2018 08:32 PM

    richr's Avatar

    hey dude, no prob.
    i did have doubt that maybe i missed something moving the 1.9.1 code changes into my heavily customized version (the copy i setup to test) - so i found and diffed both versions 1.8.5 & 1.9.1 - and yep - a hand of files - nothing concerning API or even "lables".

  11. 11 Posted by richr on 07 Jun, 2018 07:13 PM

    richr's Avatar get labels data out -- make this change
    updated to output the label arrary appropriately as compared with all the other output arrays

    in FILE:

       {code root dir}/library/Bugify/Issue.php

    About or Around the code LINE:


    Add the "else" lines shown near the bottom;
    Ie. Change the routine FROM:

            if (is_array($this->_labels) && count($this->_labels) > 0) {
                foreach ($this->_labels as $label) {
                    $data['labels'][] = $label->toArray();
            if (is_array($this->_labels) && count($this->_labels) > 0) {
                foreach ($this->_labels as $label) {
                    $data['labels'][] = $label->toArray();
            } else {                                          ⇐ add line
                foreach ($this->getLabels() as $label) {      ⇐ add line
                    $data['labels'][] = $label->toArray();    ⇐ add line
                }                                             ⇐ add line
  12. 12 Posted by richr on 14 Jun, 2018 02:28 AM

    richr's Avatar

    That should do it.

    BTW, you do get the labels array (without the code alteration above) - if you pull ALL the issues [ ie: /api/issues.{format} ], not just 1 [ ie: /api/issues/{issue#}.{format} ]

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac