Targetprocess

The Targetprocess Developer Hub

Welcome to the Targetprocess developer hub. Here you'll find comprehensive guides and documentation to help you start working with Targetprocess as quickly as possible and support you if you get stuck. Let's jump right in!

Docs
Ask A Question

Questions

Missing documentation: What does the custom unit parameter "segments" do?

Posted by Christian Peters 3 months ago

Hi!

I want to add a custom variant of the name field to my cards.
I figured out I had to add segments: 1 to the config so that it behaves like the other name fields.

Can you explain the concept of segments?

Also I had to hack the class ' tau-board-unit_format_max' into the classId field so I can add my variant to a M sized card. This is my config:

            id: 'name_unobtrusive',
            classId: 'tau-board-unit_type_name-unobtrusive tau-board-unit_format_max',
            name: 'Name (unobtrusive)',
            types: [ types.STORY, types.TASK, types.BUG, types.REQUEST ],
            sizes: [ sizes.XS, sizes.S, sizes.M, sizes.L, sizes.XL, sizes.List ],
            template: {
                markup:[
              '<% if(this.data.name) { %>',
                '<div class="tau-board-unit__value">',
                    '<%= this.data.name %>',
                '</div>',
              '<% } %>'
            ]},
            model: 'name:Name',
            sampleData: { name: 'Kunden, Callcenter-Agenten und Admins drucken Rechnungen' },
            segments: 1

Thanks!
Christian

Loading comments...