It's all about the answers!

Ask a question

Importing csv values into a custom attribute (drop down) in a RTC custom work item


0
1
Guru Prasad Rao K P (381813) | asked Oct 25 '18, 2:39 a.m.

 Hi,

  I have a requirement to populate a custom attribute drop down(enumeration list) with the values from an external csv (excel) file. I did some search & did not find any articles which talk about the solution for this requirement. 

Do I need to develop custom extension to address this requirement? (server side / client side). If so, can someone please share any steps /jazz articles which can help me to try this out. 

I am also practically exploring RTC extensibility workshop steps. 

Thanks in advance.
Guru.

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Oct 25 '18, 7:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 There is no feature to import enumeration literals into the process configuration. I have answered a very similar question recently and suggested to look into the HTTP filtered value set instead.

Guru Prasad Rao K P selected this answer as the correct answer

Comments
Guru Prasad Rao K P commented Oct 30 '18, 3:21 a.m.

  Hi Ralph,

   Thanks for pointing at the 'HTTP Filtered Value Set' Option. I followed the 2 articles (Jazz.net Workitem Customization article & https://rsjazz.wordpress.com/tag/http-filtered-value-set/) & was able to import csv values into custom attribute created in RTC.
Couple of more requirements here.
(i) Say there are 2 columns in my .csv ,'A' & 'B' ('B' is dependent on 'A'). Both the column values need to be imported into 2 Custom attributes in RTC. Whenever I select an entry from Attribute 'A', automatically the entry in Attribute'B' need to be selected..I guess the 'Dependent Enumerations' option available in 'Attribute Customization' allows to establish the dependency only between the Custom enumerations defined manually in RTC Client. Any suggestion?
(ii) Also, is there a way to store the Attribute values ( the csv column values) which gets imported into RTC during runtime (while creating work item)? In my case, I will be having around 9k+ entries, loading such big dropdown value set is taking 7-8 mins in my RTC setup. 

Many thanks - Guru.


1
Ralph Schoon commented Oct 30 '18, 3:49 a.m. | edited Oct 30 '18, 3:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

i. Get your language right, you don't import anything, you can set an attribute value using a value provider. You can, as far as I am aware, only set one attribute at a time. Dependent enumerations is not available in this case as far as I know. What I have done in the past for a similar requirement was to combine the values and set only one attributes value, then use calculated value provider to split the data into two attributes.

ii. The latest versions of RTC should cache HTTP filtered value sets. For the very reason that the client has to load all the data (does not matter if it is an enumeration or http filtered value set) and that users are basically unable to really handle so many choices, value sets of that size should not be used. Nonetheless we have customers doing exactly that and, as far as I can tell, use http filtered value sets for it. This is also the reason why the caching has been added.


Guru Prasad Rao K P commented Nov 14 '18, 4:28 a.m.

 Hi Ralph,

    This stands complete now. I was able to refer the external values & establish the dependency using the HTTP filtered value set & Calculated Value Provider. 

I did a XML conversion (from .xls) & moved this file into the Jazz Server location. Only a concern is, this xls file gets updated once in a week, & I have a batch which converts this xls & copies the xml into server location. And I need to do a restart of the RTC server, so as to have the new values getting reflected. Any alternate/suggestions? 

Many thanks Again.
Guru.



1
Ralph Schoon commented Nov 14 '18, 5:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Guru,

1. You could try to republish the XML file and see what is happening. 
2. The XML file has nothing to do with the Jazz Server. 
3.  The XML file is published by the HTTP/Web/Application server and should make it available as soon as it is changed.
4. It would be possible to have your own HTTP/Web/Application server for these kinds of files e.g. to make a restart possible without affecting the Jazz servers and for security (read/write access control) to the disk. 

Guru Prasad Rao K P commented Nov 14 '18, 8:08 a.m.

 Yes Ralph. I used a tomcat server for referring this XML. As I said earlier, my XML normally has 5000+ nodes. Below are the observations.


a. Any changes to the XML doesn't require Tomcat to be restarted. Auto republished.

b. If I set 'HTTP Filtered Value Set Cache Enabled' = true in RTC Admin page, Attribute dropdown in RTC Web Work item page will not show the updated/new XML contents (since contents are cached) unless I restart the RTC server. If I set 'HTTP Filtered Value Set Cache Enabled' = false, then every time when I create a new work item (of my custom type), it takes constant time (for 9000 nodes, it took good amount of time) to load the values for the attribute. Not sure whether to enable the cache or disable.


Ralph Schoon commented Nov 14 '18, 8:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Guru,


ah, therefore the server restart.....

You need the cache to be enabled to get decent performance - this is not a problem of RTC, it is a problem with your data size and shape. I would expect the cache to detect a changed XML e.g. based on the publishing date. You should consider approaching IBM support an try to find out if there is something you could do to force a refresh. Create an enhancement request if needed.  


Ralph Schoon commented Nov 15 '18, 2:24 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 There is no feature to refresh the cache at the moment. So you would have to restart the server. Please create an enhancement request.


Guru Prasad Rao K P commented Nov 15 '18, 6:06 a.m.

 True Ralph. In my case, XML will be updated only once in a week (every Friday). I think I can setup the 'Cache Duration' for a weeks time, so RTC will refer to the XML after this timer (once every week). Looks like this will be better, than restarting the RTC server. Will continue using Tomcat for hosting XML. In the future if required, will raise a PMR for enhancement. 



showing 5 of 8 show 3 more comments

One other answer



permanent link
Ralph Schoon (63.1k33645) | answered Oct 25 '18, 4:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Have you

  1. Read the documentation on excel export/import?
  2. Tried to export a work item with a custom enumeration list attribute?
  3. Tried to import the export file?

What is the observation?

I would expect this to work out of the box. If not https://github.com/jazz-community/work-item-command-line should support this.


Comments
Guru Prasad Rao K P commented Oct 25 '18, 6:03 a.m.

 Thanks Ralph for the quick revert. I need to create a new work item/s manually & not through import. In my case, Work item(custom work item type) with a custom attribute (whoes enumeration values need to be populated from external excel sheet). 


I am actually not importing the work items, but I need to import the attribute drop down values from this sheet..I guess, you are referring about importing the work items through excel. But that is not the case here, Ralph.

In case you are referring to importing the attribute values only (through OOTB capability), can you please share any article that covers this? I am new to command-line, will go through the article you shared earlier.

Also, I am using RTC 6.0.6.

Thanks
Guru

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.