It's all about the answers!

Ask a question

DNG Desynchronising Name vs Primary text


Sean F (1.3k252162) | asked Jun 18 '18, 6:22 p.m.
edited Jun 18 '18, 6:32 p.m.
For any artifact the Primary Text (PT) attribute can be edited and any changes are reflected in the Name attribute (although the name only has the display value of the 1st paragraph of Primary Text)

It is possible to edit Name directly in which case the 2 attributes become 'desynchronised'

It is also possible to 'resychronise' them for any given artifact by editing Name to be blank (it will then take on the value of PT once again).

Is there any use case where desycnhroniing Name and Primary Text is desirable?

It is a bit of a guddle when the become desynchronised because a user accidentally edits the 'name' attribute directly when they should be editing the PT.

What is the purpose of these 2 attributes being desychronisable?

There does not seem to be any instances of it being done deliberately in any sample projects I have looked at.

If there is no use case for desynchronising them then would it be a good idea to make Name a 'read-only' attribute so it updates automatically from PT and is never directly editable?

If so then how could this be done as 'Name' does not appear as an 'attribute' in the project attribute list? There is an attribute called 'Title' which is a system attribute. Is 'Title' the same as "Name' ?

7 answers



permanent link
Pierre Bentkowski (131517) | answered Jun 19 '18, 2:56 p.m.
edited Jun 19 '18, 2:56 p.m.
Hello

You could use the OSLC API, that worked well for me.
But you could also use the Client extension capability RM Extension
to build an add-on in JavaScript.

   

permanent link
David Clark (2341352) | answered Jun 19 '18, 8:20 a.m.
edited Jun 19 '18, 8:21 a.m.

Sean, we ran into the same thing. Our desire was also to be able to filter on the Name attribute since the Full Text/Contents attribute was not available. This got addressed in 6.0.4 (maybe 6.0.3 I do not remember, but we jumped from 6.0.2 to 6.0.4).


DNG automatically copies the first 254 characters (or up to the first carriage return/line feed) from the Contents to the Name if the content of Name is erased or was never written to.

As for a use case, the ability to summarize a long bit of text or table into a short meaningful description is one such use case.  Other than that I cannot think of one. 

We had three different problems with this approach in DNG. 
First, filtering was not available on Contents. If we were looking for a specific word that occurred in an artifact but was beyond the 254 character limit the filter would not return the artifact (this was addressed in 6.0.4, we can now filter on Content).
Second, tracing. In a trace matrix within the tool (e.g. showing satisfied/by in a column) would show the Name attribute, not the Contents attribute. If the Name had been modified and not updated when the Contents was changed, then the trace matrix would show old information and be incorrect.
Third, people were editing the text from the main module view. This would sometimes modify the Name attribute - we still do not know why most likely user error, but then we would be in the position of not really knowing they were different. Something to watch out for.

Resolution: We wrote a Java Script to search through an entire module and erase the contents of Name, in order for DNG to then pick up the latest Contents.

Note on Filtering: 
In the Id picker to show columns there are three different fields: Name, Contents, and Primary Text. Primary Text and Contents appear to be the same thing. Name is still only the first 254 characters or <cr> whichever occurs first. 
The filter does NOT present Contents or Primary Text, instead calls it Full Text. A little discrepancy in the User Interface naming conventions.


permanent link
Pierre Bentkowski (131517) | answered Jun 19 '18, 1:05 p.m.
Sean,
If you want to re-synchronize the Name and the Content, 
but do not wish to develop a JavaScript, you could do the following.

1) Create a View (Module or Folder context) with only the Id and the Name.
2) Export the view (Export view ...) as a CSV

3) Open the CSV file, and remove the bottom METADATA lines and the data in the Name column
Example:
From
id,Name,isHeading,parentBinding,module,Artifact Type
736,SomeText,"","",735,Use Case Requirement
737,SomeName,"","",735,Use Case Requirement
To
id,Name,isHeading,parentBinding,module,Artifact Type
736,,"","",735,Use Case Requirement
737,,"","",735,Use Case Requirement

4) Import Artifacts
use those setting when doing the import.
Import requirements from a CSV file or spreadsheet
Update artifacts that match entries, and ignore new entries
 The Name entries will be erase and DNG will use the Content by default.

Hope it help

permanent link
Sean F (1.3k252162) | answered Jun 19 '18, 2:48 p.m.

Thanks for the detailed description David and the filtering tips.

To run a Javascript you need to use the OSLC API I think?

There is the OSLC workshop but I have only had limited success getting it to work through the Firefox REST client. Can you tell me how you are running your Javascript?

Thanks for the CSV tip Pierre. Good idea.



permanent link
Sean F (1.3k252162) | answered Jun 19 '18, 3:08 p.m.
^Thanks Pierre.

I was only able to run basic GET queries with OSLC through REST Client.

I could not get the CreationFactory to work.

I will give the RM Extension feature a go.

permanent link
Sean F (1.3k252162) | answered Jun 19 '18, 6:21 p.m.
^^The RM Extensions feature is very good. Thanks for the pointer Pierre.

Going back to the Name vs Primary text discussion, I notice that when you 'duplicate' an artifact the new artifact has the same 'primary text' as the original but the 'name' is pre-fixed with 'Copy of ' so then it is different and therefore de-synchronised.

Just another thing to be aware of with the behaviour around this feature.



permanent link
Sean F (1.3k252162) | answered Jun 22 '18, 5:39 p.m.
A simple solution for resynching by setting Name to blank would be if 'Name' was one of the attributes available on the 'Edit the attributes for X objects' option on the pencil menu when you select multiple objects.

Is there any way to get Name to appear on that list of attributes?

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.