Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CARDS-1904 / CARDS-1937 #1199

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from
Draft

CARDS-1904 / CARDS-1937 #1199

wants to merge 7 commits into from

Conversation

sofi2002sofi
Copy link
Contributor

No description provided.

…nges to the source answer and updates the copied answer
…nges to the source answer and updates the copied answer

add checking out and checking in of forms before and after edditing
…nges to the source answer and updates the copied answer

remove unnecessary annotation
…nges to the source answer and updates the copied answer

avoide deeply nested if statements; simplify getQuestionNode method; add a check for the root node
…ges to the source answer and updates the copied answer

create the inner class that saves the value and path of the answer from which it was copied
…nt on change reference answers computed answers
…nt on change reference answers computed answers

changed the logic of searching dependent computed answers
* @return node of question to reference answer
* @throws RepositoryException if the form data could not be accessed
*/
private Node getQuestionNode(final Resource answer, final Session session, final ResourceResolver serviceResolver)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of all this method why can't we use questionnaireUtils since it's injected but never actually used in class?

questionnaireUtils.getQuestion(answer.getValueMap().get("question").toString())

* @param child node for which the parent form is sought
* @return string of path the parent form
*/
private String getParentFormPath(Resource child)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this method why can't we use formUtils.getForm(child.adaptTo(Node.class)).getPath() ?

* @param child node for which the parent form is sought
* @return node of the parent form
*/
private Node getParentFormNode(Node child) throws RepositoryException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, formUtils.getForm(child).getPath()

@marta- marta- added conflict There's a merge conflict to be resolved needs rebase labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflict There's a merge conflict to be resolved needs rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants