It's all about the answers!

Ask a question

JS Approvals


Tomislav Klisanic (736) | asked Jan 13 '14, 9:17 a.m.
edited Jan 13 '14, 9:21 a.m. by Krzysztof Kaźmierczyk (7.5k480103)
 Is it possible to get approval or approver from JS? 

Accepted answer


permanent link
Ralph Schoon (63.3k33646) | answered Jan 13 '14, 10:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No.  Assuming JS means JavaScript. See https://jazz.net/library/article/1093 Lab 5 the first sections for what you can access and with JavaScript and what you can't.
Tomislav Klisanic selected this answer as the correct answer

Comments
Tomislav Klisanic commented Jan 13 '14, 10:09 a.m. | edited Jan 13 '14, 10:09 a.m.

Thought so :(  Tnx


Ralph Schoon commented Jan 13 '14, 10:11 a.m. | edited Jan 13 '14, 10:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Ralph Schoon commented Jan 13 '14, 10:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Thinking again, approvals are not attribute based, so you will probably have no luck with a value provider and will have to use other techniques like this: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/


Tomislav Klisanic commented Jan 13 '14, 10:45 a.m. | edited Jan 13 '14, 10:46 a.m.

 I was looking to set read only on certain fields if work item is approved.

I created a test script to see if it would work but I can't get to the approval from the workItem inside javascript function.


Ralph Schoon commented Jan 13 '14, 10:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have not tried that. You could try if you can implement a condition in Java similar to https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/  and if that works for you. I tried this approach and it worked for me for roles, which you can also not access in JavaScript.


Tomislav Klisanic commented Jan 13 '14, 10:54 a.m.

 Will try that. Hope it will work.

showing 5 of 6 show 1 more comments

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.