javamagnoliapulse

How to add a custom column in Tasks section on Pulse in Magnolia


Good morning, i am a fairly new person at Magnolia and i have the need to improve a web by showing more data at the Task section of Pulse in Magnolia, to be able to do that i need to create a couple of columns but after trying to find some information at Magnolia documentation y have only been able to find this "Add custom column to Inbox", but unfortunately is outdated and the Inbox class that makes reference is not used anymore in the newers versions of Magnolia.

Could somebody help me and explain to me how to create these columns at the Tasks section of Pulse in Magnolia?, or point me in the rigth direction?.

Im using the Magnolia version 5.3 with a Maven setup, thanks in advance for the help.


Solution

  • If you want to add additional column to pulse tasks, you should be dealing with java code unfortunately.

    Have a look at info.magnolia.ui.admincentral.shellapp.pulse.task.TasksListViewImpl#constructTable and there you will see the following:

        table.addGeneratedColumn(NEW_PROPERTY_ID, new PulseNewItemColumnGenerator());
        table.setColumnWidth(NEW_PROPERTY_ID, 100);
        table.addGeneratedColumn(TASK_PROPERTY_ID, new TaskSubjectColumnGenerator());
        table.setColumnWidth(TASK_PROPERTY_ID, 220);
        table.addGeneratedColumn(STATUS_PROPERTY_ID, new TaskStatusColumnGenerator());
        table.setColumnWidth(STATUS_PROPERTY_ID, 80);
        table.addGeneratedColumn(SENT_TO_PROPERTY_ID, new SentToColumnGenerator());
        table.setColumnWidth(SENT_TO_PROPERTY_ID, 100);
        table.addGeneratedColumn(LAST_CHANGE_PROPERTY_ID, new DateColumnFormatter(null));
        table.setColumnWidth(LAST_CHANGE_PROPERTY_ID, 140);
    

    Just adjust it to your needs.

    Cheers,