Field api/projects Returning Erroneous is_active Value

There was an interesting question. /api/projects call returns a field named is_active with a value of true/false. This indicates which project is currently active in the given UI session. This could be easily mistaken as project status.

Q.  /api/projects call returns is_active, a value of true/false.  But it is not reporting correctly. Please see the images below.

In UI, every project is “Active”:

6a019b00bdedf0970b01b8d148b533970c

With /api/projects, is_active is false, which is wrong:

6a019b00bdedf0970b01b8d148b5c9970c

When I check the same project via the /api/project call, is_active field is not available. However, the status field shows active, which is correct.

6a019b00bdedf0970b01b8d148b609970c.png

A. Actually, there is a confusion here. is_active that /api/projects returns is not corresponding to “status” of a project in the UI. It indicates if the given project is currently active in the UI. In the UI session, you can have only one active project at a given time. Field remembers the last active project when you logout.

If you would like to check the status of project, you will need to check the “status” field that /api/project returns.

Another example that a better documentation is needed.

Mikako

Leave a comment