Develop with NRP
NRP provides an action to create what we call a Full-Package that can be used in any other plugin.
What is Full-Package?
A Full-Package is a full NRP items linked together:
PlanningItem
⮑ Assignment
⮑ Article
How can i create a Full-Package?
NRP uses Dashboard Actions to expose its function to create a Full-Package
In your plugin you can ask Dashboard to give you the action and utilise it in your plugin.
First thing you need to do is to require an action from your plugin so you can map it later in Plugin Mappings to the action from NRP.
Follow the steps in Require an Action.
After you register your required action you need to map the NRP action to your plugin in order to use it
example
In your plugin register function:
Map NRP action to your plugin
In Dashboard go to store and click on your plugin after you install it and then click on Mappings
From there you should see your required action:
By clicking on Select action, you should see all the available actions from all the installed plugins, including the NRP action.
By selecting the correct option and clicking on save, your plugin now has the create full package method, and it's ready to be used.
Make sure that you have NRP plugin installed and configured and active in your Dashboard so you can see the option in Select action
Use create full package in your plugin
After we registered the required action and mapped it to the correct on from NRP, we can use it in plugin
See how to utilise Dashboard actions in your plugin here
example
If the request went fine you should see the results from the action looks like:
Params tabel
Create full package action is a function returning a promise which resolves with the full package items info and rejects if something went wrong, and it accepts one argument type object with the following keys:
Key
Type
Required
Description
headline
String
x
Headline for all the package items: PlanningItem, Assignment and Article
startDate
String
x
Start date for all the package items in ISO format
assigneeInfo
Object
x
An object contains the assignee info: uuid and name to link it to the Assignment and the Article
Last updated