Hello Guys, Just wondering how could I create new option for origins. Such as WhatsApp/messenger etc. As much as I understood it's not as easy as - "add new origins" button but again requires programming. Can anyone give me advice or point me in right direction, so I could add this.
Keep in mind that you have to make these changes to the User Request Class to get what you want. Make sure when you create the Module you fill out the dependencies correctly.
After that, it should be a simple matter of adding the values with a very small amount of code is you won't have to touch the presentation part.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to make your own extension and add values in the XML datamodel.
- Check here for how to make your extension
- Check here for an exemple made by Vladimir Kunin to add currencies in contracts (which is the same as what you want to do : add values to an enum attribute)
Hope this helps,
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yep, you should keep values lowercase as they will be used in the DB.
The label displayed to the user should be done through a dictionary entry, like you did at the end of the XML.
Don't forget to add in your "module.xxx.php" file a dependancy to the module bringing the "Contract" class in the first place, otherwise you might have an error during compilation.
Guillaume
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Will this work? how should i proceed to compile it for a plugin or next steps i should take read the manual but i got more confused of what it requests.
Any help would be appreciated.
-Bananaman.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer, I'm still a bit stuck about creating package of all this do i need sql section as well, all of this is way too in depth for as simple thing as adding an drop down function. Please could anyone give me a bit of help.
-Sadbananaman
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Bananaman I can't reply to your private message; I think the email account linked to your SourceForge account/email address is unavailable for some reason.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Guys, Just wondering how could I create new option for origins. Such as WhatsApp/messenger etc. As much as I understood it's not as easy as - "add new origins" button but again requires programming. Can anyone give me advice or point me in right direction, so I could add this.
Thank you so much :)
Keep in mind that you have to make these changes to the User Request Class to get what you want. Make sure when you create the Module you fill out the dependencies correctly.
After that, it should be a simple matter of adding the values with a very small amount of code is you won't have to touch the presentation part.
Hello,
You need to make your own extension and add values in the XML datamodel.
- Check here for how to make your extension
- Check here for an exemple made by Vladimir Kunin to add currencies in contracts (which is the same as what you want to do : add values to an enum attribute)
Hope this helps,
Guillaume
Hello Guillaume thanks for response,
Will this work?
I'd recommend to write "whatsapp" in small characters for the value ID. It's not required, but more consistent.
Yep, you should keep values lowercase as they will be used in the DB.
The label displayed to the user should be done through a dictionary entry, like you did at the end of the XML.
Don't forget to add in your "module.xxx.php" file a dependancy to the module bringing the "Contract" class in the first place, otherwise you might have an error during compilation.
Guillaume
Hello again guys,
Will this work? how should i proceed to compile it for a plugin or next steps i should take read the manual but i got more confused of what it requests.
Any help would be appreciated.
-Bananaman.
Hello,
This seems ok.
About creating a module to host this XML, take a look here : Customizing iTop [iTop Documentation]
Thanks for your answer, I'm still a bit stuck about creating package of all this do i need sql section as well, all of this is way too in depth for as simple thing as adding an drop down function. Please could anyone give me a bit of help.
-Sadbananaman
Still need help with this. BUMP
I tried to convert currencies one provided earlier this is the error i get on compiling.
You don't need to generate an extension.xml file.
All needed files can be found in the wiki !
Here, you probably forgot to define the dependancies in your module's module.*.php file
2 files from my main folder. What am i missing? :/
Last edit: Bananaman 2021-10-15
BUMP
Compare to this example - https://github.com/jbostoen/iTop-custom-extensions/tree/master/web/extensions/jb-tweaks-request-mgmt-itil
Otherwise, feel free to get in touch :)
@Bananaman I can't reply to your private message; I think the email account linked to your SourceForge account/email address is unavailable for some reason.
Still need help with this plugin.