Feature #31559

Support "active" attribute in Enumerations REST API

Added by Michel Albert 4 months ago. Updated 4 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:REST API
Target version:4.1.0
Resolution:Fixed

Description

Expected behaviour

When doing a HTTP request to /enumerations/time_entry_activities.json it should only return activities marked as "active"

Observed behaviour

  • All activities are returned
  • Additionally, the returned values don't contain the values for the "active" field, so filtering on the client-side after fetching is not possible either.

Additional notes

  • This was observed on Redmine 3.3.2
  • I also came across #8573 which notes something similar, but not for the API.

31559.patch Magnifier (2.5 KB) Go MAEDA, 2019-06-29 11:15

Associated revisions

Revision 18325
Added by Go MAEDA 4 months ago

Support "active" attribute in Enumerations REST API (#31559).

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA 4 months ago

Michel Albert wrote:

Expected behaviour

When doing a HTTP request to /enumerations/time_entry_activities.json it should only return activities marked as "active"

I think it is better to add "active" field to the response instead of omitting inactive enumerations. What do you think?

#2 Updated by Michel Albert 4 months ago

Yes. That would work perfectly as well.

#3 Updated by Go MAEDA 4 months ago

  • File 31559.patchMagnifier added
  • Tracker changed from Defect to Feature
  • Subject changed from The API on enumerations returns inactive entries as well to Support "active" attribute in Enumerations REST API
  • Target version set to 4.1.0

Here is a patch to add "active" attribute to Enumerations API.

#4 Updated by Go MAEDA 4 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

Also available in: Atom PDF