Discussion

Ask a Question
ANSWERED

Manage mashup run order

Hi, I saw the example https://dev.targetprocess.com/v1.0/docs/add-controls-1#section-example-add-submenu-to-the-main-menu In this example submenu items are added in the same mashup, where submenu is created. But I need to add elements in submenu in other mahups. Question: is it possible and how guarantee that other mashups, which add items in submenu run after the mashup that creates the submenu.
ANSWERED

Python script Skeleton to extract project information

Hello TP Devs, I'd need to use a python script to extract info from all "In flight" projects, processed them one by one to evaluate latest status update then update a DB where we'll have some dashboards graphed using grafana. Just wondering if you guys have a sort of template or skeleton script available to take it from there... haven't found anything useful on below links. - https://github.com/TargetProcess/RestAPISamples - https://dev.targetprocess.com/reference#generals-post (only C# examples) Thanks for any help.
ANSWERED

Update pass/fail of test steps in test case runs

Does the v1 api support updating pass/fail status of individual test steps in a testcase run? Something like a post to /api/v1/TestCaseRuns/[RunId]/TestSteps/[StepId] with {Status: "Passed"}?
ANSWERED

Mashup to display warnings on entities which are linked to an Sprint that doesn't have Velocity value set.

Hi TP Development team, We are developing a Mashup in TP which can displays a warning message on top of entities and after Sprint field for those entities which are assigned to sprints without velocity value set. The above goal has been achieved with the below code, however we would like to add a listener to re-validate these warnings when user removes or select a different Sprint on Entity, how can this be achieved? The code is as below: [[ tau.mashups .addDependency('tp/general/view') .addDependency('jQuery') .addMashup(function(view) { view.onRender(function($pageElement, context) { var sprintName = ""; var velocityValue = ""; var isCurrentSprint = false; var controlMessage = ''; var APIEntity = ''; if($.inArray(context.entity.type, ['userstory', 'task', 'bug']) >= 0 ){ switch(context.entity.type) { case 'userstory': APIEntity = 'UserStories'; break; case 'task': APIEntity = 'Tasks'; break; case 'bug': APIEntity = 'Bugs'; break; } //FULL API URL: https://ppbtest.tpondemand.com/api/v1/TeamIterations?where=(Id%20eq%2015437)&include=[Id,Name,StartDate,EndDate,IsCurrent,Velocity]&format=json //Bellow taken from https://dev.targetprocess.com/docs/response-formats var URLAPIEntity = "/api/v1/"+ APIEntity + "?where=(Id%20eq%20"+ context.entity.id + ")&include=[TeamIteration]&format=json"; console.log(URLAPIEntity); $.getJSON(URLAPIEntity, entityObjet); function entityObjet(dataEntity) { console.log(dataEntity); var teamiteration = null; for (i = 0; i < dataEntity.Items.length; i++) { //debugger; teamiteration = dataEntity.Items[i].TeamIteration; } if(teamiteration !== null){ var URLAPITeamiteration = "/api/v1/TeamIterations?where=(Id%20eq%20"+ teamiteration.Id + ")&include=[Id,Name,StartDate,EndDate,IsCurrent,IsNext,Velocity]&format=json"; console.log(URLAPITeamiteration); $.getJSON(URLAPITeamiteration, sprintObjet); function sprintObjet(data) { console.log(data); for (i = 0; i < data.Items.length; i++) { isCurrentSprint = data.Items[i].IsCurrent; isNextSprint = data.Items[i].IsNext; velocityValue = data.Items[i].Velocity; sprintName = data.Items[i].Name; } if((isCurrentSprint || isNextSprint) && velocityValue === 0){ if(isNextSprint){ controlMessage = 'Velocity Value has not been set on future Sprint "' + sprintName + '".'; }else{ controlMessage = 'Velocity Value has not been set on current Sprint "' + sprintName + '".'; } var newBlockTitle = 'Has sprint started? ' + isCurrentSprint; var newBlockContent = 'Velocity Value' + velocityValue; var newBlockContainer= getHTMLVelocityControlText(controlMessage); //Add validation message right below after Velocity Field var $insertAfterBlockSpan = $pageElement.find('.ui-label:contains("Sprint")'); var $insertAfterBlockContainer = $insertAfterBlockSpan.closest('.ui-additionalinfo_editable_true'); //Add Popup message right after Body tag to display message on the header. $("body").prepend(getHTMLHeaderMessage("No Velocity on Sprint", controlMessage)); if ($insertAfterBlockContainer.length) { // do something if proper place is found $insertAfterBlockContainer.after(newBlockContainer); } } }//End function sprintObjet(data) } }//End function Calling Entity API to get Sprint ID entityObjet(data) } }); }); function getHTMLVelocityControlText(controlMessage){ var HTMLVelocityControlText = '<tr class="ui-additionalinfo_editable_true">'+ '<td class="ui-additionalinfo__label" colspan = "2">' + //<div class="tau-container tau-system-message-body"><div class="tau-system-message-body__content"><div class="tau-system-message-body-inner"><div data-reactroot=""><div class="tau-system-message__title i-role-message-title"><div class="tau-message-error">Data layer exception occurred.</div></div></div></div></div><div class="tau-system-message-body__button" style="display: none;"><button type="button" class="tau-btn i-role-message-button"></button></div></div><div class="ui-label-container"><span class="ui-label " data-title="Sprint">Sprint</span></div></td> '<div class="tau-system-message-body">' + '<div class="tau-system-message-body__content">' + '<div class="tau-system-message-body-inner">' + '<div data-reactroot="">' + '<div class="tau-system-message__title i-role-message-title">' + '<div class="tau-message-error">'+ controlMessage +'</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '<div class="tau-system-message-body__button" style="display: none;">' + '<button type="button" class="tau-btn i-role-message-button"></button>' + '</div>' + '</div>' + '</td>'+ '</tr>'; return HTMLVelocityControlText; } function getHTMLHeaderMessage(header, controlMessage){ var HTMLHeaderMessage = '<div class="tau-system-message tau-message-error" style="display: true;" id="tau-system-message_notifyBar">' + '<div class="tau-system-message-body">' + '<div class="tau-system-message-body__content">' + '<div class="tau-system-message__title">' + header + '</div> ' + '<div class="tau-system-message__details">' + controlMessage + //'<a class="tau-entity-name i-role-card-view" href="#page=task/15486&amp;appConfig=eyJhY2lkIjoiOEIzQkQ3M0Q5NTlDMEE5MTY3QTlBMDYwMzlFODBBRDEifQ==">Anotherone</a> was added. ' + '</div>' + '</div>' + '<div class="tau-system-message-body__button" style="display: none;">' + '<button type="button" class="tau-btn i-role-message-button">' + '</button>' + '</div>' + '</div>' + '</div>'; return HTMLHeaderMessage; } ]]
ANSWERED

Filter rest API request based on a Multiple Selection List custom field

Hello, I would like to filter a REST API request by a Multiple Selection List custom field, but I can't find how. More specifically, I would like to get a list of bugs, but only those who have a specific value selected in a multiple selection list. Could you help me ?
ANSWERED

What is the best way to update just one field of an entity via REST API

Hi! What's the best way to update the state ONLY? Should I read entire object of specific type (bug/userstory/etc), change one field (e.g. EntityState) and PUT it back? Or, there is a more lightweight way to do that without reading and writing the entire object?
ANSWERED

Mashup

Is there a way to apply one mashup for several users or all users with certain role?
ANSWERED

Comments word break not working on v3.11.2

Hi, I just updated my production server from 3.10.9 to 3.11.2 and observed that the comments word break not working. When I checked with TP Support, they said it's a known issue identified in 3.11.1 and fixes will be available on 3.11.4. When I inspect this issue, I observed that this is a very small css change in page.board.views.core.css. We have to use "break-word" instead of "break-all" in .ui-comment-text { word-break:break-all }. Is there any way to make this available on my Prod as early as possible, because many users keep on reporting this.
ANSWERED

Automatically Assign User to a Bug

I know how to assign users to entities using the webhooks, but is there a way to get the people who are assigned to a userstory and assign them to a bug whenever it is created for that userstory? Also, I think it's a bug but if you click post question here without having a field filled out, it erases all of the fields.
ANSWERED

Hide Teams for Specific Project Members or Roles

Hi, I have three teams inside a Project, and this Project has Project Members that aren't inside those teams (just inside the Project). Due I want that some Project Members are able to create a card and assigned it to just ONE Team (not all three), I would like to know if there is a way to "hide" some teams for an specific Project Members (User) or Role. Thanks!