Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How do I use the javascript API to get information from an artifact without it causing a history edit?

 

Been trying to figure it out for awhile, Still new to Jazz. Should I subscribe to the event? or is there a way to get the information in the artifacts without it? Still not sure if its the subscribing thats causing the issues or not.


To be more descriptive, Its an api using xml that searches Jazz for a specific term and creates links to it. The problem it has is that when it creates links to the artifact, it also sets it as modified in the history which is behavior I dont want happening. Im not sure if I can share the snippet of code, but what seems to happen is that subscribing to the event is whats causing the history to be modified rather then just referenced which is something Im not quite sure how to fix.

 

Thanks!

0 votes

Comments

Your question is rather vague. I suggest you reference which API (URL to page that describes it) you are talking about and give specific detailed examples of what you're trying and the results.

 I am specifically using xml, Thanks!



2 answers

Permanent link

 If you expect answers, I would suggest to provide reasonable questions and information. 

0 votes

Comments

Sorry, Ive tried to make it as specific as I can

All you have mentioned to date is a Javascript API and that you are using XML.

Presumably got some information about this API from a WIki page or other online reference. What is the URI of that Wiki page or online documentation page?

What Javascript classes/methods of the API are used?
Provide some sample code of what you have tried so far.

I think they might talk about this API: https://jazz.net/wiki/bin/view/Main/RMExtensionsMain but I am not sure since it seems to be too complicated to provide such information. 


Permanent link
The key is here:

"To be more descriptive, Its an api using xml that searches Jazz for a specific term and creates links to it. The problem it has is that when it creates links to the artifact, it also sets it as modified in the history which is behavior I dont want happening."

When you say you are creating links to the artefact, do you mean you're making an actual ELM link of some sort, or do you mean you're just working out a URL that points to the artefact? If the script is actually creating a link then it's modifying the artefact - so it's going to trigger an audit log entry

0 votes

Comments

Thank you! So if the code finds the term its looking for in the artifacts it creates a link and modifies the history which is wanted, but the problem is that when it doesnt find the term its looking for, it doesnt create a link, but still modifies the history and creates an audit log entry. So in order to avoid that, Im not sure if its the event subscription that causes the audit log entry, or if it is the .getattributes function that causes the entry. Im sorry if what Im saying doesnt really make sense, I wasnt involved in the development of this code, so Im not sure exactly what everything does yet.

The subscription wouldn't do it, and I've never seen getAttributes trigger an audit event either. We really need to see the code unfortunately.

There is an example widget in the IBM Samples that gets attributes from artefacts - you could load that up and confirm that an audit is not triggered, but I'm almost positive it doesn't - there must be something in the code elsewhere that does.

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 1,725

Question asked: Jun 29 '23, 6:11 a.m.

Question was seen: 1,977 times

Last updated: Jul 13 '23, 8:29 p.m.

Confirmation Cancel Confirm