Top Menu

Jump to content
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    Home
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      OpenProject ID Google

Side Menu

Collapse project menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums
Expand project menu

Content

General discussion
  1. OpenProject
  2. Forums
  3. General discussion
  4. Edit custom field List via API

Edit custom field List via API

Added by Danilo Petrone over 6 years ago

Hi,

I'm trying to edit the content of a custom field via API. The custom field is a List, so I try to change it to one of the possible values of the list.

/api/v3/work_packages/13511?notify=false

body:

{   
"lockVersion": 2,
"customField30": {
           "href": "/api/v3/string_objects?value=LOGISTICS"
       }        
}

As a result I get the same custom field value.

When a custom field is just text, I'm able to patch it.


Replies (4)

RE: Edit custom field List via API - Added by Danilo Petrone over 6 years ago

Hi All,

any suggestion?

RE: RE: Edit custom field List via API - Added by Zsombor Varga over 3 years ago

Hi!

Is there solution for this requirement?

Zsombor

RE: RE: Edit custom field List via API - Added by Jonathan SMITH over 3 years ago

From what I can see you need to pass the value as the following:

[href] => '/api/v3/custom_options/XXX' where XXX is replaced by the ID of the list item in your list

RE: Edit custom field List via API - Added by Zsombor Varga over 3 years ago

I've tried this on work packages, and it's working.

But not working for projects!
I've lit typed custom fields on projects.

Any idea?

  • (1 - 4/4)
Loading...